Today I started another topic of my project. Although the training is over now but the task regarding project is still pending. To design Graphics in LaTeX i need a script that run latex compiling commands from web browser and a php code that calls the script and last a .tex file to be compiled containing graphics code.
For the script that run latex commands do following:Got to terminal
$cd /var/www/
$sudo mkdir demo
$cat > script.bat
cd /var/www/demo
latex slide.tex
dvips slide -o
ps2pdf slide.ps
^z
Now to design the php code that runs the script:
Go to terminal again
$cd /var/www/demo
$sudo -s
#vi index.php
$command = "sh script.bat";
exec($command, $output=array());
?>
:wq!
#exit
Now give the permissions to whole demo folder so that script can create some other files during latex file compilation without any difficulty.
No comments:
Post a Comment