diff options
author | David A. Madore <david+git@madore.org> | 2013-03-07 20:41:00 +0100 |
---|---|---|
committer | David A. Madore <david+git@madore.org> | 2013-03-07 20:41:00 +0100 |
commit | aba0486092b9ccad03da4fb2a5394509ea13198c (patch) | |
tree | 9708db866ceefac13e88c821d40c0b6681a847e5 | |
parent | 52bdab0c0d5c13276f650f3c9a8bafc6fdae1ca8 (diff) | |
download | galois-aba0486092b9ccad03da4fb2a5394509ea13198c.tar.gz galois-aba0486092b9ccad03da4fb2a5394509ea13198c.tar.bz2 galois-aba0486092b9ccad03da4fb2a5394509ea13198c.zip |
Affichage du numéro de version Git si on compile avec --shell-escape
Affiche le numéro de commit et la date de celui-ci (sortie de
« git log --pretty=format:"%h %ai" -1 ») suivi du mot « (dirty) » si
des changements ont été faits par rapport à ce commit.
29 files changed, 59 insertions, 0 deletions
diff --git a/chapitres/AC.tex b/chapitres/AC.tex index 82f1311..9df985c 100644 --- a/chapitres/AC.tex +++ b/chapitres/AC.tex @@ -1390,6 +1390,7 @@ $A$ est connexe ssi $\Top(A)$ est connexe. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/AVD-Dedekind.tex b/chapitres/AVD-Dedekind.tex index 4ea0a35..f9dce47 100644 --- a/chapitres/AVD-Dedekind.tex +++ b/chapitres/AVD-Dedekind.tex @@ -1126,6 +1126,7 @@ Si $𝐐(ζ_n)\bo 𝐐$, le discriminant est $n^{φ(n)}/∏_{p|n} p^{φ(n)/(p-1) \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/Boole.tex b/chapitres/Boole.tex index 4f55b33..1021936 100644 --- a/chapitres/Boole.tex +++ b/chapitres/Boole.tex @@ -87,6 +87,7 @@ le composé $B↠B_{i'}\dessusdessous{f_{i'}}{→}C$. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/Cebotarev.tex b/chapitres/Cebotarev.tex index 3f1680c..91d8551 100644 --- a/chapitres/Cebotarev.tex +++ b/chapitres/Cebotarev.tex @@ -699,6 +699,7 @@ de Dirichlet sur les nombres premiers en progression arithmétique. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/Dedekind.tex b/chapitres/Dedekind.tex index 0148bb1..f855443 100644 --- a/chapitres/Dedekind.tex +++ b/chapitres/Dedekind.tex @@ -779,6 +779,7 @@ Utilise : \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/KASW.tex b/chapitres/KASW.tex index 1c5fc10..39b94f3 100644 --- a/chapitres/KASW.tex +++ b/chapitres/KASW.tex @@ -2346,6 +2346,7 @@ Voir aussi les articles de Witt, très bien écrits. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/RT.tex b/chapitres/RT.tex index 9c06ddd..ea4b452 100644 --- a/chapitres/RT.tex +++ b/chapitres/RT.tex @@ -448,6 +448,7 @@ Toute extension d'un corps \emph{parfait} est séparable. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/bases-groebner.tex b/chapitres/bases-groebner.tex index abc9642..d95937b 100644 --- a/chapitres/bases-groebner.tex +++ b/chapitres/bases-groebner.tex @@ -2556,6 +2556,7 @@ intéressant. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/brauer.tex b/chapitres/brauer.tex index f753fb8..0ea89e7 100644 --- a/chapitres/brauer.tex +++ b/chapitres/brauer.tex @@ -2235,6 +2235,7 @@ Norme spinorielle : cf. Jean Lannes. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/calculs-galois.tex b/chapitres/calculs-galois.tex index 351bf43..36fb35f 100644 --- a/chapitres/calculs-galois.tex +++ b/chapitres/calculs-galois.tex @@ -3663,6 +3663,7 @@ surprise. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/categories.tex b/chapitres/categories.tex index b9212a2..ec3d0de 100644 --- a/chapitres/categories.tex +++ b/chapitres/categories.tex @@ -3036,6 +3036,7 @@ l'unité de $\theta$ et aussi la réciproque de la coünité de $\xi$. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/cohomologie-groupes.tex b/chapitres/cohomologie-groupes.tex index 481ddb2..85868d7 100644 --- a/chapitres/cohomologie-groupes.tex +++ b/chapitres/cohomologie-groupes.tex @@ -718,6 +718,7 @@ caract\'{e}risque $0$. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/corps-finis.tex b/chapitres/corps-finis.tex index f38836b..161a904 100644 --- a/chapitres/corps-finis.tex +++ b/chapitres/corps-finis.tex @@ -3108,6 +3108,7 @@ C'est la fameuse \emph{loi de réciprocité quadratique}. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/correspondance-galois.tex b/chapitres/correspondance-galois.tex index 3ab4b4d..deb3c59 100644 --- a/chapitres/correspondance-galois.tex +++ b/chapitres/correspondance-galois.tex @@ -2079,6 +2079,7 @@ conceptuelle, sur laquelle nous reviendrons. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/descente.tex b/chapitres/descente.tex index ccfc001..064a5c4 100644 --- a/chapitres/descente.tex +++ b/chapitres/descente.tex @@ -58,6 +58,7 @@ $x∈M_n(k)$. \ifx\danslelivre\undefined \bibliography{../configuratoin/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/exemples-galois.tex b/chapitres/exemples-galois.tex index 60cb29d..5ccb600 100644 --- a/chapitres/exemples-galois.tex +++ b/chapitres/exemples-galois.tex @@ -2059,6 +2059,7 @@ hexades, une contradiction. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/extensions-algebriques.tex b/chapitres/extensions-algebriques.tex index 87daef9..c7c3baf 100644 --- a/chapitres/extensions-algebriques.tex +++ b/chapitres/extensions-algebriques.tex @@ -2745,6 +2745,7 @@ $\Der_k(A,M) ⥲ \Hom_{k-\mathtextrm{alg}\bo A}(A,M[ε])$. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/formes-tordues.tex b/chapitres/formes-tordues.tex index bb7a97c..cf7c754 100644 --- a/chapitres/formes-tordues.tex +++ b/chapitres/formes-tordues.tex @@ -1314,6 +1314,7 @@ Le quotient $B/𝔪$ est une $k$-algèbre de type fini qui est un corps. D'aprè \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/groupes-permutations.tex b/chapitres/groupes-permutations.tex index d9e56df..3c3e508 100644 --- a/chapitres/groupes-permutations.tex +++ b/chapitres/groupes-permutations.tex @@ -1447,6 +1447,7 @@ non-triviale. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/krull.tex b/chapitres/krull.tex index 07644ed..716de94 100644 --- a/chapitres/krull.tex +++ b/chapitres/krull.tex @@ -1056,6 +1056,7 @@ et $F$ un isomorphisme $\Frob^*ℳ⥲ℳ$, sont équivalentes. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/locaux-globaux.tex b/chapitres/locaux-globaux.tex index 23ca5cb..ae59e40 100644 --- a/chapitres/locaux-globaux.tex +++ b/chapitres/locaux-globaux.tex @@ -5730,6 +5730,7 @@ Hypothèse de Riemann : \cite{Fried-Jarden} (eux-même inspirés par Bombieri). \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/omega.tex b/chapitres/omega.tex index 849ccea..a18562a 100644 --- a/chapitres/omega.tex +++ b/chapitres/omega.tex @@ -39,6 +39,7 @@ si et seulement si $Ω¹_{K\bo k}=0$. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/produit-tensoriel.tex b/chapitres/produit-tensoriel.tex index d85a12a..7dc96d8 100644 --- a/chapitres/produit-tensoriel.tex +++ b/chapitres/produit-tensoriel.tex @@ -1558,6 +1558,7 @@ $B⊗_A \Frac(A)$ est intègre. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/radicaux.tex b/chapitres/radicaux.tex index 8bcae63..f89a976 100644 --- a/chapitres/radicaux.tex +++ b/chapitres/radicaux.tex @@ -1834,6 +1834,7 @@ nombres premiers ? \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/spectre.tex b/chapitres/spectre.tex index 9040276..f492e9d 100644 --- a/chapitres/spectre.tex +++ b/chapitres/spectre.tex @@ -1009,6 +1009,7 @@ et d'homomorphismes entre anneaux connexes. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/chapitres/verselles.tex b/chapitres/verselles.tex index 249cc12..01c1be6 100644 --- a/chapitres/verselles.tex +++ b/chapitres/verselles.tex @@ -1856,6 +1856,7 @@ est largement inspirée de \cite{Topics@Serre}, §4.3. \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/config/macros.tex b/config/macros.tex index f674bfa..dba337e 100644 --- a/config/macros.tex +++ b/config/macros.tex @@ -364,6 +364,34 @@ end \newcommand\XXX{\textcolor{Magenta}{(XXX)}} %% +%% Pour afficher le numéro de version Git (exige que LuaTeX soit appelé avec --shell-escape) +%% + +\catcode`\%=12 +\directlua{ +function command_output(cmd) + local output_pipe = io.popen(cmd) + local line_iter = output_pipe and output_pipe:lines() + local line = line_iter and line_iter() + if output_pipe then output_pipe:close() end + return line +end +local git_command1 = [[git log --pretty=format:"%h %ai" -1]] +local git_command2 = [[if git diff --quiet HEAD ; then echo clean ; else echo dirty ; fi]] +function git_status() + local status = command_output(git_command1) + if status then + tex.tprint({luatexbase.catcodetables.CatcodeTableLaTeX, string.char(0x5c).."texttt{"}, {-2,status}, {luatexbase.catcodetables.CatcodeTableLaTeX, "}"}) + if not (command_output(git_command2) == "clean") then tex.sprint(-2, " (dirty)") end + else + tex.sprint(-2, "?") + end +end +} +\catcode`\%=14 +\def\showgitstatus{\directlua{git_status()}} + +%% %% Paramétrages divers %% \setcounter{tocdepth}{2} diff --git a/divers/modele-chapitre.tex b/divers/modele-chapitre.tex index d8b4b8d..3e8fef3 100644 --- a/divers/modele-chapitre.tex +++ b/divers/modele-chapitre.tex @@ -19,6 +19,7 @@ \ifx\danslelivre\undefined \bibliography{../biblio/bibliographie-livre} \bibliographystyle{../biblio/style-bib-livre} +Git: \showgitstatus \end{document} \else \endgroup diff --git a/livre/livre.tex b/livre/livre.tex index a4d3bd0..babca38 100644 --- a/livre/livre.tex +++ b/livre/livre.tex @@ -29,6 +29,10 @@ Théorie de Galois\\et ses ramifications\par} \textbf{David Madore}\\\textbf{Fabrice Orgogozo}\par} \end{center} +\vglue11cm + +Git: \showgitstatus + %\IfFileExists{.cv.tex}{\version}{} \pagenumbering{roman} |