Eeb development -- use the internet to call the shell to compile a latex file?

Posted on 2006-03-25
Medium Priority
Last Modified: 2010-04-22

I have a webpage that displays a latex .tex file. I would like to be able to compile this latex .tex file online.

In order to compile a latex file via the shell one needs to type the following:

> latex onlinefile.tex

this will compile the file and produce two files:  onlinefile.ps and onlinefile.dvi. I would like to be able to compile the onlinefile.tex file by clicking a submit button on my webpage.

How can I achive this?


Question by:XPUSR
1 Comment
LVL 24

Accepted Solution

fridom earned 200 total points
ID: 16292743
Write a CGI script that does the job for you. Here's an example just using the some shell script. (Warning do not use it unmodified)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <title>Calling Latex</title>

    <h1>Calling Latex</h1>

    <form action="cgi/run_latex.cgi" method="post">
      <p> I will call run_latex a dummy </p>
      <input type="submit" value="Do it" />


the run_latex.cgi script:

echo "Content-type: text/html\n\n"
echo "<html>"
echo "  <body>"

echo "<p>I will pretend to call latex<p>"

echo "<p>latex some_file.tex</p>"
echo "</body> </html>"

Now instead of echo "<p> latex...." you call
latex some_file.tex
And then this file gets compiled.


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question