summaryrefslogtreecommitdiff
path: root/php/compileLatex.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2022-12-02 15:29:02 +0100
committerpolo <ordipolo@gmx.fr>2022-12-02 15:29:02 +0100
commit6b55446d12a5c39d5a4a4584bfabc7507c2f9b74 (patch)
tree8e2e337b93391225d5e702a553314164f6139d86 /php/compileLatex.php
parent473ee4ec50a6bfdfa5c145471b077b7e3749beeb (diff)
downloadAppliGestionPHP-6b55446d12a5c39d5a4a4584bfabc7507c2f9b74.zip
date<->timestamp, ===, renommage, latex
Diffstat (limited to 'php/compileLatex.php')
-rw-r--r--php/compileLatex.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/php/compileLatex.php b/php/compileLatex.php
deleted file mode 100644
index ccd9dab..0000000
--- a/php/compileLatex.php
+++ /dev/null
@@ -1,30 +0,0 @@
1<?php
2// compileLatex.php
3
4// contenu
5$codeLaTeX = '\documentclass{article}
6
7\usepackage[francais]{babel}
8\usepackage[utf8]{inputenc}
9\usepackage[T1]{fontenc}
10
11\begin{document}
12 Bravo, ça compile !!
13\end{document}';
14
15
16// ficher tex
17// regarder la doc, php-cli permettrait de manipuler les fichiers directement comme le bash
18$fichier = fopen("latex.tex", "w+");
19fputs($fichier, $codeLaTeX);
20fclose($fichier);
21
22// compilation
23exec('pdflatex latex.tex');
24
25// nettoyage
26unlink("latex.aux");
27unlink("latex.log");
28unlink("latex.tex");
29
30exec('xdg-open latex.pdf');