summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FILES.byname464
-rw-r--r--FILES.byname.gzbin2234493 -> 2234565 bytes
-rw-r--r--FILES.last07days442
-rw-r--r--macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdfbin64815 -> 64813 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/externalize.pdfbin29623 -> 29623 bytes
-rw-r--r--macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdfbin27155 -> 27155 bytes
-rw-r--r--macros/latex/contrib/todonotes/todonotes.dtx79
-rw-r--r--macros/latex/contrib/todonotes/todonotes.pdfbin316253 -> 317605 bytes
-rw-r--r--support/ltximg/README.md122
-rw-r--r--support/ltximg/doc/ltximg-doc.pdfbin0 -> 245484 bytes
-rw-r--r--support/ltximg/doc/ltximg-doc.tex2087
-rw-r--r--support/ltximg/ltximg-doc.dtx1705
-rw-r--r--support/ltximg/ltximg-doc.pdfbin147577 -> 0 bytes
-rw-r--r--support/ltximg/ltximg.pl1814
-rw-r--r--support/ltximg/script/ltximg.pl2972
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb51
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.md52
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha5122
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc14
-rw-r--r--systems/texlive/tlnet/tlpkg/texlive.tlpdb.xzbin2216240 -> 2214112 bytes
-rw-r--r--systems/win32/miktex/tm/packages/next/pr.ini8
-rw-r--r--systems/win32/miktex/tm/packages/pr.ini8
-rw-r--r--timestamp2
23 files changed, 5693 insertions, 4079 deletions
diff --git a/FILES.byname b/FILES.byname
index e213b3074a..91a10fcd01 100644
--- a/FILES.byname
+++ b/FILES.byname
@@ -5003,7 +5003,7 @@
1990/10/02 | 5440 | dviware/vutex/vaxvms.hlp
1990/10/02 | 812 | dviware/vutex/vaxvms.ins
1990/10/02 | 127576 | dviware/vutex/vutex.web
-2020/08/17 | 43226 | FILES.last07days
+2020/08/18 | 43178 | FILES.last07days
2020/08/14 | 104065 | fonts/academicons/academicons.pdf
2020/08/14 | 17247 | fonts/academicons/academicons.sty
2020/08/14 | 6546 | fonts/academicons/academicons.tex
@@ -140480,7 +140480,7 @@
1997/10/07 | 2953 | info/biblio/texbook1.ltx
2019/04/27 | 456277 | info/biblio/texbook2.bib
2019/03/04 | 2877 | info/biblio/texbook2.ltx
-2020/08/07 | 974760 | info/biblio/texbook3.bib
+2020/08/17 | 974898 | info/biblio/texbook3.bib
2020/08/06 | 3912 | info/biblio/texbook3.ltx
2019/03/04 | 179842 | info/biblio/texgraph.bib
2019/03/04 | 4179 | info/biblio/texgraph.ltx
@@ -206414,17 +206414,17 @@
2014/03/10 | 2561 | macros/latex/contrib/tocvsec2/tocvsec2.ins
2014/03/10 | 300978 | macros/latex/contrib/tocvsec2/tocvsec2.pdf
2014/03/10 | 308536 | macros/latex/contrib/tocvsec2.zip
-2019/01/24 | 64815 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
-2019/01/24 | 1034 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex
-2019/01/24 | 29623 | macros/latex/contrib/todonotes/examples/externalize.pdf
-2019/01/24 | 762 | macros/latex/contrib/todonotes/examples/externalize.tex
-2019/01/24 | 27155 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
-2019/01/24 | 668 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.tex
-2019/01/24 | 1631 | macros/latex/contrib/todonotes/README
-2019/01/24 | 74039 | macros/latex/contrib/todonotes/todonotes.dtx
-2019/01/24 | 1979 | macros/latex/contrib/todonotes/todonotes.ins
-2019/01/24 | 316253 | macros/latex/contrib/todonotes/todonotes.pdf
-2019/01/24 | 449049 | macros/latex/contrib/todonotes.zip
+2020/08/18 | 64813 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
+2020/08/18 | 1034 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex
+2020/08/18 | 29623 | macros/latex/contrib/todonotes/examples/externalize.pdf
+2020/08/18 | 762 | macros/latex/contrib/todonotes/examples/externalize.tex
+2020/08/18 | 27155 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
+2020/08/18 | 668 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.tex
+2020/08/18 | 1631 | macros/latex/contrib/todonotes/README
+2020/08/18 | 74987 | macros/latex/contrib/todonotes/todonotes.dtx
+2020/08/18 | 1979 | macros/latex/contrib/todonotes/todonotes.ins
+2020/08/18 | 317605 | macros/latex/contrib/todonotes/todonotes.pdf
+2020/08/18 | 450558 | macros/latex/contrib/todonotes.zip
2010/04/01 | 413 | macros/latex/contrib/todo/README
2010/04/01 | 21736 | macros/latex/contrib/todo/todo.dtx
2010/04/01 | 521 | macros/latex/contrib/todo/todo.ins
@@ -249071,11 +249071,11 @@
2015/10/16 | 37575 | support/ltxfileinfo/ltxfileinfo.pdf
2015/10/16 | 590 | support/ltxfileinfo/README
2015/10/16 | 42423 | support/ltxfileinfo.zip
-2019/08/24 | 62557 | support/ltximg/ltximg-doc.dtx
-2019/08/24 | 147577 | support/ltximg/ltximg-doc.pdf
-2019/08/24 | 67534 | support/ltximg/ltximg.pl
-2019/08/24 | 5835 | support/ltximg/README.md
-2019/08/24 | 170921 | support/ltximg.zip
+2020/08/18 | 245484 | support/ltximg/doc/ltximg-doc.pdf
+2020/08/18 | 85946 | support/ltximg/doc/ltximg-doc.tex
+2020/08/18 | 6397 | support/ltximg/README.md
+2020/08/18 | 126366 | support/ltximg/script/ltximg.pl
+2020/08/18 | 259781 | support/ltximg.zip
1996/11/22 | 25535 | support/ltxinput/ltxinput.zip
1996/11/10 | 971 | support/ltxinput/readme.txt
2010/03/15 | 4720 | support/lua/lua-alt-getopt/lua-alt-getopt-0.7.0.tar.gz
@@ -253633,9 +253633,9 @@
1994/02/22 | 94984 | systems/mac/macmakeindex2.12.sea.hqx
1993/07/19 | 61321 | systems/mac/macmakeindex.sit.hqx
2020/04/10 | 47 | systems/mac/mactex/BasicTeX.pkg.md5
-2020/08/04 | 38004 | systems/mac/mactex/ExtrasFolder.pdf
+2020/08/17 | 38009 | systems/mac/mactex/ExtrasFolder.pdf
2020/04/10 | 50 | systems/mac/mactex/Ghostscript.pkg.md5
-2020/08/04 | 1780 | systems/mac/mactex/Licenses.txt
+2020/08/17 | 1780 | systems/mac/mactex/Licenses.txt
2020/04/08 | 4206162866 | systems/mac/mactex/mactex-20200407.pkg
2020/04/08 | 54 | systems/mac/mactex/mactex-20200407.pkg.md5
2020/04/07 | 83213937 | systems/mac/mactex/mactex-basictex-20200407.pkg
@@ -253643,8 +253643,8 @@
2020/03/29 | 24931926 | systems/mac/mactex/mactex-ghostscript-9.50-20200329.pkg
2020/03/29 | 71 | systems/mac/mactex/mactex-ghostscript-9.50-20200329.pkg.md5
2020/04/10 | 45 | systems/mac/mactex/MacTeX.pkg.md5
-2020/08/04 | 373968605 | systems/mac/mactex/MacTeXtras-20200804.zip
-2020/08/04 | 58 | systems/mac/mactex/MacTeXtras-20200804.zip.md5
+2020/08/17 | 373976190 | systems/mac/mactex/MacTeXtras-20200817.zip
+2020/08/17 | 58 | systems/mac/mactex/MacTeXtras-20200817.zip.md5
2020/04/10 | 169 | systems/mac/mactex/README
1995/08/15 | 308344 | systems/mac/MakeIndex-Fat-1.0-sit.hqx
1994/04/20 | 2925109 | systems/mac/metafont/bluesky/MAC_MF_0.66.sit.hqx
@@ -254937,6 +254937,8 @@
2019/02/28 | 293444 | systems/texlive/tlnet/archive/algorithms.doc.r42428.tar.xz
2019/02/28 | 3472 | systems/texlive/tlnet/archive/algorithms.r42428.tar.xz
2019/02/28 | 11940 | systems/texlive/tlnet/archive/algorithms.source.r42428.tar.xz
+2020/08/18 | 333648 | systems/texlive/tlnet/archive/algpseudocodex.doc.r56125.tar.xz
+2020/08/18 | 6912 | systems/texlive/tlnet/archive/algpseudocodex.r56125.tar.xz
2019/02/28 | 2568 | systems/texlive/tlnet/archive/alg.r15878.tar.xz
2019/02/28 | 5768 | systems/texlive/tlnet/archive/alg.source.r15878.tar.xz
2020/08/01 | 173088 | systems/texlive/tlnet/archive/algxpar.doc.r56006.tar.xz
@@ -256839,7 +256841,7 @@
2020/08/14 | 688 | systems/texlive/tlnet/archive/collection-latex.r56105.tar.xz
2020/03/04 | 748 | systems/texlive/tlnet/archive/collection-latexrecommended.r54074.tar.xz
2020/08/15 | 680 | systems/texlive/tlnet/archive/collection-luatex.r56113.tar.xz
-2020/07/24 | 1448 | systems/texlive/tlnet/archive/collection-mathscience.r55918.tar.xz
+2020/08/18 | 1456 | systems/texlive/tlnet/archive/collection-mathscience.r56125.tar.xz
2019/03/09 | 540 | systems/texlive/tlnet/archive/collection-metapost.r50293.tar.xz
2020/04/12 | 472 | systems/texlive/tlnet/archive/collection-music.r54666.tar.xz
2020/07/14 | 1376 | systems/texlive/tlnet/archive/collection-pictures.r55827.tar.xz
@@ -262037,9 +262039,9 @@
2019/02/28 | 340 | systems/texlive/tlnet/archive/mkpic.x86_64-linuxmusl.r46840.tar.xz
2019/02/28 | 336 | systems/texlive/tlnet/archive/mkpic.x86_64-linux.r33688.tar.xz
2019/02/28 | 336 | systems/texlive/tlnet/archive/mkpic.x86_64-solaris.r33688.tar.xz
-2019/08/12 | 2969948 | systems/texlive/tlnet/archive/mlacls.doc.r51865.tar.xz
-2019/08/12 | 2604 | systems/texlive/tlnet/archive/mlacls.r51865.tar.xz
-2019/08/12 | 9000 | systems/texlive/tlnet/archive/mlacls.source.r51865.tar.xz
+2020/08/18 | 3001912 | systems/texlive/tlnet/archive/mlacls.doc.r56126.tar.xz
+2020/08/18 | 2624 | systems/texlive/tlnet/archive/mlacls.r56126.tar.xz
+2020/08/18 | 9052 | systems/texlive/tlnet/archive/mlacls.source.r56126.tar.xz
2020/03/04 | 2004 | systems/texlive/tlnet/archive/mla-paper.doc.r54080.tar.xz
2020/03/04 | 2316 | systems/texlive/tlnet/archive/mla-paper.r54080.tar.xz
2019/12/05 | 308648 | systems/texlive/tlnet/archive/mleftright.doc.r53021.tar.xz
@@ -265445,8 +265447,8 @@
2020/03/24 | 280 | systems/texlive/tlnet/archive/texlive-cz.r54496.tar.xz
2020/03/29 | 1338300 | systems/texlive/tlnet/archive/texlive-de.doc.r54604.tar.xz
2020/03/29 | 272 | systems/texlive/tlnet/archive/texlive-de.r54604.tar.xz
-2020/08/16 | 168264 | systems/texlive/tlnet/archive/texlive-docindex.doc.r56115.tar.xz
-2020/08/16 | 388 | systems/texlive/tlnet/archive/texlive-docindex.r56115.tar.xz
+2020/08/18 | 168264 | systems/texlive/tlnet/archive/texlive-docindex.doc.r56124.tar.xz
+2020/08/18 | 388 | systems/texlive/tlnet/archive/texlive-docindex.r56124.tar.xz
2020/04/16 | 1891392 | systems/texlive/tlnet/archive/texlive-en.doc.r54755.tar.xz
2020/04/16 | 272 | systems/texlive/tlnet/archive/texlive-en.r54755.tar.xz
2020/03/22 | 3090144 | systems/texlive/tlnet/archive/texlive-es.doc.r54465.tar.xz
@@ -265502,7 +265504,7 @@
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.amd64-freebsd.r55172.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.amd64-netbsd.r55172.tar.xz
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.armhf-linux.r55172.tar.xz
-2020/08/16 | 218656 | systems/texlive/tlnet/archive/texlive-scripts.doc.r56115.tar.xz
+2020/08/18 | 218656 | systems/texlive/tlnet/archive/texlive-scripts.doc.r56124.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.aarch64-linux.r53577.tar.xz
2020/01/27 | 924 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-freebsd.r53577.tar.xz
2020/01/27 | 916 | systems/texlive/tlnet/archive/texlive-scripts-extra.amd64-netbsd.r53577.tar.xz
@@ -265526,7 +265528,7 @@
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.i386-linux.r55172.tar.xz
2020/05/17 | 592 | systems/texlive/tlnet/archive/texlive-scripts.i386-netbsd.r55172.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.i386-solaris.r55172.tar.xz
-2020/08/16 | 132028 | systems/texlive/tlnet/archive/texlive-scripts.r56115.tar.xz
+2020/08/18 | 132016 | systems/texlive/tlnet/archive/texlive-scripts.r56124.tar.xz
2020/05/31 | 36284 | systems/texlive/tlnet/archive/texlive-scripts.win32.r55357.tar.xz
2020/05/17 | 588 | systems/texlive/tlnet/archive/texlive-scripts.x86_64-cygwin.r55172.tar.xz
2020/05/12 | 592 | systems/texlive/tlnet/archive/texlive-scripts.x86_64-darwinlegacy.r55117.tar.xz
@@ -267170,16 +267172,16 @@
2020/07/18 | 47816 | systems/texlive/tlnet/archive/zztex.doc.r55862.tar.xz
2020/07/18 | 101724 | systems/texlive/tlnet/archive/zztex.r55862.tar.xz
2020/06/13 | 105829 | systems/texlive/tlnet/install-tl
-2020/08/17 | 5500832 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2020/08/17 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2020/08/18 | 5500861 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2020/08/18 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
2020/05/31 | 4770 | systems/texlive/tlnet/install-tl-windows.bat
-2020/08/17 | 19381435 | systems/texlive/tlnet/install-tl-windows.exe
-2020/08/17 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2020/08/17 | 24269384 | systems/texlive/tlnet/install-tl.zip
-2020/08/17 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2020/08/18 | 19382094 | systems/texlive/tlnet/install-tl-windows.exe
+2020/08/18 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2020/08/18 | 24269376 | systems/texlive/tlnet/install-tl.zip
+2020/08/18 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
2020/03/05 | 1215 | systems/texlive/tlnet/README.md
2020/04/06 | 5961 | systems/texlive/tlnet/tlpkg/gpg/pubring.gpg
2016/04/12 | 600 | systems/texlive/tlnet/tlpkg/gpg/random_seed
@@ -267188,7 +267190,7 @@
2020/04/06 | 1280 | systems/texlive/tlnet/tlpkg/gpg/trustdb.gpg
2020/07/15 | 48932 | systems/texlive/tlnet/tlpkg/installer/config.guess
2010/11/11 | 11651 | systems/texlive/tlnet/tlpkg/installer/COPYING.MinGW-runtime.txt
-2020/08/15 | 6588 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
+2020/08/17 | 6547 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2020/04/15 | 223687 | systems/texlive/tlnet/tlpkg/installer/curl/curl-ca-bundle.crt
2020/04/15 | 2606592 | systems/texlive/tlnet/tlpkg/installer/curl/curl.exe
2018/04/29 | 13647 | systems/texlive/tlnet/tlpkg/installer/DirSelect.pm
@@ -267235,12 +267237,12 @@
2020/05/17 | 20322 | systems/texlive/tlnet/tlpkg/TeXLive/TLCrypto.pm
2020/05/03 | 4786 | systems/texlive/tlnet/tlpkg/TeXLive/TLDownload.pm
2020/08/06 | 27567 | systems/texlive/tlnet/tlpkg/TeXLive/TLPaper.pm
-2020/08/17 | 16379111 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2020/08/17 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2020/08/18 | 16380597 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2020/08/18 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
2020/05/13 | 86417 | systems/texlive/tlnet/tlpkg/TeXLive/TLPDB.pm
-2020/08/17 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2020/08/17 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2020/08/17 | 2215288 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2020/08/18 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2020/08/18 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2020/08/18 | 2216240 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
2020/04/15 | 58761 | systems/texlive/tlnet/tlpkg/TeXLive/TLPOBJ.pm
2020/03/20 | 41736 | systems/texlive/tlnet/tlpkg/TeXLive/TLPSRC.pm
2020/05/11 | 15010 | systems/texlive/tlnet/tlpkg/TeXLive/TLTREE.pm
@@ -271728,7 +271730,7 @@
2020/02/04 | 281488 | systems/win32/miktex/tm/packages/filehook.tar.lzma
2012/12/04 | 924573 | systems/win32/miktex/tm/packages/fileinfo.tar.lzma
2011/09/21 | 281409 | systems/win32/miktex/tm/packages/filemod.tar.lzma
-2020/08/17 | 542244 | systems/win32/miktex/tm/packages/files.csv.lzma
+2020/08/18 | 542244 | systems/win32/miktex/tm/packages/files.csv.lzma
2001/05/14 | 5617 | systems/win32/miktex/tm/packages/finbib.tar.lzma
2015/10/20 | 44379 | systems/win32/miktex/tm/packages/findhyph.tar.lzma
2011/10/21 | 89323 | systems/win32/miktex/tm/packages/fink.tar.lzma
@@ -272893,9 +272895,9 @@
2018/01/12 | 157226 | systems/win32/miktex/tm/packages/miktex-zip-bin-x64.tar.lzma
2020/08/01 | 38929 | systems/win32/miktex/tm/packages/miktex-zlib-bin-2.9.tar.lzma
2020/08/01 | 43039 | systems/win32/miktex/tm/packages/miktex-zlib-bin-x64-2.9.tar.lzma
-2020/08/17 | 202504 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
-2020/08/17 | 1211954 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
-2020/08/17 | 1131000 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
+2020/08/18 | 202490 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
+2020/08/18 | 1211843 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
+2020/08/18 | 1130970 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
2020/08/01 | 13102 | systems/win32/miktex/tm/packages/miktex-zzip-bin-2.9.tar.lzma
2020/08/01 | 14104 | systems/win32/miktex/tm/packages/miktex-zzip-bin-x64-2.9.tar.lzma
2016/07/15 | 35914 | systems/win32/miktex/tm/packages/mil3.tar.lzma
@@ -273049,187 +273051,187 @@
2018/04/09 | 400132 | systems/win32/miktex/tm/packages/newunicodechar.tar.lzma
2011/09/19 | 101312 | systems/win32/miktex/tm/packages/newvbtm.tar.lzma
2019/09/11 | 231430 | systems/win32/miktex/tm/packages/newverbs.tar.lzma
-2020/08/17 | 541919 | systems/win32/miktex/tm/packages/next/files.csv.lzma
-2020/08/17 | 59343 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
-2020/08/17 | 67258 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
-2020/08/17 | 956333 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
-2020/08/17 | 1061414 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
-2020/08/17 | 28605 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
-2020/08/17 | 30909 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
-2020/08/17 | 29399 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
-2020/08/17 | 34775 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
-2020/08/17 | 49592 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
-2020/08/17 | 57160 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
-2020/08/17 | 84663 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
-2020/08/17 | 93641 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
-2020/08/17 | 65817 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
-2020/08/17 | 73450 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
-2020/08/17 | 27008 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
-2020/08/17 | 30891 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
-2020/08/17 | 329617 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
-2020/08/17 | 392368 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
-2020/08/17 | 32350 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
-2020/08/17 | 36360 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
-2020/08/17 | 72256 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
-2020/08/17 | 79420 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
-2020/08/17 | 203965 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
-2020/08/17 | 224086 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
-2020/08/17 | 169657 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
-2020/08/17 | 184491 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
-2020/08/17 | 51937 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
-2020/08/17 | 58660 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
-2020/08/17 | 20816 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
-2020/08/17 | 22981 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
-2020/08/17 | 460433 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
-2020/08/17 | 45319 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
-2020/08/17 | 51136 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
-2020/08/17 | 273697 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
-2020/08/17 | 310936 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
-2020/08/17 | 40822 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
-2020/08/17 | 45032 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
-2020/08/17 | 115881 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
-2020/08/17 | 130356 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
-2020/08/17 | 1265431 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
-2020/08/17 | 1404304 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
-2020/08/17 | 95400 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
-2020/08/17 | 109730 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
-2020/08/17 | 43314 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
-2020/08/17 | 48083 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
-2020/08/17 | 46355 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
-2020/08/17 | 51236 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
-2020/08/17 | 57148 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
-2020/08/17 | 62976 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
-2020/08/17 | 133655 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
-2020/08/17 | 151865 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
-2020/08/17 | 72862 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
-2020/08/17 | 77367 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
-2020/08/17 | 68968 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
-2020/08/17 | 77316 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
-2020/08/17 | 246824 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
-2020/08/17 | 281780 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
-2020/08/17 | 25504 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
-2020/08/17 | 29058 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
-2020/08/17 | 100917 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
-2020/08/17 | 116786 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
-2020/08/17 | 63512 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
-2020/08/17 | 72612 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
-2020/08/17 | 94383 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
-2020/08/17 | 113580 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
-2020/08/17 | 59041 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
-2020/08/17 | 65546 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
-2020/08/17 | 462709 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
-2020/08/17 | 549967 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
-2020/08/17 | 141853 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
-2020/08/17 | 154419 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
-2020/08/17 | 94513 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
-2020/08/17 | 108991 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
-2020/08/17 | 15949 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
-2020/08/17 | 17626 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
-2020/08/17 | 27801 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
-2020/08/17 | 29637 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
-2020/08/17 | 623928 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
-2020/08/17 | 677580 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
-2020/08/17 | 500567 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
-2020/08/17 | 561890 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
-2020/08/17 | 544358 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
-2020/08/17 | 583965 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
-2020/08/17 | 93621 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
-2020/08/17 | 102589 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
-2020/08/17 | 1746181 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
-2020/08/17 | 2031793 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
-2020/08/17 | 67276 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
-2020/08/17 | 73690 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
-2020/08/17 | 26996 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
-2020/08/17 | 31253 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
-2020/08/17 | 7548 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
-2020/08/17 | 8566 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
-2020/08/17 | 192835 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
-2020/08/17 | 211536 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
-2020/08/17 | 269404 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
-2020/08/17 | 305083 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
-2020/08/17 | 96480 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
-2020/08/17 | 101784 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
-2020/08/17 | 79691 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-2.9.tar.lzma
-2020/08/17 | 88874 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-x64-2.9.tar.lzma
-2020/08/17 | 170419 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
-2020/08/17 | 189152 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
-2020/08/17 | 159877 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
-2020/08/17 | 180901 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
-2020/08/17 | 196318 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
-2020/08/17 | 177375 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
-2020/08/17 | 85159 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
-2020/08/17 | 96847 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
-2020/08/17 | 31224 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
-2020/08/17 | 35034 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
-2020/08/17 | 57313 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
-2020/08/17 | 64237 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
-2020/08/17 | 63358 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
-2020/08/17 | 69913 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
-2020/08/17 | 45776 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
-2020/08/17 | 52203 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
-2020/08/17 | 192587 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
-2020/08/17 | 210278 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
-2020/08/17 | 35215 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
-2020/08/17 | 39332 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
-2020/08/17 | 327553 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
-2020/08/17 | 360763 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
-2020/08/17 | 187719 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
-2020/08/17 | 193835 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
-2020/08/17 | 207672 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
-2020/08/17 | 243053 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
-2020/08/17 | 78101 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
-2020/08/17 | 87297 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
-2020/08/17 | 922274 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
-2020/08/17 | 1021969 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
-2020/08/17 | 20006 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
-2020/08/17 | 23600 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
-2020/08/17 | 31211 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
-2020/08/17 | 36866 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
-2020/08/17 | 63554 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
-2020/08/17 | 71553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
-2020/08/17 | 42624 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
-2020/08/17 | 50916 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
-2020/08/17 | 1192974 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
-2020/08/17 | 1325258 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
-2020/08/17 | 42063 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
-2020/08/17 | 51421 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
-2020/08/17 | 76796 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
-2020/08/17 | 82787 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
-2020/08/17 | 26852 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
-2020/08/17 | 29026 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
-2020/08/17 | 16023 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
-2020/08/17 | 17728 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
-2020/08/17 | 63429 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
-2020/08/17 | 69184 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
-2020/08/17 | 151836 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
-2020/08/17 | 165592 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
-2020/08/17 | 77487 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
-2020/08/17 | 87981 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
-2020/08/17 | 97375 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
-2020/08/17 | 104547 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
-2020/08/17 | 2534480 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
-2020/08/17 | 2657476 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
-2020/08/17 | 55559 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
-2020/08/17 | 62027 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
-2020/08/17 | 33088 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
-2020/08/17 | 36922 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
-2020/08/17 | 26612 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
-2020/08/17 | 32393 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
-2020/08/17 | 66015 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
-2020/08/17 | 70140 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
-2020/08/17 | 250290 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
-2020/08/17 | 279881 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
-2020/08/17 | 597780 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
-2020/08/17 | 638663 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
-2020/08/17 | 39268 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
-2020/08/17 | 43075 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
-2020/08/17 | 202524 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
-2020/08/17 | 1211820 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
-2020/08/17 | 1131809 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
-2020/08/17 | 13127 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
-2020/08/17 | 14132 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
+2020/08/18 | 541919 | systems/win32/miktex/tm/packages/next/files.csv.lzma
+2020/08/18 | 59343 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
+2020/08/18 | 67258 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
+2020/08/18 | 956334 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
+2020/08/18 | 1061413 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
+2020/08/18 | 28605 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
+2020/08/18 | 30908 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
+2020/08/18 | 29398 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
+2020/08/18 | 34774 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
+2020/08/18 | 49591 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
+2020/08/18 | 57160 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
+2020/08/18 | 84661 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
+2020/08/18 | 93640 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
+2020/08/18 | 65819 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
+2020/08/18 | 73450 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
+2020/08/18 | 27008 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
+2020/08/18 | 30890 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
+2020/08/18 | 329616 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
+2020/08/18 | 392367 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
+2020/08/18 | 32352 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
+2020/08/18 | 36360 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
+2020/08/18 | 72254 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
+2020/08/18 | 79419 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
+2020/08/18 | 203965 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
+2020/08/18 | 224086 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
+2020/08/18 | 169656 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
+2020/08/18 | 184489 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
+2020/08/18 | 51937 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
+2020/08/18 | 58660 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
+2020/08/18 | 20816 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
+2020/08/18 | 22980 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
+2020/08/18 | 460433 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
+2020/08/18 | 45318 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
+2020/08/18 | 51136 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
+2020/08/18 | 273697 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
+2020/08/18 | 310936 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
+2020/08/18 | 40822 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
+2020/08/18 | 45033 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
+2020/08/18 | 115880 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
+2020/08/18 | 130357 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
+2020/08/18 | 1265432 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
+2020/08/18 | 1404300 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
+2020/08/18 | 95400 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
+2020/08/18 | 109731 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
+2020/08/18 | 43314 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
+2020/08/18 | 48085 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
+2020/08/18 | 46356 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
+2020/08/18 | 51236 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
+2020/08/18 | 57148 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
+2020/08/18 | 62975 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
+2020/08/18 | 133655 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
+2020/08/18 | 151863 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
+2020/08/18 | 72861 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
+2020/08/18 | 77366 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
+2020/08/18 | 68968 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
+2020/08/18 | 77315 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
+2020/08/18 | 246824 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
+2020/08/18 | 281780 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
+2020/08/18 | 25504 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
+2020/08/18 | 29058 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
+2020/08/18 | 100916 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
+2020/08/18 | 116787 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
+2020/08/18 | 63513 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
+2020/08/18 | 72612 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
+2020/08/18 | 94381 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
+2020/08/18 | 113581 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
+2020/08/18 | 59041 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
+2020/08/18 | 65545 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
+2020/08/18 | 462707 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
+2020/08/18 | 549967 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
+2020/08/18 | 141853 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
+2020/08/18 | 154419 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
+2020/08/18 | 94513 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
+2020/08/18 | 108992 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
+2020/08/18 | 15948 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
+2020/08/18 | 17625 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
+2020/08/18 | 27802 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
+2020/08/18 | 29636 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
+2020/08/18 | 623926 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
+2020/08/18 | 677580 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
+2020/08/18 | 500567 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
+2020/08/18 | 561890 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
+2020/08/18 | 544358 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
+2020/08/18 | 583964 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
+2020/08/18 | 93618 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
+2020/08/18 | 102588 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
+2020/08/18 | 1746181 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
+2020/08/18 | 2031793 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
+2020/08/18 | 67278 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
+2020/08/18 | 73690 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
+2020/08/18 | 26997 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
+2020/08/18 | 31253 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
+2020/08/18 | 7548 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
+2020/08/18 | 8567 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
+2020/08/18 | 192836 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
+2020/08/18 | 211537 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
+2020/08/18 | 269402 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
+2020/08/18 | 305083 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
+2020/08/18 | 96478 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
+2020/08/18 | 101782 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
+2020/08/18 | 79689 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-2.9.tar.lzma
+2020/08/18 | 88873 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-x64-2.9.tar.lzma
+2020/08/18 | 170418 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
+2020/08/18 | 189152 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
+2020/08/18 | 159878 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
+2020/08/18 | 180901 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
+2020/08/18 | 196316 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
+2020/08/18 | 177374 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
+2020/08/18 | 85158 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
+2020/08/18 | 96846 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
+2020/08/18 | 31224 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
+2020/08/18 | 35034 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
+2020/08/18 | 57313 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
+2020/08/18 | 64237 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
+2020/08/18 | 63360 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
+2020/08/18 | 69913 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
+2020/08/18 | 45775 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
+2020/08/18 | 52201 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
+2020/08/18 | 192587 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
+2020/08/18 | 210278 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
+2020/08/18 | 35216 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
+2020/08/18 | 39331 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
+2020/08/18 | 327551 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
+2020/08/18 | 360765 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
+2020/08/18 | 187718 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
+2020/08/18 | 193833 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
+2020/08/18 | 207671 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
+2020/08/18 | 243051 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
+2020/08/18 | 78101 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
+2020/08/18 | 87297 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
+2020/08/18 | 922273 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
+2020/08/18 | 1021969 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
+2020/08/18 | 20006 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
+2020/08/18 | 23600 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
+2020/08/18 | 31209 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
+2020/08/18 | 36864 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
+2020/08/18 | 63553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
+2020/08/18 | 71553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
+2020/08/18 | 42621 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
+2020/08/18 | 50914 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
+2020/08/18 | 1192974 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
+2020/08/18 | 1325257 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
+2020/08/18 | 42062 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
+2020/08/18 | 51420 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
+2020/08/18 | 76795 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
+2020/08/18 | 82786 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
+2020/08/18 | 26852 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
+2020/08/18 | 29026 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
+2020/08/18 | 16022 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
+2020/08/18 | 17727 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
+2020/08/18 | 63427 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
+2020/08/18 | 69183 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
+2020/08/18 | 151836 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
+2020/08/18 | 165592 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
+2020/08/18 | 77485 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
+2020/08/18 | 87981 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
+2020/08/18 | 97374 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
+2020/08/18 | 104547 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
+2020/08/18 | 2534480 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
+2020/08/18 | 2657474 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
+2020/08/18 | 55559 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
+2020/08/18 | 62026 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
+2020/08/18 | 33087 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
+2020/08/18 | 36920 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
+2020/08/18 | 26612 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
+2020/08/18 | 32392 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
+2020/08/18 | 66013 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
+2020/08/18 | 70140 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
+2020/08/18 | 250289 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
+2020/08/18 | 279882 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
+2020/08/18 | 597782 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
+2020/08/18 | 638659 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
+2020/08/18 | 39268 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
+2020/08/18 | 43076 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
+2020/08/18 | 202480 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
+2020/08/18 | 1211864 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
+2020/08/18 | 1129649 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
+2020/08/18 | 13128 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
+2020/08/18 | 14132 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
2019/03/12 | 1412 | systems/win32/miktex/tm/packages/nextpage.tar.lzma
-2020/08/17 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
+2020/08/18 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
2018/07/06 | 145915 | systems/win32/miktex/tm/packages/nexus-otf.tar.lzma
2017/03/30 | 191149 | systems/win32/miktex/tm/packages/nfssext-cfr.tar.lzma
2012/12/20 | 612251 | systems/win32/miktex/tm/packages/nicefilelist.tar.lzma
@@ -273548,7 +273550,7 @@
2008/11/07 | 35981 | systems/win32/miktex/tm/packages/prettyref.tar.lzma
2017/07/26 | 201385 | systems/win32/miktex/tm/packages/preview.tar.lzma
2019/06/20 | 375963 | systems/win32/miktex/tm/packages/prftree.tar.lzma
-2020/08/17 | 866 | systems/win32/miktex/tm/packages/pr.ini
+2020/08/18 | 866 | systems/win32/miktex/tm/packages/pr.ini
2010/09/27 | 248469 | systems/win32/miktex/tm/packages/printlen.tar.lzma
2008/06/17 | 77313 | systems/win32/miktex/tm/packages/proba.tar.lzma
2017/07/12 | 988486 | systems/win32/miktex/tm/packages/probsoln.tar.lzma
@@ -274914,7 +274916,7 @@
2004/06/04 | 404 | tds/tds.sed
2004/06/23 | 65418 | tds/tds.tex
2019/05/29 | 304264 | tds.zip
-2020/08/18 | 186 | timestamp
+2020/08/19 | 186 | timestamp
2002/08/26 | 61898 | usergrps/dante/antrag.pdf
2002/08/26 | 118217 | usergrps/dante/antrag.ps
2017/06/30 | 917 | usergrps/dante/dtk/doc/beispiel.bib
diff --git a/FILES.byname.gz b/FILES.byname.gz
index 0ca5be6642..507c51a8ce 100644
--- a/FILES.byname.gz
+++ b/FILES.byname.gz
Binary files differ
diff --git a/FILES.last07days b/FILES.last07days
index fb34b2c3b3..7bd5162dae 100644
--- a/FILES.last07days
+++ b/FILES.last07days
@@ -1,229 +1,261 @@
-2020/08/17 | 97375 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
-2020/08/17 | 96847 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
-2020/08/17 | 96480 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
+2020/08/18 | 97374 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-2.9.tar.lzma
+2020/08/18 | 96846 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-x64-2.9.tar.lzma
+2020/08/18 | 96478 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-2.9.tar.lzma
+2020/08/18 | 956334 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
+2020/08/18 | 95400 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
+2020/08/18 | 94513 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
+2020/08/18 | 94381 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
+2020/08/18 | 93640 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
+2020/08/18 | 93618 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
+2020/08/18 | 922273 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
+2020/08/18 | 9052 | systems/texlive/tlnet/archive/mlacls.source.r56126.tar.xz
+2020/08/18 | 88873 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-x64-2.9.tar.lzma
+2020/08/18 | 87981 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
+2020/08/18 | 87297 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
+2020/08/18 | 866 | systems/win32/miktex/tm/packages/pr.ini
+2020/08/18 | 85946 | support/ltximg/doc/ltximg-doc.tex
+2020/08/18 | 8567 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
+2020/08/18 | 85158 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
+2020/08/18 | 84661 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
+2020/08/18 | 82786 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
+2020/08/18 | 79689 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-2.9.tar.lzma
+2020/08/18 | 79419 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
+2020/08/18 | 78101 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
+2020/08/18 | 77485 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
+2020/08/18 | 77366 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
+2020/08/18 | 77315 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
+2020/08/18 | 76795 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
+2020/08/18 | 762 | macros/latex/contrib/todonotes/examples/externalize.tex
+2020/08/18 | 7548 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
+2020/08/18 | 74987 | macros/latex/contrib/todonotes/todonotes.dtx
+2020/08/18 | 73690 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
+2020/08/18 | 73450 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
+2020/08/18 | 72861 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
+2020/08/18 | 72612 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
+2020/08/18 | 72254 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
+2020/08/18 | 71553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
+2020/08/18 | 70140 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
+2020/08/18 | 69913 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
+2020/08/18 | 69183 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
+2020/08/18 | 6912 | systems/texlive/tlnet/archive/algpseudocodex.r56125.tar.xz
+2020/08/18 | 68968 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
+2020/08/18 | 677580 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
+2020/08/18 | 67278 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
+2020/08/18 | 67258 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
+2020/08/18 | 668 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.tex
+2020/08/18 | 66013 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
+2020/08/18 | 65819 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
+2020/08/18 | 65545 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
+2020/08/18 | 64813 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
+2020/08/18 | 64237 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
+2020/08/18 | 6397 | support/ltximg/README.md
+2020/08/18 | 638659 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
+2020/08/18 | 63553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
+2020/08/18 | 63513 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
+2020/08/18 | 63427 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
+2020/08/18 | 63360 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
+2020/08/18 | 62975 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
+2020/08/18 | 623926 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
+2020/08/18 | 62026 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
+2020/08/18 | 597782 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
+2020/08/18 | 59343 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
+2020/08/18 | 59041 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
+2020/08/18 | 58660 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
+2020/08/18 | 583964 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
+2020/08/18 | 57313 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
+2020/08/18 | 57160 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
+2020/08/18 | 57148 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
+2020/08/18 | 561890 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
+2020/08/18 | 55559 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
+2020/08/18 | 5500861 | systems/texlive/tlnet/install-tl-unx.tar.gz
+2020/08/18 | 549967 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
+2020/08/18 | 544358 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
+2020/08/18 | 542244 | systems/win32/miktex/tm/packages/files.csv.lzma
+2020/08/18 | 541919 | systems/win32/miktex/tm/packages/next/files.csv.lzma
+2020/08/18 | 52201 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
+2020/08/18 | 51937 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
+2020/08/18 | 51420 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
+2020/08/18 | 51236 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
+2020/08/18 | 51136 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
+2020/08/18 | 50914 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
+2020/08/18 | 500567 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
+2020/08/18 | 49591 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
+2020/08/18 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+2020/08/18 | 48085 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
+2020/08/18 | 46356 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
+2020/08/18 | 462707 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
+2020/08/18 | 460433 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
+2020/08/18 | 45775 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
+2020/08/18 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
+2020/08/18 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
+2020/08/18 | 45318 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
+2020/08/18 | 450558 | macros/latex/contrib/todonotes.zip
+2020/08/18 | 45033 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
+2020/08/18 | 43314 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
+2020/08/18 | 43076 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
+2020/08/18 | 42621 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
+2020/08/18 | 42062 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
+2020/08/18 | 40822 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
+2020/08/18 | 39331 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
+2020/08/18 | 39268 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
+2020/08/18 | 392367 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
+2020/08/18 | 388 | systems/texlive/tlnet/archive/texlive-docindex.r56124.tar.xz
+2020/08/18 | 36920 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
+2020/08/18 | 36864 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
+2020/08/18 | 36360 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
+2020/08/18 | 360765 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
+2020/08/18 | 35216 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
+2020/08/18 | 35034 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
+2020/08/18 | 34774 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
+2020/08/18 | 333648 | systems/texlive/tlnet/archive/algpseudocodex.doc.r56125.tar.xz
+2020/08/18 | 33087 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
+2020/08/18 | 329616 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
+2020/08/18 | 327551 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
+2020/08/18 | 32392 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
+2020/08/18 | 32352 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
+2020/08/18 | 317605 | macros/latex/contrib/todonotes/todonotes.pdf
+2020/08/18 | 31253 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
+2020/08/18 | 31224 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
+2020/08/18 | 31209 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
+2020/08/18 | 310936 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
+2020/08/18 | 30908 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
+2020/08/18 | 30890 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
+2020/08/18 | 305083 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
+2020/08/18 | 3001912 | systems/texlive/tlnet/archive/mlacls.doc.r56126.tar.xz
+2020/08/18 | 29636 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
+2020/08/18 | 29623 | macros/latex/contrib/todonotes/examples/externalize.pdf
+2020/08/18 | 29398 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
+2020/08/18 | 29058 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
+2020/08/18 | 29026 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
+2020/08/18 | 28605 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
+2020/08/18 | 281780 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
+2020/08/18 | 279882 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
+2020/08/18 | 27802 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
+2020/08/18 | 273697 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
+2020/08/18 | 27155 | macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
+2020/08/18 | 27008 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
+2020/08/18 | 26997 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
+2020/08/18 | 269402 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
+2020/08/18 | 26852 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
+2020/08/18 | 26612 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
+2020/08/18 | 2657474 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
+2020/08/18 | 2624 | systems/texlive/tlnet/archive/mlacls.r56126.tar.xz
+2020/08/18 | 259781 | support/ltximg.zip
+2020/08/18 | 25504 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
+2020/08/18 | 2534480 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
+2020/08/18 | 250289 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
+2020/08/18 | 246824 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
+2020/08/18 | 245484 | support/ltximg/doc/ltximg-doc.pdf
+2020/08/18 | 243051 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
+2020/08/18 | 24269376 | systems/texlive/tlnet/install-tl.zip
+2020/08/18 | 23600 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
+2020/08/18 | 22980 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
+2020/08/18 | 224086 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
+2020/08/18 | 2216240 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+2020/08/18 | 218656 | systems/texlive/tlnet/archive/texlive-scripts.doc.r56124.tar.xz
+2020/08/18 | 211537 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
+2020/08/18 | 210278 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
+2020/08/18 | 20816 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
+2020/08/18 | 207671 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
+2020/08/18 | 203965 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
+2020/08/18 | 2031793 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
+2020/08/18 | 202490 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
+2020/08/18 | 202480 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
+2020/08/18 | 20006 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
+2020/08/18 | 1979 | macros/latex/contrib/todonotes/todonotes.ins
+2020/08/18 | 196316 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
+2020/08/18 | 193833 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
+2020/08/18 | 19382094 | systems/texlive/tlnet/install-tl-windows.exe
+2020/08/18 | 192836 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
+2020/08/18 | 192587 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
+2020/08/18 | 189152 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
+2020/08/18 | 187718 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
+2020/08/18 | 184489 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
+2020/08/18 | 180901 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
+2020/08/18 | 177374 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
+2020/08/18 | 17727 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
+2020/08/18 | 17625 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
+2020/08/18 | 1746181 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
+2020/08/18 | 170418 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
+2020/08/18 | 169656 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
+2020/08/18 | 168264 | systems/texlive/tlnet/archive/texlive-docindex.doc.r56124.tar.xz
+2020/08/18 | 165592 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
+2020/08/18 | 16380597 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
+2020/08/18 | 1631 | macros/latex/contrib/todonotes/README
+2020/08/18 | 16022 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
+2020/08/18 | 159878 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
+2020/08/18 | 15948 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
+2020/08/18 | 154419 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
+2020/08/18 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
+2020/08/18 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
+2020/08/18 | 151863 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
+2020/08/18 | 151836 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
+2020/08/18 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
+2020/08/18 | 1456 | systems/texlive/tlnet/archive/collection-mathscience.r56125.tar.xz
+2020/08/18 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+2020/08/18 | 141853 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
+2020/08/18 | 14132 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
+2020/08/18 | 1404300 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
+2020/08/18 | 133655 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
+2020/08/18 | 1325257 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
+2020/08/18 | 132016 | systems/texlive/tlnet/archive/texlive-scripts.r56124.tar.xz
+2020/08/18 | 13128 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
+2020/08/18 | 130357 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
+2020/08/18 | 1265432 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
+2020/08/18 | 126366 | support/ltximg/script/ltximg.pl
+2020/08/18 | 1211864 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
+2020/08/18 | 1211843 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
+2020/08/18 | 1192974 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
+2020/08/18 | 116787 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
+2020/08/18 | 115880 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
+2020/08/18 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
+2020/08/18 | 113581 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
+2020/08/18 | 1130970 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
+2020/08/18 | 1129649 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
+2020/08/18 | 109731 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
+2020/08/18 | 108992 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
+2020/08/18 | 1061413 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
+2020/08/18 | 104547 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
+2020/08/18 | 1034 | macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.tex
+2020/08/18 | 102588 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
+2020/08/18 | 1021969 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
+2020/08/18 | 101782 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
+2020/08/18 | 100916 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
+2020/08/17 | 974898 | info/biblio/texbook3.bib
2020/08/17 | 96121 | systems/win32/miktex/tm/packages/marathi.tar.lzma
-2020/08/17 | 956333 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-2.9.tar.lzma
-2020/08/17 | 95400 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-2.9.tar.lzma
-2020/08/17 | 94513 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-2.9.tar.lzma
-2020/08/17 | 94383 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-2.9.tar.lzma
-2020/08/17 | 93641 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-x64-2.9.tar.lzma
-2020/08/17 | 93621 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-2.9.tar.lzma
-2020/08/17 | 922274 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-2.9.tar.lzma
2020/08/17 | 9221340 | systems/win32/miktex/tm/packages/oberdiek.tar.lzma
-2020/08/17 | 88874 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-x64-2.9.tar.lzma
-2020/08/17 | 87981 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-x64-2.9.tar.lzma
-2020/08/17 | 87297 | systems/win32/miktex/tm/packages/next/miktex-png-bin-x64-2.9.tar.lzma
-2020/08/17 | 866 | systems/win32/miktex/tm/packages/pr.ini
-2020/08/17 | 8566 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-x64-2.9.tar.lzma
-2020/08/17 | 85159 | systems/win32/miktex/tm/packages/next/miktex-mpmcli-bin-2.9.tar.lzma
-2020/08/17 | 84663 | systems/win32/miktex/tm/packages/next/miktex-bibtex8bit-bin-2.9.tar.lzma
-2020/08/17 | 82787 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin-x64.tar.lzma
2020/08/17 | 82612 | systems/texlive/tlnet/archive/tikztosvg.doc.r56122.tar.xz
-2020/08/17 | 79691 | systems/win32/miktex/tm/packages/next/miktex-mkfntmap-bin-2.9.tar.lzma
-2020/08/17 | 79420 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-x64-2.9.tar.lzma
-2020/08/17 | 78101 | systems/win32/miktex/tm/packages/next/miktex-png-bin-2.9.tar.lzma
2020/08/17 | 776723 | systems/win32/miktex/tm/packages/apa7.tar.lzma
-2020/08/17 | 77487 | systems/win32/miktex/tm/packages/next/miktex-texify-bin-2.9.tar.lzma
-2020/08/17 | 77367 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-x64-2.9.tar.lzma
-2020/08/17 | 77316 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-x64-2.9.tar.lzma
-2020/08/17 | 76796 | systems/win32/miktex/tm/packages/next/miktex-tdsutil-bin.tar.lzma
-2020/08/17 | 7548 | systems/win32/miktex/tm/packages/next/miktex-md5-bin-2.9.tar.lzma
2020/08/17 | 750353 | systems/win32/miktex/tm/packages/fontsetup.tar.lzma
-2020/08/17 | 73690 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-x64-2.9.tar.lzma
-2020/08/17 | 73450 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-x64-2.9.tar.lzma
-2020/08/17 | 72862 | systems/win32/miktex/tm/packages/next/miktex-fonts-bin-2.9.tar.lzma
-2020/08/17 | 72612 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-x64-2.9.tar.lzma
-2020/08/17 | 72256 | systems/win32/miktex/tm/packages/next/miktex-cjkutils-bin-2.9.tar.lzma
-2020/08/17 | 71553 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-x64-2.9.tar.lzma
-2020/08/17 | 70140 | systems/win32/miktex/tm/packages/next/miktex-web-bin-x64-2.9.tar.lzma
-2020/08/17 | 69913 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-x64-2.9.tar.lzma
2020/08/17 | 69594 | systems/win32/miktex/tm/packages/frpseudocode.tar.lzma
-2020/08/17 | 69184 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-x64-2.9.tar.lzma
-2020/08/17 | 68968 | systems/win32/miktex/tm/packages/next/miktex-freeglut-bin-2.9.tar.lzma
-2020/08/17 | 677580 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-x64-2.9.tar.lzma
-2020/08/17 | 67276 | systems/win32/miktex/tm/packages/next/miktex-lzma-bin-2.9.tar.lzma
-2020/08/17 | 67258 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-x64-2.9.tar.lzma
-2020/08/17 | 66015 | systems/win32/miktex/tm/packages/next/miktex-web-bin-2.9.tar.lzma
-2020/08/17 | 65817 | systems/win32/miktex/tm/packages/next/miktex-bibtex-bin-2.9.tar.lzma
-2020/08/17 | 65546 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-x64-2.9.tar.lzma
2020/08/17 | 65521 | systems/win32/miktex/tm/packages/tikztosvg.tar.lzma
-2020/08/17 | 64237 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-x64-2.9.tar.lzma
-2020/08/17 | 638663 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-x64-2.9.tar.lzma
-2020/08/17 | 63554 | systems/win32/miktex/tm/packages/next/miktex-ps2pk-bin-2.9.tar.lzma
-2020/08/17 | 63512 | systems/win32/miktex/tm/packages/next/miktex-graphite2-bin-2.9.tar.lzma
-2020/08/17 | 63429 | systems/win32/miktex/tm/packages/next/miktex-tex4ht-bin-2.9.tar.lzma
+2020/08/17 | 6547 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2020/08/17 | 633869 | systems/win32/miktex/tm/packages/biblatex-ext.tar.lzma
-2020/08/17 | 63358 | systems/win32/miktex/tm/packages/next/miktex-mtprint-bin-2.9.tar.lzma
-2020/08/17 | 62976 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-x64-2.9.tar.lzma
2020/08/17 | 629683 | systems/win32/miktex/tm/packages/overlock.tar.lzma
-2020/08/17 | 623928 | systems/win32/miktex/tm/packages/next/miktex-lcdf-typetools-bin-2.9.tar.lzma
-2020/08/17 | 62027 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-x64-2.9.tar.lzma
2020/08/17 | 6137953 | systems/win32/miktex/tm/packages/newcomputermodern.tar.lzma
2020/08/17 | 602780 | systems/win32/miktex/tm/packages/asmeconf.tar.lzma
-2020/08/17 | 597780 | systems/win32/miktex/tm/packages/next/miktex-yap-bin-2.9.tar.lzma
2020/08/17 | 597270 | systems/win32/miktex/tm/packages/ekdosis.tar.lzma
-2020/08/17 | 59343 | systems/win32/miktex/tm/packages/next/miktex-arctrl-bin-2.9.tar.lzma
-2020/08/17 | 59041 | systems/win32/miktex/tm/packages/next/miktex-gsf2pk-bin-2.9.tar.lzma
-2020/08/17 | 58660 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-x64-2.9.tar.lzma
-2020/08/17 | 583965 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-x64-2.9.tar.lzma
-2020/08/17 | 57313 | systems/win32/miktex/tm/packages/next/miktex-mthelp-bin-2.9.tar.lzma
-2020/08/17 | 57160 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-x64-2.9.tar.lzma
-2020/08/17 | 57148 | systems/win32/miktex/tm/packages/next/miktex-fmt-bin-2.9.tar.lzma
-2020/08/17 | 561890 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-x64-2.9.tar.lzma
-2020/08/17 | 55559 | systems/win32/miktex/tm/packages/next/miktex-ttf2pk2-bin-2.9.tar.lzma
-2020/08/17 | 5500832 | systems/texlive/tlnet/install-tl-unx.tar.gz
-2020/08/17 | 549967 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-x64-2.9.tar.lzma
-2020/08/17 | 544358 | systems/win32/miktex/tm/packages/next/miktex-log4cxx-bin-2.9.tar.lzma
-2020/08/17 | 542244 | systems/win32/miktex/tm/packages/files.csv.lzma
-2020/08/17 | 541919 | systems/win32/miktex/tm/packages/next/files.csv.lzma
+2020/08/17 | 58 | systems/mac/mactex/MacTeXtras-20200817.zip.md5
2020/08/17 | 52715 | systems/win32/miktex/tm/packages/chhaya.tar.lzma
-2020/08/17 | 52203 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-x64-2.9.tar.lzma
-2020/08/17 | 51937 | systems/win32/miktex/tm/packages/next/miktex-cweb-bin-2.9.tar.lzma
-2020/08/17 | 51421 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-x64-2.9.tar.lzma
-2020/08/17 | 51236 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-x64-2.9.tar.lzma
-2020/08/17 | 51136 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-x64-2.9.tar.lzma
-2020/08/17 | 50916 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-x64-2.9.tar.lzma
-2020/08/17 | 500567 | systems/win32/miktex/tm/packages/next/miktex-libressl-bin-2.9.tar.lzma
-2020/08/17 | 49592 | systems/win32/miktex/tm/packages/next/miktex-bibarts-bin-2.9.tar.lzma
-2020/08/17 | 48 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
-2020/08/17 | 48083 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-x64-2.9.tar.lzma
-2020/08/17 | 46355 | systems/win32/miktex/tm/packages/next/miktex-findtexmf-bin-2.9.tar.lzma
-2020/08/17 | 462709 | systems/win32/miktex/tm/packages/next/miktex-harfbuzz-bin-2.9.tar.lzma
-2020/08/17 | 460433 | systems/win32/miktex/tm/packages/next/miktex-doc.tar.lzma
-2020/08/17 | 45776 | systems/win32/miktex/tm/packages/next/miktex-m-tx-bin-2.9.tar.lzma
-2020/08/17 | 455 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl.zip.sha512.asc
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl-windows.exe.sha512.asc
-2020/08/17 | 455 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512.asc
-2020/08/17 | 45319 | systems/win32/miktex/tm/packages/next/miktex-dvicopy-bin-2.9.tar.lzma
2020/08/17 | 452885 | systems/win32/miktex/tm/packages/luaprogtable.tar.lzma
-2020/08/17 | 45032 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-x64-2.9.tar.lzma
-2020/08/17 | 43314 | systems/win32/miktex/tm/packages/next/miktex-expat-bin-2.9.tar.lzma
-2020/08/17 | 43075 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-x64-2.9.tar.lzma
-2020/08/17 | 42624 | systems/win32/miktex/tm/packages/next/miktex-psutils-bin-2.9.tar.lzma
-2020/08/17 | 42063 | systems/win32/miktex/tm/packages/next/miktex-synctex-bin-2.9.tar.lzma
-2020/08/17 | 40822 | systems/win32/miktex/tm/packages/next/miktex-dvipng-bin-2.9.tar.lzma
-2020/08/17 | 39332 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin-x64.tar.lzma
-2020/08/17 | 39268 | systems/win32/miktex/tm/packages/next/miktex-zlib-bin-2.9.tar.lzma
-2020/08/17 | 392368 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-x64-2.9.tar.lzma
-2020/08/17 | 36922 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin-x64.tar.lzma
-2020/08/17 | 36866 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-x64-2.9.tar.lzma
-2020/08/17 | 36360 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-x64-2.9.tar.lzma
-2020/08/17 | 360763 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-x64-2.9.tar.lzma
+2020/08/17 | 38009 | systems/mac/mactex/ExtrasFolder.pdf
+2020/08/17 | 373976190 | systems/mac/mactex/MacTeXtras-20200817.zip
2020/08/17 | 3592713 | systems/win32/miktex/tm/packages/acmart.tar.lzma
-2020/08/17 | 35215 | systems/win32/miktex/tm/packages/next/miktex-patgen-bin.tar.lzma
-2020/08/17 | 35034 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-x64-2.9.tar.lzma
-2020/08/17 | 34775 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-x64-2.9.tar.lzma
2020/08/17 | 341442 | systems/win32/miktex/tm/packages/pagesel.tar.lzma
2020/08/17 | 340901 | systems/win32/miktex/tm/packages/algpseudocodex.tar.lzma
-2020/08/17 | 33088 | systems/win32/miktex/tm/packages/next/miktex-upmendex-bin.tar.lzma
-2020/08/17 | 329617 | systems/win32/miktex/tm/packages/next/miktex-cairo-bin-2.9.tar.lzma
-2020/08/17 | 327553 | systems/win32/miktex/tm/packages/next/miktex-pdftex-bin-2.9.tar.lzma
-2020/08/17 | 32393 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-x64-2.9.tar.lzma
-2020/08/17 | 32350 | systems/win32/miktex/tm/packages/next/miktex-chktex-bin-2.9.tar.lzma
2020/08/17 | 3149207 | systems/win32/miktex/tm/packages/texplate.tar.lzma
-2020/08/17 | 31253 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-x64-2.9.tar.lzma
-2020/08/17 | 31224 | systems/win32/miktex/tm/packages/next/miktex-mspack-bin-2.9.tar.lzma
-2020/08/17 | 31211 | systems/win32/miktex/tm/packages/next/miktex-posix-bin-2.9.tar.lzma
-2020/08/17 | 310936 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-x64-2.9.tar.lzma
2020/08/17 | 310483 | systems/win32/miktex/tm/packages/hopatch.tar.lzma
-2020/08/17 | 30909 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-x64-2.9.tar.lzma
-2020/08/17 | 30891 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-x64-2.9.tar.lzma
-2020/08/17 | 305083 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-x64-2.9.tar.lzma
2020/08/17 | 3033158 | systems/win32/miktex/tm/packages/logix.tar.lzma
2020/08/17 | 3008745 | macros/latex/contrib/mlacls.zip
-2020/08/17 | 29637 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-x64-2.9.tar.lzma
-2020/08/17 | 29399 | systems/win32/miktex/tm/packages/next/miktex-axohelp-bin-2.9.tar.lzma
-2020/08/17 | 29058 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-x64-2.9.tar.lzma
-2020/08/17 | 29026 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-x64-2.9.tar.lzma
-2020/08/17 | 28605 | systems/win32/miktex/tm/packages/next/miktex-autosp-bin-2.9.tar.lzma
2020/08/17 | 286004 | systems/win32/miktex/tm/packages/thmtools.tar.lzma
-2020/08/17 | 281780 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-x64-2.9.tar.lzma
-2020/08/17 | 279881 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-x64-2.9.tar.lzma
-2020/08/17 | 27801 | systems/win32/miktex/tm/packages/next/miktex-lacheck-bin-2.9.tar.lzma
-2020/08/17 | 273697 | systems/win32/miktex/tm/packages/next/miktex-dvipdfmx-bin-2.9.tar.lzma
-2020/08/17 | 27008 | systems/win32/miktex/tm/packages/next/miktex-bzip2-bin-2.9.tar.lzma
-2020/08/17 | 26996 | systems/win32/miktex/tm/packages/next/miktex-makeindex-bin-2.9.tar.lzma
-2020/08/17 | 269404 | systems/win32/miktex/tm/packages/next/miktex-metapost-bin-2.9.tar.lzma
-2020/08/17 | 26852 | systems/win32/miktex/tm/packages/next/miktex-teckit-bin-2.9.tar.lzma
2020/08/17 | 267100 | systems/win32/miktex/tm/packages/expkv-opt.tar.lzma
-2020/08/17 | 26612 | systems/win32/miktex/tm/packages/next/miktex-uriparser-bin-2.9.tar.lzma
-2020/08/17 | 2657476 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-x64-2.9.tar.lzma
-2020/08/17 | 25504 | systems/win32/miktex/tm/packages/next/miktex-fribidixetex-bin-2.9.tar.lzma
-2020/08/17 | 2534480 | systems/win32/miktex/tm/packages/next/miktex-texworks-bin-2.9.tar.lzma
-2020/08/17 | 250290 | systems/win32/miktex/tm/packages/next/miktex-xetex-bin-2.9.tar.lzma
-2020/08/17 | 246824 | systems/win32/miktex/tm/packages/next/miktex-freetype2-bin-2.9.tar.lzma
-2020/08/17 | 243053 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-x64-2.9.tar.lzma
-2020/08/17 | 24269384 | systems/texlive/tlnet/install-tl.zip
-2020/08/17 | 23600 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-x64-2.9.tar.lzma
-2020/08/17 | 22981 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-x64-2.9.tar.lzma
-2020/08/17 | 224086 | systems/win32/miktex/tm/packages/next/miktex-console-bin-x64-2.9.tar.lzma
-2020/08/17 | 2215288 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
-2020/08/17 | 211536 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-x64-2.9.tar.lzma
-2020/08/17 | 210278 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-x64-2.9.tar.lzma
-2020/08/17 | 20816 | systems/win32/miktex/tm/packages/next/miktex-devnag-bin-2.9.tar.lzma
-2020/08/17 | 207672 | systems/win32/miktex/tm/packages/next/miktex-pmx-bin-2.9.tar.lzma
-2020/08/17 | 203965 | systems/win32/miktex/tm/packages/next/miktex-console-bin-2.9.tar.lzma
-2020/08/17 | 2031793 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-x64-2.9.tar.lzma
-2020/08/17 | 202524 | systems/win32/miktex/tm/packages/next/miktex-zzdb1-2.9.tar.lzma
-2020/08/17 | 202504 | systems/win32/miktex/tm/packages/miktex-zzdb1-2.9.tar.lzma
-2020/08/17 | 20006 | systems/win32/miktex/tm/packages/next/miktex-popt-bin-2.9.tar.lzma
-2020/08/17 | 196318 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-2.9.tar.lzma
-2020/08/17 | 193835 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-x64-2.9.tar.lzma
-2020/08/17 | 19381435 | systems/texlive/tlnet/install-tl-windows.exe
-2020/08/17 | 192835 | systems/win32/miktex/tm/packages/next/miktex-metafont-bin-2.9.tar.lzma
-2020/08/17 | 192587 | systems/win32/miktex/tm/packages/next/miktex-omegaware-bin-2.9.tar.lzma
2020/08/17 | 190856 | systems/win32/miktex/tm/packages/beamerauxtheme.tar.lzma
-2020/08/17 | 189152 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-x64-2.9.tar.lzma
-2020/08/17 | 187719 | systems/win32/miktex/tm/packages/next/miktex-pixman-bin-2.9.tar.lzma
-2020/08/17 | 184491 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-x64-2.9.tar.lzma
-2020/08/17 | 180901 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-x64-2.9.tar.lzma
-2020/08/17 | 177375 | systems/win32/miktex/tm/packages/next/miktex-mpfr-bin-x64-2.9.tar.lzma
-2020/08/17 | 17728 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-x64-2.9.tar.lzma
-2020/08/17 | 17626 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-x64-2.9.tar.lzma
-2020/08/17 | 1746181 | systems/win32/miktex/tm/packages/next/miktex-luatex-bin-2.9.tar.lzma
-2020/08/17 | 170419 | systems/win32/miktex/tm/packages/next/miktex-mktex-bin-2.9.tar.lzma
-2020/08/17 | 169657 | systems/win32/miktex/tm/packages/next/miktex-curl-bin-2.9.tar.lzma
+2020/08/17 | 1780 | systems/mac/mactex/Licenses.txt
2020/08/17 | 1684 | systems/texlive/tlnet/archive/tikztosvg.r56122.tar.xz
-2020/08/17 | 165592 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-x64-2.9.tar.lzma
-2020/08/17 | 16379111 | systems/texlive/tlnet/tlpkg/texlive.tlpdb
-2020/08/17 | 16023 | systems/win32/miktex/tm/packages/next/miktex-tex2xindy-bin-2.9.tar.lzma
-2020/08/17 | 159877 | systems/win32/miktex/tm/packages/next/miktex-mo-bin-2.9.tar.lzma
-2020/08/17 | 15949 | systems/win32/miktex/tm/packages/next/miktex-kpathsea-bin-2.9.tar.lzma
-2020/08/17 | 154419 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-x64-2.9.tar.lzma
-2020/08/17 | 153 | systems/texlive/tlnet/install-tl-windows.exe.sha512
-2020/08/17 | 152 | systems/texlive/tlnet/install-tl-unx.tar.gz.sha512
-2020/08/17 | 151865 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-x64-2.9.tar.lzma
-2020/08/17 | 151836 | systems/win32/miktex/tm/packages/next/miktex-tex-bin-2.9.tar.lzma
-2020/08/17 | 145 | systems/texlive/tlnet/install-tl.zip.sha512
-2020/08/17 | 144 | systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
-2020/08/17 | 141853 | systems/win32/miktex/tm/packages/next/miktex-hunspell-bin-2.9.tar.lzma
-2020/08/17 | 14132 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-x64-2.9.tar.lzma
-2020/08/17 | 1404304 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-x64-2.9.tar.lzma
2020/08/17 | 136373 | systems/win32/miktex/tm/packages/academicons.tar.lzma
-2020/08/17 | 133655 | systems/win32/miktex/tm/packages/next/miktex-fontconfig-bin-2.9.tar.lzma
-2020/08/17 | 1325258 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-x64-2.9.tar.lzma
-2020/08/17 | 13127 | systems/win32/miktex/tm/packages/next/miktex-zzip-bin-2.9.tar.lzma
-2020/08/17 | 130356 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-x64-2.9.tar.lzma
-2020/08/17 | 1265431 | systems/win32/miktex/tm/packages/next/miktex-dvisvgm-bin-2.9.tar.lzma
-2020/08/17 | 1211954 | systems/win32/miktex/tm/packages/miktex-zzdb2-2.9.tar.lzma
-2020/08/17 | 1211820 | systems/win32/miktex/tm/packages/next/miktex-zzdb2-2.9.tar.lzma
-2020/08/17 | 1192974 | systems/win32/miktex/tm/packages/next/miktex-runtime-bin-2.9.tar.lzma
-2020/08/17 | 116786 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-x64-2.9.tar.lzma
-2020/08/17 | 115881 | systems/win32/miktex/tm/packages/next/miktex-dvips-bin-2.9.tar.lzma
-2020/08/17 | 1153 | systems/win32/miktex/tm/packages/next/pr.ini
-2020/08/17 | 113580 | systems/win32/miktex/tm/packages/next/miktex-gregorio-bin-x64-2.9.tar.lzma
-2020/08/17 | 1131809 | systems/win32/miktex/tm/packages/next/miktex-zzdb3-2.9.tar.lzma
-2020/08/17 | 1131000 | systems/win32/miktex/tm/packages/miktex-zzdb3-2.9.tar.lzma
-2020/08/17 | 109730 | systems/win32/miktex/tm/packages/next/miktex-epstopdf-bin-x64-2.9.tar.lzma
-2020/08/17 | 108991 | systems/win32/miktex/tm/packages/next/miktex-jpeg-bin-x64-2.9.tar.lzma
2020/08/17 | 1082861 | systems/win32/miktex/tm/packages/mcf2graph.tar.lzma
-2020/08/17 | 1061414 | systems/win32/miktex/tm/packages/next/miktex-asymptote-bin-x64-2.9.tar.lzma
-2020/08/17 | 104547 | systems/win32/miktex/tm/packages/next/miktex-texware-bin-x64-2.9.tar.lzma
-2020/08/17 | 102589 | systems/win32/miktex/tm/packages/next/miktex-lua53-bin-x64-2.9.tar.lzma
-2020/08/17 | 1021969 | systems/win32/miktex/tm/packages/next/miktex-poppler-bin-x64-2.9.tar.lzma
-2020/08/17 | 101784 | systems/win32/miktex/tm/packages/next/miktex-mfware-bin-x64-2.9.tar.lzma
-2020/08/17 | 100917 | systems/win32/miktex/tm/packages/next/miktex-gd-bin-2.9.tar.lzma
2020/08/16 | 93967 | support/tikztosvg/tikztosvg.pdf
2020/08/16 | 920 | support/tikztosvg/Makefile
2020/08/16 | 803192 | systems/win32/w32tex/win64/dvipdfm-w64.tar.xz
@@ -235,7 +267,6 @@
2020/08/16 | 48804788 | systems/win32/w32tex/xetex-w32.tar.xz
2020/08/16 | 468 | macros/latex/contrib/mlacls/BUGS.md
2020/08/16 | 4661680 | systems/win32/w32tex/dvipdfm-w32.tar.xz
-2020/08/16 | 388 | systems/texlive/tlnet/archive/texlive-docindex.r56115.tar.xz
2020/08/16 | 3639 | macros/latex/contrib/mlacls/mla-example.tex
2020/08/16 | 363697 | macros/latex/contrib/algpseudocodex/documentation.pdf
2020/08/16 | 343165 | macros/latex/contrib/algpseudocodex.zip
@@ -246,17 +277,14 @@
2020/08/16 | 2697315 | macros/latex/contrib/mlacls/mla-example.pdf
2020/08/16 | 267 | support/tikztosvg/CHANGELOG.adoc
2020/08/16 | 2296 | support/tikztosvg/man/tikztosvg.1
-2020/08/16 | 218656 | systems/texlive/tlnet/archive/texlive-scripts.doc.r56115.tar.xz
2020/08/16 | 2016 | support/tikztosvg/README.md
2020/08/16 | 19393 | macros/latex/contrib/algpseudocodex/documentation.tex
2020/08/16 | 1920 | macros/latex/contrib/mlacls/README.md
2020/08/16 | 19106 | macros/latex/contrib/mlacls/LICENSE
2020/08/16 | 1707804 | systems/win32/w32tex/win64/ptex-ng-w64.tar.xz
-2020/08/16 | 168264 | systems/texlive/tlnet/archive/texlive-docindex.doc.r56115.tar.xz
2020/08/16 | 1642 | support/tikztosvg/man/man.adoc
2020/08/16 | 1628 | macros/latex/contrib/mlacls/mla.ins
2020/08/16 | 15343 | CTAN.sites
-2020/08/16 | 132028 | systems/texlive/tlnet/archive/texlive-scripts.r56115.tar.xz
2020/08/16 | 11006888 | systems/win32/w32tex/win64/xetex-w64.tar.xz
2020/08/16 | 103408 | systems/texlive/tlnet/archive/academicons.doc.r56119.tar.xz
2020/08/15 | 867928 | systems/texlive/tlnet/archive/beebe.r56109.tar.xz
@@ -264,7 +292,6 @@
2020/08/15 | 7092 | systems/texlive/tlnet/archive/luaprogtable.r56113.tar.xz
2020/08/15 | 680 | systems/texlive/tlnet/archive/collection-luatex.r56113.tar.xz
2020/08/15 | 68024 | systems/texlive/tlnet/archive/ekdosis.source.r56112.tar.xz
-2020/08/15 | 6588 | systems/texlive/tlnet/tlpkg/installer/ctan-mirrors.pl
2020/08/15 | 5688 | systems/texlive/tlnet/archive/fontsetup.r56111.tar.xz
2020/08/15 | 513188 | systems/texlive/tlnet/archive/ekdosis.doc.r56112.tar.xz
2020/08/15 | 4479552 | systems/texlive/tlnet/archive/newcomputermodern.r56110.tar.xz
@@ -537,10 +564,3 @@
2020/08/12 | 13344 | macros/latex/contrib/oberdiek/tabularkv.dtx
2020/08/12 | 1278 | macros/latex/contrib/apa7/README.txt
2020/08/12 | 106085 | macros/latex/contrib/oberdiek/bmpsize.dtx
-2020/08/11 | 68644 | systems/texlive/tlnet/archive/frpseudocode.doc.r56088.tar.xz
-2020/08/11 | 3579 | info/biblio/tugboat.ltx
-2020/08/11 | 3312 | systems/texlive/tlnet/archive/beamerauxtheme.r56087.tar.xz
-2020/08/11 | 20912 | systems/texlive/tlnet/archive/mcf2graph.r56086.tar.xz
-2020/08/11 | 187988 | systems/texlive/tlnet/archive/beamerauxtheme.doc.r56087.tar.xz
-2020/08/11 | 1216 | systems/texlive/tlnet/archive/frpseudocode.r56088.tar.xz
-2020/08/11 | 1060304 | systems/texlive/tlnet/archive/mcf2graph.doc.r56086.tar.xz
diff --git a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
index 4aa4f385eb..9c5ad84d16 100644
--- a/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
+++ b/macros/latex/contrib/todonotes/examples/alterAppearenceOfListOfTodos.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/externalize.pdf b/macros/latex/contrib/todonotes/examples/externalize.pdf
index 892d8cf37c..13fc64975f 100644
--- a/macros/latex/contrib/todonotes/examples/externalize.pdf
+++ b/macros/latex/contrib/todonotes/examples/externalize.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
index be2f44a1d2..d0544a53ec 100644
--- a/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
+++ b/macros/latex/contrib/todonotes/examples/saveColorByUsingLayers.pdf
Binary files differ
diff --git a/macros/latex/contrib/todonotes/todonotes.dtx b/macros/latex/contrib/todonotes/todonotes.dtx
index b4180a797f..484d825eb3 100644
--- a/macros/latex/contrib/todonotes/todonotes.dtx
+++ b/macros/latex/contrib/todonotes/todonotes.dtx
@@ -20,14 +20,14 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{todonotes}
%<*package>
- [2019/01/24 v1.1.2 Todonotes source and documentation.]
+ [2020/08/18 v1.1.3 Todonotes source and documentation.]
%</package>
%
%<*driver>
\documentclass{ltxdoc}
\usepackage{wrapfig}
\usepackage[colorlinks, linkcolor=black, urlcolor=blue]{hyperref}
-\usepackage[colorinlistoftodos]{todonotes}[2018/11/22]
+\usepackage[colorinlistoftodos]{todonotes}[2020/08/18]
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{soul}
@@ -45,7 +45,7 @@
%</driver>
% \fi
%
-% \CheckSum{717}
+% \CheckSum{721}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -205,6 +205,8 @@
% (both commands (backslash tiny) and text (tiny) are now supported).}
% \changes{1.1.1}{2018/11/22}{Implemented shadow and noshadow options for the todo command.}
% \changes{1.1.2}{2019/01/24}{Fix issue 36 and 37.}
+% \changes{1.1.3}{2020/08/18}{Fix issue 48 and make colors used in the last todo
+% globally available.}
% \GetFileInfo{todonotes.dtx}
%
% \DoNotIndex{\newcommand,\newenvironment}
@@ -253,10 +255,10 @@
% Large package with a lot of features.
% \end{itemize}
% The main reason for considering other packages is that the todonotes
-% package is quire large and relies heavily on tikz.
+% package is quite large and relies heavily on tikz.
% This can slow down compilation of large documents significantly.
% The mentioned alternatives have a different feature set and does not
-% rely on tikz, which makes them require less ressoureces.
+% rely on tikz, which makes them require fewer resources.
%
%
% \subsection{Usage}
@@ -700,6 +702,12 @@
%\usepackage{menukeys}
% \end{verbatim}
%
+% The following packages must be loaded before the todonotes
+% package:
+% \begin{itemize}
+% \item polyglossia
+% \end{itemize}
+%
%
% \subsubsection{Wrapping of long lines in list of todos}
% When a document is compiled with latex (and not pdflatex) long
@@ -792,6 +800,33 @@
% |\let\marginpar\oldmarginpar|
%
%
+% \subsubsection{todos in math and floating environments}
+% It is not possible to insert todonotes into math environments or
+% floating environments like \verb!figure! or \verb!table!.
+% By replacing the marginpar command with a marginnote this
+% can be enabled.
+% For todos inside math environments the todo must be placed in an
+% \verb!mbox! or \verb!\textrm! command.
+%
+% \begin{verbatim}
+% \documentclass{article}
+% \usepackage{todonotes}
+% \usepackage{marginnote}
+% \let\marginpar\marginnote
+%
+% \begin{document}
+% \begin{equation}
+% a^2=b^2+c^2 \textrm{\todo{Test}}
+% \end{equation}
+% \begin{figure}
+% \centering
+% \caption{Caption\todo{tests}.}
+% \label{fig}
+% \end{figure}
+%
+% \end{verbatim}
+%
+%
% \subsection{Things to improve}
% This is a list of things I consider to improve sometime in the
% future. It have not been done yet as I lack the time or skills to
@@ -859,18 +894,16 @@
% functionality of |\todo| with custom default values.
% \begin{verbatim}
% \newcommand{\todoredefined}[2][]
-% {\todo[color=red, #1]{#2}}
-% \end{verbatim}
+% {\todo[color=red, #1]{#2}}\end{verbatim}
% \newcommand{\todoredefined}[2][]
% {\todo[color=red, #1]{#2}}
-% \todoredefined{Test of newly defined command.}
-% The new command can now be used like shown below
+% The \todoredefined{Test of newly defined command.}
+% new command can now be used like shown below
% \begin{verbatim}
% \todoredefined{Test of newly defined command.}
-% \todoredefined[color=green]{Test of newly defined command, requesting a green color.}
-% \end{verbatim}
-% \todoredefined[color=green]{Test of newly defined command, requesting a green color.}
-% This can be done with all the accepted options for the |\todo| command.
+% \todoredefined[color=green]{Test of newly defined command, requesting a green color.} \end{verbatim}
+% This \todoredefined[color=green]{Test of newly defined command, requesting a green color.}
+% can be done with all the accepted options for the |\todo| command.
%
%
%
@@ -1497,21 +1530,21 @@ prior to loading the todonotes package.} \else\fi%
% commands in the package are defined.
% Set an arbitrarily fill color
% \begin{macrocode}
-\newcommand{\@todonotes@currentlinecolor}{}%
-\newcommand{\@todonotes@currentbackgroundcolor}{}%
-\newcommand{\@todonotes@currenttextcolor}{}%
-\newcommand{\@todonotes@currentbordercolor}{}%
+\gdef\@todonotes@currentlinecolor{\@todonotes@linecolor}%
+\gdef\@todonotes@currentbackgroundcolor{\@todonotes@backgroundcolor}%
+\gdef\@todonotes@currenttextcolor{\@todonotes@textcolor}%
+\gdef\@todonotes@currentbordercolor{\@todonotes@bordercolor}%
\define@key{todonotes}{color}{%
- \renewcommand{\@todonotes@currentlinecolor}{#1}%
- \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+ \gdef\@todonotes@currentlinecolor{#1}%
+ \gdef\@todonotes@currentbackgroundcolor{#1}}%
\define@key{todonotes}{linecolor}{%
- \renewcommand{\@todonotes@currentlinecolor}{#1}}%
+ \gdef\@todonotes@currentlinecolor{#1}}%
\define@key{todonotes}{backgroundcolor}{%
- \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+ \gdef\@todonotes@currentbackgroundcolor{#1}}%
\define@key{todonotes}{textcolor}{%
- \renewcommand{\@todonotes@currenttextcolor}{#1}}%
+ \gdef\@todonotes@currenttextcolor{#1}}%
\define@key{todonotes}{bordercolor}{%
- \renewcommand{\@todonotes@currentbordercolor}{#1}}%
+ \gdef\@todonotes@currentbordercolor{#1}}%
% \end{macrocode}
% Toggle whether there is a shadow behind the inserted notes.
% \begin{macrocode}
diff --git a/macros/latex/contrib/todonotes/todonotes.pdf b/macros/latex/contrib/todonotes/todonotes.pdf
index 4a3f576369..a3f20cdf2b 100644
--- a/macros/latex/contrib/todonotes/todonotes.pdf
+++ b/macros/latex/contrib/todonotes/todonotes.pdf
Binary files differ
diff --git a/support/ltximg/README.md b/support/ltximg/README.md
index de487ceabd..f61e27dd66 100644
--- a/support/ltximg/README.md
+++ b/support/ltximg/README.md
@@ -1,38 +1,50 @@
-## LTXimg &ndash; LaTeX environments to image format
+## LTXimg &ndash; Extract LaTeX environments to image format and standalone files
+
+Release v1.8 \[2020-08-18\]
## Description
**ltximg** is a perl *script* that automates the process of extracting and converting
-environments provided by **tikz**, **pstricks** and other packages from input file
-to image formats in individual files using `ghostscript` and `poppler-utils`. Generates a file
-with only extracted environments and other with environments converted to `\includegraphics`.
+environments provided by **TikZ**, **PStricks** and other packages from input file
+to image formats and standalone files using `ghostscript` and `poppler-utils`. Generates a
+file with only extracted environments and another with all extracted environments converted to `\includegraphics`.
## Syntax
-```bash
-$ ltximg [<compiler>] [<options>] [--] <input file>.<tex|ltx>
+
```
+$ ltximg [<options>] [--] <input file>.<tex|ltx>
+```
+
+Relative or absolute `paths` for directories and files is not supported. Options that accept a _value_ require either a blank
+space or `=` between the option and the _value_. Multiple short options can be bundling and if the last option takes a _comma
+separated list_ you need `--` at the end.
+
## Usage
-```bash
+
+```
$ ltximg --latex [<options>] <file.tex>
$ ltximg --arara [<options>] <file.tex>
$ ltximg [<options>] <file.tex>
$ ltximg <file.tex>
```
-If used without `[<compiler>]` and `[<options>]` the extracted environments are converted to `pdf` image format
-and saved in the `/images` directory using `pdflatex` and `preview` package. Relative or absolute `paths` for files
-and directories is not supported. If the last `[<options>]` take a *list separated by commas*, you need `--` at the end.
+
+If used without `[<options>]` the extracted environments are converted to `pdf` image format
+and saved in the `./images` directory using `pdflatex` and `preview` package to process `<input file>`.
## Default environments extract
-```bash
- pspicture tikzpicture pgfpicture psgraph postscript PSTexample
+
+```
+ preview pspicture tikzpicture pgfpicture psgraph postscript PSTexample
```
+
## Options
-```bash
+```
[default]
-h, --help Display command line help and exit [off]
--l, --license Display GPL license and exit [off]
--v, --version Display current version (1.7) and exit [off]
+-v, --version Display current version (1.8) and exit [off]
+-V, --verbose Verbose printing information [off]
+-l, --log Write .log file with debug information [off]
-t, --tif Create .tif files using ghostscript [gs]
-b, --bmp Create .bmp files using ghostscript [gs]
-j, --jpg Create .jpg files using ghostscript [gs]
@@ -42,65 +54,75 @@ and directories is not supported. If the last `[<options>]` take a *list separat
-P, --ppm Create .ppm files using poppler-utils [pdftoppm]
-g, --gray Gray scale for images using ghostscript [off]
-f, --force Capture "\psset" and "\tikzset" to extract [off]
--n, --noprew Create images files whitout "preview" package [off]
+-n, --noprew Create images files without "preview" package [off]
+-r <integer>, --runs <integer>
+ Set the number of times the compiler will run
+ on the input file for environment extraction [1]
-d <integer>, --dpi <integer>
Dots per inch resolution for images [150]
--m <integer>, --margin <integer>
- Set margins for pdfcrop [0]
---imgdir <dirname> Set name of directory to save images [images]
---zip Compress files generated in .zip format [off]
---tar Compress files generated in .tar.gz format [off]
+-m <integer>, --margins <integer>
+ Set margins in bp for pdfcrop [0]
-o <filename>, --output <filename>
Create output file [off]
---verbose Verbose printing [off]
---srcenv Create files whit only code environment [off]
---subenv Create files whit preamble and code [off]
+--imgdir <dirname> Set name of directory to save images/files [images]
+--prefix <string> Set prefix append to each generated files [fig]
+--myverb <macroname> Add "\macroname" to verbatim inline search [myverb]
+--clean (doc|pst|tkz|all|off)
+ Removes specific block text in output file [doc]
+--zip Compress files generated in .zip [off]
+--tar Compress files generated in .tar.gz [off]
+--srcenv Create files with only code of environments [off]
+--subenv Create standalone files for environments [off]
+--shell Enable \write18{SHELL COMMAND} [off]
--latex Using latex>dvips>ps2pdf for compiler input
and pdflatex for compiler output [off]
--dvips Using latex>dvips>ps2pdf for compiler input
and latex>dvips>ps2pdf for compiler output [off]
---arara Use arara for compiler input and output [off]
+--dvilua Using dvilualatex>dvips>ps2pdf for compiler
+ input and lualatex for compiler output [off]
+--dvipdf Using latex>dvipdfmx for compiler input and
+ latex>dvipdfmx for compiler output [off]
--xetex Using xelatex for compiler input and output [off]
---dvipdf Using dvipdfmx for compiler input and output [off]
--luatex Using lualatex for compiler input and output [off]
---prefix <string> Set prefix append to each image file [off]
+--arara Use arara for compiler input and output [off]
+--latexmk Using latexmk for compiler output file [off]
--norun Run script, but no create images files [off]
--nopdf Don't create a ".pdf" image files [off]
--nocrop Don't run pdfcrop [off]
---verbcmd <cmdname> Set "\cmdname" verbatim command [myverb]
---clean (doc|pst|tkz|all|off)
- Removes specific text in output file [doc]
--extrenv <env1,...> Add new environments to extract [empty]
---skipenv <env1,...> Skip environments to extract [empty]
---verbenv <env1,...> Add verbatim environments [empty]
---writenv <env1,...> Add verbatim write environments [empty]
+--skipenv <env1,...> Skip some default environments to extract [empty]
+--verbenv <env1,...> Add new verbatim environments [empty]
+--writenv <env1,...> Add new verbatim write environments [empty]
--deltenv <env1,...> Delete environments in output file [empty]
```
+
## Example
-```bash
-$ ltximg --latex -e -p --srcenv --imgdir=mypics -o test-out test-in.ltx
+
```
-```bash
-$ ltximg --latex -ep --srcenv --imgdir mypics -o test-out test-in.ltx
+$ ltximg --latex -e -p --subenv --imgdir mypics -o test-out test-in.ltx
```
- Create a `/mypics` directory whit all extracted environments converted to
- image formats (`.pdf`, `.eps`, `.png`), individual files whit source code (`.tex`)
- for all extracted environments, a file `test-out.ltx` whit all environments converted to `\includegraphics`
- and file `test-in-fig-all.tex` with only the extracted environments using
- `latex>dvips>ps2pdf` and `preview` package for `<input file>` and `pdflatex`
- for `<output file>`.
+
+Create a `./mypics` directory (if it doesn’t exist) with all extracted environments
+converted to images (`.pdf`, `.eps`, `.png`) and _standalone_ files (`.ltx`), a file `test-in-fig-all.ltx`
+with all extracted environments and the file `test-out.ltx` with all environments converted to `\includegraphics`
+using `latex>dvips>ps2pdf` and `preview` package for `<input file>` and `pdflatex` for `<output file>`.
## Documentation
- For full documentation use:
-```bash
+
+For full documentation use:
+
+```
$ texdoc ltximg
```
- For recreation all documentation use:
-```bash
-$ arara ltximg-doc.dtx
+
+For recreation all documentation use:
+
+```
+$ arara ltximg-doc.dtx -H
```
## Licence
+
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
@@ -111,8 +133,8 @@ License for more details.
## Author
-Written by Pablo González L <pablgonz@yahoo.com>, last update 2019-08-24.
+Written by Pablo González L `<pablgonz@yahoo.com>`.
## Copyright
-Copyright 2013 - 2019 by Pablo González L
+Copyright 2013 - 2020 by Pablo González L.
diff --git a/support/ltximg/doc/ltximg-doc.pdf b/support/ltximg/doc/ltximg-doc.pdf
new file mode 100644
index 0000000000..6f8418d952
--- /dev/null
+++ b/support/ltximg/doc/ltximg-doc.pdf
Binary files differ
diff --git a/support/ltximg/doc/ltximg-doc.tex b/support/ltximg/doc/ltximg-doc.tex
new file mode 100644
index 0000000000..782ea159d3
--- /dev/null
+++ b/support/ltximg/doc/ltximg-doc.tex
@@ -0,0 +1,2087 @@
+% arara: lualatex
+% arara: lualatex
+% arara: clean: { extensions: [ aux, log, out, ilg, ind, idx, toc, hd, fls ] }
+\documentclass{ltxdoc}
+\usepackage[top=0.5in, bottom=0.3in, left=1.4in, right=0.7in,footskip=0.2in,headheight=1cm,headsep=0.27cm]{geometry}
+\usepackage{unicode-math} %
+\setmathfont[Scale = 0.95]{Latin Modern Math}
+\setmainfont[
+ Numbers = OldStyle,
+ Ligatures = TeX,
+ Scale = 0.95,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ BoldItalicFont = *-BoldItalic,
+ SmallCapsFeatures = {Letters=SmallCaps},
+ Extension =.otf]{LibertinusSerif}
+\setsansfont[
+ Numbers = OldStyle,
+ Ligatures = TeX,
+ Scale = 0.95,
+ UprightFont = *-Regular,
+ ItalicFont = *-Italic,
+ BoldFont = *-Bold,
+ SmallCapsFeatures = {Letters=SmallCaps},
+ Extension = .otf]{LibertinusSans}
+\setmonofont[
+ Numbers = OldStyle,
+ Scale = 0.80,
+ UprightFont = *-Regular,
+ ItalicFont = *-RegularIt,
+ BoldFont = *-Semibold,
+ BoldItalicFont = *-SemiboldIt,
+ RawFeature = {+zero,+ss06},
+ FontFace = {m}{sc}{LinBiolinum_R.otf},
+ Extension = .otf]{SourceCodePro} % source code font
+\newfontfamily\lmmitalic{lmmono10-italic.otf}[
+ Scale = 0.95,%
+ Extension = .otf,%
+ ItalicFont = lmmono10-italic,%
+ SmallCapsFont = lmmonocaps10-oblique,%
+ SlantedFont = lmmonoslant10-regular,
+ ]
+\newfontfamily\fetamontotf{ffmw10.otf}[
+ Scale = 0.95,%
+ RawFeature = {+latn,+rand,+kern,+size},%
+ FontFace = {bx}{n}{ffmw10.otf},
+ ]
+\newfontfamily\libertinusinitials{LibertinusSerifInitials-Regular.otf}
+% The character of visible space is now taken from Latin Modern Mono
+% to prevent fonts in T1. The original definition for xetex/luatex is
+% \def\verbvisiblespace{\usefont{OT1}{cmtt}{m}{n}\asciispace}
+\def\verbvisiblespace{{\fontfamily{lmtt}\selectfont\char"2423}}
+\usepackage{fontawesome5}
+\usepackage{hologo} % LaTeX logos
+\usepackage{enumitem,lastpage,microtype,titletoc} % custom
+\usepackage[svgnames]{xcolor} %
+\usepackage[sf,bf,compact,medium]{titlesec} % section styles
+\usepackage[topmarks,extramarks]{titleps} % pagestyles
+\settitlemarks*{section,subsection}
+\usepackage{adjustbox,multicol,hyperref,xparse,listings,accsupp}
+\usepackage{csquotes}
+\usepackage{hyperxmp,imakeidx}%
+% Hyperref number in index
+\newcommand{\HP}[1]{\emph{\hyperpage{#1}}\normalsize}
+\def\SortIndex#1#2{\index{#1\actualchar#2|HP}}
+\indexsetup{level=\section,firstpagestyle=myheader}
+%\makeindex[options=-s gind.ist,columnsep=15pt,title={Index of Documentation}] %noautomatic
+\makeindex[noautomatic,columnsep=15pt,title={Index of Documentation}] %
+
+% parindent
+\setlength{\parindent}{0pt}
+
+% Colors for options
+\definecolor{optcolor}{rgb}{0.281,0.275,0.485}
+\definecolor{pkgcolor}{rgb}{0,0.5,0.5}
+\definecolor{araracolor}{rgb}{0, 0.72, 0.28}
+\definecolor{linkcolor}{rgb}{0.04,0.38,0.04}
+\definecolor{rulecolor}{rgb}{0.96,0.96,0.96}
+
+% Only for arara... I like arara :)
+\usepackage[scale=0.85]{comfortaa}
+\newcommand{\araratext}[1]{{\small\normalfont\comfortaa\color{araracolor}\bfseries#1}}
+\newcommand*\arara{\araratext{ar\kern-.03emar\kern-.03ema}}
+
+% Identification
+\def\myscript{ltximg}
+\def\fileversion{1.8}
+\def\filedate{2020-08-18}
+
+% Logo with fetamont and libertuns font
+\ExplSyntaxOn
+\NewDocumentCommand{\pkglogo}{}
+ {
+ \group_begin:
+ \libertinusinitials%
+ \textcolor{red}{L}\hspace{-3.0pt}%
+ \raisebox{-0.2em}{\small \textcolor{green}{T}}%
+ \hspace{-2.9pt}\textcolor{blue}{X}%
+ \hspace{-1pt}
+ \fetamontotf{\textcolor{gray}{img}}
+ \group_end:
+ }
+\ExplSyntaxOff
+
+% Logo with libertuns and fetamont font (box)
+\newsavebox{\logobox}
+\savebox{\logobox}{%
+ \normalsize%
+ {\libertinusinitials%
+ \textcolor{red}{L}\hspace{-3.0pt}%
+ \raisebox{-0.2em}{\small \textcolor{green}{T}}%
+ \hspace{-2.9pt}\textcolor{blue}{X}}%
+ \hspace{-1pt}\fetamontotf{\textcolor{gray}{img}}%
+}%
+\makeatletter
+\newcommand{\LTXimg}{%
+ \settoheight{\@tempdima}{L}%
+ \resizebox{!}{\@tempdima}{\usebox{\logobox}}%
+}
+\makeatother
+
+% email https://tex.stackexchange.com/a/663
+\catcode`\_=11\relax%
+\newcommand\email[1]{\_email #1\q_nil}%
+\def\_email#1@#2\q_nil{%
+ \href{mailto:#1@#2}{{\emailfont #1\emailampersat #2}}%
+}%
+\newcommand\emailfont{\sffamily}%
+\newcommand\emailampersat{{\color{pkgcolor}\footnotesize@}}%
+\catcode`\_=8\relax% %
+
+% Config hyperref
+\hypersetup{
+ linkcolor = linkcolor,%
+ citecolor = magenta,%
+ urlcolor = magenta,%
+ colorlinks = true,%
+ linktoc = all,
+ pdftitle = {.:: ltximg v\fileversion{} [\filedate] --- LaTeX environments to image format and standalone files ::.},%
+ pdfauthor = {Pablo Gonz\'{a}lez Luengo},%
+ pdfsubject = {Documentation for version \fileversion},%
+ pdfcopyright = {\textcopyright 2013 - 2020 by Pablo González Luengo},
+ pdfcontacturl = {https://github.com/pablgonz/ltximg},
+ pdfkeywords = {extract, conversion, images, TikZ, PStricks, standalone files},
+ pdfstartview = {FitH},%
+ bookmarksopenlevel = 2,%
+}
+
+% Configuration titleps and titlesec
+\renewpagestyle{plain}[\color{optcolor}\small\sffamily]{%
+\setfoot{\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax%
+ \parbox{1.93\paperwidth}{\hfil\thepage\,/\,\pageref{LastPage}}}}%
+ {}%
+ {}%
+}
+\newpagestyle{myheader}[\color{optcolor}\small\sffamily]{%
+\renewcommand\makeheadrule{%
+\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax
+ \color{rulecolor}\rule[0.3cm]{\paperwidth}{0.7cm}}\hss
+}
+\setfoot{\rlap{\hskip\dimexpr-\oddsidemargin-1in\relax%
+ \parbox{1.93\paperwidth}{\hfil\thepage\,/\,\pageref{LastPage}}}}%
+ {\parbox{\textwidth}{\raggedright \textcolor{gray}{\raisebox{-1pt}{\textcopyright}{}2013 -- 2020 by Pablo González}}}%
+ {}%
+\sethead{\llap{\raisebox{0.55cm}{\parbox{\dimexpr\oddsidemargin+1in\relax}{\makebox[0pt][l]{\hspace{15pt}\pkglogo\space\fileversion}}}}}
+ {\raisebox{0.55cm}{\parbox{\textwidth}{\hspace*{-\oddsidemargin}\centering\small\S.\firstextramarks{section}\thesection\space\sectiontitle}}}%
+ {}%
+}
+
+% Table of contents
+\titlecontents{section}[0mm]{}%
+ {\bfseries\contentspush{\makebox[5mm][l]{\thecontentslabel\hfill}}}%
+ {\hspace*{-5mm}}% numberless
+ {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
+
+\titlecontents{subsection}[5mm]{}%
+ {\contentspush{\makebox[6mm][l]{\thecontentslabel\hfill}}}
+ {\hspace*{-11mm}}% numberless
+ {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
+
+\titlecontents{subsubsection}[11mm]{}%
+ {\contentspush{\makebox[8mm][l]{\thecontentslabel\hfill}}}
+ {\hspace*{-19mm}}% numberless
+ {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
+
+\makeatletter
+\renewcommand\tableofcontents{%
+\begingroup%
+\section*{\contentsname\quad{\color{optcolor}\leaders\hrule height 5pt depth -4.4pt\hfill}%
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
+\vspace*{-14pt}
+\setlength{\columnsep}{10pt}%
+ \begin{multicols}{2}%
+ \@starttoc{toc}%
+\end{multicols}%
+\vspace*{-3pt}{\color{optcolor}\hrule height 0.6pt}%
+\vspace*{5pt}
+\endgroup
+}
+\makeatother
+
+% Custom thanks
+\makeatletter
+\renewcommand*{\@fnsymbol}[1]{\ensuremath{\ifcase#1\or \textcolor{pkgcolor}{*}
+\or \textcolor{pkgcolor}{\dagger} \or \ddagger\or \mathsection
+\or \mathparagraph\or \|\or **\or \dagger\dagger
+\or \ddagger\ddagger \else\@ctrerr\fi}}
+\makeatother
+
+% Custom \meta[...]{...}, \marg[...]{...} and \oarg[...]{...} for color
+\ExplSyntaxOn
+\RenewDocumentCommand{\meta}{O{}m}
+ {
+ \ltximg_meta_generic:Nnn \ltximg_meta:n { #1 } { #2 }
+ }
+\RenewDocumentCommand{\marg}{O{}m}
+ {
+ \ltximg_meta_generic:Nnn \ltximg_marg:n { #1 } { #2 }
+ }
+\RenewDocumentCommand{\oarg}{O{}m}
+ {
+ \ltximg_meta_generic:Nnn \ltximg_oarg:n { #1 } { #2 }
+ }
+%^^A Variables and keys
+\tl_new:N \l_ltximg_meta_font_tl
+
+\keys_define:nn { ltximg/meta }
+ {
+ type .choice:,
+ type / tt .code:n = \tl_set:Nn \l_ltximg_meta_font_tl { \ttfamily },
+ type / rm .code:n = \tl_set:Nn \l_ltximg_meta_font_tl { \rmfamily },
+ type .initial:n = rm,
+ cf .tl_set:N = \l_ltximg_meta_color_tl,
+ cf .initial:n = optcolor,
+ ac .tl_set:N = \l_ltximg_meta_anglecolor_tl,
+ ac .initial:n = lightgray,
+ sbc .tl_set:N = \l_ltximg_meta_brackcolor_tl,
+ sbc .initial:n = gray,
+ cbc .tl_set:N = \l_ltximg_meta_bracecolor_tl,
+ cbc .initial:n = gray,
+ }
+%^^A Internal commands
+\cs_new_protected:Npn \ltximg_meta_generic:Nnn #1 #2 #3
+ {
+ \group_begin:
+ \keys_set:nn { ltximg/meta } { #2 }
+ \color{ \l_ltximg_meta_color_tl }
+ \l_ltximg_meta_font_tl
+ #1 { #3 } % #1 is \ltximg_meta:n, \ltximg_marg:n or \ltximg_oarg:n
+ \group_end:
+ }
+\cs_new_protected:Npn \ltximg_meta:n #1
+ {
+ \ltximg_meta_angle:n { \textlangle }
+ \ltximg_meta_meta:n { #1 }
+ \ltximg_meta_angle:n { \textrangle }
+ }
+\cs_new_protected:Npn \ltximg_marg:n #1
+ {
+ \ltximg_meta_brace:n { \textbraceleft }
+ \ltximg_meta:n { #1 }
+ \ltximg_meta_brace:n { \textbraceright }
+ }
+\cs_new_protected:Npn \ltximg_oarg:n #1
+ {
+ \ltximg_meta_brack:n { [ }
+ \ltximg_meta:n { #1 }
+ \ltximg_meta_brack:n { ] }
+ }
+\cs_new_protected:Npn \ltximg_meta_meta:n #1
+ {
+ \textnormal{\textit{#1}}
+ }
+\cs_new_protected:Npn \ltximg_meta_angle:n #1
+ {
+ \group_begin:
+ \fontfamily{lmr}\selectfont
+ \textcolor{\l_ltximg_meta_anglecolor_tl}{#1}
+ \group_end:
+ }
+\cs_new_protected:Npn \ltximg_meta_brace:n #1
+ {
+ \group_begin:
+ \color{\l_ltximg_meta_bracecolor_tl}
+ #1
+ \group_end:
+ }
+\cs_new_protected:Npn \ltximg_meta_brack:n #1
+ {
+ \textcolor{\l_ltximg_meta_brackcolor_tl}{#1}
+ }
+
+% \ltximg for body document
+\NewDocumentCommand{\ltximg}{}
+ {
+ \normalsize\texttt{\bfseries\textcolor{pkgcolor}{ltximg}}
+ }
+
+% \prgname{sm} : #1 index compiler, #2 index programs:
+\NewDocumentCommand{\prgname}{sm}
+ {
+ \IfBooleanTF{#1}
+ {
+ \textcolor{ForestGreen}{\texttt{#2}}
+ \SortIndex{compiler}{Compiler>\small\texttt{#2}}
+ }
+ {
+ \textcolor{ForestGreen}{\texttt{#2}}
+ \SortIndex{programs}{Programs>\small\texttt{#2}}
+ }
+ }
+
+% \prgopt{sm} : #1 compiler opt, #2 program opt:
+\NewDocumentCommand{\prgopt}{sm}
+ {
+ \IfBooleanTF{#1}
+ {
+ \mbox{\textcolor{gray}{\texttt{-{}#2}}}
+ \SortIndex{compiler ~ options}{Compiler ~ options>\small\texttt{-{}#2}}
+ }
+ {
+ \mbox{\textcolor{gray}{\texttt{-{}#2}}}
+ \SortIndex{#2}{\small\texttt{-{}#2} (program ~ option)}%
+ }
+ }
+
+% \scriptname*{m}
+\NewDocumentCommand{\scriptname}{m}
+ {
+ \textcolor{ForestGreen}{\texttt{#1}}
+ \SortIndex{scripts}{Scripts>\small\texttt{#1}}
+ }
+
+% \scriptopt{m}
+\NewDocumentCommand{\scriptopt}{m}
+ {
+ \mbox{\texttt{#1}}
+ \SortIndex{script ~ option}{Script ~ options>\small\texttt{#1}}
+ }
+
+% \myclass{m}
+\NewDocumentCommand{\myclass}{ m }
+ {
+ \mbox{\textsf{\textcolor{SlateBlue}{#1}}}
+ \SortIndex{document}{Document ~ class>\small\texttt{#1}}
+ \SortIndex{#1}{\texttt{#1} ~ (class)}
+ }
+
+% \pkgname{m}
+\NewDocumentCommand{\pkgname}{ m }
+ {
+ \textsf{\textcolor{SlateBlue}{#1}}
+ \SortIndex{packages}{Packages>\small\texttt{#1}}
+ \SortIndex{#1}{\texttt{#1} ~ (package)}
+ }
+
+% \pkgopt{m}
+\NewDocumentCommand{\pkgopt}{ m }
+ {
+ \textsf{\textcolor{gray}{#1}}
+ \SortIndex{package ~ options}{Package ~ options>\small\texttt{#1}}
+ \SortIndex{#1}{\texttt{#1} ~ (package ~ option)}
+ }
+
+% \env{m}
+\NewDocumentCommand{\env}{ m }
+ {
+ \textcolor{pkgcolor}{\texttt{#1}}
+ \SortIndex{environment}{Environments>\small\texttt{#1}}
+ }
+
+% \LVenv{m}
+\NewDocumentCommand{\LVenv}{ m }
+ {
+ \textcolor{pkgcolor}{\texttt{#1}}
+ \SortIndex{environment ~ verbatim}{Environments ~ verbatim>\small\texttt{#1}}
+ }
+
+% \LWenv{m}
+\NewDocumentCommand{\LWenv}{ m }
+ {
+ \textcolor{pkgcolor}{\texttt{#1}}
+ \SortIndex{environment ~ verbatim ~ write}{Environments ~ verbatim ~ write>\small\texttt{#1}}
+ }
+
+% \ics{sm}
+\NewDocumentCommand{\ics}{sm}
+ {
+ \IfBooleanTF{#1}
+ {
+ \tl_set:Nn \l_tmpa_tl { #2 }
+ \regex_replace_once:nnN { (\*) } { \c{textcolor}\cB\{MediumOrchid\cE\}\cB\{\1\cE\} } \l_tmpa_tl
+ \textcolor{blue!75}{\ttfamily\textbackslash{\tl_use:N \l_tmpa_tl}}
+ }
+ {
+ \textcolor{blue!75}{\ttfamily{\textbackslash#2}}
+ }
+ \SortIndex{#2}{\texttt{\small\textbackslash#2}}
+ }
+
+% file extention
+\NewDocumentCommand{\fext}{m}
+ {
+ \mbox{\textcolor{OrangeRed}{\texttt{.#1}}}
+ \SortIndex{file ~ extention}{File ~ extentions >\small\texttt{.#1}}
+ }
+
+% File
+\NewDocumentCommand{\Fext}{m m}
+ {
+ \mbox{\textcolor{OrangeRed}{\texttt{#1}\fext{#2}}}
+ \SortIndex{file}{File >\small\texttt{#1.#2}}
+ }
+
+
+% image format/extention
+\NewDocumentCommand{\iext}{m}
+ {
+ \textcolor{optcolor}{\texttt{#1}}
+ \SortIndex{Image ~ format}{Image ~ formats>\small\texttt{#1}}
+ }
+
+% \sysydir{m}
+\NewDocumentCommand{\sysdir}{m}
+ {
+ \mbox{\textcolor{OrangeRed}{\texttt{#1}}}
+ }
+
+% \sysfile{m} ...only for color in some examples
+\NewDocumentCommand{\sysfile}{m}
+ {
+ \mbox{\textcolor{OrangeRed}{\texttt{#1}}}
+ }
+
+% \OSsystem{m} ...only for color in some examples
+\NewDocumentCommand{\OSsystem}{m}
+ {
+ \mbox{\textcolor{OrangeRed}{\texttt{#1}}}
+ \SortIndex{Operating ~ system}{Operating ~ system>\small\texttt{#1}}
+ }
+
+% \cmdopt[short]{long}
+\NewDocumentCommand{\cmdopt}{om}
+ {
+ \IfNoValueTF{#1}
+ {
+ \textcolor{optcolor}{\texttt{-\/-#2}}
+ }
+ {
+ \textcolor{optcolor}{\texttt{-{}#1}},
+ \textcolor{optcolor}{\texttt{-\/-#2}}
+ }
+ \SortIndex{options}{\textsf{\myscript}\ options ~ in ~ command ~ line>\small\texttt{-\/-#2}}
+ }
+
+\ExplSyntaxOff
+% \DescribeIF{m}, #1 image format
+\newsavebox{\marginIF}
+\NewDocumentCommand{\DescribeIF}{ m }
+ {%
+ \begin{lrbox}{\marginIF}%
+ \begin{minipage}[t]{\marginparwidth}%
+ \raggedleft\ttfamily\bfseries%
+ \textcolor{optcolor}{#1}
+ \end{minipage}%
+ \end{lrbox}%
+ \SortIndex{Image format}{Image formats>\small\texttt{#1}}
+ \leavevmode%
+ \marginpar{\usebox{\marginIF}}%
+ \ignorespaces%
+ }%
+
+% \myenv{environ} for margin
+\NewDocumentCommand{\myenv}{m}
+ {
+ \begin{minipage}[t]{\marginparwidth}%
+ \raggedleft\ttfamily\small%
+ {\textcolor{gray}{\textbackslash begin\{}}{\bfseries\textcolor{pkgcolor}{#1}}\textcolor{gray}{\}}\par%
+ \meta[ac=lightgray,cf=gray]{env content}\par%
+ {\textcolor{gray}{\textbackslash end\{}}{\bfseries\textcolor{pkgcolor}{#1}}\textcolor{gray}{\}}%
+ \end{minipage}%
+ \SortIndex{Environment}{Environments suport by default>\small\texttt{#1}}%
+ }
+
+% \mytag{dtxtag} for margin
+\NewDocumentCommand{\mytag}{m}
+ {%
+ \begin{minipage}[t]{\marginparwidth}%
+ \raggedleft\ttfamily\small%
+ \textcolor{gray}{\%<*}{\bfseries\textcolor{pkgcolor}{#1}}\textcolor{gray}{>}\par%
+ \meta[ac=lightgray,cf=gray]{content}\par%
+ \textcolor{gray}{\%</}{\bfseries\textcolor{pkgcolor}{#1}}\textcolor{gray}{>}%
+ \end{minipage}%
+ \SortIndex{docstrip}{Docstrip tag>\small\texttt{#1}}%
+ }%
+
+% \DescribeTE{sm}, #1 tag, #2 env
+\newsavebox{\marginenvtag}
+\NewDocumentCommand{\DescribeTE}{sm}{%
+\begin{lrbox}{\marginenvtag}%
+ \begin{minipage}[t]{\marginparwidth}%
+ \raggedleft
+ \IfBooleanTF{#1}{\mytag{#2}}{\myenv{#2}}
+ \end{minipage}%
+\end{lrbox}%
+ \leavevmode%
+ \marginpar{\usebox{\marginenvtag}}%
+ \ignorespaces%
+}%
+
+% DescribeOptFile*{options}{example}[!]
+\newsavebox{\optinfile}
+\NewDocumentCommand{\DescribeOptFile}{s m m O{\hphantom{!}}}{
+\begin{lrbox}{\optinfile}%
+ \begin{minipage}[t]{\marginparwidth}%
+ \raggedleft\ttfamily\bfseries%
+ \textcolor{gray}{\%}\textcolor{optcolor}{{#4}\myscript}\textcolor{gray}{\texttt{:}}%
+ \end{minipage}%
+\end{lrbox}%
+\leavevmode%
+\lapbox[0pt]{-\marginparwidth-0.5\marginparsep}{\usebox{\optinfile}}%
+\textcolor{optcolor}{\bfseries\texttt{{#2}}}%
+\textcolor{gray}{\texttt{:}}\space%
+\marg[type=tt,cbc=gray,ac=lightgray,cf=optcolor!85]{#3}%
+\vspace*{2pt}\par%
+\IfBooleanF{#1}
+ {%
+ \SortIndex{options}{\textsf{\myscript}\ options in input file>\small\texttt{#2}}%
+ }%
+}
+
+% \DescribeCmd[...]{...}{...}{...}
+\newsavebox{\optcmdline}
+\NewDocumentCommand{\DescribeCmd}{ o m m m }
+ {
+ \begin{lrbox}{\optcmdline}%
+ \begin{minipage}[t]{\marginparwidth}%
+ \ttfamily\bfseries\raggedleft%
+ \IfNoValueTF{#1}
+ {\textcolor{optcolor}{-\/-#2}}
+ {\textcolor{optcolor}{-{#1}}\textcolor{gray}{,} \textcolor{optcolor}{-\/-#2}}%
+ \end{minipage}%
+ \SortIndex{options}{\textsf{\myscript}\ options in command line>\small\texttt{-\/-#2}}%
+ \end{lrbox}%
+ \leavevmode%
+ \marginpar{\usebox{\optcmdline}}%
+ \ignorespaces
+ \meta[ac=lightgray,cf=gray]{#3}
+ \hfill\textcolor{gray}{\textsf{(default: {#4})}}%
+ \vspace*{2pt}\par%
+}
+
+% don't copy numbers in code example for listings
+\newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}
+
+% Create a language for documentation
+\lstdefinelanguage{ltximg-doc}{
+ texcsstyle=*,%
+ escapechar=`,%
+ showstringspaces=false,%
+ extendedchars=true, %
+ stringstyle = {\color{red}},%
+ alsoletter={\-,.},%
+% comments
+ morecomment=[l]{\%},%
+ commentstyle=\lmmitalic\color{lightgray},%
+% Important words 1
+ keywordstyle=[1]{\color{NavyBlue}},%
+ keywords=[1]{PassOptionsToPackage,AtBeginDocument,documentclass,usepackage,section},%
+% Important words 2 (macros)
+ keywordstyle=[2]{\color{blue!75}},%
+ keywords=[2]{graphicspath,RequirePackage,renewcommand,includegraphics,coordinate,draw,approx,%
+ PreviewBbAdjust,setlength,parindent,usetikzlibrary,tikzexternalize,psset,tikzset,PrependGraphicsExtensions,%
+ DefineShortVerb,lstMakeShortInline,MakeSpecialShortVerb,UndefineShortVerb,verb,myverb,macro,put,line},%
+% Important words 3, options in input file
+ keywordstyle=[3]{\color{optcolor!85}},%
+ keywords=[3]{extrenv,deltenv,skipenv,options,arara,extensions,luatex,env,norun,%
+ clean,pst,tkz,eps,pdf,xetex,latex,luatex,dvips,png,latexmk,svg,srcenv,noprew,imgdir,prefix,output},%
+% Important words 4, environments and tags
+ keywordstyle=[4]{\color{pkgcolor}},%
+ keywords=[4]{ltximg,noltximg,remove,pspicture,endpspicture,overlay,remember,%
+ description,filecontents,PSTexample,pgfpicture, endpgfpicture, tikzpicture, endtikzpicture, %
+ psgraph, endpsgraph,nopreview,postscript,picture},%
+% Important words 5, directory
+ keywordstyle=[5]{\color{OrangeRed}},%
+ keywords=[5]{images,pics},%
+% Important words 6, begin, end and other
+ keywordstyle=[6]{\color{gray}},% replace this color
+ keywords=[6]{begin,end,-recorder,doc,active,inactive,tightpage,BEGIN,END,%
+ -shell-escape,osf,--output-format,--exact-bbox,-o,dvi},%
+% Important words 7, reserved for arara
+ keywordstyle=[7]{\color{araracolor}},%
+ keywords=[7]{lualatex,dvisvgm,halt,xelatex},%
+% Important words 8, pkg and others load in examples
+ keywordstyle=[8]{\color{SlateBlue}},%
+ keywords=[8]{graphicx,grfext,tikz,article,document,preview,libertinus,calc,tikzmark,pst-pdf},%
+% Important words 9, files used in examples
+ keywordstyle=[10]{\color{OrangeRed}},%
+ keywords=[10]{file.tex,test-fig-1981.tex,test-fig-1981.pdf,test-fig-1,test-fig-2,test-out,test-in.ltx,%
+ test-fig-1981.tex,test-out.tex,file-in.tex,file-out,test.tex,test-fig-all.dvi,test-fig-1.svg,test-fig-all.tex},%
+}[keywords,tex,comments,strings]% end languaje
+
+% \begin{examplecode}[opts]...\end{examplecode}
+\lstnewenvironment{examplecode}[1][]{%
+\lstset{
+ language=ltximg-doc,%
+ stringstyle = {\color{red}},%
+ basicstyle=\ttfamily\small,%
+ numbersep=1em,%
+ numberstyle=\tiny\color{gray}\noaccsupp,%
+ rulecolor=\color{gray!50},%
+ framesep=\fboxsep,%
+ framerule=\fboxrule,%
+ xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+ xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+% literateee
+ literate=*{\{}{{\bfseries\textcolor{gray}{\{}}}{1}
+ {\}}{{\bfseries\textcolor{gray}{\}}}}{1}
+ {[}{{\textcolor{gray}{[}}}{1}
+ {]}{{\textcolor{gray}{]}}}{1}
+ {\*}{{\bfseries\textcolor{MediumOrchid}{*}}}{1}
+ {:}{{\textcolor{gray}{:}}}{1}
+ {,}{{\textcolor{gray}{,}}}{1}
+ {=}{{\textcolor{gray}{=}}}{1}
+ {/}{{\textcolor{OrangeRed}{/}}}{1}
+ {scale=1}{{\textcolor{gray}{scale=1}}}{7}
+ {\%\ ltximg}{{\textcolor{gray}{\%}\space\textcolor{optcolor}{ltximg}}}{8}
+ {\%\ arara}{{\textcolor{gray}{\%}\space\textcolor{araracolor}{arara}}}{7}
+ {\%<*remove>}{{\textcolor{gray}{\%<*}\textcolor{pkgcolor}{remove}\textcolor{gray}{>}}}{10}
+ {\%</remove>}{{\textcolor{gray}{\%</}\textcolor{pkgcolor}{remove}\textcolor{gray}{>}}}{10}
+ {\%<*ltximg>}{{\textcolor{gray}{\%<*}\textcolor{pkgcolor}{ltximg}\textcolor{gray}{>}}}{10}
+ {\%</ltximg>}{{\textcolor{gray}{\%</}\textcolor{pkgcolor}{ltximg}\textcolor{gray}{>}}}{10}
+ {\%<*noltximg>}{{\textcolor{gray}{\%<*}\textcolor{pkgcolor}{noltximg}\textcolor{gray}{>}}}{12}
+ {\%</noltximg>}{{\textcolor{gray}{\%</}\textcolor{pkgcolor}{noltximg}\textcolor{gray}{>}}}{12},%
+ #1,%
+ }% close lstset
+}%
+{}% close examplecode
+
+% \begin{examplecmd}...\end{examplecmd}
+\lstnewenvironment{examplecmd}{%
+\lstset{
+ language=ltximg-doc,%
+ basicstyle=\ttfamily\small,%
+ frame=single,%
+ alsoletter={\-,.,\-\-},%
+ rulecolor=\color{gray!50},%
+ framesep=\fboxsep,%
+ framerule=\fboxrule,%
+ xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+ xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
+ keywordstyle=[20]{\color{gray}},% replace this color
+ keywords=[20]{-recorder,-shell-escape,--latex,-s,-o,--arara,--log,%
+ -no-shell-escape,-interaction,nonstopmode,--norun,--luatex,--latexmk,%
+ --svg,--png,--nopdf,--margins},%
+% Reserved words (cmd line options)
+ deletekeywords=[4]{ltximg},%
+ classoffset=7,%
+ keywordstyle=\bfseries\color{pkgcolor},%
+ morekeywords={ltximg},%
+% % Reserved words (cmd line options)
+ classoffset=8,%
+ keywordstyle={\color{ForestGreen}},%
+ morekeywords={gs,pdftoppm,pdftocairo,pdftops,cd,perl,pdfcrop},%
+% Only for command line options
+ classoffset=5,%
+ keywordstyle=\color{blue},%
+ keywords={user,machine},%
+ literate=*{[}{{\textcolor{darkgray}{[}}}{1}
+ {]}{{\textcolor{darkgray}{]}}}{1}
+ {=}{{\textcolor{gray}{=}}}{1}
+ {@}{{\textcolor{blue}{@}}}{1}
+ {\$}{{\textcolor{blue}{\$}}}{1}
+ {:}{{\textcolor{blue}{:}}}{1}
+ {§}{{\textcolor{red}{\$}}}{1}
+ {~}{{\textcolor{blue}{\bfseries\textasciitilde}}}{1}%
+ }% close lstset
+}%
+{}% close examplecmd
+
+% \lstinline[style=inline]|...|
+\lstdefinestyle{inline}
+ {
+ language=ltximg-doc,%
+ basicstyle=\ttfamily\color{gray},%
+ escapechar=`,%
+ upquote=true,%
+ deletekeywords=[8]{preview},%
+ morekeywords =[4]{preview},%
+ literate=*{\%}{{\bfseries\textcolor{gray}{\%}}}{1}
+ {\*}{{\bfseries\textcolor{MediumOrchid}{*}}}{1}
+ }
+
+% set default style
+\lstset{style=inline}
+
+\begin{document}
+
+\title{%
+ {\fetamontotf latex environments }\\[3pt]%
+ \scalebox{3.4}{\LTXimg}\\[2pt]%
+ {\fetamontotf\addfontfeature{LetterSpace=12.0} to image format}\\%
+ \Large
+ v\fileversion{} --- \filedate\thanks{%
+ This file describes a documentation for version \fileversion, last revised \filedate.}\\[25pt]%
+ \author{%
+ \large%
+ \raisebox{-1pt}{\textcopyright}{}2013--2020 by Pablo González L%
+ \thanks{E-mail: \textcolor{optcolor}{\textsf{\guillemotleft}}\email{pablgonz@yahoo.com}\textcolor{optcolor}{\textsf{\guillemotright}}}
+ }%
+\small
+\textsc{ctan}: \url{https://www.ctan.org/pkg/ltximg}\\
+\textcolor{gray}{\scriptsize\faIcon[regular]{github}}\,\,\,\url{https://github.com/pablgonz/ltximg}
+\vspace*{-2cm}
+}%
+\date{}
+\maketitle
+
+\begin{abstract}
+\ltximg{} is a \prgname{perl} \emph{script} that automates the process of
+extracting and converting environments provided by \pkgname{tikz}, %
+\pkgname{pstricks} and other packages from \meta[cf=optcolor]{input file} to image
+formats and standalone files using \prgname{ghostscript} and %
+\prgname{poppler-utils}. Generates a file with only extracted environments
+and another with all extracted environments converted to \ics{includegraphics}.
+\end{abstract}
+
+\tableofcontents
+\setlength{\parskip}{3pt}
+
+\section{License}
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the \href{https://www.gnu.org/licenses/gpl-3.0.html}{GNU General Public License} as published by
+the \href{https://www.fsf.org/}{Free Software Foundation}; either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \href{https://www.gnu.org/licenses/gpl-3.0.html}{GNU General Public License}
+for more details.
+
+\section{Motivation and Acknowledgments}
+
+The original idea was to extend the functionality of the \scriptname{pst2pdf}\cite{pst2pdf}
+script to work with \env{tikzpicture} and other environments. The \pkgname{tikz}\cite{tikz} package
+allows to \emph{externalize} the environments, but, the idea was to be able to extend this
+to \emph{any type} of environment covering three central points:
+
+\begin{enumerate}[font=\small,noitemsep,leftmargin=*,nosep]
+
+\item Generate a separate image files for environments.
+
+\item Generate a standalone files with only the extracted environments.
+
+\item Generate a file replacing the environments by \ics{includegraphics}.
+\end{enumerate}
+
+\thispagestyle{plain}
+
+\newpage
+
+\pagestyle{myheader}
+
+From the side of \hologo{TeX} there are some packages that cover several of these
+points such as the \pkgname{preview}\cite{preview}, \pkgname{xcomment}\cite{xcomment}, \pkgname{extract}\cite{extract}
+and \pkgname{cachepic}\cite{cachepic} packages among others, but none covered all points.
+
+In the network there are some solutions in \texttt{bash} that were able to
+extract and convert environments, but in general they presented problems
+when the document contained \emph{\enquote{verbatim style}} code or were only
+available for \OSsystem{Linux}.
+
+Analysed the situation the best thing was to create a new \emph{\enquote{script}} that
+was able to cover the three points and was multi platform, the union of all
+these ideas is born \ltximg.
+
+This script would not be possible without the great work of Herbert Voß
+author of \scriptname{pst2pdf}\footnote{\url{https://ctan.org/pkg/pst2pdf}}
+and Heiko Oberdiek author of \scriptname{pdfcrop}\footnote{\url{https://ctan.org/pkg/pdfcrop}}.
+Several parts of the code have been taken and adapted from both scripts.
+
+\section{Requirements for operation}
+\label{sec:requirements}
+
+For the complete operation of \ltximg{} you need to have a modern %
+\hologo{TeX} distribution such as \hologo{TeX} Live or \hologo{MiKTeX}, have
+a version equal to or greater than \liningnums{5.28} of \prgname{perl}, a
+version equal to or greater than \liningnums{9.24} of \prgname{ghostscript}, a
+version equal to or greater than \liningnums{1.40} of \scriptname{pdfcrop}
+and have a version equal to or greater than \liningnums{0.52} of %
+\prgname{poppler-utils}. The distribution of \hologo{TeX} Live 2020 for \OSsystem{Windows} includes %
+\ltximg{} and all requirements, \hologo{MiKTeX} users must install the
+appropriate software for full operation.
+
+The script auto detects the \prgname{ghostscript}, but not \prgname{poppler-utils}.
+You should keep this in mind if you are using the script directly and not
+the version provided in your \hologo{TeX} distribution.
+
+The script has been tested on \OSsystem{Windows} (v10) and %
+\OSsystem{Linux} (fedora 32) using \prgname{ghostscript} %
+\liningnums{v9.52}, \prgname{poppler-utils} \liningnums{v0.84}, \prgname{perl} \liningnums{v5.30}
+and the standard classes offers by \hologo{LaTeX}: \myclass{book},
+\myclass{report}, \myclass{article} and \myclass{letter}. The \pkgname{preview}\cite{preview} and
+\pkgname{pst-pdf}\cite{pst-pdf} packages are required to process the \meta{input file} and if
+an \meta{output file} is generated, the \pkgname{graphicx}\cite{graphicx} and \pkgname{grfext}\cite{grfext}
+packages will be needed.
+
+\section{How it works}
+\label{sec:howtowork}
+
+It is important to have a general idea of how the \emph{\enquote{extraction and conversion}}
+process works and the requirements that must be fulfilled so
+that everything works correctly, for this we must be clear about some
+concepts related to how to work with the \meta[cf=optcolor]{input file}, the \meta{verbatim content}
+and the \meta{steps process}.
+
+\section{The input file}
+\label{sec:inputfile}
+
+The \meta[cf=optcolor]{input file} must comply with \emph{certain characteristics} in order to
+be processed, the content at the beginning and at the end of the \meta{input
+file} is treated in a special way, before \lstinline|\documentclass| and after
+\lstinline|\end{document}| can go any type of content, internally the script will
+\emph{\enquote{split}} the \meta[cf=optcolor]{input file} at this points.
+
+If the \meta[cf=optcolor]{input file} contains files using \ics{input}\marg[type=tt]{file} or
+\ics{include}\marg[type=tt]{file} these will not be processed, from the side of
+the \emph{script} they only represent lines within the file, if you want
+them to be processed it is better to use the \scriptname{latexpand}\footnote{\url{https://www.ctan.org/pkg/latexpand}}
+first and then process the file.
+
+Like \ics{input}\marg[type=tt]{file} or \ics{include}\marg[type=tt]{file}, blank lines, vertical spaces and tab
+characters are treated literally, for the \emph{script} the \meta[cf=optcolor]{input file}
+is just a set of characters, as if it was a simple text file. It is
+advisable to format the source code \meta[cf=optcolor]{input file} using utilities such
+as \prgname{chktex}\footnote{\url{https://www.ctan.org/pkg/chktex}} and
+\scriptname{latexindent}\footnote{\url{https://www.ctan.org/pkg/latexindent}}, especially if you want to
+extract the source code of the environments.
+
+Both \ics{thispagestyle}\marg[type=tt]{style} and \ics{pagestyle}\marg[type=tt]{style}
+are treated in a special way by the script, if they do not appear in the
+preamble then \ics{pagestyle}\marg[type=tt]{empty} will be added and if they are present
+and \marg[type=tt]{style} is different from \marg[type=tt]{empty} this
+will be replaced by \marg[type=tt]{empty}.
+
+This is necessary for the image creation process, it does not affect the \meta{output file}, but
+it does affect the \emph{standalone} files. For the script the process of dividing the \meta{input file} into four
+parts and then processing them:
+
+\begin{examplecode}[numbers=left,frame=single]
+% Part One: Everything before \documentclass
+\documentclass{article}
+% Part two: Everything between \documentclass and \begin{document}
+\begin{document}
+% Part three: : Everything between \begin{document} and \end{document}
+\end{document}
+% Part Four: Everything after \end{document}
+\end{examplecode}
+
+If for some reason you have an environment \LWenv{filecontens} before \lstinline|\documentclass| or
+in the preamble of the \meta{input file} that contains a \emph{sub-document} or \emph{environment}
+you want to extract, the script will ignore them.
+
+\newpage
+
+\section{Verbatim contents}
+\label{sec:verbatim}
+
+One of the greatest capabilities of this script is to \emph{\enquote{skip}}
+the complications that \meta{verbatim content} produces with the extraction
+of environments using tools outside the \enquote{\hologo{TeX} world}\footnote{Only \hologo{TeX} can
+understand \hologo{TeX}, all other languages and programs are just lines in a file.}.
+In order to \emph{\enquote{skip}} the complications, the \meta{verbatim content} is classified into
+three types:
+
+\begin{itemize}[nosep]
+ \item Verbatim in line.
+ \item Verbatim standard.
+ \item Verbatim write.
+\end{itemize}
+
+\subsection{Verbatim in line}
+\label{sec:verbatim:inline}
+
+The small pieces of code written using a \emph{\enquote{verbatim macro}}
+are considered \meta{verbatim in line}, such as \lstinline+\verb|+\meta{code}\lstinline+|+
+or \lstinline+\verb*|+\meta{code}\lstinline+|+ or \lstinline+\macro+\marg[type=tt]{code} or
+\lstinline+\macro+\oarg[type=tt]{opts}\marg[type=tt]{code}.
+
+Most \emph{\enquote{verbatim macro}} provide by packages \pkgname{minted}\cite{minted}, %
+\pkgname{fancyvrb}\cite{fancyvrb} and \pkgname{listings}\cite{listings} have been tested and are fully
+supported. They are automatically detected the \emph{verbatim macro} (including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument) generates by
+\ics{newmint} and \ics{newmintinline} and the following list:
+
+\vspace*{-10pt}
+\begin{multicols}{3}
+\begin{itemize}[font=\sffamily\small,partopsep=5pt,parsep=5pt,nosep,leftmargin=*]
+\small
+\item \ics{mint}
+\item \ics{spverb}
+\item \ics{qverb}
+\item \ics{fverb}
+\item \ics{verb}
+\item \ics{Verb}
+\item \ics{lstinline}
+\item \ics{pyginline}
+\item \ics{pygment}
+\item \ics{Scontents}
+\item \ics{tcboxverb}
+\item \ics{mintinline}
+\end{itemize}
+\end{multicols}
+
+Some packages define abbreviated versions for \emph{\enquote{verbatim macro}} as %
+\ics{DefineShortVerb}, \ics{lstMakeShortInline} and %
+\ics{MakeSpecialShortVerb}, will be detected automatically if are declared
+explicitly in \meta[cf=optcolor]{input file}.
+
+The following consideration should be kept in mind for some packages that
+use abbreviations for verbatim macros, such as \pkgname{shortvrb}\cite{doc} or %
+\pkgname{doc}\cite{doc} for example in which there is no explicit \lstinline+\macro+ in the
+document by means of which the abbreviated form can be detected, for
+automatic detection need to find \ics{DefineShortVerb} explicitly to process
+it correctly. The solution is quite simple, just add in \meta[cf=optcolor]{input file}:
+
+\begin{examplecode}
+\UndefineShortVerb{\|}
+\DefineShortVerb{\|}
+\end{examplecode}
+
+depending on the package you are using. If your \emph{\enquote{verbatim macro}} is not
+supported by default or can not detect, use the options described in \ref%
+{sec:optline} and \ref{sec:optfile}.
+
+\subsection{Verbatim standard}
+\label{sec:verbatim:std}
+
+These are the \emph{\enquote{classic}} environments for \emph{\enquote{writing code}} are considered %
+\meta{verbatim standard}, such as \LVenv{verbatim} and \LVenv{lstlisting}
+environments. The following list (including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument)
+is considered as \meta{verbatim standard} environments:
+
+\begin{multicols}{4}
+\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
+\small
+\item \LVenv{Example}
+\item \LVenv{CenterExample}
+\item \LVenv{SideBySideExample}
+\item \LVenv{PCenterExample}
+\item \LVenv{PSideBySideExample}
+\item \LVenv{verbatim}
+\item \LVenv{Verbatim}
+\item \LVenv{BVerbatim}
+\item \LVenv{LVerbatim}
+\item \LVenv{SaveVerbatim}
+\item \LVenv{PSTcode}
+\item \LVenv{LTXexample}
+\item \LVenv{tcblisting}
+\item \LVenv{spverbatim}
+\item \LVenv{minted}
+\item \LVenv{listing}
+\item \LVenv{lstlisting}
+\item \LVenv{alltt}
+\item \LVenv{comment}
+\item \LVenv{chklisting}
+\item \LVenv{verbatimtab}
+\item \LVenv{listingcont}
+\item \LVenv{boxedverbatim}
+\item \LVenv{demo}
+\item \LVenv{sourcecode}
+\item \LVenv{xcomment}
+\item \LVenv{pygmented}
+\item \LVenv{pyglist}
+\item \LVenv{program}
+\item \LVenv{programl}
+\item \LVenv{programL}
+\item \LVenv{programs}
+\item \LVenv{programf}
+\item \LVenv{programsc}
+\item \LVenv{programt}
+\end{itemize}
+\end{multicols}
+
+They are automatically detected \meta{verbatim standard} environments
+(including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument)
+generates by commands:
+
+\begin{multicols}{2}
+\begin{itemize}[font=\sffamily\small,noitemsep,leftmargin=*]
+\small
+\item \ics{DefineVerbatimEnvironment}
+\item \ics{NewListingEnvironment}
+\item \ics{DeclareTCBListing}
+\item \ics{ProvideTCBListing}
+\item \ics{lstnewenvironment}
+\item \ics{newtabverbatim}
+\item \ics{specialcomment}
+\item \ics{includecomment}
+\item \ics{newtcblisting}
+\item \ics{NewTCBListing}
+\item \ics{newverbatim}
+\item \ics{NewProgram}
+\item \ics{newminted}
+\end{itemize}
+\end{multicols}
+
+If any of the \meta{verbatim standard} environments is not supported by
+default or can not detected, you can use the options described in \ref%
+{sec:optline} and \ref{sec:optfile}.
+
+\subsection{Verbatim write}
+\label{sec:verbatim:write}
+
+Some environments have the ability to write \emph{\enquote{external files}}
+or \emph{\enquote{store content}} in memory, these environments are
+considered \meta{verbatim write}, such as \LWenv{scontents}, \LWenv{filecontents}
+or \LWenv{VerbatimOut} environments. The following list is considered (including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument) as %
+\meta{verbatim write} environments:
+
+\begin{multicols}{4}
+\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
+\ttfamily\small
+\item \LWenv{scontents}
+\item \LWenv{filecontents}
+\item \LWenv{tcboutputlisting}
+\item \LWenv{tcbexternal}
+\item \LWenv{tcbwritetmp}
+\item \LWenv{extcolorbox}
+\item \LWenv{extikzpicture}
+\item \LWenv{VerbatimOut}
+\item \LWenv{verbatimwrite}
+\item \LWenv{filecontentsdef}
+\item \LWenv{filecontentshere}
+\item \LWenv{filecontentsdefmacro}
+\item \LWenv{filecontentsdefstarred}
+\item \LWenv{filecontentsgdef}
+\item \LWenv{filecontentsdefmacro}
+\item \LWenv{filecontentsgdefmacro}
+\end{itemize}
+\end{multicols}
+
+They are automatically detected \meta{verbatim write}
+(including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument) environments generates
+by commands:
+
+\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
+\small
+\item \ics{renewtcbexternalizetcolorbox}
+\item \ics{renewtcbexternalizeenvironment}
+\item \ics{newtcbexternalizeenvironment}
+\item \ics{newtcbexternalizetcolorbox}
+\item \ics{newenvsc}
+\end{itemize}
+
+If any of the \meta{verbatim write} environments is not supported by default
+or can not detected, you can use the options described in \ref{sec:optline}
+and \ref{sec:optfile}.
+
+\section{Steps process}
+\label{sec:steps:process}
+
+For creation of the image formats, extraction of source code of environments and creation of an
+\meta[cf=optcolor]{output file}, \ltximg{} need a various steps. Let's assume that the %
+\meta[cf=optcolor]{input file} is \sysfile{test.tex}, \meta[cf=optcolor]{output file} is %
+\sysfile{test-out.tex}, the working directory are \enquote{\sysdir{./}}, the
+directory for images are \sysdir{./images}, the temporary
+directory is \sysdir{/tmp} and we want to generate images in \iext{pdf}
+format and \meta{standalone} files for all environments extracted.
+
+We will use the following code as \sysfile{test.tex}:
+
+\begin{examplecode}[numbers=left,frame=single]
+% Some commented lines at begin file
+\documentclass{article}
+\usepackage{tikz}
+\begin{document}
+Some text
+\begin{tikzpicture}
+ Some code
+\end{tikzpicture}
+Always use \verb|\begin{tikzpicture}| and \verb|\end{tikzpicture}| to open
+and close environment
+\begin{tikzpicture}
+ Some code
+\end{tikzpicture}
+Some text
+\begin{verbatim}
+\begin{tikzpicture}
+ Some code
+\end{tikzpicture}
+\end{verbatim}
+Some text
+\end{document}
+Some lines that will be ignored by the script
+\end{examplecode}
+
+\subsection{Validating Options}
+
+The first step is read and validated \oarg[type=tt,cf=optcolor,sbc=gray,ac=lightgray]{options} from the command
+line and \sysfile{test.tex}, verifying that \sysfile{test.tex} contains \emph{some} environment to extract,
+check the name and extension of \sysfile{test-out.tex}, check the directory \sysdir{./images} if it doesn't exist create it
+and create a temporary directory \sysdir{/tmp/hG45uVklv9}.
+
+The entire \sysfile{test.tex} file is loaded into memory and \emph{\enquote{split}} to start the extraction process.
+
+\newpage
+
+\subsection{Comment and ignore}
+In the second step, once the file \sysfile{test.tex} is loaded and divided in memory,
+proceeds (in general terms) as follows:
+
+\begin{quotation}
+Search the words \lstinline|\begin{| and \lstinline|\end{| in verbatim standard, verbatim write, verbatim in line and
+commented lines, if it finds them, converts to \lstinline|\BEGIN{| and \lstinline|\END{|, then places all code to
+extract inside the \lstinline|\begin{preview}| \ldots \lstinline|\end{preview}|.
+\end{quotation}
+
+At this point \emph{\enquote{all}} the code you want to extract is inside \lstinline|\begin{preview}|\ldots\lstinline|\end{preview}|.
+
+\subsection{Creating files and extracting}
+
+In the third step, the script generate \meta{standalone} files: \sysfile{test-fig-1.tex},
+\sysfile{test-fig-2.tex}, \dots{} and saved in \sysdir{./images} then proceed in two ways
+according to the \oarg[type=tt,cf=optcolor,sbc=gray,ac=lightgray]{options}
+passed to generate a temporary file with a random number (1981 for example):
+
+\begin{enumerate}[leftmargin=*]
+\item If script is call \emph{without} \cmdopt{noprew} options, the following lines
+will be added at the beginning of the \sysfile{test.tex} (in memory):
+
+\begin{examplecode}
+\PassOptionsToPackage{inactive}{pst-pdf}%
+\AtBeginDocument{%
+\RequirePackage[inactive]{pst-pdf}%
+\RequirePackage[active,tightpage]{preview}%
+\renewcommand\PreviewBbAdjust{-60pt -60pt 60pt 60pt}}%
+% rest of input file
+\end{examplecode}
+
+The different parts of the file read in memory are joined and save in a temporary
+file \sysfile{test-fig-1981.tex} in \enquote{\sysdir{./}}. This file will contain all the environments
+for extraction between \lstinline|\begin{preview}|\ldots\lstinline|\end{preview}| along with the rest of the document.
+If the document contains images, these must be in the formats supported by the \emph{engine} selected to process the \meta{input file}.
+
+\item If script is call \emph{with} \cmdopt{noprew} options, the \lstinline|\begin{preview}|\ldots\lstinline|\end{preview}|
+lines are only used as delimiters for extracting the content \emph{without} using the package \pkgname{preview}, the following lines
+will be added at the beginning of the \sysfile{test.tex} (in memory):
+
+\begin{examplecode}
+\PassOptionsToPackage{inactive}{pst-pdf}%
+\AtBeginDocument{%
+\RequirePackage[inactive]{pst-pdf}}%
+% only environments extracted
+\end{examplecode}
+
+Then it is joined with all extracted environments separated by \ics{newpage} and saved
+in a temporary file \sysfile{test-fig-1981.tex} in \enquote{\sysdir{./}}.
+
+\end{enumerate}
+
+If \cmdopt{norun} is passed, the temporary file \sysfile{test-fig-1981.tex}
+is renamed to \sysfile{test-fig-all.tex} and moved to \sysdir{./images}.
+
+\subsection{Generate image formats}
+
+In the fourth step, the script generating the file \sysfile{test-fig-1981.pdf} with all code extracted and croping, running:
+\begin{examplecmd}
+[user@machine ~:]§ `\small\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler}` -no-shell-escape -interaction=nonstopmode -recorder test-fig-1981.tex
+[user@machine ~:]§ pdfcrop --margins `\small\textcolor{gray}{0}` test-fig-1981.pdf test-fig-1981.pdf
+\end{examplecmd}
+Now move \sysfile{test-fig-1981.pdf} to \sysdir{/tmp/hG45uVklv9} and rename to \sysfile{test-fig-all.pdf},
+generate image files \sysfile{test-fig-1.pdf} and \sysfile{test-fig-2.pdf} and copy to \sysdir{./images}, if the
+image files exist, they will be rewritten each time you run the script. The file \sysfile{test-fig-1981.tex} is
+moved to the \sysdir{./images} and rename to \sysfile{test-fig-all.tex}.
+
+Note the options passed to \meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler} always use \prgopt*{no-shell-escape}
+and \prgopt*{recorder}, to generate the \fext{fls} file which is used to delete temporary files and directories after
+the process is completed and. The \cmdopt{shell} option activates \prgopt*{shell-escape} for compatibility with packages
+such as \pkgname{minted} or others.
+
+\subsection{Create output file}
+
+In the fifth step, the script apply the option \cmdopt{clean}, remove all content betwen \lstinline|%<*remove> ... %</remove>|
+and try to detect whether the \pkgname{graphicx} package and the \ics{graphicspath} command are in the preamble of the \meta[cf=optcolor]{output file} (in memory).
+If it is not possible to find it, it will read the \fext{log} file generated by the temporary file with only preamble.
+Once the detection is complete, the package \pkgname{grfext} and \ics*{PrependGraphicsExtensions*} will be added at the end of the preamble:
+
+\begin{examplecode}[numbers=left]
+\usepackage{graphicx}
+\graphicspath{{images/}}
+\usepackage{grfext}
+\PrependGraphicsExtensions*{.pdf}
+\end{examplecode}
+
+Now converting all extracted code to \ics{includegraphics} and save \sysfile{test-out.tex}
+in \enquote{\sysdir{./}}, then proceed to run:
+
+\begin{examplecmd}
+[user@machine ~:]§ `\small\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler}` -recorder -shell-escape test-out.tex
+\end{examplecmd}
+
+generating the file \sysfile{test-out.pdf}.
+
+\subsection{Clean temporary files and dirs}
+
+In the sixth step, the script read the files \sysfile{test-fig-1981.fls}
+and \sysfile{test-out.fls}, extract the information from the
+temporary files and dirs generated in the process in \enquote{\sysdir{./}} and then
+delete them together with the directory \sysdir{/tmp/hG45uVklv9}.
+
+Finally the output file \sysfile{test-out.tex} looks like this:
+
+\begin{examplecode}[numbers=left]
+% some commented lines at begin document
+\documentclass{article}
+\usepackage{tikz}
+\graphicspath{{images/}}
+\usepackage{grfext}
+\PrependGraphicsExtensions*{.pdf}
+\begin{document}
+Some text
+\includegraphics[scale=1]{test-fig-1}
+Always use \verb|\begin{tikzpicture}| and \verb|\end{tikzpicture}| to open
+and close environment
+\includegraphics[scale=1]{test-fig-2}
+Some text
+\begin{verbatim}
+\begin{tikzpicture}
+ Some code
+\end{tikzpicture}
+\end{verbatim}
+Some text
+\end{document}
+\end{examplecode}
+
+\section{Extract content}
+\label{sec:extract}
+
+The script provides two ways to \meta{extract} content from \meta[cf=optcolor]{input file},
+using \meta[type=rm,cf=optcolor,ac=gray]{environments} and \meta[type=rm,cf=optcolor,ac=gray]{docstrip tags}.
+Some environment (including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument)
+are supported by default. If environments are nested, the outermost one will be extracted.
+
+\subsection{Default environments}
+\label{sec:extract:env}
+
+\DescribeTE{preview}
+Environment provide by \pkgname{preview}\cite{preview} package. If any \env{preview} environments
+found in the \meta[cf=optcolor]{input file} will be extracted and converted these. Internally
+the script converts all environments to extract in \env{preview} environments.
+Is better comment this package in preamble unless the option \cmdopt[n]{noprew}{} is
+used. This environment is reserved for the internal process of extraction and conversion, it
+cannot be passed as an argument to the option \cmdopt{skipenv}.
+
+\vspace{0.25\baselineskip}
+
+\DescribeTE{postscript}
+Environment provide by \pkgname{pst-pdf}\cite{pst-pdf}, \pkgname{auto-pst-pdf}\cite{auto-pst-pdf}
+and \pkgname{auto-pst-pdf-lua}\cite{auto-pst-pdf-lua} packages. Since the \pkgname{pst-pdf}, \pkgname{auto-pst-pdf}
+and \pkgname{auto-pst-pdf-lua} packages internally use the \pkgname{preview} package, is better comment this in preamble.
+Only the \emph{content} of this environment is extracted and \emph{\enquote{not}} the environment itself when using the
+\cmdopt{srcenv}{} or \cmdopt{subenv}{} options.
+
+\vspace{0.25\baselineskip}
+
+\DescribeTE{PSTexample}
+Environment provide by \pkgname{pst-exa}\cite{pst-exa} packages. The script automatically detects the
+\lstinline|\begin{PSTexample}| \lstinline|...\end{PSTexample}|
+environments and processes them as separately compiled files. The user should have loaded the
+package with the [\pkgopt{swpl}] or [\pkgopt{tcb}] option and run the script
+using \cmdopt{latex}{} or \cmdopt{xetex}. This environment is reserved for the internal process of extraction and conversion, it
+cannot be passed as an argument to the option \cmdopt{skipenv}{}.
+
+\vspace{0.25\baselineskip}
+
+\DescribeTE{pspicture}
+Environment provide by \pkgname{pstricks}\cite{pstricks} package. The plain \hologo{TeX}
+syntax \lstinline|\pspicture ... \endpspicture| its converted to \hologo{LaTeX} syntax
+\lstinline|\begin{pspicture} ... \end{pspicture}| if not within the \env{PSTexample} or \env{postscript} environments.
+
+\vspace{0.75\baselineskip}
+
+\DescribeTE{psgraph}
+Environment provide by \pkgname{pst-plot}\cite{pst-plot} package. The plain \hologo{TeX} syntax \lstinline|\psgraph ... \endpsgraph|
+its converted to \hologo{LaTeX} syntax \lstinline|\begin{psgraph} ... \end{psgraph}| if
+not within the \env{PSTexample} or \env{postscript} environments.
+
+\newpage
+
+\DescribeTE{tikzpicture}
+Environment provide by \pkgname{tikz}\cite{tikz} package. The plain \hologo{TeX} syntax \lstinline|\tikzpicture ... \tikzpicture|
+its converted to \hologo{LaTeX} syntax \lstinline|\begin{tikzpicture} ... \end{tikzpicture}|
+but no a short syntax \lstinline|\tikz ... ;|.
+
+\vspace{0.75\baselineskip}
+
+\DescribeTE{pgfpicture}
+Environment provide by \pkgname{pgf}\cite{tikz} package. Since the script uses a
+\emph{\enquote{recursive regular expression}} to extract environments, no presents problems
+if present \env{pgfinterruptpicture}.
+
+If you need to extract other environments you can use one of the options described
+in \ref{sec:optline} or \ref{sec:optfile}.
+
+\subsection{Extract with docstrip tags}
+\label{sec:extract:tag}
+
+\DescribeTE*{ltximg}
+All content included between \lstinline|%<*ltximg> ... %</ltximg>| is extracted.
+The tags can \emph{not} be nested and should be at the beginning of the line and in separate lines.
+Internally the script converts all this tags to \env{preview} environments.
+
+\begin{examplecode}[frame=single]
+% no space before open tag %<*
+%<*ltximg>
+code to extract
+%</ltximg>
+% no space before close tag %</
+\end{examplecode}
+
+\subsection{Prevent extraction and remove}
+\label{sec:noextract}
+
+Sometimes you do not want to \emph{\enquote{extract all}} the environments from \meta[cf=optcolor]{input file} or you want to
+remove environments or arbitrary content. The script provides a convenient way to solve this situation.
+
+\DescribeTE{nopreview}
+Environment provide by \pkgname{preview} package. Internally the script
+converts all \emph{\enquote{skip}} environments to \lstinline|\begin{nopreview} ... \end{nopreview}|.
+Is better comment this package in preamble unless the option \cmdopt[n]{noprew}{} is used.
+This environment is reserved for the internal process of extraction and conversion, it
+cannot be passed as an argument to the option \cmdopt{extrenv}.
+
+\vspace{\baselineskip}
+
+\DescribeTE*{noltximg}
+All content betwen \lstinline|%<*noltximg> ... %</noltximg>| are ignored and no extract.
+The tags can \emph{not} be nested and should be at the beginning of the line and in separate lines.
+Internally the script converts all this tags to \env{nopreview} environments.
+
+\begin{examplecode}[frame=single]
+% no space before open tag %<*
+%<*noltximg>
+no extract this
+%</noltximg>
+% no space before close tag %</
+\end{examplecode}
+
+\DescribeTE*{remove}
+All content betwen \lstinline|%<*remove> ... %</remove>| are deleted in the \meta[cf=optcolor]{output file}.
+The tags can \emph{not} be nested and should be at the beginning of the line and in separate lines.
+
+\begin{examplecode}[frame=single]
+% no space before open tag %<*
+%<*remove>
+lines removed in output file
+%</remove>
+% no space before close tag %</
+\end{examplecode}
+
+The content will be deleted if it is \emph{\enquote{not}} within a \meta{verbatim} or \meta{verbatim write}
+environment. If you want to remove specific environments automatically you can use one of
+the options described in \ref{sec:optline} or \ref{sec:optfile}.
+
+\section{Image Formats}
+\label{sec:image:format}
+
+The \meta{image formats} generated by the \ltximg{} using \prgname{ghostscript}
+and \prgname{poppler-utils} are the following command lines:
+
+\DescribeIF{pdf}
+The image format generated using \prgname{ghostscript}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress
+\end{examplecmd}
+
+\DescribeIF{eps}
+The image format generated using \prgname{pdftoeps}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ pdftops -q -eps
+\end{examplecmd}
+
+\DescribeIF{png}
+The image format generated using \prgname{ghostscript}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pngalpha -r150
+\end{examplecmd}
+
+\DescribeIF{jpg}
+The image format generated using \prgname{ghostscript}. The line executed by the system is:
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=jpeg -r150 -dJPEGQ=100 \
+ -dGraphicsAlphaBits=4 -dTextAlphaBits=4
+\end{examplecmd}
+
+\DescribeIF{ppm}
+The image format generated using \prgname{pdftoppm}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ pdftoppm -q -r 150
+\end{examplecmd}
+
+\DescribeIF{tiff}
+The image format generated using \prgname{ghostscript}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=tiff32nc -r150
+\end{examplecmd}
+
+\DescribeIF{svg}
+The image format generated using \prgname{pdftocairo}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ pdftocairo -q -r 150
+\end{examplecmd}
+
+\DescribeIF{bmp}
+The image format generated using \prgname{ghostscript}. The line executed by the system is:
+
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=bmp32b -r150
+\end{examplecmd}
+
+\section{How to use}
+\subsection{Syntax}
+The syntax for \ltximg{} is simple, if your use the version provided in your \hologo{TeX} distribution:
+
+\begin{examplecmd}
+[user@machine ~:]§ ltximg `\small\oarg[type=tt,cf=optcolor,sbc=gray,ac=lightgray]{options} \textcolor{gray}{\texttt{[-\/-]}} \meta[cf=optcolor]{input file}`
+\end{examplecmd}
+If the development version is used:
+\begin{examplecmd}
+[user@machine ~:]§ perl ltximg `\small\oarg[type=tt,cf=optcolor,sbc=gray,ac=lightgray]{options} \textcolor{gray}{\texttt{[-\/-]}} \meta[cf=optcolor]{input file}`
+\end{examplecmd}
+
+The extension valid for \meta[cf=optcolor]{input file} are \fext{tex} or \fext{ltx},
+relative or absolute paths for files and directories is not supported. If used without
+\oarg[type=tt,cf=optcolor,sbc=gray,ac=lightgray]{options} the extracted environments are converted to \iext{pdf}
+image format and saved in the \sysdir{./images} directory using \prgname*{pdflatex} and \pkgname{preview} package.
+
+\subsection{Command line interface}
+\label{sec:optline}
+
+The script provides a \emph{command line interface} with short \textcolor{optcolor}{\bfseries\texttt{-}}
+and long \textcolor{optcolor}{\bfseries\texttt{--}} option, they may be given before
+the name of the \meta[cf=optcolor]{input file}, the order of specifying the options is not significant.
+Options that accept a \meta{value} require either a blank space \verb*| | or \textcolor{optcolor}{\bfseries\texttt{=}}
+between the option and the \meta{value}. Multiple short options can be bundling and if the last option takes a
+\meta{comma separated list} you need \textcolor{optcolor}{\bfseries\texttt{-\/-}} at the end.
+
+\DescribeCmd[h]{help}{bolean}{off}
+Display a command line help and exit.
+
+\DescribeCmd[l]{log}{bolean}{off}
+Write a \Fext{ltximg}{log} file with all process information.
+
+\DescribeCmd[v]{version}{bolean}{off}
+Display the current version (\fileversion) and exit.
+
+\DescribeCmd[V]{verbose}{bolean}{off}
+Show verbose information of process in terminal.
+
+\DescribeCmd[d]{dpi}{integer}{150}
+Dots per inch for images files. Values are positive integers less than or equal to 2500.
+
+\DescribeCmd[t]{tif}{bolean}{off}
+Create a \fext{tif} images files using \prgname{ghostscript}.
+
+\DescribeCmd[b]{bmp}{bolean}{off}
+Create a \fext{bmp} images files using \prgname{ghostscript}.
+
+\DescribeCmd[j]{jpg}{bolean}{off}
+Create a \fext{jpg} images files using \prgname{ghostscript}.
+
+\DescribeCmd[p]{png}{bolean}{off}
+Create a \fext{png} transparent image files using \prgname{ghostscript}.
+
+\DescribeCmd[e]{eps}{bolean}{off}
+Create a \fext{eps} image files using \prgname{pdftops}.
+
+\DescribeCmd[s]{svg}{bolean}{off}
+Create a \fext{svg} image files using \prgname{pdftocairo}.
+
+\DescribeCmd[P]{ppm}{bolean}{off}
+Create a \fext{ppm} image files using \prgname{pdftoppm}.
+
+\DescribeCmd[g]{gray}{bolean}{off}
+Create a gray scale for all images using \prgname{ghostscript}. The line behind this options is:
+
+\begin{examplecmd}
+[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress \
+ -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray
+\end{examplecmd}
+
+\DescribeCmd[f]{force}{bolean}{off}
+Try to capture \lstinline|\psset|\marg[type=tt]{code} and \lstinline|\tikzset|\marg[type=tt]{code} to extract.
+When using the \cmdopt{force} option the script will try to capture \lstinline|\psset|\marg[type=tt]{code} or
+\lstinline|\tikzset|\marg[type=tt]{code} and leave it inside the \env{preview} environment, any line that is between \lstinline|\psset|\marg[type=tt]{code} and
+\lstinline|\begin{pspicture}| or between \lstinline|\tikzset|\marg[type=tt]{code} and \lstinline|\begin{tikzpicture}| will be captured.
+
+\DescribeCmd[n]{noprew}{bolean}{off}
+Create images files without \pkgname{preview} package. The \lstinline|\begin{preview}|\ldots \lstinline|\end{preview}|
+lines are only used as delimiters for extracting the content \emph{without} using the package \pkgname{preview}.
+Using this option \emph{\enquote{only}} the extracted environments are processed and not the whole \meta[cf=optcolor]{input file}, sometimes
+it is better to use it together with \cmdopt{force}.
+
+\DescribeCmd[m]{margins}{integer}{0}
+Set margins in bp for \scriptname{pdfcrop}.
+
+\DescribeCmd[r]{runs}{\textnormal{\ttfamily 1\textbar 2\textbar 3}}{1}
+Set the number of times the \meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler} will run
+on the \meta[cf=optcolor]{input file} for environment extraction.
+
+\DescribeCmd[o]{output}{file name}{empty}
+Create \meta{file name} with all extracted environments converted to \ics{includegraphics}.
+Only \meta{file name} must be passed \emph{without} relative or absolute paths.
+
+\DescribeCmd{prefix}{string}{fig}
+Set \meta{prefix} append to each generated files.
+
+\DescribeCmd{myverb}{macro name}{myverb}
+Set custom verbatim command \lstinline+\myverb+. Just pass the \meta{macro name}{}
+\emph{without} \enquote{\textcolor{optcolor}{\texttt{\bfseries\textbackslash}}}.
+
+\DescribeCmd{imgdir}{string}{images}
+Set the name of directory for save generated files. Only the \meta{name} of directory
+must be passed \emph{without} relative or absolute paths.
+
+\DescribeCmd{zip}{bolean}{off}
+Compress the files generated by the script in \sysdir{./images} in \fext{zip} format.
+Does not include \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{tar}{bolean}{off}
+Compress the files generated by the script in \sysdir{./images} in \fext{tar.gz} format.
+Does not include \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{srcenv}{bolean}{off}
+Create separate files with \emph{\enquote{only code}} for all extracted
+environments. This option is mutually exclusive with \cmdopt{subenv}.
+
+\DescribeCmd{subenv}{bolean}{off}
+Create a \meta{standalone} files (with \emph{\enquote{preamble and code}}) for all extracted
+environments. This option is designed to generate \emph{\enquote{compilable files}}
+for each extracted environment, is mutually exclusive with \cmdopt{srcenv}.
+
+\DescribeCmd{shell}{bolean}{off}
+Enable \ics*{write18}\meta{shell command}.
+
+\DescribeCmd{norun}{bolean}{off}
+Execute the script, but do not create image files. This option is designed to
+be used in conjunction with \cmdopt{srcenv} or \cmdopt{subenv} and to
+debug the \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{nopdf}{bolean}{off}
+Don't create a \fext{pdf} image files.
+
+\DescribeCmd{nocrop}{bolean}{off}
+Don't run \scriptname{pdfcrop} in image files.
+
+\DescribeCmd{arara}{bolean}{off}
+Use \prgname*{arara}\footnote{\url{https://ctan.org/pkg/arara}} tool for compiler \meta[cf=optcolor]{input file}
+and \meta[cf=optcolor]{output file}. This option is designed to full process \meta[cf=optcolor]{input file}
+and \meta[cf=optcolor]{output file}, is mutually exclusive with \emph{\enquote{any}} other
+\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler} option. See \ref{sec:arara} for more information.
+
+\DescribeCmd{xetex}{bolean}{off}
+Using \prgname*{xelatex} compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{latex}{bolean}{off}
+Using \prgname*{latex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\prgname*{dvips}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\scriptname{ps2pdf}
+compiler in \meta[cf=optcolor]{input file} and \prgname*{pdflatex} for \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{dvips}{bolean}{off}
+Using \prgname*{latex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\prgname*{dvips}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\scriptname{ps2pdf}
+for compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{dvilua}{bolean}{off}
+Using \prgname*{dvilualatex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\prgname*{dvips}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\scriptname{ps2pdf}
+for compiler \meta[cf=optcolor]{input file} and \prgname*{lualatex} for \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{dvipdf}{bolean}{off}
+Using \prgname*{latex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\prgname*{dvipdfmx}
+for compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{latexmk}{bolean}{off}
+Using \scriptname{latexmk}\footnote{\url{https://www.ctan.org/pkg/latexmk}} for process \meta[cf=optcolor]{output file}.
+This option is designed to full process \meta[cf=optcolor]{output file}, is mutually exclusive with \cmdopt{arara}.
+
+\DescribeCmd{luatex}{bolean}{off}
+Using \prgname*{lualatex} for compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}.
+
+\DescribeCmd{clean}{\textnormal{\ttfamily doc\textbar pst\textbar tkz\textbar all\textbar off}}{doc}
+Removes specific content in \meta[cf=optcolor]{output file}. Valid values for this option are:
+
+\begin{description}[font=\ttfamily, nosep, noitemsep, leftmargin=0pt]
+\item[\textcolor{gray}{doc}] All content after \lstinline+\end{document}+ is removed.
+\item[\textcolor{gray}{pst}] All \lstinline|\psset|\marg[type=tt]{code} and \pkgname{pstricks} package is removed in \meta{preamble} and \meta{body}.
+\item[\textcolor{gray}{tkz}] All \lstinline|\tikzset|\marg[type=tt]{code} is removed in \meta{body}.
+\item[\textcolor{gray}{all}] Activates \textcolor{gray}{\texttt{doc}}, \textcolor{gray}{\texttt{pst}} and \textcolor{gray}{\texttt{tkz}}.
+\item[\textcolor{gray}{off}] Deactivate all.
+\end{description}
+
+\DescribeCmd{extrenv}{comma separated list}{empty}
+Add environments to extract, if it's the last option passed need \textcolor{optcolor}{\textbf{\texttt{-\/-}}}
+at the end. The environments \env{document} and \env{nopreview} are not supported in this option.\par
+
+\DescribeCmd{skipenv}{comma separated list}{empty}
+Add environments that should \emph{\enquote{not be extracted}} and that the script supports
+by default, if it's the last option passed need \textcolor{optcolor}{\textbf{\texttt{-\/-}}}
+at the end. The environments \env{PSTexample} and \env{preview} are not supported in this option.\par
+
+\DescribeCmd{verbenv}{comma separated list}{empty}
+Add \meta{verbatim standard} environment support, if it's the last option
+passed need \textcolor{optcolor}{\textbf{\texttt{-\/-}}} at the end.\par
+
+\DescribeCmd{writenv}{comma separated list}{empty}
+Add \meta{verbatim write} environment support, if it's the last option
+passed need \textcolor{optcolor}{\textbf{\texttt{-\/-}}} at the end.\par
+
+\DescribeCmd{deltenv}{comma separated list}{empty}
+Add environments to deleted in \meta[cf=optcolor]{output file}. The environments are
+delete only in \meta{body} of \meta[cf=optcolor]{output file}, if it's the last option
+passed need \textcolor{optcolor}{\textbf{\texttt{-\/-}}} at the end. The environment \env{document}
+is not supported in this option.\par
+
+\subsection{Passing options from command line}
+
+An example of usage from command line:
+
+\begin{examplecmd}
+[user@machine ~:]§ ltximg --latex -s -o test-out test-in.ltx
+\end{examplecmd}
+Create a \sysdir{./images} directory (if it does not exist) with all extracted environments converted to image
+formats (\iext{pdf}, \iext{svg}) in individual files, an output file \meta[ac=LightSlateGrey,cf=OrangeRed]{test-out.ltx}
+with all extracted environments converted to \ics{includegraphics} and a single file
+\meta[ac=LightSlateGrey,cf=OrangeRed]{test-in-fig-all.ltx} with only the extracted environments
+using \prgname*{latex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\prgname*{dvips}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\scriptname{ps2pdf}
+and \pkgname{preview} package for for process \meta[ac=LightSlateGrey,cf=OrangeRed]{test-in.ltx} and
+\prgname*{pdflatex} for \meta[ac=LightSlateGrey,cf=OrangeRed]{test-out.ltx}.
+
+\newpage
+
+\subsection{Options from input file}
+\label{sec:optfile}
+
+Many of the ideas in this section are inspired by the \arara.
+A very useful way to pass options to the script is to place them in commented
+lines at the beginning of the file, very much in the \emph{\enquote{style of \arara}}.
+
+\DescribeOptFile*{\meta[ac=lightgray,cf=optcolor]{argument}}{option one, option two, option three, \ldots}
+\DescribeOptFile*{\meta[ac=lightgray,cf=optcolor]{argument}}{option one, option two, option three, \ldots}[\textcolor{gray}{!}]
+
+The vast majority of the \meta[ac=lightgray,cf=optcolor]{options} can be passed into the \meta[cf=optcolor]{input file}. These
+should be put at the beginning of the file in commented lines and everything must
+be on the same line, the exclamation mark \textcolor{optcolor}{\texttt{!}} deactivates the \meta{options}.
+When passing options from the \meta[cf=optcolor]{input file} you should be aware that
+they must \emph{\enquote{not}} contain \textcolor{optcolor}{\texttt{-}} or \textcolor{optcolor}{\texttt{-\/-}},
+the \textcolor{optcolor}{\texttt{=}} sign between an option and its value is mandatory,
+short names are disabled and options found in the \meta[cf=optcolor]{input file} overwrite
+those passed on the command line. Valid values for \meta[ac=lightgray,cf=optcolor]{argument} are the following:
+
+\DescribeOptFile{extrenv}{environment one, environment two, environment three, \ldots}
+This line is to indicate to the script which environments, not supported by
+default, are extracted.
+
+\DescribeOptFile{skipenv}{environment one, environment two, environment three, \ldots}
+This line is to indicate to the script which environments, of the ones
+supported by default, should not be extracted.
+
+\DescribeOptFile{verbenv}{environment one, environment two, environment three, \ldots}
+This line is to indicate to the script which environments, its considerate a \meta{verbatim standard}.
+
+\DescribeOptFile{writenv}{environment one, environment two, environment three, \ldots}
+This line is to indicate to the script which environments its consider \meta{verbatim write}.
+
+\DescribeOptFile{deltenv}{environment one, environment two, environment three, \ldots}
+This line is to indicate to the script which environments are deleted.
+
+\DescribeOptFile{options}{option one = value, option two = value, option three = value, \ldots}
+This line is to indicate to the script which options(other than those listed above) need to process.
+
+The options passed from the \meta[cf=optcolor]{input file} are validated by the script after they are read. If you are going to
+create an \meta[cf=optcolor]{output file} and you do not want these lines to remain, it is better to
+place them inside the \lstinline|%<*remove> ... %</remove>|. Like this:
+
+\begin{examplecode}[numbers=left]
+%<*remove>
+% ltximg: options: { png, srcenv, xetex }
+% ltximg: extrenv: { description }
+%</remove>
+\end{examplecode}
+
+\subsection{Passing options from input file}
+
+Adding the following lines to the beginning of the file \sysfile{file-in.tex}:
+
+\begin{examplecode}[numbers=left]
+% ltximg: options: { luatex, output = file-out, imgdir = pics, prefix = env }
+% ltximg: skipenv: { tikzpicture }
+% ltximg: deltenv: { filecontents }
+\end{examplecode}
+and run:
+\begin{examplecmd}
+[user@machine~:]§ ltximg file-in.tex
+\end{examplecmd}
+
+Create a \sysdir{./pics} directory (if it does not exist) with all extracted environments,
+except \env{tikzpicture}, converted to image formats (\iext{pdf}) in individual files,
+an output file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex} with all extracted environments
+converted to \ics{includegraphics} and environment \LWenv{filecontents} removed,
+a single file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-in-env-all.ltx} with \emph{only} the extracted environments
+using \prgname*{lualatex} and \pkgname{preview} package for process \meta[ac=LightSlateGrey,cf=OrangeRed]{file-in.tex}
+and \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex}.
+
+\section{The way of \texttt{arara}}
+\label{sec:arara}
+By design, the script only runs \emph{\enquote{one or more compilation}} on top
+of the \meta[cf=optcolor]{input file}, but, sometimes you need to process in a specific mode the \meta[cf=optcolor]{input file}
+or needs to be processed with something other than \hologo{LaTeX}, \hologo{XeLaTeX}, \hologo{pdfLaTeX} or \hologo{LuaLaTeX} engine.
+This is where \arara\cite{arara} comes in, this \emph{\enquote{great little tool}},
+is able to have complete control over the compilation of the \meta[cf=optcolor]{input file}, we just
+have to keep a few considerations in mind:
+
+\begin{enumerate}[font=\small, nosep, noitemsep,leftmargin=*]
+\item Read the documentation (this always comes first).
+\item Add \lstinline|{ options: [-recorder] }| to \enquote{rule} for clean temporary files.
+\item Avoiding the use of \lstinline|: clean: { extensions: [...] }|.
+\item Don't set \lstinline|-jobname| and \lstinline|-output-directory| in any \enquote{rule}.
+\end{enumerate}
+
+When the \cmdopt{arara} option is passed to the script, the line that runs in the system is:
+
+\begin{examplecmd}
+[user@machine~:]§ `\small\prgname{arara}` --log file.tex
+\end{examplecmd}
+
+If you have several \enquote{rules} within the file they will all be executed, to avoid this we must add:
+
+\begin{examplecode}[numbers=left]
+% arara: halt
+\end{examplecode}
+
+After the last \enquote{rule} you have at the beginning of the file. With all these considerations
+in mind it is possible to extract and convert environments
+from \emph{any file}.
+
+For example, by adding these lines at the beginning of the file:
+
+\begin{examplecode}[numbers=left]
+% arara: lualatex: { options: [-recorder] }
+% arara: lualatex: { options: [-recorder] }
+%<*remove>
+% ltximg: options: { arara, output = file-out, prefix = tkz}
+%</remove>
+\end{examplecode}
+
+and run:
+
+\begin{examplecmd}
+[user@machine~:]§ ltximg test.tex
+\end{examplecmd}
+
+Create a \sysdir{./images} directory (if it does not exist) with all extracted
+environments converted to image format (\iext{pdf}) in individual files,
+an output file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex} with all exatracted environments
+converted to \ics{includegraphics}, a single file \meta[ac=LightSlateGrey,cf=OrangeRed]{test-tkz-all.tex}
+with only the extracted environments using \pkgname{preview} package and \prgname*{lualatex} \emph{\enquote{two times}}
+for process \meta[ac=LightSlateGrey,cf=OrangeRed]{test.tex} and \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex}.
+
+Remember that the \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}
+will be compiled using the same \enquote{rule}. One \emph{trick} to get around this situation is to use:
+
+\begin{examplecode}[numbers=left]
+%<*remove>
+% arara: lualatex: { options: [-recorder] }
+% arara: lualatex: { options: [-recorder] }
+% arara: halt
+% ltximg: options: { arara, output = file-out, prefix = tkz}
+%</remove>
+% arara: xelatex: { options: [-recorder] }
+% arara: xelatex: { options: [-recorder] }
+\end{examplecode}
+
+The content betwen \lstinline|%<*remove> ... %</remove>| are remove from output file
+before compiling. Thus, the output file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex} will be
+compiled using \prgname*{xelatex} \emph{\enquote{two times}}.
+
+As a final consideration, \ltximg{} passes options to the \pkgname{preview} package and
+the \scriptname{pdfcrop} script according to the engine used. When using \cmdopt{arara} it
+will \emph{\enquote{try}} to detect the used engine by means of a regular expression, if the
+detection fails the default values will be used.
+
+This does not affect the process of creating \meta{standalone} files and can be prevented by using \cmdopt{noprew}
+or \cmdopt{nocrop} at the cost of not having the images cropped.
+
+In this way we can \meta{compile} and \meta{convert} any document as long as the conditions
+of the \meta[cf=optcolor]{input file} are met and the correct \enquote{rule} are used.
+
+\newpage
+
+\section{Example usign \texttt{latexmk}}
+
+If you are a user of \scriptname{latexmk}, another great utility that automates the compilation process, you must keep
+in mind that this will run only in the \meta{output file}. Consider the following example
+adapted from \href{https://tex.stackexchange.com/a/209059}{How to get tikzmark to work} and
+\href{https://tex.stackexchange.com/a/114847}{Draw an aircraft with Tikz}
+to generate an image in \iext{svg}, \iext{png} and \iext{pdf} format from environment \env{picture} using \prgname*{lualatex} and \scriptname{latexmk}.
+
+\begin{examplecode}[numbers=left]
+%<*remove>
+% ltximg: extrenv: {picture}
+% ltximg: skipenv: {tikzpicture}
+%</remove>
+\documentclass{article}
+\usepackage{tikz}
+\usetikzlibrary{calc,tikzmark}
+\setlength{\parindent}{0pt}
+\begin{document}
+\section{How to get Tikzmark to work}
+By taking logarithms of both sides:
+
+\[
+ t = \frac{30\cdot\ln(3/22)}{\ln(15/22)}
+ \tikzmark{calculator}\approx\tikzmark{otherside}
+ 156
+\]
+\begin{tikzpicture}[overlay,remember picture]
+ \coordinate (target) at ($(pic cs:calculator)!1/2!(pic cs:otherside) - (0,.5ex)$);
+ \draw[arrows=->] (target) ++(0,-2ex) node [anchor=north] {use calculator} -- (target);
+\end{tikzpicture}
+
+\section{Draw an aircraft with Tikz}
+The best airplane ever drawn by David Carlise. No TikZ used, just the
+classic and perhaps forgotten \verb|\begin{picture} ... \end{picture}|.
+
+\begin{picture}(200,100)
+ \put(30,40){\line(1,0){150}} \put(30,40){\line(0,1){60}}
+ \put(30,100){\line(1,0){20}} \put(50,100){\line(1,-4){10}}
+ \put(60,60){\line(1,0){100}} \put(160,60){\line(1,-1){20}}
+ \put(100,50){\line(0,-1){80}} \put(130,50){\line(0,-1){80}}
+ \put(100,-30){\line(1,0){30}} \put(100,61){\line(0,1){49}}
+ \put(130,61){\line(0,1){49}} \put(100,110){\line(1,0){30}}
+\end{picture}
+\end{document}
+\end{examplecode}
+
+We now run:
+
+\begin{examplecmd}
+[user@machine~:]§ ltximg --luatex --latexmk --svg --png -o file-out file-in.tex
+\end{examplecmd}
+
+Create a \sysdir{./images} directory (if it does not exist) with all \env{picture} environments,
+except \env{tikzpicture}, converted to image formats (\iext{svg}, \iext{png}, \iext{pdf}),
+an output file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex} with all \env{picture} environments
+converted to \ics{includegraphics}, a single file \meta[ac=LightSlateGrey,cf=OrangeRed]{file-in-fig-all.ltx} with
+only environments \env{picture} extracted using \prgname*{lualatex} and \pkgname{preview} package for process
+\meta[ac=LightSlateGrey,cf=OrangeRed]{file-in.tex} and \scriptname{latexmk} for \emph{full} process
+\meta[ac=LightSlateGrey,cf=OrangeRed]{file-out.tex}.
+
+\section{Note for \texttt{dvisvgm} users}
+\label{sec:dvisvgm}
+
+By design, the image format \iext{svg} is created using \prgname{pdftocairo} over the
+generated \iext{pdf} file, but, if you want to have a good \iext{svg} files that preserve our \emph{typographic} fonts it is best to
+use \prgname{dvisvgm}\footnote{\url{https://ctan.org/pkg/dvisvgm}}. The best results of \prgname{dvisvgm}\cite{dvisvgm} are obtained when processing the file in \fext{dvi} or \fext{xdv}
+format, there are two possible ways to do this:
+
+\begin{enumerate}[font=\small, nosep, noitemsep,leftmargin=*]
+\item Execute the script using \cmdopt{subenv}{} and \cmdopt{norun}{} to generate \meta{standalone} files, move to \sysdir{./images}
+and generate \fext{dvi} or \fext{xdv} files, then runing:
+
+\begin{examplecmd}
+[user@machine~:]§ for i in *.tex; do `\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler} \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options}` §i;done
+[user@machine~:]§ for i in *.dvi; do `\small\prgname{dvisvgm} \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options}` §i;done
+\end{examplecmd}
+
+\item Execute the script using \cmdopt{norun}{}, move to \sysdir{./images} and generate \fext{dvi} or \fext{xdv} file, then runing:
+
+\begin{examplecmd}
+[user@machine~:]§ `\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler} \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options}` test-fig-all.tex
+[user@machine~:]§ `\small\prgname{dvisvgm} \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options}` test-fig-all.dvi
+\end{examplecmd}
+
+\end{enumerate}
+
+\section{Final notes}
+
+The process and operations required to generate the various types of \meta{image
+formats} or \meta{standalone} files have been described throughout the documentation,
+but, as discussed in section \ref{sec:arara}, sometimes the requirements are a \emph{little
+different}.
+
+This is the best way to extend the capabilities of the \ltximg{}. Although
+many tasks can be \emph{automated}, in the end only the user knows what
+the document contains and how it should be generated.
+
+Finding the correct \emph{\enquote{regular expressions}} and writing a \emph{\enquote{good documentation}}
+would be the great mission (which does not end yet).
+
+\section{Change history}
+\label{sec:change:history}
+
+The most recent publicly released of \ltximg{} is available at
+\textsc{ctan}: \url{https://www.ctan.org/pkg/ltximg}. Historical and
+developmental versions are available at \textcolor{gray}{\scriptsize\faIcon[regular]{github}}
+\url{https://github.com/pablgonz/ltximg}.
+
+While general feedback via email is welcomed, specific bugs or feature
+requests should be reported through the issue
+tracker: \url{https://github.com/pablgonz/ltximg/issues}.
+
+This is a short list of some of the notable changes in the history of the \ltximg{} along with the
+versions, both development (devp) and public (ctan).
+
+\setlist[itemize,1]{label=\textendash,wide=0.5em,nosep,noitemsep,leftmargin=10pt}
+% length for change history
+\newlength\descrwidth
+\settowidth{\descrwidth}{\textsf{v1.4.5, (ctan), 2013-01-23}}
+\begin{description}[font=\small\sffamily,wide=0pt,style=multiline,leftmargin=\descrwidth,nosep,noitemsep]
+\item [v\fileversion\ (ctan), \filedate]
+ \begin{itemize}
+ \item It is now possible to extract any environment.
+ \item Add \texttt{--log}, \texttt{--runs}, \texttt{--latexmk} and \texttt{--dvilua} options.
+ \item All calls to the system are captured.
+ \item Re-write source code acording to \texttt{Perl} v5.3x.
+ \item Review of documentation.
+ \end{itemize}
+\item [v1.7 (ctan), 2019-08-24]
+ \begin{itemize}
+ \item Add \texttt{scontents} environment support.
+ \item Add \texttt{filecontentsdefmacro} environment support.
+ \item Fix regex in source code.
+ \item Update documentation.
+ \end{itemize}
+\item [v1.6 (ctan), 2019-07-13]
+ \begin{itemize}
+ \item Add \texttt{--zip} and \texttt{--tar} options.
+ \item Add new \texttt{Verb} from \texttt{fvextra}.
+ \item Fix and update source code and documentation.
+ \end{itemize}
+\item [v1.5 (ctan), 2018-04-12]
+ \begin{itemize}
+ \item Use \texttt{GitHub} to control version.
+ \item Rewrite and optimize most part of source code and options.
+ \item Change \texttt{pdf2svg} for \texttt{pdftocairo}.
+ \item Complete support for \texttt{pst-exa} package.
+ \item Escape characters in regex according to \texttt{Perl} v5.2x.
+ \end{itemize}
+\item [v1.4 (devp), 2016-11-29]
+ \begin{itemize}
+ \item Remove and rewrite code for regex and system call.
+ \item Add \texttt{--arara} compiler, clean and comment code.
+ \item Add \texttt{--dvips} and \texttt{--dvipdfm(x)} for creation images.
+ \item Add \texttt{bmp}, \texttt{tiff} image format.
+ \end{itemize}
+\item [v1.3 (devp), 2016-08-14]
+ \begin{itemize}
+ \item Rewrite some part of code (norun, nocrop, clean).
+ \item Suport \texttt{minted} and \texttt{tcolorbox} package.
+ \item Escape some characters in regex according to \texttt{Perl} v5.2x.
+ \item All options read from command line and input file.
+ \item Use \texttt{/tmp} dir for work process.
+ \end{itemize}
+\item [v1.2 (ctan), 2015-04-22]
+ \begin{itemize}
+ \item Remove unused modules.
+ \item Add more image format.
+ \item Fix regex.
+ \end{itemize}
+\item [v1.1 (ctan), 2015-04-21]
+ \begin{itemize}
+ \item Change \texttt{mogrify} to \texttt{gs} for image formats.
+ \item Create output file.
+ \item Rewrite source code and fix regex.
+ \item Change format date to iso format.
+ \end{itemize}
+\item [v1.0 (ctan), 2013-12-01]
+ \begin{itemize}
+ \item First public release.
+ \end{itemize}
+\end{description}
+
+\newpage
+
+\let\stdsection\section
+\def\section*#1{\stdsection{#1}}
+\begin{thebibliography}{9}
+
+\bibitem{preview} \textsc{Kastrup, David}. \enquote{The \textsf{preview}
+package for \hologo{LaTeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/preview}, 2017.
+
+\bibitem{tikz} \textsc{Tantau, Till}. \enquote{The \textsf{TikZ} and \textsf{PGF}
+Packages}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pgf}, 2020.
+
+\bibitem{pstricks} \textsc{Van Zandt, Timothy}. \enquote{\textsf{PSTricks} -
+\textsf{PostScript} macros for generic \hologo{TeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pstricks-base}, 2007.
+
+\bibitem{pst-plot} \textsc{Van Zandt, Timothy}. \enquote{\textsf{pst-plot} –
+Plot data using \textsf{PSTricks}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pst-plot}, 2019.
+
+\bibitem{pst-pdf} \textsc{Niepraschk, Rolf}. \enquote{The \textsf{pst-pdf}
+Packages}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pst-pdf}, 2019.
+
+\bibitem{auto-pst-pdf} \textsc{Robertson, Will}. \enquote{The \textsf{auto-pst-pdf}
+Packages}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/auto-pst-pdf}, 2009.
+
+\bibitem{auto-pst-pdf-lua} \textsc{Voß, Herbert}. \enquote{\textsf{auto-pst-pdf-lua} - Using
+\hologo{LuaLaTeX} with \textsf{PSTricks}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/auto-pst-pdf-lua}, 2018.
+
+\bibitem{pst-exa} \textsc{Voß, Herbert}. \enquote{\textsf{pst-exa} - Typeset
+\textsf{PSTricks} examples, with \hologo{pdfTeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pst-exa}, 2017.
+
+\bibitem{pst2pdf} \textsc{Voß, Herbert}. \enquote{\textsf{pst2pdf} - A script
+to compile \textsf{PSTricks} documents via \hologo{pdfTeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/pst2pdf}, 2017.
+
+\bibitem{graphicx} \textsc{The \hologo{LaTeX3} Project}. \enquote{\textsf{graphics} – Enhanced
+support for graphics}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/graphicx}, 2017.
+
+\bibitem{grfext} \textsc{Oberdiek, Heiko}. \enquote{The \textsf{grfext}
+package}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/grfext}, 2019.
+
+\bibitem{xcomment} \textsc{Van Zandt, Timothy}. \enquote{The \textsf{xcomment}
+package}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/xcomment}, 2010.
+
+\bibitem{extract} \textsc{Adriaens, Hendri}. \enquote{The \textsf{extract}
+package}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/extract}, 2019.
+
+\bibitem{cachepic} \textsc{Trzeciak, Tomasz M}. \enquote{The \textsf{cachepic}
+package}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/cachepic}, 2009.
+
+\bibitem{doc} \textsc{Mittelbach, Frank}. \enquote{The \textsf{doc} and \textsf{shortvrb}
+Packages}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/doc}, 2020.
+
+\bibitem{fancyvrb} \textsc{Van Zandt, Timothy}. \enquote{The \textsf{fancyvrb}
+package - Fancy Verbatims in \hologo{LaTeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/fancyvrb}, 2020.
+
+\bibitem{listings} \textsc{Hoffmann, Jobst}. \enquote{The \textsf{listings}
+package}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/listings}, 2020.
+
+\bibitem{minted} \textsc{Poore, Geoffrey M}. \enquote{The \textsf{minted}
+package - Highlighted source code in \hologo{LaTeX}}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/minted}, 2017.
+
+\bibitem{arara} \textsc{The Island of \hologo{TeX}}. \enquote{\textsf{arara} - The
+cool \hologo{TeX} automation tool}. Available from
+\textsc{ctan}, \url{https://www.ctan.org/pkg/arara}, 2020.
+
+\bibitem{dvisvgm} \textsc{Gieseking, Martin}. \enquote{\textsf{dvisvgm} - A
+fast \textsf{DVI} to \textsf{SVG} converter}. Available from
+\textsc{ctan}, \url{https://ctan.org/pkg/dvisvgm}, 2020.
+
+\end{thebibliography}
+\let\section\stdsection
+
+\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
+\cleardoublepage
+\phantomsection
+\indexprologue{
+The italic numbers denote the pages where the corresponding entry is
+described.}
+
+\printindex
+\end{document}
diff --git a/support/ltximg/ltximg-doc.dtx b/support/ltximg/ltximg-doc.dtx
deleted file mode 100644
index b703faf7ec..0000000000
--- a/support/ltximg/ltximg-doc.dtx
+++ /dev/null
@@ -1,1705 +0,0 @@
-% arara: xelatex
-% arara: xelatex
-% arara: clean: { extensions: [ aux, log, out, ilg, ind, idx, toc, hd ] }
-% \iffalse meta-comment
-%<*internal>
-\iffalse
-%</internal>
-%<*readme>
-## LTXimg &ndash; LaTeX environments to image format
-
-## Description
-
-**ltximg** is a perl *script* that automates the process of extracting and converting
-environments provided by **tikz**, **pstricks** and other packages from input file
-to image formats in individual files using `ghostscript` and `poppler-utils`. Generates a file
-with only extracted environments and other with environments converted to `\includegraphics`.
-
-## Syntax
-```bash
-$ ltximg [<compiler>] [<options>] [--] <input file>.<tex|ltx>
-```
-## Usage
-```bash
-$ ltximg --latex [<options>] <file.tex>
-$ ltximg --arara [<options>] <file.tex>
-$ ltximg [<options>] <file.tex>
-$ ltximg <file.tex>
-```
-If used without `[<compiler>]` and `[<options>]` the extracted environments are converted to `pdf` image format
-and saved in the `/images` directory using `pdflatex` and `preview` package. Relative or absolute `paths` for files
-and directories is not supported. If the last `[<options>]` take a *list separated by commas*, you need `--` at the end.
-
-## Default environments extract
-```bash
- pspicture tikzpicture pgfpicture psgraph postscript PSTexample
-```
-## Options
-
-```bash
- [default]
--h, --help Display command line help and exit [off]
--l, --license Display GPL license and exit [off]
--v, --version Display current version (1.7) and exit [off]
--t, --tif Create .tif files using ghostscript [gs]
--b, --bmp Create .bmp files using ghostscript [gs]
--j, --jpg Create .jpg files using ghostscript [gs]
--p, --png Create .png files using ghostscript [gs]
--e, --eps Create .eps files using poppler-utils [pdftops]
--s, --svg Create .svg files using poppler-utils [pdftocairo]
--P, --ppm Create .ppm files using poppler-utils [pdftoppm]
--g, --gray Gray scale for images using ghostscript [off]
--f, --force Capture "\psset" and "\tikzset" to extract [off]
--n, --noprew Create images files whitout "preview" package [off]
--d <integer>, --dpi <integer>
- Dots per inch resolution for images [150]
--m <integer>, --margin <integer>
- Set margins for pdfcrop [0]
---imgdir <dirname> Set name of directory to save images [images]
---zip Compress files generated in .zip format [off]
---tar Compress files generated in .tar.gz format [off]
--o <filename>, --output <filename>
- Create output file [off]
---verbose Verbose printing [off]
---srcenv Create files whit only code environment [off]
---subenv Create files whit preamble and code [off]
---latex Using latex>dvips>ps2pdf for compiler input
- and pdflatex for compiler output [off]
---dvips Using latex>dvips>ps2pdf for compiler input
- and latex>dvips>ps2pdf for compiler output [off]
---arara Use arara for compiler input and output [off]
---xetex Using xelatex for compiler input and output [off]
---dvipdf Using dvipdfmx for compiler input and output [off]
---luatex Using lualatex for compiler input and output [off]
---prefix <string> Set prefix append to each image file [off]
---norun Run script, but no create images files [off]
---nopdf Don't create a ".pdf" image files [off]
---nocrop Don't run pdfcrop [off]
---verbcmd <cmdname> Set "\cmdname" verbatim command [myverb]
---clean (doc|pst|tkz|all|off)
- Removes specific text in output file [doc]
---extrenv <env1,...> Add new environments to extract [empty]
---skipenv <env1,...> Skip environments to extract [empty]
---verbenv <env1,...> Add verbatim environments [empty]
---writenv <env1,...> Add verbatim write environments [empty]
---deltenv <env1,...> Delete environments in output file [empty]
-```
-## Example
-```bash
-$ ltximg --latex -e -p --srcenv --imgdir=mypics -o test-out test-in.ltx
-```
-```bash
-$ ltximg --latex -ep --srcenv --imgdir mypics -o test-out test-in.ltx
-```
- Create a `/mypics` directory whit all extracted environments converted to
- image formats (`.pdf`, `.eps`, `.png`), individual files whit source code (`.tex`)
- for all extracted environments, a file `test-out.ltx` whit all environments converted to `\includegraphics`
- and file `test-in-fig-all.tex` with only the extracted environments using
- `latex>dvips>ps2pdf` and `preview` package for `<input file>` and `pdflatex`
- for `<output file>`.
-
-## Documentation
- For full documentation use:
-```bash
-$ texdoc ltximg
-```
- For recreation all documentation use:
-```bash
-$ arara ltximg-doc.dtx
-```
-
-## Licence
-This program is free software; you can redistribute it and/or modify it under the terms of the GNU
-General Public License as published by the Free Software Foundation; either version 3 of the License,
-or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-License for more details.
-
-## Author
-
-Written by Pablo González L <pablgonz@yahoo.com>, last update 2019-08-24.
-
-## Copyright
-
-Copyright 2013 - 2019 by Pablo González L
-%</readme>
-%<*internal>
-\fi
-\def\nameofplainTeX{plain}
-\ifx\fmtname\nameofplainTeX\else
- \expandafter\begingroup
-\fi
-%</internal>
-%<*internal>
-\input docstrip.tex
-\keepsilent
-\askforoverwritefalse
-\nopreamble\nopostamble
-\generate{
- \file{README.md}{\from{\jobname.dtx}{readme}}
-}
-\ifx\fmtname\nameofplainTeX
- \expandafter\endbatchfile
-\else
- \expandafter\endgroup
-\fi
-%</internal>
-%<*documentation>
-\documentclass{ltxdoc}
-\usepackage[top=0.5in, bottom=0.5in, left=2in, right=1in,footskip=0.2in,%
- headsep=10pt]{geometry} % page dimension
-\usepackage{unicode-math} %
-\setmathfont[Scale = 0.95]{Latin Modern Math}
-\setmainfont[
- Numbers = OldStyle,
- Ligatures = TeX,
- Scale = 0.95,
- UprightFont = *-Regular,
- ItalicFont = *-Italic,
- BoldFont = *-Bold,
- BoldItalicFont = *-BoldItalic,
- SmallCapsFeatures = {Letters=SmallCaps},
- Extension =.otf]{LibertinusSerif}
-\setsansfont[
- Numbers = OldStyle,
- Ligatures = TeX,
- Scale = 0.95,
- UprightFont = *-Regular,
- ItalicFont = *-Italic,
- BoldFont = *-Bold,
- SmallCapsFeatures = {Letters=SmallCaps},
- Extension = .otf]{LibertinusSans}
-\setmonofont[
- Scale = 0.80,
- Extension = .otf,
- UprightFont = *-Regular ,
- ItalicFont = *-RegularIt,
- BoldFont = *-Medium ,
- BoldItalicFont = *-MediumIt
- ]{SourceCodePro} % source code font
-\newfontfamily\lmmitalic{lmmono10-italic.otf}[
- Scale = 0.95,%
- Extension = .otf,%
- ItalicFont = lmmono10-italic,%
- SmallCapsFont = lmmonocaps10-oblique,%
- SlantedFont = lmmonoslant10-regular,
- ]
-\newfontfamily\fetamono{ffmw10.otf}[
- Scale = 0.95,%
- RawFeature ={+latn,+rand,+kern,+size},%
- ]
-\newfontfamily\libertinusinitials{LibertinusSerifInitials-Regular.otf}
-\usepackage{microtype,hologo} % LaTeX logo
-\usepackage{enumitem,lastpage,microtype,titletoc} % custom
-\usepackage[svgnames]{xcolor} %
-\usepackage[sf,bf,compact,medium,pagestyles]{titlesec}
-\usepackage{adjustbox,multicol,hyperref,xparse,listings,accsupp}
-\usepackage{hyperxmp,imakeidx}%
-\PageIndex
-\EnableCrossrefs
-\newcommand{\HP}[1]{\emph{\hyperpage{#1}}\normalsize}
-\def\SortIndex#1#2{\index{#1\actualchar#2|HP}}
-\indexsetup{level=\section,firstpagestyle=myheader}
-%\makeindex[name=mydoc,options=-s gind.ist,columnsep=15pt,title={Index of Documentation}]
-\makeindex[options=-s gind.ist,columnsep=15pt,title={Index of Documentation}]
-% don't copy numbers in code example
-\newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}
-
-% parindent
-\setlength{\parindent}{0pt}
-
-% Colors for options
-\definecolor{optcolor}{rgb}{0.281,0.275,0.485}
-
-% Identification
-\def\myscript{ltximg}
-\def\fileversion{1.7}
-\def\filedate{2019-08-24}
-
-% Logo whit libertuns and fetamono font
-\newsavebox{\logobox}
-\savebox{\logobox}{%
- \normalsize%
- {\libertinusinitials%
- \textcolor{red}{L}\hspace{-3.0pt}%
- \raisebox{-0.2em}{\small \textcolor{green}{T}}%
- \hspace{-2.9pt}\textcolor{blue}{X}}%
- \hspace{-1pt}\fetamono{\textcolor{gray}{img}}%
-}%
-\makeatletter
-\newcommand{\LTXimg}{%
- \settoheight{\@tempdima}{L}%
- \resizebox{!}{\@tempdima}{\usebox{\logobox}}%
-}
-\makeatother
-
-% email https://tex.stackexchange.com/a/663
-\catcode`\_=11\relax%
-\newcommand\email[1]{\_email #1\q_nil}%
-\def\_email#1@#2\q_nil{%
- \href{mailto:#1@#2}{{\emailfont #1\emailampersat #2}}%
-}%
-\newcommand\emailfont{\sffamily}%
-\newcommand\emailampersat{{\color{NavyBlue}\footnotesize@}}%
-\catcode`\_=8\relax% %
-
-% Config hyperref
-\hypersetup{
- linkcolor = blue!50,
- citecolor = red!50,%
- urlcolor = magenta,%
- colorlinks = true,%
- pdftitle = {.:: ltximg \fileversion{} (\filedate) --- LaTeX environments to image formats ::.},%
- pdfauthor = {Pablo Gonz\'{a}lez Luengo},%
- pdfsubject = {Documentation for version \fileversion},%
- pdfcopyright = {\textcopyright 2019 by Pablo González Luengo},
- pdfcontacturl = {https://github.com/pablgonz/ltximg},
- pdfkeywords = {extract, conversion, images, tikz, pstricks},
- pdfstartview = {FitH},%
- bookmarksopenlevel = 2,%
-}
-
-% Configuration titleps
-\settitlemarks{section}
-\renewpagestyle{plain}[\color{gray}\small\sffamily]{
-\setfoot{}{}{\thepage/\pageref{LastPage}}}
-
-\newpagestyle{myheader}[\color{gray}\small\sffamily]{
-\renewcommand\makeheadrule{\color{gray}\rule[0.45\baselineskip]{\linewidth}{0.4pt}}
-\setfoot{\scalebox{0.85}{\LTXimg}\space\textcopyright\space 2019 by Pablo González L}
- {}
- {\thepage/\pageref{LastPage}}
-\sethead{\raisebox{0.75\baselineskip}{Documentation for version \fileversion\space[\filedate]}}
- {}
- {\raisebox{0.75\baselineskip}{\scshape\small\S.\thesection\space\sectiontitle}}
-}
-\setlength{\headheight}{21pt}%
-
-% Table of contents
-\titlecontents{section}[0mm]{}%
- {\bfseries\contentspush{\makebox[4mm][l]{\thecontentslabel\hfill}}}%
- {\hspace*{-4mm}}% numberless
- {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
-
-\titlecontents{subsection}[4mm]{}%
- {\contentspush{\makebox[6mm][l]{\thecontentslabel\hfill}}}
- {\hspace*{-10mm}}% numberless
- {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
-
-\titlecontents{subsubsection}[10mm]{}%
- {\contentspush{\makebox[8mm][l]{\thecontentslabel\hfill}}}
- {\hspace*{-18mm}}% numberless
- {\hspace{0.25em}\titlerule*[6pt]{.}\contentspage}%
-
-\makeatletter
-\renewcommand\tableofcontents{%
-\begingroup%
-\section*{\contentsname\quad{\color{gray}\leaders\hrule height 5pt depth -4.4pt\hfill}%
- \@mkboth{%
- \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
-\vspace*{-14pt}
-\setlength{\columnsep}{10pt}%
- \begin{multicols}{2}%
- \@starttoc{toc}%
-\end{multicols}%
-\vspace*{-3pt}{\color{gray}\hrule height 0.6pt}%
-\vspace*{5pt}
-\endgroup
-}
-\makeatother
-
-% Custom \meta[...]{...}, \marg[...]{...} and \oarg[...]{...} for color
-\ExplSyntaxOn
-%^^A user level commands
-\RenewDocumentCommand{\meta}{O{}m}
- {
- \ltximg_meta_generic:Nnn \ltximg_meta:n { #1 } { #2 }
- }
-\RenewDocumentCommand{\marg}{O{}m}
- {
- \ltximg_meta_generic:Nnn \ltximg_marg:n { #1 } { #2 }
- }
-\RenewDocumentCommand{\oarg}{O{}m}
- {
- \ltximg_meta_generic:Nnn \ltximg_oarg:n { #1 } { #2 }
- }
-%^^A variables and keys
-\tl_new:N \l_ltximg_meta_font_tl
-
-\keys_define:nn { ltximg/meta }
- {
- type .choice:,
- type / tt .code:n = \tl_set:Nn \l_ltximg_meta_font_tl { \ttfamily },
- type / rm .code:n = \tl_set:Nn \l_ltximg_meta_font_tl { \rmfamily },
- type .initial:n = tt,
- cf .tl_set:N = \l_ltximg_meta_color_tl,
- cf .initial:n = black,
- ac .tl_set:N = \l_ltximg_meta_anglecolor_tl,
- ac .initial:n = black,
- sbc .tl_set:N = \l_ltximg_meta_brackcolor_tl,
- sbc .initial:n = black,
- cbc .tl_set:N = \l_ltximg_meta_bracecolor_tl,
- cbc .initial:n = black,
- }
-%^^A internal commands
-\cs_new_protected:Npn \ltximg_meta_generic:Nnn #1 #2 #3
- {
- \group_begin:
- \keys_set:nn { ltximg/meta } { #2 }
- \color{ \l_ltximg_meta_color_tl }
- \l_ltximg_meta_font_tl
- #1 { #3 } % #1 is \ltximg_meta:n, \ltximg_marg:n or \ltximg_oarg:n
- \group_end:
- }
-\cs_new_protected:Npn \ltximg_meta:n #1
- {
- \ltximg_meta_angle:n { \textlangle }
- \ltximg_meta_meta:n { #1 }
- \ltximg_meta_angle:n { \textrangle }
- }
-\cs_new_protected:Npn \ltximg_marg:n #1
- {
- \ltximg_meta_brace:n { \textbraceleft }
- \ltximg_meta:n { #1 }
- \ltximg_meta_brace:n { \textbraceright }
- }
-\cs_new_protected:Npn \ltximg_oarg:n #1
- {
- \ltximg_meta_brack:n { [ }
- \ltximg_meta:n { #1 }
- \ltximg_meta_brack:n { ] }
- }
-\cs_new_protected:Npn \ltximg_meta_meta:n #1
- {
- \textnormal{\textit{#1}}
- }
-\cs_new_protected:Npn \ltximg_meta_angle:n #1
- {
- \group_begin:
- \fontfamily{cmr}\selectfont
- \textcolor{\l_ltximg_meta_anglecolor_tl}{#1}
- \group_end:
- }
-\cs_new_protected:Npn \ltximg_meta_brace:n #1
- {
- \group_begin:
- \color{\l_ltximg_meta_bracecolor_tl}
- #1
- \group_end:
- }
-\cs_new_protected:Npn \ltximg_meta_brack:n #1
- {
- \textcolor{\l_ltximg_meta_brackcolor_tl}{#1}
- }
-
-% \ltximg for body document
-\DeclareDocumentCommand{\ltximg}{}
- {
- \normalsize\texttt{\bfseries\textcolor{NavyBlue}{ltximg}}
- }
-
-% \prgname{sm} : #1 index compiler, #2 index programs:
-\DeclareDocumentCommand{\prgname}{sm}
- {%
- \IfBooleanTF{#1}
- {
- \textcolor{ForestGreen}{\ttfamily\bfseries{#2}}
- \SortIndex{compiler}{Compiler>\small\texttt{#2}}
- }
- {
- \textcolor{ForestGreen}{\ttfamily\bfseries{#2}}
- \SortIndex{programs}{Programs>\small\texttt{#2}}
- }
- }%
-
-% \prgopt{sm} : #1 compiler opt, #2 program opt:
-\DeclareDocumentCommand{\prgopt}{sm}
- {%
- \IfBooleanTF{#1}
- {
- \textcolor{gray}{\ttfamily\bfseries{-{}#2}}
- \SortIndex{compiler ~ options}{Compiler ~ options>\small\texttt{-{}#2}}%
- }
- {
- \mbox{\texttt{-{}#2}}%
- \SortIndex{#2}{\small\texttt{-{}#2} (program ~ option)}%
- }
- }
-
-% \scriptname*{m}
-\DeclareDocumentCommand{\scriptname}{m}
- {
- \textcolor{ForestGreen}{\ttfamily\bfseries{#1}}
- \SortIndex{scripts}{Scripts>\small\texttt{#1}}%
- }
-
-% \scriptopt{m}
-\DeclareDocumentCommand{\scriptopt}{m}
- {
- \mbox{\texttt{#1}}
- \SortIndex{script ~ option}{Script ~ options>\small\texttt{#1}}%
- }
-
-% \pkgname{m}
-\DeclareDocumentCommand{\pkgname}{ m }
- {
- \textsf{\textcolor{SlateBlue}{#1}}
- \SortIndex{packages}{Packages>\small\texttt{#1}}
- \SortIndex{#1}{\texttt{#1} ~ (package)}
- }%
-
-% \pkgopt{m}
-\DeclareDocumentCommand{\pkgopt}{ m }
- {
- \textsf{\textcolor{Orange}{#1}}
- \SortIndex{package ~ options}{Package ~ options>\small\texttt{#1}}
- \SortIndex{#1}{\texttt{#1} (package ~ option)}
- }
-
-% \env{sm}, #1 not used now
-\DeclareDocumentCommand{\env}{m}
- {
- \textcolor{optcolor}{\texttt{#1}}%
- \SortIndex{environment}{Environments>\small\texttt{#1}}%
- }
-
-% \ics{sm}, #1 not used now
-\DeclareDocumentCommand{\ics}{sm}
- {
- \textcolor{optcolor}{\ttfamily{\textbackslash#2}}%
- \SortIndex{#2}{\texttt{\small\textbackslash#2}}
- }
-
-% file extention
-\DeclareDocumentCommand{\fext}{m}
- {
- \mbox{\textcolor{optcolor}{\ttfamily\bfseries{.#1}}}%
- \SortIndex{files ~ extention}{File ~ extentions >\small\texttt{.#1}}%
- }
-
-% image format/extention
-\DeclareDocumentCommand{\iext}{m}
- {%
- \textcolor{optcolor}{\ttfamily\bfseries{#1}}%
- \SortIndex{Image format}{Image formats>\small\texttt{#1}}%
- }
-
-% \sysydir{m}
-\DeclareDocumentCommand{\sysdir}{m}
- {
- \mbox{\textcolor{NavyBlue}{\ttfamily{/#1}}}%
- }
-
-% \sysfile{m} ...only for color in some examples
-\DeclareDocumentCommand{\sysfile}{m}
- {
- \mbox{\textcolor{gray}{\ttfamily{#1}}}
- }
-
-% \OSsystem{m} ...only for color in some examples
-\DeclareDocumentCommand{\OSsystem}{m}
- {
- \mbox{\textcolor{NavyBlue}{\ttfamily\bfseries{#1}}}%
- \SortIndex{Operating ~ system}{Operating ~ system>\small\texttt{#1}}
- }
-
-% \cmdopt[short]{long}
-\DeclareDocumentCommand{\cmdopt}{om}
- {
- \IfNoValueTF{#1}
- {
- \textcolor{optcolor}{\ttfamily\bfseries{-\/-#2}}
- }
- {
- \textcolor{optcolor}{\ttfamily\bfseries{-{}#1}},
- \textcolor{optcolor}{\ttfamily\bfseries{-\/-#2}}
- }
- \SortIndex{options}{\textsf{\myscript}\ options ~ in ~ command ~ line>\small\texttt{-\/-#2}}%
- }
-
-\ExplSyntaxOff
-% \DescribeIF{m}, #1 image format
-\newsavebox{\marginIF}
-\NewDocumentCommand{\DescribeIF}{ m }
- {%
- \begin{lrbox}{\marginIF}%
- \begin{minipage}[t]{\marginparwidth}%
- \raggedleft
- \iext{#1}
- \end{minipage}%
- \end{lrbox}%
- \leavevmode%
- \marginpar{\usebox{\marginIF}}%
- \ignorespaces%
- }%
-
-% \myenv{environ}
-\DeclareDocumentCommand\myenv{m}
- {
- \moveright 0.0pt \hbox{%
- \begin{minipage}[t]{\marginparwidth}%
- \raggedleft\ttfamily%\small%
- {\textcolor{gray}{\textbackslash begin\{}}{\bfseries\textcolor{optcolor}{#1}}\textcolor{gray}{\}}\par%
- \meta[ac=gray,cf=gray]{env content}\par%
- {\textcolor{gray}{\textbackslash end\{}}{\bfseries\textcolor{optcolor}{#1}}\textcolor{gray}{\}}%
- \end{minipage}%
- } % close hbox
- \SortIndex{Environment}{Environments suport by default>\small\texttt{#1}}%
- }
-
-% \mytag{dtxtag}
-\DeclareDocumentCommand\mytag{m}{%
-\moveright 0.0pt \hbox{%
- \begin{minipage}[t]{\marginparwidth}%
- \raggedleft\ttfamily%\small%
- \textcolor{gray}{\%<*}{\bfseries\textcolor{optcolor}{#1}}\textcolor{gray}{>}\par%
- \meta[ac=gray,cf=gray]{content}\par%
- \textcolor{gray}{\%</}{\bfseries\textcolor{optcolor}{#1}}\textcolor{gray}{>}%
- \end{minipage}%
- } % close hbox
- \SortIndex{docstrip}{Docstrip tag>\small\texttt{#1}}%
-}%
-
-% \DescribeTE{sm}, #1 tag, #2 env
-\newsavebox{\marginenvtag}
-\NewDocumentCommand\DescribeTE{sm}{%
-\begin{lrbox}{\marginenvtag}%
- \begin{minipage}[t]{\marginparwidth}%
- \raggedleft
- \IfBooleanTF{#1}{\mytag{#2}}{\myenv{#2}}
- \end{minipage}%
-\end{lrbox}%
- \leavevmode%
- \marginpar{\usebox{\marginenvtag}}%
- \ignorespaces%
-}%
-
-% DescribeOptFile*{options}{example}[!]
-\newsavebox{\optinfile}
-\NewDocumentCommand\DescribeOptFile{s m m O{\hphantom{!}}}{
-\begin{lrbox}{\optinfile}%
- \begin{minipage}[t]{\marginparwidth}%
- \raggedleft\ttfamily\bfseries%
- \textcolor{optcolor}{\%{#4}\myscript\hspace*{1.5pt}}%
- \end{minipage}%
-\end{lrbox}%
-\leavevmode%
-\marginpar{\usebox{\optinfile}}%
-\lapbox[0pt]{-0.85\marginparsep}{\textcolor{red}{\texttt{:}}}%
-\textcolor{optcolor}{\bfseries\texttt{{#2}}}%
-\textcolor{red}{\hspace*{2.5pt}\texttt{:}}
-\hspace*{-1pt}\marg[cbc=optcolor,ac=gray,cf=gray]{#3}
-\vspace*{2pt}\par%
-\IfNoValueTF{#1}
-{}%%
-{%
-\SortIndex{options}{\textsf{\myscript}\ options in input file>\small\texttt{#2}}%
-}%
-}
-
-% \DescribeCmd[...]{...}{...}{...}, need changue to \DescribeOptCmd
-\newsavebox{\optcmdline}
-\NewDocumentCommand\DescribeCmd{ommm}{
-\begin{lrbox}{\optcmdline}%
- \begin{minipage}[t]{\marginparwidth}%
- \ttfamily\bfseries\raggedleft%
- \IfNoValueTF{#1}
- {\textcolor{optcolor}{-\/-#2}}
- {\textcolor{optcolor}{-{#1}}\textcolor{gray}{,} \textcolor{optcolor}{-\/-#2}}%
- \end{minipage}%
-\SortIndex{options}{\textsf{\myscript}\ options in command line>\small\texttt{-\/-#2}}%
-\end{lrbox}%
- \leavevmode%
- \marginpar{\usebox{\optcmdline}}%
- \ignorespaces
- \meta[ac=gray,cf=gray]{\textnormal{\sffamily{#3}}}
- \hfill\textcolor{gray}{\textsf{(default: {#4})}}%
- \vspace*{2pt}\par%
-}
-
-% Create a language for documentation
-\lstdefinelanguage{ltximg-doc}{
- texcsstyle=*,%
- escapechar=`,%
- showstringspaces=false,%
- extendedchars=true, %
- stringstyle = {\color{red}},%
-% comments
- morecomment=[l]{\%},%
- commentstyle=\lmmitalic\color{lightgray},%
-% Important words 1
- keywordstyle=[1]{\color{NavyBlue}},%
- keywords=[1]{AtBeginDocument,begin,end,documentclass,BEGIN,END},%
-% Other words 2
- keywordstyle=[2]{\color{blue!75}},%
- keywords=[2]{usepackage,graphicspath,RequirePackage,renewcommand,%
- PreviewBbAdjust,usetikzlibrary,tikzexternalize,psset,tikzset,PrependGraphicsExtensions,%
- DefineShortVerb,lstMakeShortInline,MakeSpecialShortVerb,UndefineShortVerb},%
-% Other words 3
- keywordstyle=[3]{\color{optcolor!85}},%
- keywords=[3]{document,graphicx,preview,active,tightpage,article,grfext,description,filecontents,%
- external,tikz,clean,pst,tkz,eps,pdf,xetex,latex,luatex,dvips,png,srcenv,noprew,imgdir,prefix,output},%
-% Reserved words 4(inputfile options)
- keywordstyle=[4]{\color{optcolor}},%
- keywords=[4]{ltximg,noltximg,remove,options,pspicture,endpspicture,%
- PSTexample,pgfpicture, endpgfpicture, tikzpicture, endtikzpicture, %
- psgraph, endpsgraph,nopreview,postscript, arara,extrenv,deltenv,skipenv},%
-% Reserved in orange
- keywordstyle=[5]{\color{OrangeRed}},%
- keywords=[5]{images,includegraphics,env,file-out,pics,doc},%
-% Reserved in orange
- keywordstyle=[6]{\color{red}},%
- keywords=[6]{verb,myverb},%
-}[keywords,tex,comments,strings]% end languaje
-
-% \begin{examplecode}[optlst]...\end{examplecode}
-\lstnewenvironment{examplecode}[1][]{%
-\lstset{
- language=ltximg-doc,%
- stringstyle = {\color{red}},%
- basicstyle=\ttfamily\small,%
- numbersep=1em,%
- numberstyle=\tiny\color{gray}\noaccsupp,%
- rulecolor=\color{gray!50},%
- framesep=\fboxsep,%
- framerule=\fboxrule,%
- xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
- xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
-% literateee
- literate=*{\{}{{\bfseries\textcolor{gray}{\{}}}{1}
- {\}}{{\bfseries\textcolor{gray}{\}}}}{1}
- {[}{{\bfseries\textcolor{optcolor}{[}}}{1}
- {]}{{\bfseries\textcolor{optcolor}{]}}}{1}
- {*}{{\bfseries\textcolor{red}{*}}}{1}
- {:}{{\textcolor{red}{:}}}{1}
- {,}{{\textcolor{gray}{,}}}{1}
- {=}{{\textcolor{gray}{=}}}{1}
- {/}{{\textcolor{gray}{/}}}{1}
- {\%\ ltximg}{{\textcolor{gray}{\%}\space\bfseries\textcolor{optcolor}{ltximg}}}{8}
- {\%\ arara}{{\textcolor{gray}{\%}\space\bfseries\textcolor{optcolor}{arara}}}{7}
- {\{arara}{{\textcolor{gray}{\{arara}}}{6}
- {\%<*remove>}{{\bfseries\textcolor{gray}{\%<*remove>}}}{10}
- {\%</remove>}{{\bfseries\textcolor{gray}{\%</remove>}}}{10}
- {\%<*ltximg>}{{\bfseries\textcolor{gray}{\%<*ltximg>}}}{10}
- {\%</ltximg>}{{\bfseries\textcolor{gray}{\%</ltximg>}}}{10}
- {\%<*noltximg>}{{\bfseries\textcolor{gray}{\%<*noltximg>}}}{12}
- {\%</noltximg>}{{\bfseries\textcolor{gray}{\%</noltximg>}}}{12},%
- #1,%
- }% close lstset
-}%
-{}% close examplecode
-
-% \begin{examplecmd}...\end{examplecmd}
-\lstnewenvironment{examplecmd}{%
-\lstset{
- language=ltximg-doc,%
- basicstyle=\ttfamily\small,%
- frame=single,%
- rulecolor=\color{gray!50},%
- framesep=\fboxsep,%
- framerule=\fboxrule,%
- xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,%
- xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,%
-% Reserved words (cmd line options)
- classoffset=7,%
- keywordstyle=\bfseries\color{optcolor},%
- morekeywords={ltximg},%
-% % Reserved words (cmd line options)
- classoffset=8,%
- keywordstyle={\bfseries\color{ForestGreen}},%
- morekeywords={gs,pdftoppm,pdftocairo,pdftops},%
-% Only for command line options
- classoffset=5,%
- keywordstyle=\color{blue},%
- keywords={user,machine},%
- literate=*{[}{{\textcolor{darkgray}{[}}}{1}
- {]}{{\textcolor{darkgray}{]}}}{1}
- {@}{{\textcolor{blue}{@}}}{1}
- {\$}{{\textcolor{blue}{\$}}}{1}
- {:}{{\textcolor{blue}{:}}}{1}
- {§}{{\textcolor{red}{\$}}}{1}
- {~}{{\textcolor{blue}{\bfseries\textasciitilde}}}{1}%
- }% close lstset
-}%
-{}% close examplecmd
-
-% \lstinline[style=inline]|...|
-\lstdefinestyle{inline}
- {
- language=ltximg-doc,%
- basicstyle=\ttfamily\color{gray},%
- escapechar=`,%
- upquote=true,%
- literate=*{\%}{{\bfseries\textcolor{gray}{\%}}}{1}
- }
-
-% set default style
-\lstset{style=inline}
-
-
-\begin{document}
-
-\title{%
- {\fetamono latex environments }\\[3pt]%
- \scalebox{3.4}{\LTXimg}\\[2pt]%
- {\fetamono\addfontfeature{LetterSpace=12.0} to image format}\\%
- \Large
- v\fileversion{} --- \filedate\thanks{%
- This file describes a documentation for version \fileversion, last revised \filedate.}\\[25pt]%
- \author{%
- \large%
- \raisebox{-1pt}{\textcopyright}{}2013--2019 by Pablo González L%
- \thanks{E-mail: \texttt{\guillemotleft}\email{pablgonz@yahoo.com}\texttt{\guillemotright}}
- }%
-\small
-\textsc{ctan}: \url{http://www.ctan.org/pkg/ltximg}\\
-\textsc{git}: \url{https://github.com/pablgonz/ltximg}
-\vspace*{-2cm}
-}%
-\date{}
-\maketitle
-
-\begin{abstract}
-\ltximg{} is a \prgname{perl} \emph{script} that automates the process of
-extracting and converting environments provided by \pkgname{tikz}, %
-\pkgname{pstricks} and other packages from \meta{input file} to image
-formats in individual files using \prgname{ghostscript} and %
-\prgname{poppler-utils}. Generates a file with only extracted environments
-and another with environments converted to \ics{includegraphics}.
-\end{abstract}
-
-\tableofcontents
-\setlength{\parskip}{3pt}
-
-\section{Motivation}
-
-The original idea was to extend the functionality of the \scriptname{pst2pdf}
-script (only for \env{pspicture} and \env{postscript}) to work with %
-\env{tikzpicture} and other environments.
-
-The \pkgname{tikz} package allows to externalize the environments, but, the
-idea was to be able to extend this to any type of environment covering three
-central points:
-
-\begin{enumerate}[font=\small , noitemsep,leftmargin=*]
-
-\item Generate separate files for environments and converted into images.
-
-\item Generate a file with only the extracted environments.
-
-\item Generate a file replacing the environments by \ics{includegraphics}.
-\end{enumerate}
-
-From the side of \TeX{} there are some packages that cover several of these
-points such as the \pkgname{preview}, \pkgname{xcomment}, \pkgname{external}
-and \pkgname{cachepic} packages among others, but none covered all points.
-
-In the network there are some solutions in \texttt{bash} that were able to
-extract and convert environments, but in general they presented problems
-when the document contained \emph{verbatim style} code or were only
-available for \OSsystem{Linux}.
-
-Analysed the situation the best thing was to create a new \emph{script} that
-was able to cover the three points and was multi platform, the union of all
-these ideas is born \ltximg. Finding the correct \emph{regular expressions}
-and writing \emph{documentation} would be the great mission (which does not
-end yet).
-
-\thispagestyle{plain}
-\newpage
-\pagestyle{myheader}
-\section{Required Software}\label{sec:software}
-
-For the complete operation of \ltximg{} you need to have a modern %
-\hologo{TeX} distribution such as \hologo{TeX}Live or \hologo{MiKTeX}, have
-a version equal to or greater than \liningnums{5.28} of \prgname{perl}, a
-version equal to or greater than \liningnums{9.24} of \prgname{ghostscript}
-and have a version equal to or greater than \liningnums{0.52} of %
-\prgname{poppler-utils}.
-
-The distribution of \hologo{TeX}Live 2019 for \OSsystem{Windows} includes %
-\ltximg{} and all requirements, \hologo{MiKTeX} users must install the
-appropriate software for full operation.
-
-The script has been tested on \OSsystem{Windows} (version 10) and %
-\OSsystem{Linux} (fedora 30) in x64 architecture using \prgname{ghostscript} %
-\liningnums{v9.26}, \prgname{poppler-utils} \liningnums{v0.52} to %
-\liningnums{v0.73} and \prgname{perl} from \liningnums{v5.28} to %
-\liningnums{v5.30}.
-
-\section{How it works}
-
-\label{sec:howtowork}
-
-It is important to have a general idea of how the \emph{extraction and
-conversion} process works and the requirements that must be fulfilled so
-that everything works correctly, for this we must be clear about some
-concepts related to how to work with the \meta{verbatim content}, the %
-\meta{input file}, the \meta{output file} and the \meta{steps process}.
-
-\subsection{The input file}
-
-\label{sec:inputfile}
-
-The \meta{input file} must comply with certain characteristics in order to
-be processed, the content at the beginning and at the end of the \meta{input
-file} is treated in a special way, before \lstinline|\documentclass| can only be
-commented lines and after \lstinline|\end{document}| can go any type of content,
-internally will split the \meta{input file} at this points.
-
-If the \meta{input file} contains files using \ics{input} or \ics{include}
-these will not be processed, from the side of the \emph{script} they only
-represent lines within the file, if you want them to be processed it is
-better to use the \scriptname{latexpand} first and then process the file.
-
-Like \ics{input} or \ics{include}, blank lines, vertical spaces and tab
-characters are treated literally, for the \emph{script} the \meta{input file}
-is just a set of characters, as if it was a simple text file. It is
-advisable to format the source code \meta{input file} using utilities such
-as \prgname{chktex} and \scriptname{latexindent}, especially if you want to
-extract the source code of the environments.
-
-An example of the \meta{input file}:
-
-\begin{examplecode}[numbers=left,frame=single]
-% some commented lines at begin document
-\documentclass{article}
-\usepackage{tikz}
-\begin{document}
-Some text
-\begin{tikzpicture}
-Some code
-\end{tikzpicture}
-Always use \verb|\begin{tikzpicture}|
-and \verb|\end{tikzpicture}| to open
-and close environment
-\begin{tikzpicture}
-Some code
-\end{tikzpicture}
-Some text
-\end{document}
-% some lines after end document
-\end{examplecode}
-
-\subsection{Verbatim contents}\label{sec:verbatim}
-
-One of the greatest capabilities of \ltximg{} script is to skip the complications
-that \emph{verbatim style} content produces with the extraction of environments.
-In order to skip the complications, the verbatim content is classified into
-three types:
-
-\begin{itemize}[nosep]
- \item Verbatim in line
- \item Verbatim standard
- \item Verbatim write
-\end{itemize}
-
-Each of these classifications works differently within the creation and
-extraction process using different regular expressions for it.
-
-\newpage
-
-\subsubsection{Verbatim in line}
-
-\label{sec:verbatim:inline}
-
-The small pieces of code written in the same line using a verbatim command
-are considered \meta{verbatim in line}, such as \lstinline+\verb|<code>|+.
-Most verbatim commands provide by packages \pkgname{minted}, %
-\pkgname{fancyvrb} and \pkgname{listings} have been tested and are fully
-supported. They are automatically detected the verbatim command generates by
-\ics{newmint} and \ics{newmintinline} and the following command list:
-
-\begin{multicols}{3}
-\begin{itemize}[font=\sffamily\small,partopsep=5pt,parsep=5pt,nosep,leftmargin=*]
-\small
-\item \ics{mint}
-\item \ics{spverb}
-\item \ics{qverb}
-\item \ics{fverb}
-\item \ics{verb}
-\item \ics{Verb}
-\item \ics{lstinline}
-\item \ics{pyginline}
-\item \ics{pygment}
-\item \ics{Scontents}
-\item \ics{tcboxverb}
-\item \ics{mintinline}
-\end{itemize}
-\end{multicols}
-
-Some packages define abbreviated versions for verbatim commands as %
-\ics{DefineShortVerb}, \ics{lstMakeShortInline} and %
-\ics{MakeSpecialShortVerb}, will be detected automatically if are declared
-explicitly in \meta{input file}.
-
-The following consideration should be kept in mind for some packages that
-use abbreviations for verbatim commands, such as \pkgname{shortvrb} or %
-\pkgname{doc} for example in which there is no explicit command in the
-document by means of which the abbreviated form can be detected, for
-automatic detection need to find \ics{DefineShortVerb} explicitly to process
-it correctly. The solution is quite simple, just add in \meta{input file}:
-
-\begin{examplecode}
-\UndefineShortVerb{\|}
-\DefineShortVerb{\|}
-\end{examplecode}
-
-depending on the package you are using. If your verbatim command is not
-supported by default or can not detect, use the options described in \ref%
-{sec:optline} and \ref{sec:optfile}.
-
-\subsubsection{Verbatim standard}
-
-\label{sec:verbatim:std}
-
-These are the classic environments for writing code are considered %
-\meta{verbatim standard}, such as \env{verbatim} and \env{lstlisting}
-environments. The following list is considered as \meta{verbatim standard}
-environments:
-
-\begin{multicols}{4}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\ttfamily\small
-\item Example
-\item CenterExample
-\item SideBySideExample
-\item PCenterExample
-\item PSideBySideExample
-\item verbatim
-\item Verbatim
-\item BVerbatim
-\item LVerbatim
-\item SaveVerbatim
-\item PSTcode
-\item LTXexample
-\item tcblisting
-\item spverbatim
-\item minted
-\item listing
-\item lstlisting
-\item alltt
-\item comment
-\item chklisting
-\item verbatimtab
-\item listingcont
-\item boxedverbatim
-\item demo
-\item sourcecode
-\item xcomment
-\item pygmented
-\item pyglist
-\item program
-\item programl
-\item programL
-\item programs
-\item programf
-\item programsc
-\item programt
-\end{itemize}
-\end{multicols}
-
-They are automatically detected \meta{verbatim standard} environments generates by commands:
-
-\begin{multicols}{2}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\small
-\item \ics{DefineVerbatimEnvironment}
-\item \ics{NewListingEnvironment}
-\item \ics{DeclareTCBListing}
-\item \ics{ProvideTCBListing}
-\item \ics{lstnewenvironment}
-\item \ics{newtabverbatim}
-\item \ics{specialcomment}
-\item \ics{includecomment}
-\item \ics{newtcblisting}
-\item \ics{NewTCBListing}
-\item \ics{newverbatim}
-\item \ics{NewProgram}
-\item \ics{newminted}
-\end{itemize}
-\end{multicols}
-
-If any of the \meta{verbatim standard} environments is not supported by
-default or can not detected, you can use the options described in \ref%
-{sec:optline} and \ref{sec:optfile}.
-
-\subsubsection{Verbatim write}
-
-\label{sec:verbatim:write}
-
-Some environments have the ability to write external files directly, these
-environments are considered \meta{verbatim write}, such as \env{filecontents}
-or \env{VerbatimOut} environments. The following list is considered as %
-\meta{verbatim write} environments:
-
-\begin{multicols}{3}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\ttfamily\small
-\item scontents
-\item filecontents
-\item tcboutputlisting
-\item tcbexternal
-\item tcbwritetmp
-\item extcolorbox
-\item extikzpicture
-\item VerbatimOut
-\item verbatimwrite
-\item filecontentsdef
-\item filecontentshere
-\item filecontentsdefmacro
-\end{itemize}
-\end{multicols}
-
-They are automatically detected \meta{verbatim write} environments generates
-by commands:
-
-\begin{multicols}{2}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\small
-\item \ics{renewtcbexternalizetcolorbox}
-\item \ics{renewtcbexternalizeenvironment}
-\item \ics{newtcbexternalizeenvironment}
-\item \ics{newtcbexternalizetcolorbox}
-\end{itemize}
-\end{multicols}
-
-If any of the \meta{verbatim write} environments is not supported by default
-or can not detected, you can use the options described in \ref{sec:optline}
-and \ref{sec:optfile}.
-
-\subsection{Steps process}
-
-\label{sec:steps:process}
-
-For creation of the image formats, extraction of code and creation of an
-output file, \ltximg{} need a various steps. Let's assume that the %
-\meta{input file} is \sysfile{test.tex}, \meta{output file} is %
-\sysfile{test-out}, the working directory are \sysdir{workdir}, the
-directory for images are \sysdir{workdir/images} and the user's temporary
-directory is \sysdir{tmp} and we want to generate images in \iext{pdf}
-format together with the source codes of the environments.
-
-\begin{description}[font=\sffamily\small,leftmargin=0em,style=nextline]
-\item[Comment and ignore]
-The first step is read and validated \oarg[type=rm,cf=gray,sbc=optcolor,ac=gray]{options} from the command
-line and \sysfile{test.tex}, verifying that \sysfile{test.tex}, \sysfile{test-out} and the
-directory \sysdir{images} are in \sysdir{workdir}, create the directory \sysdir{workdir/images} if it does
-not exist and a temporary directory \sysdir{tmp/hG45uVklv9}. The entire file \sysfile{test.tex} is loaded
-in memory and proceeds (in general terms) as follows:
-
-\begin{quotation}
-Search the words \lstinline|\begin{| and \lstinline|\end{| in verbatim standard, verbatim write, verbatim in line and
-commented lines, if it finds them, converts to \lstinline|\BEGIN{| and \lstinline|\END{|, then places all code to
-extract inside the \lstinline|\begin{preview}| \ldots \lstinline|\end{preview}|.
-\end{quotation}
-
-At this point all the code you want to extract is inside \lstinline|\begin{preview}| \ldots \lstinline|\end{preview}|
-and the files \sysfile{test-fig-1.tex}, \sysfile{test-fig-2.tex}, \ldots{} are generated and saved in \sysdir{images}.
-
-\item[Create random file]
-In the second step, with the file already loaded in memory, creating a temporary file with a
-random number (1981 for example) and proceed in two ways according to the \oarg[type=rm,cf=gray,sbc=optcolor,ac=gray]{options}
-passed to the script:
-
-\begin{enumerate}
-\item If script is call \emph{whitout} \cmdopt[n]{noprew} options, adds the
-following lines to the beginning of the \sysfile{test.tex} (in memory):
-
-\begin{examplecode}
-\AtBeginDocument{%
-\RequirePackage[active,tightpage]{preview}
-\renewcommand\PreviewBbAdjust{-60pt -60pt 60pt 60pt}}%
-% rest of input file
-\end{examplecode}
-And save in a temporary file \sysfile{test-fig-1981.tex} in \sysdir{workdir}.
-
-\item If script is call \emph{whit} \cmdopt[n]{noprew} options, all code to extract
-its put inside the \env{preview} environment. The \lstinline|\begin{preview}|\ldots \lstinline|\end{preview}|
-lines are only used as delimiters for extracting the content \emph{without} using the package \pkgname{preview}.
-
-Creating a temporary file \sysfile{test-fig-1981.tex} in \sysdir{workdir}
-whit the same preamble of \sysfile{test.tex} but the body only contains code that you want to extract.
-\end{enumerate}
-
-\item[Generate image formats]
-In the third step the script run:
-\begin{examplecmd}
-[user@machine ~:]§`\small\meta[type=tt,cf=ForestGreen,ac=ForestGreen]{compiler}` -recorder -shell-escape `\small\sysfile{test-fig-1981.tex}`
-\end{examplecmd}
-generating the file \sysfile{test-fig-1981.pdf} whit all code extracted, move \sysfile{test-fig-1981.pdf}
-to \sysdir{tmp/hG45uVklv9}, separate in individual files \sysfile{test-fig-1.pdf}, \sysfile{test-fig-2.pdf}, \ldots{}
-and copy to \sysdir{workdir/images/}. The file \sysfile{test-fig-1981.tex} is moved to the \sysdir{workdir/images/}
-and rename to \sysfile{test-fig-all.tex}.
-
-Note the options passed to \meta[type=tt,cf=ForestGreen,ac=ForestGreen]{compiler} does not include \prgopt*{output-directory}
-(it is not supported) and always use \prgopt*{recorder} \prgopt*{shell-escape} you must keep this in mind if you use \prgname{arara}.
-
-\item[Create output file]
-In the fourth step the script creates the output file \sysfile{test-out.tex} converting all extracted code to
-\ics{includegraphics} and adding the following lines at end of preamble:
-
-\begin{examplecode}[numbers=left]
-\usepackage{graphicx}
-\graphicspath{{images/}}
-\usepackage{grfext}
-\PrependGraphicsExtensions*{.pdf}
-\end{examplecode}
-
-If the packages \pkgname{graphicx} and \pkgname{grfext} are already loaded and the command \ics{graphicspath}
-is found in the input file were detected automatically and only the changes will be added then proceed to run:
-\begin{examplecmd}
-[user@machine ~:]§`\small\meta[type=tt,cf=ForestGreen,ac=ForestGreen]{compiler}` -recorder -shell-escape `\small\sysfile{test-out.tex}`
-\end{examplecmd}
-generating the file \sysfile{test-out.pdf}.
-\end{description}
-Now the script read the files \sysfile{test-fig-1981.fls} and \sysfile{test-out.fls}, extract the information from the
-temporary files generated in the process and then delete them together with the directory \sysdir{tmp/hG45uVklv9}.
-An example for input and output file:
-
-\begin{minipage}[c]{0.5\textwidth}
-\begin{examplecode}[numbers=left]
-\documentclass{article}
-\usepackage{tikz}
-\begin{document}
-Some text
-\begin{tikzpicture}
-Some code
-\end{tikzpicture}
-Always use \verb|\begin{tikzpicture}|
-and \verb|\end{tikzpicture}| to open
-and close environment
-\begin{tikzpicture}
-some code
-\end{tikzpicture}
-Some text
-\end{document}
-\end{examplecode}
-\begin{flushleft}
-\sysfile{test.tex}
-\end{flushleft}
-\end{minipage}
-\begin{minipage}[c]{0.5\textwidth}
-\begin{examplecode}[numbers=left]
-\documentclass{article}
-\usepackage{tikz}
-\usepackage{graphicx}
-\graphicspath{{images/}}
-\usepackage{grfext}
-\PrependGraphicsExtensions*{.pdf}
-\begin{document}
-Some text
-\includegraphics[scale=1]{test-fig-1}
-Always use \verb|\begin{tikzpicture}|
-and \verb|\end{tikzpicture}| to open
-and close environment
-\includegraphics[scale=1]{test-fig-2}
-Some text
-\end{document}
-\end{examplecode}
-\begin{flushleft}
-\sysfile{test-out.tex}
-\end{flushleft}
-\end{minipage}
-
-\section{Extract content}
-\label{sec:extract}
-The script provides two ways to extract content from \meta{input file}, using \meta[type=rm,cf=optcolor,ac=gray]{environments}
-and \meta[type=rm,cf=optcolor,ac=gray]{docstrip tags}. Some environment (including a starred \texttt{\small\bfseries\textcolor{red}{*}} version)
-are supported by default and if the environments are nested, the outermost will be extracted.
-
-\subsection{Default environments}
-\label{sec:extract:env}
-\DescribeTE{preview}
-Environment provide by \pkgname{preview} package. If \env{preview} environments
-found in the input file will be extracted and converted these. Internally
-converts all environments to extract in \env{preview} environments.
-Is better comment this package in preamble unless the option \cmdopt[n]{noprew}{} is
-used.
-
-\vspace{\baselineskip}
-
-\DescribeTE{pspicture}
-Environment provide by \pkgname{pstricks} package. The plain
-syntax \lstinline|\pspicture ... \endpspicture| its converted to
-\lstinline|\begin{pspicture} ... \end{pspicture}|.
-\vspace{\baselineskip}
-
-\DescribeTE{psgraph}
-Environment provide by \pkgname{pst-plot} package. The plain syntax \lstinline|\psgraph ... \endpsgraph|
-its converted to \lstinline|\begin{psgraph} ... \end{psgraph}|.
-
-\vspace{\baselineskip}
-
-\DescribeTE{postscript}
-Environment provide by \pkgname{pst-pdf} and \pkgname{auto-pst-pdf} packages.
-Since the \pkgname{pst-pdf} and \pkgname{auto-pst-pdf} packages internally use
-the \pkgname{preview} package, is better comment this in preamble.
-
-\vspace{\baselineskip}
-
-\DescribeTE{tikzpicture}
-Environment provide by \pkgname{tikz} package. The plain syntax \lstinline|\tikzpicture ... \tikzpicture|
-its converted to \lstinline|\begin{tikzpicture} ... \end{tikzpicture}|
-but no a short \lstinline|\tikz...;|.
-\vspace{\baselineskip}
-
-\DescribeTE{pgfpicture}
-Environment provide by \pkgname{pgf} package. Since the script uses a
-\emph{recursive regular expression} to extract environments, no presents problems
-if present \lstinline|pgfinterruptpicture|.
-\vspace{\baselineskip}
-
-\DescribeTE{PSTexample}
-Environment provide by \pkgname{pst-exa} packages. The script automatically detects the
-\lstinline|\begin{PSTexample}| \lstinline|...\end{PSTexample}|
-environments and processes them as separately compiled files. The user should have loaded the
-package with the [\pkgopt{swpl}] or [\pkgopt{tcb}] option and run the script
-using \cmdopt{latex}{} or \cmdopt{xetex}.
-
-If you need to extract more environments you can use one of the options described in \ref{sec:optline} or \ref{sec:optfile}.
-
-\subsection{Extract whit docstrip tags}
-
-\label{sec:extract:tag}
-\DescribeTE*{ltximg}
-All content included between \lstinline|%<*ltximg> ... %</ltximg>| is extracted.
-The tags can not be nested and should be at the beginning of the line and in separate lines.
-
-\begin{examplecode}[frame=single]
-% no space before open tag %<*
-%<*ltximg>
-code to extract
-%</ltximg>
-% no space before close tag %</
-\end{examplecode}
-
-\subsection{Prevent extraction and remove}\label{sec:noextract}
-Sometimes you do not want to extract all the environments from \meta{input file} or you want to
-remove environments or arbitrary content, for example auxiliary files to generate a graphic.
-The script provides a convenient way to solve this situation.
-
-\DescribeTE{nopreview}
-Environment provide by \pkgname{preview} package. Internally the script
-converts all no extract environments to \lstinline|\begin{nopreview} ... \end{nopreview}|.
-Is better comment this package in preamble unless the option \cmdopt[n]{noprew}{} is used.
-\vspace{\baselineskip}
-
-\DescribeTE*{noltximg}
-All content betwen \lstinline|%<*noltximg> ... %</noltximg>| are ignored and no
-extract. The start and closing of the tag must be at the beginning of the line.
-
-\begin{examplecode}[frame=single]
-% no space before open tag %<*
-%<*noltximg>
-no extract this
-%</noltximg>
-% no space before close tag %</
-\end{examplecode}
-
-\DescribeTE*{remove}
-All content betwen \lstinline|%<*remove> ... %</remove>| are deleted in the \meta{output file}. The start and closing
-of the tag must be at the beginning of the line.
-
-\begin{examplecode}[frame=single]
-% no space before open tag %<*
-%<*remove>
-lines removed in output file
-%</remove>
-% no space before close tag %</
-\end{examplecode}
-
-If you want to remove specific environments automatically you can use one of
-the options described in \ref{sec:optline} or \ref{sec:optfile}.
-
-\section{Image Formats}\label{sec:image:format}
-The \meta{image formats} generated by the \ltximg{} using \prgname{ghostscript}
-and \textcolor{ForestGreen}{\ttfamily\bfseries poppler-utils}
-are the following command lines:
-
-\DescribeIF{pdf}
-The image format generated using \prgname{ghostscript}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress
-\end{examplecmd}
-
-\DescribeIF{eps}
-The image format generated using \prgname{pdftoeps}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ pdftops -q -eps
-\end{examplecmd}
-
-\DescribeIF{png}
-The image format generated using \prgname{ghostscript}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pngalpha -r 150
-\end{examplecmd}
-
-\newpage
-
-\DescribeIF{jpg}
-The image format generated using \prgname{ghostscript}. The line executed by the system is:
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=jpeg -r 150 -dJPEGQ=100 \
- -dGraphicsAlphaBits=4 -dTextAlphaBits=4
-\end{examplecmd}
-
-\DescribeIF{ppm}
-The image format generated using \prgname{pdftoppm}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ pdftoppm -q -r 150
-\end{examplecmd}
-
-\DescribeIF{tif}
-The image format generated using \prgname{ghostscript}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=tiff32nc -r 150
-\end{examplecmd}
-
-\DescribeIF{svg}
-The image format generated using \prgname{pdftocairo}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ pdftocairo -q -r 150
-\end{examplecmd}
-
-\DescribeIF{bmp}
-The image format generated using \prgname{ghostscript}. The line executed by the system is:
-
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=bmp32b -r 150
-\end{examplecmd}
-
-\section{How to use}
-\subsection{Syntax}
-The syntax for \ltximg{} is simple:
-
-\begin{examplecmd}
-[user@machine ~:]§ ltximg `\small\meta[type=tt,cf=ForestGreen,ac=ForestGreen]{compiler} \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options} \textcolor{gray}{\texttt{[-\/-]}} \meta[type=tt,cf=OrangeRed,ac=OrangeRed]{file.ext}`
-\end{examplecmd}
-
-The extension \meta[type=tt,cf=OrangeRed,ac=OrangeRed]{ext} for \meta{input file} are \fext{tex} or \fext{ltx},
-relative or absolute paths for files and directories is not supported. If used without \meta[type=tt,cf=ForestGreen,ac=ForestGreen]{compiler}
-and \oarg[type=tt,cf=gray,sbc=optcolor,ac=gray]{options} the extracted environments are converted to \iext{pdf}
-image format and saved in the \sysdir{images} directory using \prgname*{pdflatex} and \pkgname{preview} package.
-
-\subsection{Options in command line}
-\label{sec:optline}
-
-\ltximg{} provides a \emph{command line interface} with short and long option names.
-They may be given before the name of the file. Also, the order of specifying the
-options is significant. Certain options accept a list separate by commas, this require a separated by
-white space or equals sign \textcolor{red}{\texttt{=}} between option and list and if it's the last option
-need \textcolor{red}{\texttt{-\/-}} at the end. Multiple short options can be bundling.
-
-\DescribeCmd[h]{help}{bolean}{off}
-Display a command line help text and exit.
-
-\DescribeCmd[l]{license}{bolean}{off}
-Display a license text and exit.
-
-\DescribeCmd[v]{version}{bolean}{off}
-Display the current version (\fileversion) and exit.
-
-\DescribeCmd[d]{dpi}{int}{150}
-Dots per inch for images files.
-
-\DescribeCmd[t]{tif}{bolean}{off}
-Create a .\iext{tif} images files using \prgname{ghostscript}.
-
-\DescribeCmd[b]{bmp}{bolean}{off}
-Create a .\iext{bmp} images files using \prgname{ghostscript}.
-
-\DescribeCmd[j]{jpg}{bolean}{off}
-Create a .\iext{jpg} images files using \prgname{ghostscript}.
-
-\DescribeCmd[p]{png}{bolean}{off}
-Create a .\iext{png} transparent image files using \prgname{ghostscript}.
-
-\DescribeCmd[e]{eps}{bolean}{off}
-Create a .\iext{eps} image files using \prgname{pdftops}.
-
-\DescribeCmd[s]{svg}{bolean}{off}
-Create a .\iext{svg} image files using \prgname{pdftocairo}.
-
-\DescribeCmd[P]{ppm}{bolean}{off}
-Create a .\iext{ppm} image files using \prgname{pdftoppm}.
-
-\DescribeCmd[g]{gray}{bolean}{off}
-Create a gray scale for all images using \prgname{ghostscript}. The line behind this options is:
-
-\begin{examplecmd}
-[user@machine ~:]§ gs -q -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress \
- -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray
-\end{examplecmd}
-
-\DescribeCmd[f]{force}{bolean}{off}
-Try to capture \lstinline|\psset{...}| and \lstinline|\tikzset{...}| to extract.
-When using the \cmdopt{force} option the script will try to capture \lstinline|\psset{...}| or
-\lstinline|\tikzset{...}| and leave it inside the \env{preview} environment, any line that is between \lstinline|\psset{...}| and
-\lstinline|\begin{pspicture}| or between \lstinline|\tikzset{...}| and \lstinline|\begin{tikzpicture}| will be captured.
-
-\DescribeCmd[n]{noprew}{bolean}{off}
-Create images files without \pkgname{preview} package. The \lstinline|\begin{preview}|\ldots \lstinline|\end{preview}|
-lines are only used as delimiters for extracting the content \emph{without} using the package \pkgname{preview}.
-Sometimes it is better to use it together with \cmdopt{force}.
-
-\DescribeCmd[m]{margin}{numeric}{0}
-Set margins in bp for \scriptname{pdfcrop}.
-
-\DescribeCmd[o]{output}{output file name}{empty}
-Create \meta{output file name} whit all extracted environments/contents converted to \ics{includegraphics}.
-The \meta{output file name} must not contain extension.
-
-\DescribeCmd{imgdir}{string}{images}
-The name of directory for save images and source code.
-
-\DescribeCmd{zip}{bolean}{off}
-Compress only the files generated by the script during the process in \sysdir{images} in \fext{zip} format.
-Does not include \meta{output file}.
-
-\DescribeCmd{tar}{bolean}{off}
-Compress only the files generated by the script during the process in \sysdir{images} in \fext{tar.gz} format.
-Does not include \meta{output file}.
-
-\DescribeCmd{verbose}{bolean}{off}
-Show verbose information in screen and change \prgopt*{interaction} for compiler.
-
-\DescribeCmd{srcenv}{bolean}{off}
-Create separate files whit \emph{only code} for all extracted environments, is mutually exclusive whit \cmdopt{subenv}.
-
-\DescribeCmd{subenv}{bolean}{off}
-Create sub files whit \emph{preamble} and code for all extracted environments, is mutually exclusive whit \cmdopt{srcenv}.
-
-\DescribeCmd{arara}{bolean}{off}
-Use \prgname*{arara} for compiler files, need to pass \prgopt*{recorder} option to \meta{input file}:\par
-
-\lstinline|% arara : <compiler> : { options: [-recorder] }|
-
-\DescribeCmd{xetex}{bolean}{off}
-Using \prgname*{xelatex} compiler \meta{input file} and \meta{output file}.
-
-\DescribeCmd{latex}{bolean}{off}
-Using \prgname*{latex}\texttt{\bfseries\guillemotright}\prgname*{dvips}\texttt{\bfseries\guillemotright}\scriptname{ps2pdf}
-compiler in \meta{input file} and \prgname*{pdflatex} for \meta{output file}.
-
-\DescribeCmd{dvips}{bolean}{off}
-Using \prgname*{latex}\texttt{\bfseries\guillemotright}\prgname*{dvips}\texttt{\bfseries\guillemotright}\scriptname{ps2pdf}
-for compiler \meta{input file} and \meta{output file}.
-
-\newpage
-
-\DescribeCmd{dvipdf}{bolean}{off}
-Using \prgname*{latex}\texttt{\bfseries\guillemotright}\prgname*{dvipdfmx} for compiler \meta{input file} and \meta{output file}.
-
-\DescribeCmd{luatex}{bolean}{off}
-Using \prgname*{lualatex} for compiler \meta{input file} and \meta{output file}.
-
-\DescribeCmd{prefix}{string}{fig}
-Add prefix append to each files created.
-
-\DescribeCmd{norun}{bolean}{off}
-Run script, but no create images. This option is designed to debug the file and
-when you only need to extract the code
-
-\DescribeCmd{nopdf}{bolean}{off}
-Don't create a .\iext{pdf} image files.
-
-\DescribeCmd{nocrop}{bolean}{off}
-Don't run \scriptname{pdfcrop} in image files.
-
-\DescribeCmd{clean}{doc\textbar pst\textbar tkz\textbar all\textbar off}{doc}
-Removes specific content in \meta{output file}. Valid values for this option are:
-
-\begin{description}[font=\ttfamily, nosep, noitemsep, leftmargin=*]
-\item[doc] All content after \lstinline+\end{document}+ is removed.
-\item[pst] All \lstinline|\psset{...}| and \pkgname{pstricks} package is removed.
-\item[tkz] All \lstinline|\tikzset{...}| is removed.
-\item[all] Activates doc, pst and tkz.
-\item[off] Deactivate all.
-\end{description}
-
-\DescribeCmd{verbcmd}{command name}{myverb}
-Set custom verbatim command \lstinline+\myverb|<code>|+.
-
-\DescribeCmd{extrenv}{list separate by comma}{empty}
-List of environments to extract, need \texttt{-\/-} at end.\par
-
-\DescribeCmd{skipenv}{list separate by comma}{empty}
-
-List of environments that should not be extracted and that the script supports
-by default, need \texttt{-\/-} at end.\par
-
-\DescribeCmd{verbenv}{list separate by comma}{empty}
-
-List of \meta{verbatim standard} environment support, need \texttt{-\/-} at end.\par
-
-\DescribeCmd{writenv}{list separate by comma}{empty}
-
-List of \meta{verbatim write} environment support, need \texttt{-\/-} at end.\par
-
-\DescribeCmd{deltenv}{list separate by comma}{empty}
-List of environment deleted in \meta{output file}, need \texttt{-\/-} at end.
-
-\subsection{Options in input file}\label{sec:optfile}
-
-Many of the ideas in this section are inspired by the \prgname{arara} program (I adore it).
-A very useful way to pass options to the script is to place them in commented
-lines at the beginning of the file, very much in the style of \prgname{arara}.
-
-\DescribeOptFile*{\meta[ac=gray,cf=gray]{argument}}{option one, option two, option three, \ldots}
-\DescribeOptFile*{\meta[ac=gray,cf=gray]{argument}}{option one, option two, option three, \ldots}[!]
-
-The vast majority of the options can be passed into the \meta{input file}. These
-should be put at the beginning of the file in commented lines and everything must
-be on the same line, the exclamation mark deactivates the option. Valid values for
-\meta[ac=gray,cf=gray]{argument} are the following:
-
-\DescribeOptFile{options}{option one = value, option two = value, option three = value, \ldots}
-This line is to indicate to the script which options need to process.
-
-\DescribeOptFile{extrenv}{environment one, environment two, environment three, \ldots}
-This line is to indicate to the script which environments, not supported by
-default, are extracted.
-
-\DescribeOptFile{skipenv}{environment one, environment two, environment three, \ldots}
-This line is to indicate to the script which environments, of the ones
-supported by default, should not be extracted.
-
-\DescribeOptFile{verbenv}{environment one, environment two, environment three, \ldots}
-This line is to indicate to the script which environments, its considerate a \meta{verbatim standard}.
-
-\DescribeOptFile{writenv}{environment one, environment two, environment three, \ldots}
-This line is to indicate to the script which environments its consider \meta{verbatim write}.
-
-\DescribeOptFile{deltenv}{environment one, environment two, environment three, \ldots}
-This line is to indicate to the script which environments are deleted.
-
-If you are going to create an \meta{output file} and you do not want these lines to remain, it is better to
-place them inside the \lstinline|%<*remove> ... %</remove>|. Like this:
-
-\begin{examplecode}[numbers=left]
-%<*remove>
-% ltximg : options : {png,srcenv,xetex}
-% ltximg : extrenv : {description}
-%</remove>
-\end{examplecode}
-
-
-\section{Examples}
-\label{sec:examples}
-
-\subsection{From command line}
-\begin{examplecmd}
-[user@machine ~:]§ ltximg --latex -s -o test-out test-in.ltx
-\end{examplecmd}
-Create a \sysdir{images} directory whit all extracted environments converted to image
-formats (\iext{pdf}, \iext{svg}) in individual files, an \meta{output file} \sysfile{test-out.ltx} whit all supported environments
-converted to \ics{includegraphics} and a single file \sysfile{test-in-fig-all.ltx} with only the extracted environments
-using \prgname*{latex}\texttt{\bfseries\guillemotright}\prgname*{dvips}\texttt{\bfseries\guillemotright}\scriptname{ps2pdf}
-and \pkgname{preview} package for \meta{input file} and \prgname*{pdflatex} for \meta{output file}.
-
-\subsection{From input file}
-Adding the following lines to the beginning of the file \sysfile{file-in.tex}:
-
-\begin{examplecode}[numbers=left]
-%<*remove>
-% ltximg : options : {output = file-out, noprew, imgdir = pics, prefix = env, clean = doc}
-% ltximg : skipenv : {tikzpicture}
-% ltximg : deltenv : {filecontents}
-%</remove>
-\end{examplecode}
-and run:
-\begin{examplecmd}
-[user@machine~:]§ ltximg file-in.tex
-\end{examplecmd}
-Create a \sysdir{pics} directory whit all extracted environments, except \env{tikzpicture}, converted to image
-formats (\iext{pdf}) in individual files, an \meta{output file} \sysfile{file-out.tex} whit all extracted environments
-converted to \ics{includegraphics} and environment \env{filecontents} removed, a single file \sysfile{test-in-env-all.ltx}
-with only the extracted environments using \prgname*{pdflatex} and \pkgname{preview} package for \meta{input file} and \meta{output file}.
-
-\newpage
-
-\section{Change history}\label{sec:change:history}
-
-Some of the notable changes in the history of the \ltximg{} along with the
-versions, both development (devp) and public (ctan).
-
-\setlist[itemize, 1]{label=\textendash, wide=0.5em, nosep, noitemsep, leftmargin=10pt}
-
-% length for change history
-\newlength\descrwidth
-\settowidth{\descrwidth}{\textsf{v1.4.5, (ctan), 2013-01-23}}
-\begin{description}[font=\small\sffamily, wide=0pt, style=multiline, leftmargin=\descrwidth, nosep, noitemsep]
-\item [v\fileversion{} (ctan), \filedate]
- \begin{itemize}
- \item Add \texttt{scontents} environment support
- \item Add \texttt{filecontentsdefmacro} environment support
- \item Fix regex in source code
- \item Update documentation
- \end{itemize}
-\item [v1.6 (ctan), 2019-07-13]
- \begin{itemize}
- \item Add \texttt{zip} and \texttt{tar} options
- \item Add new \texttt{Verb} from \texttt{fvextra}
- \item Fix and update source code and documentation
- \end{itemize}
-\item [v1.5 (ctan), 2018-04-12]
- \begin{itemize}
- \item Use \texttt{GitHub} to control version
- \item Rewrite and optimize most part of source code and options
- \item Change \texttt{pdf2svg} for \texttt{pdftocairo}
- \item Complete support for \texttt{pst-exa} package
- \item Escape characters in regex according to \texttt{perl} v5.4x.x
- \end{itemize}
-\item [v1.4 (devp), 2016-11-29]
- \begin{itemize}
- \item Remove and rewrite code for regex and system call
- \item Add \texttt{arara} compiler, clean and comment code
- \item Add \texttt{dvips} and \texttt{dvipdfm(x)} for creation images
- \item Add \texttt{bmp}, \texttt{tiff} image format
- \end{itemize}
-\item [v1.3 (devp), 2016-08-14]
- \begin{itemize}
- \item Rewrite some part of code (norun, nocrop, clean)
- \item Suport \texttt{minted} and \texttt{tcolorbox} package
- \item Escape some characters in regex according to \texttt{perl} v5.2x.x
- \item All options read from command line and input file
- \item Use \texttt{/tmp} dir for work process
- \end{itemize}
-\item [v1.2 (ctan), 2015-04-22]
- \begin{itemize}
- \item Remove unused modules
- \item Add more image format
- \item Fix regex
- \end{itemize}
-\item [v1.1 (ctan), 2015-04-21]
- \begin{itemize}
- \item Change \texttt{mogrify} to \texttt{gs} for image formats
- \item Create output file
- \item Rewrite source code and fix regex
- \item Change format date to iso format
- \end{itemize}
-\item [v1.0 (ctan), 2013-12-01]
- \begin{itemize}
- \item First public release
- \end{itemize}
-\end{description}
-
-\newpage
-
-\addtocontents{toc}{\protect\setcounter{tocdepth}{2}}
-\cleardoublepage
-\phantomsection
-%\printindex[mydoc]
-%\PrintIndex
-\printindex
-\end{document}
-%</documentation>
diff --git a/support/ltximg/ltximg-doc.pdf b/support/ltximg/ltximg-doc.pdf
deleted file mode 100644
index b6c3abc991..0000000000
--- a/support/ltximg/ltximg-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/support/ltximg/ltximg.pl b/support/ltximg/ltximg.pl
deleted file mode 100644
index 3b61635e42..0000000000
--- a/support/ltximg/ltximg.pl
+++ /dev/null
@@ -1,1814 +0,0 @@
-#!/usr/bin/env perl
-use v5.26;
-use File::Basename;
-use Getopt::Long qw(:config bundling_values require_order no_ignore_case);
-use File::Temp qw(tempdir);
-use File::Copy;
-use Config;
-use File::Spec::Functions qw(catfile devnull);
-use File::Find;
-use IO::Compress::Zip qw(:all);
-use Archive::Tar;
-use POSIX qw(strftime);
-use Cwd;
-use autodie;
-#use Data::Dumper;
-
-### Directory for work and temp files
-my $tempDir = tempdir( CLEANUP => 1);
-my $workdir = cwd;
-my $null = devnull();
-
-### Program identification
-my $program = "LTXimg";
-my $nv = 'v1.7';
-my $copyright = <<END_COPYRIGHT ;
-[2019-08-24] (c) 2013-2019 by Pablo Gonzalez, pablgonz<at>yahoo.com
-END_COPYRIGHT
-
-### Default values
-my $prefix = 'fig'; # defaul prefix for extract files
-my $skiptag = 'noltximg'; # internal tag for regex
-my $extrtag = 'ltximg'; # internal tag for regex
-my $imageDir = "images"; # dir for images
-my $verbcmd = "myverb"; # set \myverb command
-my $margins = "0"; # margins for pdfcrop
-my $DPI = "150"; # dpi for image formats
-my $zip = 0; # zip images dir
-my $tar = 0; # tar.gz images dir
-my $arara = 0; # use arara to compiler
-my $force = 0; # force capture \psset|\tikzset
-my $latex = 0; # compiling all images using latex
-my $dvips = 0; # compiling output using dvips>ps2pdf
-my $dvipdf = 0; # compiling all images using dvipdfmx
-my $xetex = 0; # compiling all images using xelatex
-my $luatex = 0; # compiling all images using lualatex
-my $noprew = 0; # don't use preview packpage
-my $srcenv = 0; # create src code for environments
-my $subenv = 0; # create sub document for environments
-my @extr_env_tmp; # save extract environments
-my @skip_env_tmp; # save skip some environments
-my @verb_env_tmp; # save verbatim environments
-my @verw_env_tmp; # save verbatim write environments
-my @delt_env_tmp; # save delete environments in output file
-my @clean; # clean options
-my $pdf = 1; # create a PDF image file
-my $run = 1; # run mode compiler
-my $crop = 1; # croped pdf image files
-my $gray = 0; # create a gray scale images
-my $output; # set output name for outfile
-my $outfile = 0; # write output file
-my $outsrc = 0; # enable write src env files
-my $debug = 0; # debug
-my $PSTexa = 0; # extract PSTexample environment
-my $STDenv = 0; # extract standart environments
-my $verbose = 0; # verbose
-
-### Search Ghostscript
-# The next code it's part of pdfcrop adapted from TexLive 2014
-# Windows detection
-my $Win = 0;
-$Win = 1 if $^O =~ /mswin32/i;
-$Win = 1 if $^O =~ /cygwin/i;
-
-my $archname = $Config{'archname'};
-$archname = 'unknown' unless defined $Config{'archname'};
-
-# get Ghostscript command name
-my $gscmd = '';
-sub find_ghostscript () {
- return if $gscmd;
- if ($debug) {
- print "* Perl executable: $^X\n";
- if ($] < 5.006) {
- print "* Perl version: $]\n";
- }
- else {
- printf "* Perl version: v%vd\n", $^V;
- }
- if (defined &ActivePerl::BUILD) {
- printf "* Perl product: ActivePerl, build %s\n", ActivePerl::BUILD();
- }
- printf "* Pointer size: $Config{'ptrsize'}\n";
- printf "* Pipe support: %s\n",
- (defined($Config{'d_pipe'}) ? 'yes' : 'no');
- printf "* Fork support: %s\n",
- (defined($Config{'d_fork'}) ? 'yes' : 'no');
- }
- my $system = 'unix';
- $system = "dos" if $^O =~ /dos/i;
- $system = "os2" if $^O =~ /os2/i;
- $system = "win" if $^O =~ /mswin32/i;
- $system = "cygwin" if $^O =~ /cygwin/i;
- $system = "miktex" if defined($ENV{"TEXSYSTEM"}) and
- $ENV{"TEXSYSTEM"} =~ /miktex/i;
- print "* OS name: $^O\n" if $debug;
- print "* Arch name: $archname\n" if $debug;
- print "* System: $system\n" if $debug;
- my %candidates = (
- 'unix' => [qw|gs gsc|],
- 'dos' => [qw|gs386 gs|],
- 'os2' => [qw|gsos2 gs|],
- 'win' => [qw|gswin32c gs|],
- 'cygwin' => [qw|gs gswin32c|],
- 'miktex' => [qw|mgs gswin32c gs|]
- );
- if ($system eq 'win' or $system eq 'cygwin' or $system eq 'miktex') {
- if ($archname =~ /mswin32-x64/i) {
- my @a = ();
- foreach my $name (@{$candidates{$system}}) {
- push @a, 'gswin64c' if $name eq 'gswin32c';
- push @a, $name;
- }
- $candidates{$system} = \@a;
- }
- }
- my %exe = (
- 'unix' => '',
- 'dos' => '.exe',
- 'os2' => '.exe',
- 'win' => '.exe',
- 'cygwin' => '.exe',
- 'miktex' => '.exe'
- );
- my $candidates_ref = $candidates{$system};
- my $exe = $Config{'_exe'};
- $exe = $exe{$system} unless defined $exe;
- my @path = File::Spec->path();
- my $found = 0;
- foreach my $candidate (@$candidates_ref) {
- foreach my $dir (@path) {
- my $file = File::Spec->catfile($dir, "$candidate$exe");
- if (-x $file) {
- $gscmd = $candidate;
- $found = 1;
- print "* Found ($candidate): $file\n" if $debug;
- last;
- }
- print "* Not found ($candidate): $file\n" if $debug;
- }
- last if $found;
- }
- if (not $found and $Win) {
- $found = SearchRegistry();
- }
- if ($found) {
- print "* Autodetected ghostscript command: $gscmd\n" if $debug;
- }
- else {
- $gscmd = $$candidates_ref[0];
- print "* Default ghostscript command: $gscmd\n" if $debug;
- }
-}
-
-sub SearchRegistry () {
- my $found = 0;
- eval 'use Win32::TieRegistry qw|KEY_READ REG_SZ|;';
- if ($@) {
- if ($debug) {
- print "* Registry lookup for Ghostscript failed:\n";
- my $msg = $@;
- $msg =~ s/\s+$//;
- foreach (split /\r?\n/, $msg) {
- print " $_\n";
- }
- }
- return $found;
- }
- my $open_params = {Access => KEY_READ(), Delimiter => '/'};
- my $key_name_software = 'HKEY_LOCAL_MACHINE/SOFTWARE/';
- my $current_key = $key_name_software;
- my $software = new Win32::TieRegistry $current_key, $open_params;
- if (not $software) {
- print "* Cannot find or access registry key `$current_key'!\n"
- if $debug;
- return $found;
- }
- print "* Search registry at `$current_key'.\n" if $debug;
- my %list;
- foreach my $key_name_gs (grep /Ghostscript/i, $software->SubKeyNames()) {
- $current_key = "$key_name_software$key_name_gs/";
- print "* Registry entry found: $current_key\n" if $debug;
- my $key_gs = $software->Open($key_name_gs, $open_params);
- if (not $key_gs) {
- print "* Cannot open registry key `$current_key'!\n" if $debug;
- next;
- }
- foreach my $key_name_version ($key_gs->SubKeyNames()) {
- $current_key = "$key_name_software$key_name_gs/$key_name_version/";
- print "* Registry entry found: $current_key\n" if $debug;
- if (not $key_name_version =~ /^(\d+)\.(\d+)$/) {
- print " The sub key is not a version number!\n" if $debug;
- next;
- }
- my $version_main = $1;
- my $version_sub = $2;
- $current_key = "$key_name_software$key_name_gs/$key_name_version/";
- my $key_version = $key_gs->Open($key_name_version, $open_params);
- if (not $key_version) {
- print "* Cannot open registry key `$current_key'!\n" if $debug;
- next;
- }
- $key_version->FixSzNulls(1);
- my ($value, $type) = $key_version->GetValue('GS_DLL');
- if ($value and $type == REG_SZ()) {
- print " GS_DLL = $value\n" if $debug;
- $value =~ s|([\\/])([^\\/]+\.dll)$|$1gswin32c.exe|i;
- my $value64 = $value;
- $value64 =~ s/gswin32c\.exe$/gswin64c.exe/;
- if ($archname =~ /mswin32-x64/i and -f $value64) {
- $value = $value64;
- }
- if (-f $value) {
- print "EXE found: $value\n" if $debug;
- }
- else {
- print "EXE not found!\n" if $debug;
- next;
- }
- my $sortkey = sprintf '%02d.%03d %s',
- $version_main, $version_sub, $key_name_gs;
- $list{$sortkey} = $value;
- }
- else {
- print "Missing key `GS_DLL' with type `REG_SZ'!\n" if $debug;
- }
- }
- }
- foreach my $entry (reverse sort keys %list) {
- $gscmd = $list{$entry};
- print "* Found (via registry): $gscmd\n" if $debug;
- $found = 1;
- last;
- }
- return $found;
-} # end GS search
-
-### If windows
-if ($Win and $gscmd =~ /\s/) { $gscmd = "\"$gscmd\"";}
-
-### Call GS
-find_ghostscript();
-
-### Program identification, options and help for command line
-
-my $licensetxt = <<END_LICENSE ;
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-END_LICENSE
-
-my $title = "$program $nv $copyright";
-my $usage = <<"END_OF_USAGE";
-${title}** Description **
- LTXimg is a "perl" script that automates the process of extracting and
- converting "environments" provided by tikz, pstricks and other packages
- from LaTeX file to image formats in "individual files" using ghostscript
- and poppler-utils. Generates a one file with only extracted environments
- and other with all extracted environments converted to \\includegraphics.
-
-** Syntax **
- \$ ltximg [<compiler>] [<options>] [--] <filename>.<tex|ltx>
-
-** Usage **
- \$ ltximg --latex [<options>] <file.tex>
- \$ ltximg --arara [<options>] <file.tex>
- \$ ltximg [<options>] <file.tex>
- \$ ltximg <file.tex>
-
- If used without [<compiler>] and [<options>] the extracted environments
- are converted to pdf image format and saved in the "/images" directory
- using "pdflatex" and "preview" package. Relative or absolute paths for
- directories and files is not supported. If the last option take a list
- separated by commas, you need -- at the end.
-
-** Default environments extract **
- pspicture tikzpicture pgfpicture psgraph postscript PSTexample
-
-** Options **
- [default]
--h, --help Display command line help and exit [off]
--l, --license Display GPL license and exit [off]
--v, --version Display current version ($nv) and exit [off]
--t, --tif Create .tif files using ghostscript [$gscmd]
--b, --bmp Create .bmp files using ghostscript [$gscmd]
--j, --jpg Create .jpg files using ghostscript [$gscmd]
--p, --png Create .png files using ghostscript [$gscmd]
--e, --eps Create .eps files using poppler-utils [pdftops]
--s, --svg Create .svg files using poppler-utils [pdftocairo]
--P, --ppm Create .ppm files using poppler-utils [pdftoppm]
--g, --gray Gray scale for images using ghostscript [off]
--f, --force Capture "\\psset" and "\\tikzset" to extract [off]
--n, --noprew Create images files whitout "preview" package [off]
--d <integer>, --dpi <integer>
- Dots per inch resolution for images [150]
--m <integer>, --margin <integer>
- Set margins for pdfcrop [0]
---imgdir <dirname> Set name of directory to save images [images]
---zip Compress files generated in .zip format [off]
---tar Compress files generated in .tar.gz format [off]
--o <filename>, --output <filename>
- Create output file [off]
---verbose Verbose printing [off]
---srcenv Create files whit only code environment [off]
---subenv Create files whit preamble and code [off]
---latex Using latex>dvips>ps2pdf for compiler input
- and pdflatex for compiler output [off]
---dvips Using latex>dvips>ps2pdf for compiler input
- and latex>dvips>ps2pdf for compiler output [off]
---arara Use arara for compiler input and output [off]
---xetex Using xelatex for compiler input and output [off]
---dvipdf Using dvipdfmx for compiler input and output [off]
---luatex Using lualatex for compiler input and output [off]
---prefix <string> Set prefix append to each image file [off]
---norun Run script, but no create images files [off]
---nopdf Don't create a ".pdf" image files [off]
---nocrop Don't run pdfcrop [off]
---verbcmd <cmdname> Set "\\cmdname" verbatim command [myverb]
---clean (doc|pst|tkz|all|off)
- Removes specific text in output file [doc]
---extrenv <env1,...> Add new environments to extract [empty]
---skipenv <env1,...> Skip environments to extract [empty]
---verbenv <env1,...> Add verbatim environments [empty]
---writenv <env1,...> Add verbatim write environments [empty]
---deltenv <env1,...> Delete environments in output file [empty]
-
-** Example **
- \$ ltximg --latex -e -p --srcenv --imgdir=mypics -o test-out test-in.ltx
- \$ ltximg --latex -ep --srcenv --imgdir mypics -o test-out test-in.ltx
-
- Create a "/mypics" directory whit all extracted environments converted to
- image formats (.pdf, .eps, .png), individual files whit source code (.tex)
- for all extracted environments, a file "test-out.ltx" whit all extracted
- environments converted to \\includegraphics and file "test-in-fig-all.tex"
- with only the extracted environments using latex>dvips>ps2pdf and preview
- package for <input file> and pdflatex for <output file>.
-
-** Documentation **
- For extended documentation use:
- \$ texdoc ltximg
-END_OF_USAGE
-
-### Error in command line
-sub errorUsage { die "@_ (try ltximg --help for more information)\n"; }
-
-### Getopt::Long configuration for command line
-my %opts_cmd;
-
-my $result=GetOptions (
-# short and long options
- 'h|help' => \$opts_cmd{help}, # help
- 'v|version' => \$opts_cmd{version}, # version
- 'l|license' => \$opts_cmd{license}, # license
- 'd|dpi=i' => \$DPI, # numeric
- 'm|margin=i' => \$margins, # numeric
- 'b|bmp' => \$opts_cmd{bmp}, # gs
- 't|tif' => \$opts_cmd{tif}, # gs
- 'j|jpg' => \$opts_cmd{jpg}, # gs
- 'p|png' => \$opts_cmd{png}, # gs
- 's|svg' => \$opts_cmd{svg}, # pdftocairo
- 'e|eps' => \$opts_cmd{eps}, # pdftops
- 'P|ppm' => \$opts_cmd{ppm}, # pdftoppm
- 'g|gray' => \$gray, # gray (bolean)
- 'f|force' => \$force, # force (bolean)
- 'n|noprew' => \$noprew, # no preview (bolean)
- 'o|output=s{1}' => \$output, # output file name (string)
-# bolean options
- 'subenv' => \$subenv, # subfile environments (bolean)
- 'srcenv' => \$srcenv, # source files (bolean)
- 'arara' => \$arara, # arara compiler
- 'xetex' => \$xetex, # xelatex compiler
- 'latex' => \$latex, # latex compiler
- 'luatex' => \$luatex, # lualatex compiler
- 'dvips' => \$dvips, # dvips compiler
- 'dvipdf' => \$dvipdf, # dvipdfmx compiler
- 'zip' => \$zip, # zip images dir
- 'tar' => \$tar, # tar images dir
-# string options from command line
- 'extrenv=s{1,9}' => \@extr_env_tmp, # extract environments
- 'skipenv=s{1,9}' => \@skip_env_tmp, # skip environment
- 'verbenv=s{1,9}' => \@verb_env_tmp, # verbatim environment
- 'writenv=s{1,9}' => \@verw_env_tmp, # verbatim write environment
- 'deltenv=s{1,9}' => \@delt_env_tmp, # delete environment
-# string options
- 'imgdir=s{1}' => \$imageDir, # images dir name
- 'verbcmd=s{1}' => \$verbcmd, # \myverb inline (string)
- 'prefix=s{1}' => \$prefix, # prefix
-# negated options
- 'crop!' => \$crop, # run pdfcrop
- 'pdf!' => \$pdf, # pdf image format
- 'clean=s{1}' => \@clean, # clean output file
- 'run!' => \$run, # run compiler
- 'debug!' => \$debug, # debug mode
- 'verbose!' => \$verbose, # debug mode,
- ) or die $usage;
-
-### Remove white space and '=' in array captured from command line
-s/^\s*(\=):?|\s*//mg foreach @extr_env_tmp;
-s/^\s*(\=):?|\s*//mg foreach @skip_env_tmp;
-s/^\s*(\=):?|\s*//mg foreach @verb_env_tmp;
-s/^\s*(\=):?|\s*//mg foreach @verw_env_tmp;
-s/^\s*(\=):?|\s*//mg foreach @delt_env_tmp;
-
-### Split comma separte list options from command line
-@extr_env_tmp = split(/,/,join('',@extr_env_tmp));
-@skip_env_tmp = split(/,/,join('',@skip_env_tmp));
-@verb_env_tmp = split(/,/,join('',@verb_env_tmp));
-@verw_env_tmp = split(/,/,join('',@verw_env_tmp));
-@delt_env_tmp = split(/,/,join('',@delt_env_tmp));
-
-### Validate input string options
-if (grep( /(^\-|^\.).*?/, @extr_env_tmp )) {
- die errorUsage "Invalid argument for --extrenv option";
-}
-if (grep( /(^\-|^\.).*?/, @skip_env_tmp )) {
- die errorUsage "Invalid argument for --skipenv option";
-}
-if (grep( /(^\-|^\.).*?/, @verb_env_tmp )) {
- die errorUsage "Invalid argument for --verbenv option";
-}
-if (grep( /(^\-|^\.).*?/, @verw_env_tmp )) {
- die errorUsage "Invalid argument for --writenv option";
-}
-if (grep( /(^\-|^\.).*?/, @delt_env_tmp )) {
- die errorUsage "Invalid argument for --deltenv option";
-}
-
-### Help
-if (defined $opts_cmd{help}) {
- find_ghostscript();
- print $usage;
- exit(0);
-}
-
-### Version
-if (defined $opts_cmd{version}) {
- print $title;
- exit(0);
-}
-
-### Licence
-if (defined $opts_cmd{license}) {
- print $licensetxt;
- exit(0);
-}
-
-### Set tmp random name for name-fig-tmp (temp files)
-my $tmp = "$$";
-
-### Check --srcenv and --subenv option from command line
-if ($srcenv && $subenv) {
- die errorUsage "--srcenv and --subenv options are mutually exclusive";
-}
-
-### Check the input file from command line
-@ARGV > 0 or errorUsage "Input filename missing";
-@ARGV < 2 or errorUsage "Unknown option or too many input files";
-
-### Check input file extention
-my @SuffixList = ('.tex', '', '.ltx'); # posibles
-my ($name, $path, $ext) = fileparse($ARGV[0], @SuffixList);
-$ext = '.tex' if not $ext;
-
-### Read input file in memory (slurp), need :crlf for windows/linux
-open my $INPUTfile, '<:crlf', "$name$ext";
-my $ltxfile;
- {
- local $/;
- $ltxfile = <$INPUTfile>;
- }
-close $INPUTfile;
-
-### Funtion uniq
-sub uniq {
- my %seen;
- grep !$seen{$_}++, @_;
-}
-
-### Funtion array_minus
-sub array_minus(\@\@) {
- my %e = map{ $_ => undef } @{$_[1]};
- return grep( ! exists( $e{$_} ), @{$_[0]} );
-}
-
-### Funtion to create hash begin -> BEGIN, end -> END
-sub crearhash {
- my %cambios;
- for my $aentra(@_){
- for my $initend (qw(begin end)) {
- $cambios{"\\$initend\{$aentra"} = "\\\U$initend\E\{$aentra";
- }
- }
- return %cambios;
-}
-
-### Default environment to extract
-my @extr_tmp = qw (
- postscript tikzpicture pgfpicture pspicture psgraph
- );
-
-push (@extr_env_tmp, @extr_tmp);
-
-### Default verbatim environment
-my @verb_tmp = qw (
- Example CenterExample SideBySideExample PCenterExample PSideBySideExample
- verbatim Verbatim BVerbatim LVerbatim SaveVerbatim PSTcode
- LTXexample tcblisting spverbatim minted listing lstlisting
- alltt comment chklisting verbatimtab listingcont boxedverbatim
- demo sourcecode xcomment pygmented pyglist program programl
- programL programs programf programsc programt
- );
-
-push (@verb_env_tmp, @verb_tmp);
-
-### Default verbatim write environment
-my @verbw_tmp = qw (
- scontents filecontents tcboutputlisting tcbexternal tcbwritetmp extcolorbox extikzpicture
- VerbatimOut verbatimwrite PSTexample filecontentsdef filecontentshere filecontentsdefmacro
- );
-
-push (@verw_env_tmp, @verbw_tmp);
-
-### Rules to capture in regex
-my $braces = qr/ (?:\{)(.+?)(?:\}) /msx;
-my $braquet = qr/ (?:\[)(.+?)(?:\]) /msx;
-my $no_corchete = qr/ (?:\[ .*? \])? /msx;
-
-### Capture new verbatim environments defined in input file
-my @new_verb = qw (
- newtcblisting DeclareTCBListing ProvideTCBListing NewTCBListing
- lstnewenvironment NewListingEnvironment NewProgram specialcomment
- includecomment DefineVerbatimEnvironment newverbatim newtabverbatim
- );
-
-### Regex to capture names for new verbatim environments from input file
-my $newverbenv = join "|", map quotemeta, sort { length $a <=> length $b } @new_verb;
- $newverbenv = qr/\b(?:$newverbenv) $no_corchete $braces/msx;
-
-### Capture new verbatim write environments defined in input file
-my @new_verb_write = qw (
- renewtcbexternalizetcolorbox renewtcbexternalizeenvironment
- newtcbexternalizeenvironment newtcbexternalizetcolorbox
- );
-
-### Regex to capture names for new verbatim write environments from input file
-my $newverbwrt = join "|", map quotemeta, sort { length $a <=> length $b } @new_verb_write;
- $newverbwrt = qr/\b(?:$newverbwrt) $no_corchete $braces/msx;
-
-### Regex to capture MINTED related environments
-my $mintdenv = qr/\\ newminted $braces (?:\{.+?\}) /x;
-my $mintcenv = qr/\\ newminted $braquet (?:\{.+?\}) /x;
-my $mintdshrt = qr/\\ newmint $braces (?:\{.+?\}) /x;
-my $mintcshrt = qr/\\ newmint $braquet (?:\{.+?\}) /x;
-my $mintdline = qr/\\ newmintinline $braces (?:\{.+?\}) /x;
-my $mintcline = qr/\\ newmintinline $braquet (?:\{.+?\}) /x;
-
-### Pass input file to @array and remove % and comments
-my @filecheck = $ltxfile;
-s/%.*\n//mg foreach @filecheck; # del comments
-s/^\s*|\s*//mg foreach @filecheck; # del white space
-my $filecheck = join '', @filecheck;
-
-### Capture \newverbatim write names in input file
-my @newv_write = $filecheck =~ m/$newverbwrt/xg;
-
-### Add @newv_write defined in input file to @verw_env_tmp
-push (@verw_env_tmp, @newv_write);
-
-### Capture \newminted{$mintdenv}{options} (for)
-my @mint_denv = $filecheck =~ m/$mintdenv/xg;
-
-### Capture \newminted[$mintcenv]{lang} (for)
-my @mint_cenv = $filecheck =~ m/$mintcenv/xg;
-
-### Capture \newmint{$mintdshrt}{options} (while)
-my @mint_dshrt = $filecheck =~ m/$mintdshrt/xg;
-
-### Capture \newmint[$mintcshrt]{lang}{options} (while)
-my @mint_cshrt = $filecheck =~ m/$mintcshrt/xg;
-
-### Capture \newmintinline{$mintdline}{options} (while)
-my @mint_dline = $filecheck =~ m/$mintdline/xg;
-
-### Capture \newmintinline[$mintcline]{lang}{options} (while)
-my @mint_cline = $filecheck =~ m/$mintcline/xg;
-
-### Capture \newverbatim environments in input file (for)
-my @verb_input = $filecheck =~ m/$newverbenv/xg;
-
-### Add new verbatim environment defined in input file to @vrbenv
-push (@verb_env_tmp,@mint_denv,@mint_cenv,@verb_input);
-
-### Append "code" (minted)
-if (!@mint_denv == 0) {
- $mintdenv = join "\n", map { qq/$_\Qcode\E/ } @mint_denv;
- @mint_denv = split /\n/, $mintdenv;
-}
-
-### Append "inline" (minted)
-if (!@mint_dline == 0) {
- $mintdline = join "\n", map { qq/$_\Qinline\E/ } @mint_dline;
- @mint_dline = split /\n/, $mintdline;
-}
-
-### Join all minted inline/short and lstinline in @array
-my @mintline;
-my @mint_tmp = qw ( mint mintinline lstinline);
-push (@mintline,@mint_dline,@mint_cline,@mint_dshrt,@mint_cshrt,@mint_tmp);
- @mintline = uniq(@mintline);
-
-### Create a regex using @mintline
-my $mintline = join "|", map quotemeta, sort { length $a <=> length $b } @mintline;
- $mintline = qr/\b(?:$mintline)/x;
-
-### Options from input file
-# % ltximg : extrenv : {extrenv1, extrenv2, ... , extrenvn}
-# % ltximg : skipenv : {skipenv1, skipenv2, ... , skipenvn}
-# % ltximg : verbenv : {verbwrt1, verbwrt2, ... , verbwrtn}
-# % ltximg : writenv : {verbwrt1, verbwrt2, ... , verbwrtn}
-# % ltximg : deltenv : {deltenv1, deltenv2, ... , deltenvn}
-# % ltximg : options : {opt1=arg, opt2=arg, ... , bolean}
-
-### Regex to capture before preamble $readoptfile, %opt_from_file;
-my $readoptfile = qr/
- ^ %+ \s* ltximg (?&SEPARADOR) (?<clave>(?&CLAVE)) (?&SEPARADOR) \{ (?<argumentos>(?&ARGUMENTOS)) \}
- (?(DEFINE)
- (?<CLAVE> \w+ )
- (?<ARGUMENTOS> .+? )
- (?<SEPARADOR> \s* : \s* )
- )
-/mx;
-
-### Split input file, $atbegindoc contain % ltximg : <argument>
-my ($atbegindoc, $document) = $ltxfile =~ m/\A (\s* .*? \s*) (\\documentclass.*)\z/msx;
-
-### Process options from input file
-my %opts_file;
-
-while ($atbegindoc =~ /$readoptfile/g) {
- my ($clave, $argumentos) = @+{qw(clave argumentos)};
- my @argumentos = split /\s*,\s*?/, $argumentos;
- for (@argumentos) { s/^ \s* | \s* $//gx; }
- if ($clave eq 'options') {
- for my $argumento (@argumentos) {
- if ($argumento =~ /(?<key>\S+) \s* = \s* (?<valor>\S+)/x) {
- $opts_file{$clave}{$+{'key'}} = $+{'valor'};
- } # close for
- else {
- $opts_file{$clave}{$argumento} = 1;
- }
- } # close for
- } # close if
- else {
- push @{ $opts_file{ $clave } }, @argumentos;
- }
-} # close while
-
-### Validate clean
-my %clean = map { $_ => 1 } @clean;
-
-### By default clean = doc
-$clean{doc} = 1 ;
-
-### Set clean options from input file
-$clean{doc} = 1 if ($opts_file{options}{clean} eq 'doc');
-$clean{off} = 1 if ($opts_file{options}{clean} eq 'off');
-$clean{pst} = 1 if ($opts_file{options}{clean} eq 'pst');
-$clean{tkz} = 1 if ($opts_file{options}{clean} eq 'tkz');
-$clean{all} = 1 if ($opts_file{options}{clean} eq 'all');
-
-### Set clean options for script
-if ($clean{pst} or $clean{tikz}) { $clean{doc} = 1; }
-if ($clean{all}) { @clean{qw(pst doc tkz)} = (1) x 3; }
-if ($clean{off}) { undef %clean; }
-
-### Add extract options from input file
-if (exists $opts_file{extract}) {
- push @extr_env_tmp, @{ $opts_file{extract} };
-}
-
-### Add skipenv options from input file
-if (exists $opts_file{skipenv}) {
- push @skip_env_tmp, @{ $opts_file{skipenv} };
-}
-
-### Add verbenv options from input file
-if (exists $opts_file{verbenv}) {
- push @verb_env_tmp, @{ $opts_file{verbenv} };
-}
-
-### Add writenv options from input file
-if (exists $opts_file{writenv}) {
- push @verw_env_tmp, @{ $opts_file{writenv} };
-}
-
-### Add deltenv options from input file
-if (exists $opts_file{deltenv}) {
- push @delt_env_tmp, @{ $opts_file{deltenv} };
-}
-
-### Set \myverb|<code>| options from input file
-if (exists $opts_file{options}{verbcmd}) {
- $verbcmd = $opts_file{options}{verbcmd};
-}
-
-### Create @env_all_tmp contain all environments
-my @env_all_tmp;
-push(@env_all_tmp,@extr_env_tmp,@skip_env_tmp,@verb_env_tmp,@verw_env_tmp,@delt_env_tmp);
-@env_all_tmp = uniq(@env_all_tmp);
-
-### Create @no_env_all_tmp contain all No extracted environments
-my @no_env_all_tmp;
-push(@no_env_all_tmp,@skip_env_tmp,@verb_env_tmp,@verw_env_tmp,@delt_env_tmp);
-@no_env_all_tmp = uniq(@no_env_all_tmp);
-
-### The operation return @extract environment
-my @extract = array_minus(@env_all_tmp,@no_env_all_tmp);
- @extract = uniq(@extract);
-
-### The operation return @no_extract
-my @no_extract = array_minus(@env_all_tmp,@extract);
-my @no_skip;
-push(@no_skip,@verb_env_tmp,@verw_env_tmp,@delt_env_tmp);
-my @skipped = array_minus(@no_extract,@no_skip);
- @skipped = uniq(@skipped);
-
-### The operation return @delte_env environment
-my @no_ext_skip = array_minus(@no_extract,@skipped);
-my @no_del;
-push(@no_del,@verb_env_tmp,@verw_env_tmp);
-my @delete_env = array_minus(@no_ext_skip,@no_del);
- @delete_env = uniq(@delete_env);
-
-### The operation return @verbatim environment
-my @no_ext_skip_del = array_minus(@no_ext_skip,@delete_env);
-my @verbatim = array_minus(@no_ext_skip_del,@verw_env_tmp);
-
-### The operation return @verbatim write environment
-my @verbatim_w = array_minus(@no_ext_skip_del,@verbatim);
-
-### Create @env_all for hash and replace in while
-my @no_verb_env;
-push(@no_verb_env,@extract,@skipped,@delete_env,@verbatim_w);
-my @no_verw_env;
-push(@no_verw_env,@extract,@skipped,@delete_env,@verbatim);
-
-### Reserved words in verbatim inline (while)
-my %changes_in = (
-# ltximg tags
- '%<*ltximg>' => '%<*LTXIMG>',
- '%</ltximg>' => '%</LTXIMG>',
- '%<*noltximg>' => '%<*NOLTXIMG>',
- '%</noltximg>' => '%</NOLTXIMG>',
- '%<*remove>' => '%<*REMOVE>',
- '%</remove>' => '%</REMOVE>',
- '%<*ltximgverw>' => '%<*LTXIMGVERW>',
- '%</ltximgverw>' => '%</LTXIMGVERW>',
-# pst/tikz set
- '\psset' => '\PSSET',
- '\tikzset' => '\TIKZSET',
-# pspicture
- '\pspicture' => '\TRICKS',
- '\endpspicture' => '\ENDTRICKS',
-# pgfpicture
- '\pgfpicture' => '\PGFTRICKS',
- '\endpgfpicture' => '\ENDPGFTRICKS',
-# tikzpicture
- '\tikzpicture' => '\TKZTRICKS',
- '\endtikzpicture' => '\ENDTKZTRICKS',
-# psgraph
- '\psgraph' => '\PSGRAPHTRICKS',
- '\endpsgraph' => '\ENDPSGRAPHTRICKS',
-# some reserved
- '\usepackage' => '\USEPACKAGE',
- '{graphicx}' => '{GRAPHICX}',
- '\graphicspath{' => '\GRAPHICSPATH{',
- );
-
-### Changues \begin... \end in verbatim inline
-my %init_end = (
-# begin{ and end{
- '\begin{' => '\BEGIN{',
- '\end{' => '\END{',
- );
-
-### Changues for \begin{document} ... \end{document}
-my %document = (
-# begin/end document for split
- '\begin{document}' => '\BEGIN{document}',
- '\end{document}' => '\END{document}',
- );
-
-### Reverse for extract and output file
-my %changes_out = (
-# ltximg tags
- '\begin{nopreview}' => '%<*noltximg>',
- '\end{nopreview}' => '%</noltximg>',
-# pst/tikz set
- '\PSSET' => '\psset',
- '\TIKZSET' => '\tikzset',
-# pspicture
- '\TRICKS' => '\pspicture',
- '\ENDTRICKS' => '\endpspicture',
-# pgfpicture
- '\PGFTRICKS' => '\pgfpicture',
- '\ENDPGFTRICKS' => '\endpgfpicture',
-# tikzpicture
- '\TKZTRICKS' => '\tikzpicture',
- '\ENDTKZTRICKS' => '\endtikzpicture',
-# psgraph
- '\PSGRAPHTRICKS' => '\psgraph',
- '\ENDPSGRAPHTRICKS' => '\endpsgraph',
-# some reserved
- '\USEPACKAGE' => '\usepackage',
- '{GRAPHICX}' => '{graphicx}',
- '\GRAPHICSPATH{' => '\graphicspath{',
-# begin{ and end{
- '\BEGIN{' => '\begin{',
- '\END{' => '\end{',
- );
-
-### Reverse tags, need back in all file to extract
-my %reverse_tag = (
-# ltximg tags
- '%<*LTXIMG>' => '%<*ltximg>',
- '%</LTXIMG>' => '%</ltximg>',
- '%<*NOLTXIMG>' => '%<*noltximg>',
- '%</NOLTXIMG>' => '%</noltximg>',
- '%<*REMOVE>' => '%<*remove>',
- '%</REMOVE>' => '%</remove>',
- '%<*LTXIMGVERW>' => '%<*ltximgverw>',
- '%</LTXIMGVERW>' => '%</ltximgverw>',
- );
-
-### Creatate a hash for changues
-my %extract_env = crearhash(@extract);
-my %skiped_env = crearhash(@skipped);
-my %verb_env = crearhash(@verbatim);
-my %verbw_env = crearhash(@verbatim_w);
-my %delete_env = crearhash(@delete_env);
-my %change_verbw_env = crearhash(@no_verw_env);
-my %change_verb_env = crearhash(@no_verb_env);
-
-### Join changues in new hash
-my %cambios = (%changes_in, %init_end);
-
-### Variables y constantes
-my $no_del = "\0";
-my $del = $no_del;
-
-### Rules
-my $llaves = qr/\{ .+? \} /x;
-my $no_llaves = qr/(?: $llaves )? /x;
-my $corchetes = qr/\[ .+? \] /x;
-my $nestedbr = qr/(\{(?>[^\{\}\\]++|\\.|(?R))*+\}) /x;
-my $delimitador = qr/\{ (?<del>.+?) \} /x;
-my $scontents = qr/Scontents [*]? $no_corchete /ix;
-my $verb = qr/(?:((spv|(?:q|f)?v|V)erb|$verbcmd)[*]?) /ix;
-my $lst = qr/(?:(lst|pyg)inline)(?!\*) $no_corchete /ix;
-my $mint = qr/(?: $mintline |SaveVerb) (?!\*) $no_corchete $no_llaves $llaves /ix;
-my $no_mint = qr/(?: $mintline) (?!\*) $no_corchete /ix;
-my $marca = qr/\\ (?:$verb | $lst |$scontents | $mint |$no_mint) (?:\s*)? (\S) .+? \g{-1} /sx;
-my $comentario = qr/^ \s* \%+ .+? $ /mx;
-my $definedel = qr/\\ (?: DefineShortVerb | lstMakeShortInline| MakeSpecialShortVerb ) [*]? $no_corchete $delimitador /ix;
-my $indefinedel = qr/\\ (?: (Undefine|Delete)ShortVerb | lstDeleteShortInline) $llaves /ix;
-
-### Changues in input file (in memory)
-while ($document =~
- / $marca
- | $comentario
- | $definedel
- | $indefinedel
- | $del .+? $del
- /pgmx) {
- my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
- my $encontrado = ${^MATCH};
- if ($encontrado =~ /$definedel/) {
- $del = $+{del};
- $del = "\Q$+{del}" if substr($del,0,1) ne '\\';
- }
- elsif ($encontrado =~ /$indefinedel/) {
- $del = $no_del;
- }
- else {
- while (my($busco, $cambio) = each %cambios) {
- $encontrado =~ s/\Q$busco\E/$cambio/g;
- } # close while
- substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
- pos ($document) = $pos_inicial + length $encontrado;
- }
-}
-
-### Regex for verbatim inline whit braces {...}
-my $fvextra = qr /\\ (?: (Save|Esc)Verb [*]?) $no_corchete /x;
-my $mintedbr = qr /\\ (?:$mintline|pygment) (?!\*) $no_corchete $no_llaves /x;
-my $tcbxverb = qr /\\ (?: tcboxverb [*]?| Scontents [*]? |$verbcmd [*]?|lstinline) $no_corchete /x;
-my $verb_brace = qr / (?:$tcbxverb|$mintedbr|$fvextra) (?:\s*)? $nestedbr /x;
-
-### Changue \verb*{code} for verbatim inline
-while ($document =~ /$verb_brace/pgmx) {
- my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
- my $encontrado = ${^MATCH};
- while (my($busco, $cambio) = each %cambios) {
- $encontrado =~ s/\Q$busco\E/$cambio/g;
- } # close while
- substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
- pos ($document) = $pos_inicial + length $encontrado;
-} # close while
-
-### Changue <*TAGS> to <*tags>
-my $ltxtags = join "|", map {quotemeta} sort { length($a)<=>length($b) } keys %reverse_tag;
- $document =~ s/^($ltxtags)/$reverse_tag{$1}/gmsx;
-
-### Define environments Verbatim standart
-my $verbatim = join "|", map quotemeta, sort { length $a <=> length $b } @verbatim;
- $verbatim = qr/$verbatim/x;
-
-### Define environments Verbatim write
-my $verbatim_w = join "|", map quotemeta, sort { length $a <=> length $b } @verbatim_w;
- $verbatim_w = qr/$verbatim_w/x;
-
-### Define environments to skip
-my $skipenv = join "|", map quotemeta, sort { length $a <=> length $b } @skipped;
- $skipenv = qr/$skipenv/x;
-
-### Define environments to extract
-my $environ = join "|", map quotemeta, sort { length $a <=> length $b } @extract;
- $environ = qr/$environ/x;
-
-### Define environments to delete
-my $delenv = join "|", map quotemeta, sort { length $a <=> length $b } @delt_env_tmp;
- $delenv = qr/$delenv/x;
-
-### Split file by lines
-my @lineas = split /\n/, $document;
-
-### Hash and Regex for changues
-my %replace = (%change_verb_env,%changes_in,%document);
-my $find = join "|", map {quotemeta} sort { length($a)<=>length($b) } keys %replace;
-
-### Change in $verbatim and $verbatim_w
-my $DEL;
-for (@lineas) {
- if (/\\begin\{($verbatim\*?)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) {
- s/($find)/$replace{$1}/g; }
- if (/\\begin\{($verbatim_w\*?)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) {
- my %replace = (%change_verbw_env,%changes_in,%document);
- my $find = join "|", map {quotemeta} sort { length($a)<=>length($b) } keys %replace;
- s/($find)/$replace{$1}/g; }
-} # close for
-
-### Join lines in $document
-$document = join("\n", @lineas);
-
-### Split input file
-my ($preamble,$bodydoc,$enddoc) = $document =~ m/\A (.+?) (\\begin\{document\} .+?)(\\end\{document\}.*)\z/msx;
-
-### Regex for delete environment
-my $delt_env = qr /
- (
- (?:
- \\begin\{$delenv\*?\}
- (?:
- (?>[^\\]+)|
- \\
- (?!begin\{$delenv\*?\})
- (?!end\{$delenv\*?\})|
- (?-1)
- )*
- \\end\{$delenv\*?\}
- )
- )
- /x;
-
-### Regex for verbatim write environment
-my $verb_wrt = qr /
- (
- (?:
- \\begin\{$verbatim_w\*?\}
- (?:
- (?>[^\\]+)|
- \\
- (?!begin\{$verbatim_w\*?\})
- (?!end\{$verbatim_w\*?\})|
- (?-1)
- )*
- \\end\{$verbatim_w\*?\}
- )
- )
- /x;
-
-### Pass $verb_wrt to %<*ltximgverw> ... %</ltximgverw>
-$bodydoc =~ s/($verb_wrt)/\%<\*ltximgverw>\n$1\n\%<\/ltximgverw>/gmsx;
-
-### Regex for skip environment
-my $skip_env = qr /
- (
- (?:
- \\begin\{$skipenv\*?\}
- (?:
- (?>[^\\]+)|
- \\
- (?!begin\{$skipenv\*?\})
- (?!end\{$skipenv\*?\})|
- (?-1)
- )*
- \\end\{$skipenv\*?\}
- )
- )
- /x;
-
-### Pass %<*noltximg> ... %</noltximg> to \begin{nopreview} ... \end{nopreview}
-$bodydoc =~ s/^\%<\*$skiptag>(.+?)\%<\/$skiptag>/\\begin\{nopreview\}$1\\end\{nopreview\}/gmsx;
-
-### Pass $skip_env to \begin{nopreview} .+? \end{nopreview}
-$bodydoc =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- ($skip_env)/\\begin\{nopreview\}\n$1\n\\end\{nopreview\}\n/gmsx;
-
-### Regex to extract environments
-my $extr_env = qr /
- (
- (?:
- \\begin\{$environ\*?\}
- (?:
- (?>[^\\]+)|
- \\
- (?!begin\{$environ\*?\})
- (?!end\{$environ\*?\})|
- (?-1)
- )*
- \\end\{$environ\*?\}
- )
- )
- /x;
-
-### Set bolean options from input file
-$zip = 1 if exists $opts_file{options}{zip};
-$tar = 1 if exists $opts_file{options}{tar};
-$force = 1 if exists $opts_file{options}{force};
-$run = 0 if exists $opts_file{options}{norun};
-$pdf = 0 if exists $opts_file{options}{nopdf};
-$crop = 0 if exists $opts_file{options}{nocrop};
-$noprew = 1 if exists $opts_file{options}{noprew};
-$force = 1 if exists $opts_file{options}{force};
-$arara = 1 if exists $opts_file{options}{arara};
-$xetex = 1 if exists $opts_file{options}{xetex};
-$latex = 1 if exists $opts_file{options}{latex};
-$dvips = 1 if exists $opts_file{options}{dvips};
-$dvipdf = 1 if exists $opts_file{options}{dvipdf};
-$luatex = 1 if exists $opts_file{options}{luatex};
-$srcenv = 1 if exists $opts_file{options}{srcenv};
-$subenv = 1 if exists $opts_file{options}{subenv};
-
-### Check plain TeX syntax
-my %special = map { $_ => 1 } @extract; # anon hash
-
-### Convert \pspicture to LaTeX syntax
-if (exists($special{pspicture})) {
- $bodydoc =~ s/
- \\pspicture(\*)?(.+?)\\endpspicture/\\begin{pspicture$1}$2\\end{pspicture$1}/gmsx;
-}
-
-### Convert \psgraph to LaTeX syntax
-if (exists($special{psgraph})) {
- $bodydoc =~ s/
- \\psgraph(\*)?(.+?)\\endpsgraph/\\begin{psgraph$1}$2\\end{psgraph$1}/gmsx;
-}
-
-### Convert \tikzpicture to LaTeX syntax
-if (exists($special{tikzpicture})) {
- $bodydoc =~ s/
- \\tikzpicture(.+?)\\endtikzpicture/\\begin{tikzpicture}$1\\end{tikzpicture}/gmsx;
-}
-
-### Convert \pgfpicture to LaTeX syntax
-if (exists($special{pgfpicture})) {
- $bodydoc =~ s/
- \\pgfpicture(.+?)\\endpgfpicture/\\begin{pgfpicture}$1\\end{pgfpicture}/gmsx;
-}
-
-### Pass %<*ltximg> (.+?) %</ltximg> to \begin{preview} (.+?) \end{preview}
-$bodydoc =~ s/^\%<\*$extrtag>(.+?)\%<\/$extrtag>/\\begin\{preview\}$1\\end\{preview\}/gmsx;
-
-### $force mode for pstricks/psgraph/tikzpiture
-if ($force) {
-if (exists($special{pspicture}) or exists($special{psgraph})) { # pspicture or psgraph found
-$bodydoc =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
- \\begin\{postscript\}.+?\\end\{postscript\}(*SKIP)(*F)|
- (?<code>
- (?:\\psset\{(?:\{.*?\}|[^\{])*\}.+?)? # if exist ...save
- \\begin\{(?<env> pspicture\*?| psgraph)\} .+? \\end\{\k<env>\}
- )
- /\\begin\{preview\}\n$+{code}\n\\end\{preview\}/gmsx;
- } # close pspicture
-if (exists($special{tikzpicture})) {# tikzpicture found
-$bodydoc =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
- \\begin\{postscript\}.+?\\end\{postscript\}(*SKIP)(*F)|
- (?<code>
- (?:\\tikzset\{(?:\{.*?\}|[^\{])*\}.+?)? # if exist ...save
- \\begin\{(?<env> tikzpicture)\} .+? \\end\{\k<env>\}
- )
- /\\begin\{preview\}\n$+{code}\n\\end\{preview\}/gmsx;
- } # close tikzpicture
-} # close $force mode
-
-### Pass $extr_env to \begin{preview} .+? \end{preview}
-$bodydoc =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
- ($extr_env)/\\begin\{preview\}\n$1\n\\end\{preview\}/gmsx;
-
-### The extract environments need back words to original
-%replace = (%changes_out,%reverse_tag);
- $find = join "|", map {quotemeta} sort { length($a)<=>length($b) } keys %replace;
-
-### Split $preamble by lines
-@lineas = split /\n/, $preamble;
-
-### Changues in verbatim write
-for (@lineas) {
- if (/\\begin\{($verbatim_w\*?)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) {
- s/($find)/$replace{$1}/g; }
-} # close for
-
-### Join lines in $preamble
-$preamble = join("\n", @lineas);
-
-### Change back betwen \begin{preview} ... \end{preview}
-@lineas = split /\n/, $bodydoc;
-
-for (@lineas) {
- if (/\\begin\{(preview)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) { # range operator
- s/($find)/$replace{$1}/g; }
- if (/\\begin\{($verbatim_w\*?)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) {
- s/($find)/$replace{$1}/g; }
-} # close for
-
-### Join lines in $bodydoc
-$bodydoc = join("\n", @lineas);
-
-### preview environment for extract
-my $BP = '\\\\begin\{preview\}';
-my $EP = '\\\\end\{preview\}';
-
-my @env_extract = $bodydoc =~ m/(?<=$BP)(.+?)(?=$EP)/gms;
-my $envNo = scalar @env_extract;
-
-### PSTexample environment for extract
-my $BE = '\\\\begin\{PSTexample\}';
-my $EE = '\\\\end\{PSTexample\}';
-
-my @exa_extract = $bodydoc =~ m/(?<=$BE)(.+?)(?=$EE)/gms;
-my $exaNo = scalar @exa_extract;
-
-### Check if PSTexample environment found, 1 = run script
-if ($exaNo!=0) { $PSTexa = 1; }
-
-### Check if standart environment found, , 1 = run script
-if ($envNo!=0) { $STDenv=1; }
-
-### PSTexample environment suport
-if ($PSTexa) { # append [graphic={[...]...}]
-$exaNo = 1;
-while ($bodydoc =~ /\\begin\{PSTexample\}(\[.+?\])?/gsm) {
- my $swpl_grap = "graphic=\{\[scale=1\]$imageDir/$name-$prefix-exa";
- my $corchetes = $1;
- my ($pos_inicial, $pos_final) = ($-[1], $+[1]);
- if (not $corchetes) { $pos_inicial = $pos_final = $+[0]; }
- if (not $corchetes or $corchetes =~ /\[\s*\]/) {
- $corchetes = "[$swpl_grap-$exaNo}]";
- }
- else { $corchetes =~ s/\]/,$swpl_grap-$exaNo}]/; }
- substr($bodydoc, $pos_inicial, $pos_final - $pos_inicial) = $corchetes;
- pos($bodydoc) = $pos_inicial + length $corchetes;
-} # close while
-continue { $exaNo++; } # increment counter
-
-### Pass PSTexample to nopreview environment
-$bodydoc =~ s/\%<\*ltximgverw>\n
- (?<code>
- \\begin\{PSTexample\} .+? \\end\{PSTexample\}
- )
- \n\%<\/ltximgverw>
- /\\begin\{nopreview\}\n$+{code}\n\\end\{nopreview\}/gmsx;
-} # close PSTexa
-
-### Command line script identification
-print "$program $nv $copyright" ;
-
-### Check if enviroment found in input file
-if ($envNo == 0 and $exaNo == 0) {
- die errorUsage "ltximg can not find any environment to extract in file $name$ext";
- }
-elsif ($envNo!= 0 and $exaNo!= 0) {
- say "The file $name$ext contain $envNo environment to extract and $exaNo PSTexample environment to extract";
- }
-elsif ($envNo == 0 and $exaNo!= 0) {
- say "The file $name$ext contain $exaNo PSTexample environment to extract";
- }
-else { say "The file $name$ext contain $envNo environment to extract"; }
-
-### Set output file name from input file
-if (exists $opts_file{options}{output}){
- $output = $opts_file{options}{output};
-}
-
-### Validate output file name
-if (defined $output) {
-# Not contain - at begin
-if ($output =~ /(^\-|^\.).*?/) {
- die errorUsage "$output it is not a valid name for output file";
-}
-# The name of the output file must be different that $name
-if ($output eq "$name") { $output = "$name-out$ext"; }
-
-# The name of the output file must be different that $name.ext
-if ($output eq "$name$ext") { $output = "$name-out$ext"; }
-
-# Remove .ltx or .tex extension
-if ($output =~ /.*?$ext/) { $output =~ s/(.+?)$ext/$1/gms;}
-} # close check
-
-### If output name are ok, then $outfile = 1
-if (defined($output)) { $outfile = 1; }
-
-### If --srcenv or --subenv option are OK then execute script
-if ($srcenv) { $outsrc = 1; $subenv = 0; }
-if ($subenv) { $outsrc = 1; $srcenv = 0; }
-
-### Set imgdir name from input file
-if (exists $opts_file{options}{imgdir}) {
- $imageDir = $opts_file{options}{imgdir};
-}
-
-### Set prefix name from input file
-if (exists $opts_file{options}{prefix}) {
- $prefix = $opts_file{options}{prefix};
-}
-
-### Set pdfcrop margins from input file
-if (exists $opts_file{options}{margins}) {
- $margins = $opts_file{options}{margins};
-}
-
-### Set DPI resolution for images from input file
-if (exists $opts_file{options}{dpi}) {
- $DPI = $opts_file{options}{dpi};
-}
-
-### Create /images dir to save image and source code
--e $imageDir or mkdir($imageDir,0744) or die "Can't create $imageDir: $!\n";
-
-### Options for \pagestyle{empty} ($crop)
-my $opt_page = $crop ? "\n\\pagestyle\{empty\}\n\\begin\{document\}"
- : "\n\\begin\{document\}"
- ;
-
-### Add options to preamble for subfiles
-my $sub_prea = "$atbegindoc$preamble$opt_page";
-
-### Delete <*remove> ... </remove> in $sub_prea
-$sub_prea =~ s/^\%<\*remove>\s*(.+?)\s*\%<\/remove>(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
-
-### Options for preview packpage
-my $opt_prew = $xetex ? 'xetex,'
- : $latex ? ''
- : 'pdftex,'
- ;
-
-### Lines to add at begin input file
-my $preview = <<"EXTRA";
-\\AtBeginDocument\{%
-\\RequirePackage\[${opt_prew}active,tightpage\]\{preview\}%
-\\renewcommand\\PreviewBbAdjust\{-60pt -60pt 60pt 60pt\}\}%
-EXTRA
-
-### Extract source $outsrc
-if ($outsrc) {
-my $src_name = "$name-$prefix-";
-my $srcNo = 1;
-
-### Source file whitout preamble for standart environment
-if ($srcenv) {
-if ($STDenv) { # extract standard environments in individual files
- say "Creating $envNo files with source code for all environments";
- while ($bodydoc =~ m/$BP\s*(?<env_src>.+?)\s*$EP/gms) {
- open my $OUTsrc, '>', "$imageDir/$src_name$srcNo$ext";
- print $OUTsrc $+{env_src};
- close $OUTsrc;
- } # close while
- continue { $srcNo++; } # increment counter
-} # close STDenv
-if ($PSTexa) { # extract PSTexample environments in individual files
- say "Creating $exaNo files with source code for all PSTexample environments";
- while ($bodydoc =~ m/$BE\[.+?(?<pst_exa_name>$imageDir\/.+?-\d+)\}\]\s*(?<exa_src>.+?)\s*$EE/gms) {
- open my $OUTexa, '>', "$+{'pst_exa_name'}$ext";
- print $OUTexa $+{'exa_src'};
- close $OUTexa;
- }
- } # close PSTexa
-} # close srcenv
-
-### Subfile whit preamble
-if ($subenv) {
-if ($STDenv) { # extract standard environments (with preamble) in individual files
-say "Creating a $envNo files whit source code and preamble for all environments";
-while ($bodydoc =~ m/(?<=$BP)(?<env_src>.+?)(?=$EP)/gms) { # search $bodydoc
-open my $OUTsub, '>', "$imageDir/$src_name$srcNo$ext";
-print $OUTsub <<"EOC";
-$sub_prea$+{'env_src'}\\end\{document\}
-EOC
-close $OUTsub;
- } # close while
-continue { $srcNo++; }
-} # close STDenv
-if ($PSTexa) { # extract PSTexample environments (with preamble) in individual files
-say "Creating a $exaNo files whit source code and preamble for all PSTexample environments";
-while ($bodydoc =~ m/$BE\[.+?(?<pst_exa_name>$imageDir\/.+?-\d+)\}\]\s*(?<exa_src>.+?)\s*$EE/gms) {
- open my $OUTsub, '>', "$+{'pst_exa_name'}$ext";
- print $OUTsub "$sub_prea\n$+{'exa_src'}\n\\end\{document\}";
- close $OUTsub;
- } # close while
- } # close $PSTexa
- } # close subenv
-} # close $outsrc
-
-### Create a one file with "all" PSTexample environments extracted
-if ($PSTexa) {
-say "Creating the temporary file $name-$prefix-exa-$tmp$ext whit $exaNo PSTexample environments extracted";
-@exa_extract = undef;
- while ( $bodydoc =~ m/$BE\[.+? $imageDir\/.+?-\d+\}\](?<exa_src>.+?)$EE/gmsx ) { # search $bodydoc
- push @exa_extract, $+{exa_src}."\n\\newpage\n";
- open my $OUTfig, '>', "$name-$prefix-exa-$tmp$ext";
- print $OUTfig "$atbegindoc"."$preamble"."$opt_page"."@exa_extract\n"."\\end\{document\}";
- close $OUTfig;
- }# close while
-if (!$run) { # Move and rename tmp-exa-rand file to /image dir
-say "Moving the file $name-$prefix-exa-$tmp$ext to /$imageDir/$name-$prefix-exa-all$ext";
-move("$workdir/$name-$prefix-exa-$tmp$ext", "$imageDir/$name-$prefix-exa-all$ext");
- }
-}# close $PSTexa
-
-### Create a one file whit "all" standard environments extracted
-if ($STDenv) {
-open my $OUTfig, '>', "$name-$prefix-$tmp$ext";
- if ($noprew) { # $noprew option
- say "Creating the temporary file $name-$prefix-$tmp$ext whit $envNo environments extracted";
- my @env_extract;
- while ( $bodydoc =~ m/(?<=$BP)(?<env_src>.+?)(?=$EP)/gms ) { # search $bodydoc
- push @env_extract, $+{env_src}."\n\\newpage\n";
- } # close while
- print $OUTfig "$atbegindoc"."$preamble"."$opt_page"."@env_extract\n"."\\end{document}";
- } # close $noprew
- else { # default
- say "Creating the temporary file $name-$prefix-$tmp$ext whit $envNo environment extracted using preview package";
- print $OUTfig $atbegindoc.$preview.$preamble."\n".$bodydoc."\n\\end{document}";
- }
-close $OUTfig;
-
-### Move tmp-rand file to /image dir
-if (!$run) {
-say "Moving the file $name-$prefix-$tmp$ext to /$imageDir/$name-$prefix-all$ext";
- move("$workdir/$name-$prefix-$tmp$ext", "$imageDir/$name-$prefix-all$ext");
- }
-} # close $STDenv
-
-### Define --shell-escape for TeXLive and MikTeX
-my $write18 = '-shell-escape'; # TeXLive
- $write18 = '-enable-write18' if defined($ENV{"TEXSYSTEM"}) and
- $ENV{"TEXSYSTEM"} =~ /miktex/i;
-
-### Define --interaction=mode for compilers
-my $opt_compiler = $verbose ? "$write18 -interaction=nonstopmode -recorder"
- : "$write18 -interaction=batchmode -recorder"
- ;
-
-### Define $silence
-my $silence = $verbose ? ''
- : ">$null"
- ;
-
-### Append -q to gs and poppler for system command line
-my $quiet = $verbose ? ''
- : '-q'
- ;
-
-### Compilers
-my $compiler = $xetex ? "xelatex $opt_compiler"
- : $luatex ? "lualatex $opt_compiler"
- : $latex ? "latex $opt_compiler"
- : $dvips ? "latex $opt_compiler"
- : $dvipdf ? "latex $opt_compiler"
- : $arara ? 'arara'
- : "pdflatex $opt_compiler"
- ;
-
-### Message in command line for compilers
-my $msg_compiler = $xetex ? 'xelatex'
- : $luatex ? 'lualatex'
- : $latex ? 'latex>dvips>ps2pdf'
- : $dvips ? 'latex>dvips>ps2pdf'
- : $dvipdf ? 'latex>dvipdfmx'
- : $arara ? 'arara'
- : 'pdflatex'
- ;
-
-### Options for ghostscript in command line
-my %opt_gs_dev = (
- pdf => "$gscmd $quiet -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress",
- gray => "$gscmd $quiet -dNOSAFER -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray",
- png => "$gscmd $quiet -dNOSAFER -sDEVICE=pngalpha -r$DPI",
- bmp => "$gscmd $quiet -dNOSAFER -sDEVICE=bmp32b -r$DPI",
- jpg => "$gscmd $quiet -dNOSAFER -sDEVICE=jpeg -r$DPI -dJPEGQ=100 -dGraphicsAlphaBits=4 -dTextAlphaBits=4",
- tif => "$gscmd $quiet -dNOSAFER -sDEVICE=tiff32nc -r$DPI",
- );
-
-### Options for poppler-utils in command line
-my %opt_poppler = (
- eps => "pdftops $quiet -eps",
- ppm => "pdftoppm $quiet -r $DPI",
- svg => "pdftocairo $quiet -svg",
- );
-
-### Option for pdfcrop in command line
-my $opt_crop = $xetex ? "--xetex --margins $margins"
- : $luatex ? "--luatex --margins $margins"
- : $latex ? "--margins $margins"
- : "--pdftex --margins $margins"
- ;
-
-### Compiler generate file whit all environment extracted
-if ($run) {
-opendir(my $DIR, $workdir);
-while (readdir $DIR) {
-### Compiler generate file
-if (/(?<name>$name-$prefix(-exa)?)(?<type>-$tmp$ext)/) {
- system("$compiler $+{name}$+{type} $silence");
- say "Compiling the file $+{name}$+{type} using $msg_compiler";
-
-### Compiling file using latex>dvips>ps2pdf
-if ($dvips or $latex) {
- system("dvips -q -Ppdf -o $+{name}-$tmp.ps $+{name}-$tmp.dvi");
- system("ps2pdf -dPDFSETTINGS=/prepress -dAutoRotatePages=/None $+{name}-$tmp.ps $+{name}-$tmp.pdf");
-} # close latex
-
-### Compiling file using latex>dvipdfmx
-if ($dvipdf) { system("dvipdfmx -q $+{name}-$tmp.dvi"); }
-
-### If option gray
-if ($gray) {
- say "Moving the file $+{name}-$tmp.pdf to $tempDir/$+{name}-all.pdf (gray scale)";
- system("$opt_gs_dev{gray} -o $tempDir/$+{name}-all.pdf $workdir/$+{name}-$tmp.pdf");
- move("$workdir/$+{name}-$tmp.pdf","$tempDir/$+{name}-$tmp.pdf");
- }
-else {
- say "Moving the file $+{name}-$tmp.pdf to $tempDir/$+{name}-all.pdf";
- move("$workdir/$+{name}-$tmp.pdf", "$tempDir/$+{name}-all.pdf");
-}
-
-### Crop generate file
-if ($crop) {
- say "The file $+{name}-all.pdf need a crop, using pdfcrop $opt_crop";
- system("pdfcrop $opt_crop $tempDir/$+{name}-all.pdf $tempDir/$+{name}-all.pdf $silence");
-}
-
-### Move tmp-rand.tex file whit all source code for environments to /images dir
-move("$workdir/$+{name}$+{type}", "$imageDir/$+{name}-all$ext");
- } # close if m/.../
- } # close while
-closedir $DIR;
-} # close run
-
-### Append image format options
-$opts_cmd{pdf} = 'pdf' if $pdf; # ghostscript
-$opts_cmd{eps} = 1 if exists $opts_file{options}{eps}; # pdftops
-$opts_cmd{ppm} = 1 if exists $opts_file{options}{ppm}; # pdftoppm
-$opts_cmd{svg} = 1 if exists $opts_file{options}{svg}; # pdftocairo
-$opts_cmd{png} = 1 if exists $opts_file{options}{png}; # ghostscript
-$opts_cmd{jpg} = 1 if exists $opts_file{options}{jpg}; # ghostscript
-$opts_cmd{bmp} = 1 if exists $opts_file{options}{bmp}; # ghostscript
-$opts_cmd{tif} = 1 if exists $opts_file{options}{tif}; # ghostscript
-
-### Suported format
-my %format = (%opts_cmd);
-my $format = join " ",grep { defined $format{$_} } keys %format;
-
-### Create image formats in separate files
-if ($run) {
-opendir(my $DIR, $tempDir);
-while (readdir $DIR) {
-### PDF/PNG/JPG/BMP/TIFF format suported by ghostscript
-if (/(?<name>$name-$prefix(-exa)?)(?<type>-all\.pdf)/) {
-for my $var (qw(pdf png jpg bmp tif)) {
- if (defined $opts_cmd{$var}) {
- my $ghostcmd = "$opt_gs_dev{$var} -o $workdir/$imageDir/$+{name}-%1d.$var $tempDir/$+{name}$+{type}";
- system("$ghostcmd");
- print "Create a $var image format: runing command $opt_gs_dev{$var} in $+{name}$+{type}\r\n";
- } # close defined for ghostscript
- }# close for
-} # close if m/.../
-
-### EPS/PPM/SVG format suported by poppler-utils
-if (/(?<name>$name-$prefix)(?<type>-all\.pdf)/) {
-for my $var (qw(eps ppm svg)) {
- if (defined $opts_cmd{$var}) {
- for (my $epsNo = 1; $epsNo <= $envNo; $epsNo++) {
-my $poppler = "$opt_poppler{$var} -f $epsNo -l $epsNo $tempDir/$+{name}$+{type} $workdir/$imageDir/$+{name}-$epsNo.$var";
-system("$poppler");
- } # close for C style
-print "Create a $var image format: runing command $opt_poppler{$var} in $+{name}$+{type}\r\n";
- } # close defined
- } # close for my $var
-} # close if m/.../
-
-### EPS/PPM/SVG for pst-exa package
-if (/(?<name>$name-$prefix-exa)(?<type>-all\.pdf)/) {
-for my $var (qw(eps ppm svg)) {
- if (defined $opts_cmd{$var}) {
- for (my $epsNo = 1; $epsNo <= $exaNo; $epsNo++) {
-my $poppler = "$opt_poppler{$var} -f $epsNo -l $epsNo $tempDir/$+{name}$+{type} $workdir/$imageDir/$+{name}-$epsNo.$var";
-system("$poppler");
- } # close for C style
-print "Create a $var image format: runing command $opt_poppler{$var} in $+{name}$+{type}\r\n";
- } # close defined
- } # close for my $var
- } # close if m/.../
-} # close while
-closedir $DIR; #close dir
-
-### Renaming PPM image files
-if (defined $opts_cmd{ppm}) {
- opendir(my $DIR, $imageDir);
- while (readdir $DIR) {
- if (/(?<name>$name-fig(-exa)?-\d+\.ppm)(?<sep>-\d+)(?<ppm>\.ppm)/) {
- move("$imageDir/$+{name}$+{sep}$+{ppm}", "$imageDir/$+{name}");
- } # close if m/.../
- } # close while
- closedir $DIR;
- } # close renaming PPM
-} # close run
-
-### Create a output file
-if ($outfile) {
-say "Creating the file $output$ext, convert extracted environments to \\includegraphics";
-
-### Convert extracted environments to \includegraphics
-my $grap = "\\includegraphics[scale=1]{$name-$prefix-";
-my $close = '}';
-my $imgNo = 1;
-$bodydoc =~ s/$BP.+?$EP/$grap@{[$imgNo++]}$close/msg; # changes
-
-### Constant
-my $USEPACK = quotemeta('\usepackage');
-my $GRAPHICPATH = quotemeta('\graphicspath{');
-
-### Precompiled regex
-my $CORCHETES = qr/\[ [^]]*? \]/x;
-my $PALABRAS = qr/\b (?: graphicx )/x;
-my $FAMILIA = qr/\{ \s* $PALABRAS (?: \s* [,] \s* $PALABRAS )* \s* \}(\%*)?/x;
-
-### Regex to capture \graphicspath
-my $graphix = qr/(\\ usepackage \s*\[\s* .+? \s*\] \s*\{\s* graphicx \s*\} )/ix;
-
-### Capture graphix package for future use
-my (@graphix) = $preamble =~ m/$graphix/x;
-
-### Remove graphix package
-$preamble =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- ^ $USEPACK (?: $CORCHETES )? $FAMILIA \s*//msxg;
-
-### Comment \graphicspath for order and future use
-$preamble =~s /\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- ^ ($GRAPHICPATH) /%$1/msxg;
-
-### Regex to capture [options] for pst-exa package
-my $pstexa = qr/(?:\\ usepackage) \[\s*(.+?)\s*\] (?:\{\s*(pst-exa)\s*\} ) /x;
-
-### Capture [option] for pst-exa package
-my (@pst_exa) = $preamble =~ m/$pstexa/xg;
-
-### Search [option] in pst-exa package
-my %pst_exa = map { $_ => 1 } @pst_exa;
-
-### Clean file (pst/tags)
-if ($clean{pst}) {
-$PALABRAS = qr/\b (?: pst-\w+ | pstricks (?: -add )? | psfrag |psgo |vaucanson-g| auto-pst-pdf )/x;
-$FAMILIA = qr/\{ \s* $PALABRAS (?: \s* [,] \s* $PALABRAS )* \s* \}(\%*)?/x;
-
-### Remove pst packages lines
-$preamble =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- ^ $USEPACK (?: $CORCHETES )? $FAMILIA \s*//msxg;
-
-### Delete package words
-$preamble =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
-(?: ^ $USEPACK \{ | \G) [^}]*? \K (,?) \s* $PALABRAS (\s*) (,?) /$1 and $3 ? ',' : $1 ? $2 : ''/gemsx;
-
-### Delete \psset
-$preamble =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\psset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))+//gmsx;
-
-### Delete \SpecialCoor
-$preamble =~ s/\%<\*ltximgverw> .+?\%<\/ltximgverw>(*SKIP)(*F)|
- \\SpecialCoor(?:[\t ]*(?:\r?\n|\r))+//gmsx;
-} # close clean{pst}
-
-### Delete empty package line \usepackage{}
-$preamble =~ s/^\\usepackage\{\}(?:[\t ]*(?:\r?\n|\r))+/\n/gmsx;
-
-### Append graphicx to end of preamble
-if (!@graphix == 0) {
-$preamble .= <<"EXTRA";
-@graphix
-EXTRA
- } else {
-$preamble .= <<"EXTRA";
-\\usepackage{graphicx}
-EXTRA
-}
-
-### Regex to capture \graphicspath
-my $graphicspath= qr/\\ graphicspath \{ ((?: $llaves )+) \}/ix;
-
-### If preamble contain \graphicspath
-if ($preamble =~ m/($graphicspath)/m) {
- while ($preamble =~ /$graphicspath /pgmx) {
- my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
- my $encontrado = ${^MATCH};
- if ($encontrado =~ /$graphicspath/) {
- my $argumento = $1;
- if ($argumento !~ /\{$imageDir\\\}/) {
- $argumento .= "\{$imageDir/\}";
- my $cambio = "\\graphicspath{$argumento}";
- substr $preamble, $pos_inicial, $pos_final-$pos_inicial, $cambio;
- pos($preamble) = $pos_inicial + length $cambio;
- }
- }
- } #close while
-
-### Regex to capture
-my ($GraphicsPath) = $preamble =~ m/($graphicspath)/msx;
-
-### Append \graphicspath to end of preamble
-$preamble .= <<"EXTRA";
-$GraphicsPath
-\\usepackage{grfext}
-\\PrependGraphicsExtensions*{.pdf}
-EXTRA
- } # close if ($preamble)
-else {
-### If preamble not contain graphicspath, append to premble
-my $GraphicsPath = "\\graphicspath\{\{$imageDir/\}\}";
-
-### Append graphicspath to end of preamble
-$preamble .= <<"EXTRA";
-$GraphicsPath
-\\usepackage{grfext}
-\\PrependGraphicsExtensions*{.pdf}
-EXTRA
-} # close graphicspath
-
-### Suport for \usepackage[swpl]{pst-exa}
-if (exists($pst_exa{swpl})) {
-$preamble .= <<'EXTRA';
-\usepackage[swpl,pdf]{pst-exa}
-EXTRA
-}
-
-### Suport for \usepackage[tcb]{pst-exa}
-if (exists($pst_exa{tcb})) {
-$preamble .= <<'EXTRA';
-\usepackage[tcb,pdf]{pst-exa}
-EXTRA
-### Regex
-$bodydoc =~ s/(graphic=\{)\[(scale=\d*)\]($imageDir\/$name-$prefix-exa-\d*)\}/$1$2\}\{$3\}/gsmx;
-} # close if
-
-### Options for out_file (add $end to outfile)
-my $out_file = $clean{doc} ? "$atbegindoc$preamble$bodydoc\n\\end\{document\}"
- : "$atbegindoc$preamble$bodydoc\n$enddoc"
- ;
-
-### Clean \psset content in output file
-if ($clean{pst}) {
-$out_file =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- \%<\*ltximgverw> .+? \%<\/ltximgverw>(*SKIP)(*F)|
- \\psset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
-} # close clean
-
-### Clean \tikzset content in output file
-if ($clean{tkz}) {
-$out_file =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
- \%<\*ltximgverw> .+? \%<\/ltximgverw>(*SKIP)(*F)|
- \\tikzset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
-} # close clean
-
-### Revert changues in all words in outfile
-$out_file =~ s/\\begin\{nopreview\}\s*(.+?)\s*\\end\{nopreview\}/$1/gmsx;
-$out_file =~ s/\%<\*ltximgverw>\s*(.+?)\s*\%<\/ltximgverw>/$1/gmsx;
-$out_file =~ s/\%<\*noltximg>\n(.+?)\n\%<\/noltximg>/$1/gmsx;
-$out_file =~ s/^\%<\*remove>\s*(.+?)\s*\%<\/remove>(?:[\t ]*(?:\r?\n|\r))+//gmsx;
-$out_file =~ s/($delt_env)(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
-$out_file =~ s/($find)/$replace{$1}/g;
-
-### Write output file
-open my $OUTfile, '>', "$output$ext";
- print $OUTfile "$out_file";
-close $OUTfile;
-
-### Process the output file
-if ($run) {
-### Set correct $compiler, if input use latex then output use pdflatex
-$compiler = "pdflatex $opt_compiler" if $latex;
-$msg_compiler = "pdflatex" if $latex;
-
-### Compiling output file using pdflatex or arara
-say "Compiling file $output$ext using $msg_compiler";
-system("$compiler $output$ext $silence");
-
-### Compiling output file using latex>dvips>ps2pdf
-if ($dvips) {
- system("dvips -q -Ppdf $output.dvi");
- system("ps2pdf -dPDFSETTINGS=/prepress -dAutoRotatePages=/None $output.ps $output.pdf");
-} # close dvips
-
-### Compiling output file using latex>dvipdfmx
-if ($dvipdf) { system("dvipdfmx -q $output.dvi"); }
- } # close run
-} # close outfile file
-
-### Remove temporary files
-if ($run) {
-say "Deleting (most) temporary files created during the process";
-my @protected = qw();
-push (@protected,"$output$ext","$output.pdf") if defined $output;
-
-my $flsline = "OUTPUT";
-my @flsfile;
-
-if ($PSTexa) { push @flsfile,"$name-$prefix-exa-$tmp.fls"; }
-if ($STDenv) { push @flsfile,"$name-$prefix-$tmp.fls"; }
-push (@flsfile,"$output.fls") if defined $output;
-
-my @tmpfiles;
-for my $filename(@flsfile){
- open my $RECtmp, '<', "$filename";
- push @tmpfiles, grep /^$flsline/,<$RECtmp>;
- close $RECtmp;
-}
-
-foreach (@tmpfiles) { s/^$flsline\s+|\s+$//g; }
-
-if ($latex or $dvips) { push @tmpfiles,"$name-$prefix-$tmp.ps"; }
-if (-e "$name-$prefix-$tmp.ps") { push @tmpfiles,"$name-$prefix-$tmp.ps"; }
-if ($PSTexa) { push @tmpfiles,"$name-$prefix-exa-$tmp.ps"; }
-if (-e "$output.ps") { push @tmpfiles,"$output.ps"; }
-push @tmpfiles,@flsfile,"$name-$prefix-$tmp$ext","$name-$prefix-$tmp.pdf";
-
-my @delfiles = array_minus(@tmpfiles, @protected);
-foreach my $tmpfile (@delfiles) { move("$tmpfile", "$tempDir"); }
-} # close clean tmp files
-
-### Compress images dir whit generated files
-if ($zip or $tar) {
-my $stamp = strftime "%F", localtime;
-my $archivetar = "$imageDir-$stamp";
-
-my @savetozt;
-find(\&zip_tar, $imageDir);
-sub zip_tar{
- my $filesto = $_;
- if (-f $filesto && $filesto =~ m/$name-$prefix-.+?$/) { # buscamos
- push @savetozt, $File::Find::name;
- }
-}
-# Write compressed zip file
-if ($zip) {
- say "Creating a file $workdir/$archivetar.zip";
- zip \@savetozt => "$archivetar.zip";
- }
-
-# Write compressed tar.gz file
-if ($tar) {
- say "Creating a file $workdir/$archivetar.tar.gz";
- my $imgdirtar = Archive::Tar->new();
- $imgdirtar->add_files( @savetozt );
- $imgdirtar->write( "$archivetar.tar.gz" , 9 );
- }
-} #close compress
-
-### End of script process
-if ($run) { say "Finish, image formats: $format are in $workdir/$imageDir/"; }
- else { say "Done"; }
-
-__END__
diff --git a/support/ltximg/script/ltximg.pl b/support/ltximg/script/ltximg.pl
new file mode 100644
index 0000000000..4cc7440abb
--- /dev/null
+++ b/support/ltximg/script/ltximg.pl
@@ -0,0 +1,2972 @@
+#!/usr/bin/env perl
+use v5.26;
+
+############################# LICENCE ##################################
+# This program is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, but #
+# WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
+# General Public License for more details. #
+########################################################################
+
+use Getopt::Long qw(:config bundling_values require_order no_ignore_case);
+use File::Spec::Functions qw(catfile devnull);
+use File::Basename;
+use Archive::Tar;
+use Data::Dumper;
+use FileHandle;
+use IO::Compress::Zip qw(:all);
+use File::Path qw(remove_tree);
+use File::Temp qw(tempdir);
+use POSIX qw(strftime);
+use File::Copy;
+use File::Find;
+use Env qw(PATH);
+use autodie;
+use Config;
+use Cwd;
+use if $^O eq 'MSWin32', 'Win32';
+use if $^O eq 'MSWin32', 'Win32::Console::ANSI'; # need for color :)
+use Term::ANSIColor;
+
+### Directory for work and temp files
+my $tempDir = tempdir( CLEANUP => 1);
+my $workdir = cwd;
+
+### Script identification
+my $scriptname = 'ltximg';
+my $program = 'LTXimg';
+my $nv = 'v1.8';
+my $date = '2020-08-18';
+my $copyright = <<"END_COPYRIGHT" ;
+[$date] (c) 2013-2020 by Pablo Gonzalez, pablgonz<at>yahoo.com
+END_COPYRIGHT
+
+my $title = "$program $nv $copyright";
+
+### Log vars
+my $LogFile = "$scriptname.log";
+my $LogWrite;
+my $LogTime = strftime("%y/%m/%d %H:%M:%S", localtime);
+
+### Default values
+my $skiptag = 'noltximg'; # internal tag for regex
+my $extrtag = 'ltximg'; # internal tag for regex
+my @extr_env_tmp; # save extract environments
+my @skip_env_tmp; # save skip environments
+my @verb_env_tmp; # save verbatim environments
+my @verw_env_tmp; # save verbatim write environments
+my @delt_env_tmp; # save delete environments in output file
+my @clean; # clean document options
+my $outfile = 0; # write output file
+my $outsrc = 0; # write standalone files
+my $PSTexa = 0; # run extract PSTexample environments
+my $STDenv = 0; # run extract standart environments
+my $verbose = 0; # verbose info
+my $gscmd; # ghostscript executable name
+my $write18; # storing write18 for compiler in TeXLive and MikTeX
+my $log = 0; # log file
+my @currentopt; # storing current options for log file
+
+### Hash to store options for Getopt::Long and log file
+my %opts_cmd;
+$opts_cmd{string}{prefix} = 'fig';
+$opts_cmd{string}{dpi} = '150';
+$opts_cmd{string}{runs} = '1';
+$opts_cmd{string}{margin} = '0';
+$opts_cmd{string}{imgdir} = 'images';
+$opts_cmd{string}{myverb} = 'myverb';
+$opts_cmd{clean} = 'doc';
+
+### Error in command line
+sub errorUsage {
+ my $msg = shift;
+ die color('red').'* Error!!: '.color('reset').$msg.
+ " (run $scriptname --help for more information)\n";
+ return;
+}
+
+### Extended error messages
+sub exterr {
+ chomp(my $msg_errno = $!);
+ chomp(my $msg_extended_os_error = $^E);
+ if ($msg_errno eq $msg_extended_os_error) {
+ $msg_errno;
+ }
+ else {
+ "$msg_errno/$msg_extended_os_error";
+ }
+}
+
+### Funtion uniq
+sub uniq {
+ my %seen;
+ return grep !$seen{$_}++, @_;
+}
+
+### Funtion array_minus
+sub array_minus(\@\@) {
+ my %e = map{ $_ => undef } @{$_[1]};
+ return grep !exists $e{$_}, @{$_[0]};
+}
+
+### Funtion to create hash begin -> BEGIN, end -> END
+sub crearhash {
+ my %cambios;
+ for my $aentra(@_){
+ for my $initend (qw(begin end)) {
+ $cambios{"\\$initend\{$aentra"} = "\\\U$initend\E\{$aentra";
+ }
+ }
+ return %cambios;
+}
+
+### Print colored info in screen
+sub Infocolor {
+ my $type = shift;
+ my $info = shift;
+ if ($type eq 'Running') {
+ print color('cyan'), '* ', color('reset'), color('green'),
+ "$type: ", color('reset'), color('cyan'), "$info\r\n", color('reset');
+ }
+ if ($type eq 'Warning') {
+ print color('bold red'), "* $type: ", color('reset'),
+ color('yellow'), "$info\r\n", color('reset');
+ }
+ if ($type eq 'Finish') {
+ print color('cyan'), '* ', color('reset'), color('magenta'),
+ "$type!: ", color('reset'), color('green'), "$info\r\n",color('reset');
+ }
+ return;
+}
+
+### Write Log line and print msg (common)
+sub Infoline {
+ my $msg = shift;
+ my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ if ($log) { $LogWrite->print(sprintf "[%s] * %s\n", $now, $msg); }
+ say $msg;
+ return;
+}
+
+### Write Log line (no print msg and time stamp)
+sub Logline {
+ my $msg = shift;
+ if ($log) { $LogWrite->print("$msg\n"); }
+ return;
+}
+
+### Write Log line (time stamp)
+sub Log {
+ my $msg = shift;
+ my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ if ($log) { $LogWrite->print(sprintf "[%s] * %s\n", $now, $msg); }
+ return;
+}
+
+### Write array env in Log
+sub Logarray {
+ my ($env_ref) = @_;
+ my @env_tmp = @{ $env_ref }; # dereferencing and copying each array
+ if ($log) {
+ if (@env_tmp) {
+ my $tmp = join "\n", map { qq/* $_/ } @env_tmp;
+ print {$LogWrite} "$tmp\n";
+ }
+ else {
+ print {$LogWrite} "Not found\n";
+ }
+ }
+ return;
+}
+
+### Extended print info for execute system commands using $ command
+sub Logrun {
+ my $msg = shift;
+ my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ if ($log) { $LogWrite->print(sprintf "[%s] \$ %s\n", $now, $msg); }
+ return;
+}
+
+### Capture and execute system commands
+sub RUNOSCMD {
+ my $cmdname = shift;
+ my $argcmd = shift;
+ my $showmsg = shift;
+ my $captured = "$cmdname $argcmd";
+ Logrun($captured);
+ if ($showmsg eq 'show') {
+ if ($verbose) {
+ Infocolor('Running', $captured);
+ }
+ else{ Infocolor('Running', $cmdname); }
+ }
+ if ($showmsg eq 'only' and $verbose) {
+ Infocolor('Running', $captured);
+ }
+ # Run system system command
+ $captured = qx{$captured};
+ if ($log) { $LogWrite->print($captured); }
+ if ($? == -1) {
+ my $errorlog = "* Error!!: ".$cmdname." failed to execute (%s)!\n";
+ my $errorprint = "* Error!!: ".color('reset').$cmdname." failed to execute (%s)!\n";
+ if ($log) { $LogWrite->print(sprintf $errorlog, exterr); }
+ print STDERR color('red');
+ die sprintf $errorprint, exterr;
+ } elsif ($? & 127) {
+ my $errorlog = "* Error!!: ".$cmdname." died with signal %d!\n";
+ my $errorprint = "* Error!!: ".color('reset').$cmdname." died with signal %d!\n";
+ if ($log) { $LogWrite->print(sprintf $errorlog, ($? & 127)); }
+ print STDERR color('red');
+ die sprintf $errorprint, ($? & 127);
+ } elsif ($? != 0 ) {
+ my $errorlog = "* Error!!: ".$cmdname." exited with error code %d!\n";
+ my $errorprint = "* Error!!: ".color('reset').$cmdname." exited with error code %d!\n";
+ if ($log) { $LogWrite->print(sprintf $errorlog, $? >> 8); }
+ print STDERR color('red');
+ die sprintf $errorprint, $? >> 8;
+ }
+ if ($verbose) { print $captured; }
+ return;
+}
+
+### Help for command line
+sub usage {
+find_ghostscript();
+
+my $usage = <<"END_OF_USAGE";
+${title}Description
+ LTXimg is a "perl" script that automates the process of extracting and
+ converting "environments" provided by tikz, pstricks and other packages
+ from LaTeX file to image formats and "standalone" files using ghostscript
+ and poppler-utils. Generates a one file with only extracted environments
+ and other with all extracted environments converted to \\includegraphics.
+
+Syntax
+\$ ltximg [<options>] [--] <filename>.<tex|ltx>
+
+ If used without [<options>] the extracted environments are converted
+ to pdf image format and saved in "./images" directory using pdflatex
+ and preview package for process <filename>.
+
+Default environments extract
+ preview pspicture tikzpicture pgfpicture psgraph postscript PSTexample
+
+Options
+ Options that accept a value require either a blank space or = between
+ the option and the value. Multiple short options can be bundling and
+ if the last option takes a comma separated list you need -- at the end.
+ Relative or absolute paths for directories and files is not supported.
+
+ [default]
+-h, --help Display command line help and exit [off]
+-v, --version Display current version ($nv) and exit [off]
+-V, --verbose Verbose printing information [off]
+-l, --log Write .log file with debug information [off]
+-t, --tif Create .tif files using ghostscript [$gscmd]
+-b, --bmp Create .bmp files using ghostscript [$gscmd]
+-j, --jpg Create .jpg files using ghostscript [$gscmd]
+-p, --png Create .png files using ghostscript [$gscmd]
+-e, --eps Create .eps files using poppler-utils [pdftops]
+-s, --svg Create .svg files using poppler-utils [pdftocairo]
+-P, --ppm Create .ppm files using poppler-utils [pdftoppm]
+-g, --gray Gray scale for images using ghostscript [off]
+-f, --force Capture "\\psset" and "\\tikzset" to extract [off]
+-n, --noprew Create images files without "preview" package [off]
+-r <integer>, --runs <integer>
+ Set the number of times the compiler will run
+ on the input file for environment extraction [1]
+-d <integer>, --dpi <integer>
+ Dots per inch resolution for images [150]
+-m <integer>, --margins <integer>
+ Set margins in bp for pdfcrop [0]
+-o <filename>, --output <filename>
+ Create output file [off]
+--imgdir <dirname> Set name of directory to save images/files [images]
+--prefix <string> Set prefix append to each generated files [fig]
+--myverb <macroname> Add "\\macroname" to verbatim inline search [myverb]
+--clean (doc|pst|tkz|all|off)
+ Removes specific block text in output file [doc]
+--zip Compress files generated in .zip [off]
+--tar Compress files generated in .tar.gz [off]
+--srcenv Create files with only code of environments [off]
+--subenv Create standalone files for environments [off]
+--shell Enable \\write18\{SHELL COMMAND\} [off]
+--latex Using latex>dvips>ps2pdf for compiler input
+ and pdflatex for compiler output [off]
+--dvips Using latex>dvips>ps2pdf for compiler input
+ and latex>dvips>ps2pdf for compiler output [off]
+--dvilua Using dvilualatex>dvips>ps2pdf for compiler
+ input and lualatex for compiler output [off]
+--dvipdf Using latex>dvipdfmx for compiler input and
+ latex>dvipdfmx for compiler output [off]
+--xetex Using xelatex for compiler input and output [off]
+--luatex Using lualatex for compiler input and output [off]
+--arara Use arara for compiler input and output [off]
+--latexmk Using latexmk for compiler output file [off]
+--norun Run script, but no create images files [off]
+--nopdf Don't create a ".pdf" image files [off]
+--nocrop Don't run pdfcrop [off]
+--extrenv <env1,...> Add new environments to extract [empty]
+--skipenv <env1,...> Skip some default environments to extract [empty]
+--verbenv <env1,...> Add new verbatim environments [empty]
+--writenv <env1,...> Add new verbatim write environments [empty]
+--deltenv <env1,...> Delete environments in output file [empty]
+
+Example
+\$ ltximg --latex -e -p --subenv --imgdir mypics -o test-out test-in.ltx
+
+ Create a "./mypics" directory (if it doesn't exist) with all extracted
+ environments converted to images (.pdf, .eps, .png) and standalone files
+ (.ltx), a file "test-in-fig-all.ltx" with all extracted environments and
+ the file "test-out.ltx" with all environments converted to \\includegraphics
+ using latex>dvips>ps2pdf and preview package for <input file> and pdflatex
+ for <output file>.
+
+Documentation
+For full documentation use:
+\$ texdoc ltximg
+
+Issues and reports
+Repository : https://github.com/pablgonz/ltximg
+Bug tracker : https://github.com/pablgonz/ltximg/issues
+END_OF_USAGE
+print $usage;
+exit 0;
+}
+
+### Getopt configuration
+my $result=GetOptions (
+# image options
+ 'b|bmp' => \$opts_cmd{image}{bmp}, # gs
+ 't|tif' => \$opts_cmd{image}{tif}, # gs
+ 'j|jpg' => \$opts_cmd{image}{jpg}, # gs
+ 'p|png' => \$opts_cmd{image}{png}, # gs
+ 's|svg' => \$opts_cmd{image}{svg}, # pdftocairo
+ 'e|eps' => \$opts_cmd{image}{eps}, # pdftops
+ 'P|ppm' => \$opts_cmd{image}{ppm}, # pdftoppm
+# compilers
+ 'arara' => \$opts_cmd{compiler}{arara}, # arara compiler
+ 'xetex' => \$opts_cmd{compiler}{xetex}, # xelatex compiler
+ 'latex' => \$opts_cmd{compiler}{latex}, # latex compiler
+ 'latexmk' => \$opts_cmd{compiler}{latexmk}, # latex compiler
+ 'dvips' => \$opts_cmd{compiler}{dvips}, # dvips compiler
+ 'dvipdf' => \$opts_cmd{compiler}{dvipdf}, # dvipdfmx compiler
+ 'dvilua' => \$opts_cmd{compiler}{dvilua}, # dvilualatex compiler
+ 'luatex' => \$opts_cmd{compiler}{luatex}, # lualatex compiler
+# bolean
+ 'zip' => \$opts_cmd{boolean}{zip}, # zip images dir
+ 'tar' => \$opts_cmd{boolean}{tar}, # tar images dir
+ 'shell' => \$opts_cmd{boolean}{shell}, # set write18 for compiler
+ 'nopdf' => \$opts_cmd{boolean}{nopdf}, # no pdf image format
+ 'norun' => \$opts_cmd{boolean}{norun}, # no run compiler
+ 'nocrop' => \$opts_cmd{boolean}{nocrop}, # no run pdfcrop
+ 'subenv' => \$opts_cmd{boolean}{subenv}, # subfile environments (bolean)
+ 'srcenv' => \$opts_cmd{boolean}{srcenv}, # source files (bolean)
+ 'g|gray' => \$opts_cmd{boolean}{gray}, # gray (boolean)
+ 'f|force' => \$opts_cmd{boolean}{force}, # force (boolean)
+ 'n|noprew' => \$opts_cmd{boolean}{noprew}, # no preview (boolean)
+# string
+ 'd|dpi=i' => \$opts_cmd{string}{dpi}, # positive integer < 2500
+ 'r|runs=i' => \$opts_cmd{string}{runs}, # positive integer 1,2,3
+ 'm|margins=i' => \$opts_cmd{string}{margins}, # integer
+ 'extrenv=s{1,9}' => \@extr_env_tmp, # extract environments
+ 'skipenv=s{1,9}' => \@skip_env_tmp, # skip environments
+ 'verbenv=s{1,9}' => \@verb_env_tmp, # verbatim environments
+ 'writenv=s{1,9}' => \@verw_env_tmp, # verbatim write environments
+ 'deltenv=s{1,9}' => \@delt_env_tmp, # delete environments
+ 'o|output=s{1}' => \$opts_cmd{string}{output}, # output file name (string)
+ 'imgdir=s{1}' => \$opts_cmd{string}{imgdir}, # images dir name
+ 'myverb=s{1}' => \$opts_cmd{string}{myverb}, # \myverb inline (string)
+ 'prefix=s{1}' => \$opts_cmd{string}{prefix}, # prefix
+ 'clean=s{1}' => \$opts_cmd{clean}, # clean output file
+# internal
+ 'h|help' => \$opts_cmd{internal}{help}, # help
+ 'v|version' => \$opts_cmd{internal}{version}, # version
+ 'l|log' => \$log, # write log file
+ 'V|verbose' => \$verbose, # verbose mode
+ ) or do { $log = 0 ; die usage(0); };
+
+### Open log file
+if ($log) {
+ if (!defined $ARGV[0]) { errorUsage('Input filename missing'); }
+ my $tempname = $ARGV[0];
+ $tempname =~ s/\.(tex|ltx)$//;
+ if ($LogFile eq "$tempname.log") { $LogFile = "$scriptname-log.log"; }
+ $LogWrite = FileHandle->new("> $LogFile");
+}
+
+### Init ltximg.log file
+Log("The script $scriptname $nv was started in $workdir");
+Log("Creating the temporary directory $tempDir");
+
+### Make ENV safer (perldoc perlsec)
+delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
+
+### The next code it's part of pdfcrop (adapted from TexLive 2014)
+# Windows detection
+my $Win = 0;
+if ($^O =~ /mswin32/i) { $Win = 1; }
+
+my $archname = $Config{'archname'};
+$archname = 'unknown' unless defined $Config{'archname'};
+
+# Get ghostscript command name
+sub find_ghostscript {
+ if ($log) {
+ Log('General information about the Perl instalation and operating system');
+ print {$LogWrite} "* Perl executable: $^X\n";
+ if ($] < 5.006) {
+ print {$LogWrite} "* Perl version: $]\n";
+ }
+ else {
+ printf {$LogWrite} "* Perl version: v%vd\n", $^V;
+ }
+ if (defined &ActivePerl::BUILD) {
+ printf {$LogWrite} "* Perl product: ActivePerl, build %s\n", ActivePerl::BUILD();
+ }
+ printf {$LogWrite} "* Pointer size: $Config{'ptrsize'}\n";
+ printf {$LogWrite} "* Pipe support: %s\n",
+ (defined $Config{'d_pipe'} ? 'yes' : 'no');
+ printf {$LogWrite} "* Fork support: %s\n",
+ (defined $Config{'d_fork'} ? 'yes' : 'no');
+ }
+ my $system = 'unix';
+ $system = 'win' if $^O =~ /mswin32/i;
+ $system = 'msys' if $^O =~ /msys/i;
+ $system = 'cygwin' if $^O =~ /cygwin/i;
+ $system = 'miktex' if defined $ENV{'TEXSYSTEM'} and
+ $ENV{'TEXSYSTEM'} =~ /miktex/i;
+ if ($log) {
+ print {$LogWrite} "* OS name: $^O\n";
+ print {$LogWrite} "* Arch name: $archname\n";
+ if ($^O eq 'MSWin32') {
+ my $tmp = Win32::GetOSName();
+ print {$LogWrite} "* System: $tmp\n";
+ }
+ else { print {$LogWrite} "* System: $system\n"; }
+ }
+ Log('Trying to locate the executable for Ghostscript');
+ my %candidates = (
+ 'unix' => [qw|gs|],
+ 'win' => [qw|gswin32c|],
+ 'msys' => [qw|gswin64c gswin32c|],
+ 'cygwin' => [qw|gs|],
+ 'miktex' => [qw|mgs gswin32c|],
+ );
+ if ($system eq 'win' or $system eq 'miktex') {
+ if ($archname =~ /mswin32-x64/i) {
+ my @a = ();
+ foreach my $name (@{$candidates{$system}}) {
+ push @a, 'gswin64c' if $name eq 'gswin32c';
+ push @a, $name;
+ }
+ $candidates{$system} = \@a;
+ }
+ }
+ my %exe = (
+ 'unix' => q{},
+ 'win' => '.exe',
+ 'msys' => '.exe',
+ 'cygwin' => '.exe',
+ 'miktex' => '.exe',
+ );
+ my $candidates_ref = $candidates{$system};
+ my $exe = $Config{'_exe'};
+ $exe = $exe{$system} unless defined $exe;
+ my @path = File::Spec->path();
+ my $found = 0;
+ foreach my $candidate (@$candidates_ref) {
+ foreach my $dir (@path) {
+ my $file = File::Spec->catfile($dir, "$candidate$exe");
+ if (-x $file) {
+ $gscmd = $candidate;
+ $found = 1;
+ if ($log) { print {$LogWrite} "* Found ($candidate): $file\n"; }
+ last;
+ }
+ if ($log) { print {$LogWrite} "* Not found ($candidate): $file\n"; }
+ }
+ last if $found;
+ }
+ if (not $found and $Win and $system ne 'msys') {
+ $found = SearchRegistry();
+ }
+ if (not $found and $system eq 'msys') {
+ $found = Searchbyregquery();
+ }
+ if ($found) {
+ if ($log) { print {$LogWrite} "* Autodetected ghostscript command: $gscmd\n"; }
+ }
+ else {
+ $gscmd = $$candidates_ref[0];
+ if ($log) { print {$LogWrite} "* Default ghostscript command: $gscmd\n"; }
+ }
+}
+
+sub SearchRegistry {
+ my $found = 0;
+ # The module Win32::TieRegistry not aviable in cygwin/msys
+ eval 'use Win32::TieRegistry qw|KEY_READ REG_SZ|';
+ if ($@) {
+ if ($log) {
+ print {$LogWrite} "* Registry lookup for Ghostscript failed:\n";
+ my $msg = $@;
+ $msg =~ s/\s+$//;
+ foreach (split /\r?\n/, $msg) {
+ print {$LogWrite} " $_\n";
+ }
+ }
+ return $found;
+ }
+ my $open_params = {Access => KEY_READ(), Delimiter => q{/}};
+ my $key_name_software = 'HKEY_LOCAL_MACHINE/SOFTWARE/';
+ my $current_key = $key_name_software;
+ my $software = new Win32::TieRegistry $current_key, $open_params;
+ if (not $software) {
+ if ($log) {
+ print {$LogWrite} "* Cannot find or access registry key `$current_key'!\n";
+ }
+ return $found;
+ }
+ if ($log) { print {$LogWrite} "* Search registry at `$current_key'.\n"; }
+ my %list;
+ foreach my $key_name_gs (grep /Ghostscript/i, $software->SubKeyNames()) {
+ $current_key = "$key_name_software$key_name_gs/";
+ if ($log) { print {$LogWrite} "* Registry entry found: $current_key\n"; }
+ my $key_gs = $software->Open($key_name_gs, $open_params);
+ if (not $key_gs) {
+ if ($log) { print {$LogWrite} "* Cannot open registry key `$current_key'!\n"; }
+ next;
+ }
+ foreach my $key_name_version ($key_gs->SubKeyNames()) {
+ $current_key = "$key_name_software$key_name_gs/$key_name_version/";
+ if ($log) { print {$LogWrite} "* Registry entry found: $current_key\n"; }
+ if (not $key_name_version =~ /^(\d+)\.(\d+)$/) {
+ if ($log) { print {$LogWrite} " The sub key is not a version number!\n"; }
+ next;
+ }
+ my $version_main = $1;
+ my $version_sub = $2;
+ $current_key = "$key_name_software$key_name_gs/$key_name_version/";
+ my $key_version = $key_gs->Open($key_name_version, $open_params);
+ if (not $key_version) {
+ if ($log) { print {$LogWrite} "* Cannot open registry key `$current_key'!\n"; }
+ next;
+ }
+ $key_version->FixSzNulls(1);
+ my ($value, $type) = $key_version->GetValue('GS_DLL');
+ if ($value and $type == REG_SZ()) {
+ if ($log) { print {$LogWrite} " GS_DLL = $value\n"; }
+ $value =~ s|([\\/])([^\\/]+\.dll)$|$1gswin32c.exe|i;
+ my $value64 = $value;
+ $value64 =~ s/gswin32c\.exe$/gswin64c.exe/;
+ if ($archname =~ /mswin32-x64/i and -f $value64) {
+ $value = $value64;
+ }
+ if (-f $value) {
+ if ($log) { print {$LogWrite} "EXE found: $value\n"; }
+ }
+ else {
+ if ($log) { print {$LogWrite} "EXE not found!\n"; }
+ next;
+ }
+ my $sortkey = sprintf '%02d.%03d %s',
+ $version_main, $version_sub, $key_name_gs;
+ $list{$sortkey} = $value;
+ }
+ else {
+ if ($log) { print {$LogWrite} "Missing key `GS_DLL' with type `REG_SZ'!\n"; }
+ }
+ }
+ }
+ foreach my $entry (reverse sort keys %list) {
+ $gscmd = $list{$entry};
+ if ($log) { print {$LogWrite} "* Found (via registry): $gscmd\n"; }
+ $found = 1;
+ last;
+ }
+ return $found;
+} # end GS search registry
+
+### This part is only necessary if you're using Git on windows and don't
+### have gs configured in PATH. Git for windows don't have a Win32::TieRegistry
+### module for perl (is not supported in the current versions of msys).
+sub Searchbyregquery {
+ my $found = 0;
+ my $gs_regkey;
+ my $opt_reg = '//s //v';
+ if ($log) { print {$LogWrite} "* Search Ghostscript in Windows registry under mingw/msys:\n";}
+ $gs_regkey = qx{reg query "HKLM\\Software\\GPL Ghostscript" $opt_reg GS_DLL};
+ if ($? == 0) {
+ if ($log) { print {$LogWrite} "* Registry entry found for GS_DLL (64 bits version)\n";}
+ }
+ else {
+ $gs_regkey = qx{reg query "HKLM\\Software\\Wow6432Node\\GPL Ghostscript" $opt_reg GS_DLL};
+ if ($? == 0) {
+ if ($log) { print {$LogWrite} "* Registry entry found for GS_DLL (32 bits version)\n";}
+ }
+ }
+ my ($gs_find) = $gs_regkey =~ m/(?:\s* GS_DLL \s* REG_SZ \s*) (.+?)(?:\.dll.+?\R)/s;
+ if ($gs_find) {
+ my ($gs_vol, $gs_path, $gs_ver) = $gs_find =~ m/
+ (\w{1})(?:\:) # volumen
+ (.+?) # path to executable
+ (?:\\gsdll) # LIB
+ (\d{2}) # Version
+ /xs;
+ # Adjust
+ $gs_vol = lc($gs_vol);
+ $gs_path = '/'.$gs_vol.$gs_path;
+ $gs_path =~ s|\\|/|gmsxi;
+ # Add to PATH
+ if ($log) { print {$LogWrite} "* Add $gs_path to PATH for current session\n"; }
+ $PATH .= ":$gs_path";
+ # Set executable
+ $gscmd = 'gswin'.$gs_ver.'c';
+ if ($log) { print {$LogWrite} "* Found (via reg query): $gscmd\n"; }
+ $found = 1;
+ }
+ if ($@) {
+ if ($log) {
+ print {$LogWrite} "* Registry lookup for Ghostscript by reg query failed:\n";
+ my $msg = $@;
+ $msg =~ s/\s+$//;
+ foreach (split /\r?\n/, $msg) {
+ print {$LogWrite} " $_\n";
+ }
+ }
+ return $found;
+ }
+ return $found;
+}
+
+### Call GS
+find_ghostscript();
+
+### Windows need suport space in path
+if ($Win and $gscmd =~ /\s/) { $gscmd = "\"$gscmd\"";}
+
+### Help
+if (defined $opts_cmd{internal}{help}) {
+ usage(1);
+ exit 0;
+}
+
+### Version
+if (defined $opts_cmd{internal}{version}) {
+ print $title;
+ exit 0;
+}
+
+### Check <input file> from command line
+@ARGV > 0 or errorUsage('Input filename missing');
+@ARGV < 2 or errorUsage('Unknown option or too many input files');
+
+### Check <input file> extention
+my @SuffixList = ('.tex', '.ltx');
+my ($name, $path, $ext) = fileparse($ARGV[0], @SuffixList);
+if ($ext eq '.tex' or $ext eq '.ltx') {
+ $ext = $ext;
+}
+else {
+ errorUsage('Invalid or empty extention for input file');
+}
+
+### Read <input file> in memory, need [:crlf] for old windows files
+Log("Read input file $name$ext in memory");
+open my $INPUTfile, '<:crlf', "$name$ext";
+ my $ltxfile;
+ {
+ local $/;
+ $ltxfile = <$INPUTfile>;
+ }
+close $INPUTfile;
+
+### Set tmp random number for <name-fig-tmp> and others
+my $tmp = int(rand(10000));
+
+### Identification message in terminal
+print $title;
+
+### Remove white space and '=' in array captured from command line
+s/^\s*(\=):?|\s*//mg foreach @extr_env_tmp;
+s/^\s*(\=):?|\s*//mg foreach @skip_env_tmp;
+s/^\s*(\=):?|\s*//mg foreach @verb_env_tmp;
+s/^\s*(\=):?|\s*//mg foreach @verw_env_tmp;
+s/^\s*(\=):?|\s*//mg foreach @delt_env_tmp;
+
+### Split comma separte list options from command line
+@extr_env_tmp = split /,/,join q{},@extr_env_tmp;
+@skip_env_tmp = split /,/,join q{},@skip_env_tmp;
+@verb_env_tmp = split /,/,join q{},@verb_env_tmp;
+@verw_env_tmp = split /,/,join q{},@verw_env_tmp;
+@delt_env_tmp = split /,/,join q{},@delt_env_tmp;
+
+### Validate environments options from comand line
+if (grep /(^\-|^\.).*?/, @extr_env_tmp) {
+ Log('Error!!: Invalid argument for --extrenv, some argument from list begin with -');
+ errorUsage('Invalid argument for --extrenv option');
+}
+if (grep /(^\-|^\.).*?/, @skip_env_tmp) {
+ Log('Error!!: Invalid argument for --skipenv, some argument from list begin with -');
+ errorUsage('Invalid argument for --skipenv option');
+}
+if (grep /(^\-|^\.).*?/, @verb_env_tmp) {
+ Log('Error!!: Invalid argument for --verbenv, some argument from list begin with -');
+ errorUsage('Invalid argument for --verbenv option');
+}
+if (grep /(^\-|^\.).*?/, @verw_env_tmp) {
+ Log('Error!!: Invalid argument for --writenv, some argument from list begin with -');
+ errorUsage('Invalid argument for --writenv option');
+}
+if (grep /(^\-|^\.).*?/, @delt_env_tmp) {
+ Log('Error!!: Invalid argument for --deltenv, some argument from list begin with -');
+ errorUsage('Invalid argument for --deltenv option');
+}
+
+### Default environment to extract
+my @extr_tmp = qw (
+ preview postscript tikzpicture pgfpicture pspicture psgraph PSTexample
+ );
+push @extr_env_tmp, @extr_tmp;
+
+### Default verbatim environment
+my @verb_tmp = qw (
+ Example CenterExample SideBySideExample PCenterExample PSideBySideExample
+ verbatim Verbatim BVerbatim LVerbatim SaveVerbatim PSTcode
+ LTXexample tcblisting spverbatim minted listing lstlisting
+ alltt comment chklisting verbatimtab listingcont boxedverbatim
+ demo sourcecode xcomment pygmented pyglist program programl
+ programL programs programf programsc programt
+ );
+push @verb_env_tmp, @verb_tmp;
+
+### Default verbatim write environment
+my @verbw_tmp = qw (
+ scontents filecontents tcboutputlisting tcbexternal tcbwritetmp extcolorbox extikzpicture
+ VerbatimOut verbatimwrite filecontentsdef filecontentshere filecontentsdefmacro
+ filecontentsdefstarred filecontentsgdef filecontentsdefmacro filecontentsgdefmacro
+ );
+push @verw_env_tmp, @verbw_tmp;
+
+########################################################################
+# One problem that can arise is the filecontents environment, this can #
+# contain a complete document and be anywhere, before dividing we will #
+# make some replacements for this and comment lines #
+########################################################################
+
+### Create a Regex for verbatim write environment
+@verw_env_tmp = uniq(@verw_env_tmp);
+my $tmpverbw = join q{|}, map { quotemeta } sort { length $a <=> length $b } @verw_env_tmp;
+$tmpverbw = qr/$tmpverbw/x;
+my $tmp_verbw = qr {
+ (
+ (?:
+ \\begin\{$tmpverbw\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$tmpverbw\*?\})
+ (?!end\{$tmpverbw\*?\})|
+ (?-1)
+ )*
+ \\end\{$tmpverbw\*?\}
+ )
+ )
+ }x;
+
+### A pre-regex for comment lines
+my $tmpcomment = qr/^ \s* \%+ .+? $ /mx;
+
+### Hash for replace in verbatim's and comment lines
+my %document = (
+ '\begin{document}' => '\BEGIN{document}',
+ '\end{document}' => '\END{document}',
+ '\documentclass' => '\DOCUMENTCLASS',
+ '\pagestyle{' => '\PAGESTYLE{',
+ '\thispagestyle{' => '\THISPAGESTYLE{',
+ );
+
+### Changes in <input file> for verbatim write and comment lines
+while ($ltxfile =~ / $tmp_verbw | $tmpcomment /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ while (my($busco, $cambio) = each %document) {
+ $encontrado =~ s/\Q$busco\E/$cambio/g;
+ }
+ substr $ltxfile, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($ltxfile) = $pos_inicial + length $encontrado;
+}
+
+### Now, split input file in $atbegindoc and contain % ltximg : <argument>
+my ($atbegindoc, $document) = $ltxfile =~ m/\A (\s* .*? \s*) (\\documentclass.*)\z/msx;
+
+### Capture options in preamble of <input file>
+# % ltximg : extrenv : {extrenv1, extrenv2, ... , extrenvn}
+# % ltximg : skipenv : {skipenv1, skipenv2, ... , skipenvn}
+# % ltximg : verbenv : {verbwrt1, verbwrt2, ... , verbwrtn}
+# % ltximg : writenv : {verbwrt1, verbwrt2, ... , verbwrtn}
+# % ltximg : deltenv : {deltenv1, deltenv2, ... , deltenvn}
+# % ltximg : options : {opt1=arg, opt2=arg, ... , booleans}
+
+my $readoptfile = qr/
+ ^ %+ \s* ltximg (?&SEPARADOR) (?<clave>(?&CLAVE)) (?&SEPARADOR) \{ (?<argumentos>(?&ARGUMENTOS)) \}
+ (?(DEFINE)
+ (?<CLAVE> \w+ )
+ (?<ARGUMENTOS> .+? )
+ (?<SEPARADOR> \s* : \s* )
+ )
+/mx;
+
+### Search options in <input file> and store in %opts_file
+my %opts_file;
+while ($atbegindoc =~ /$readoptfile/g) {
+ my ($clave, $argumentos) = @+{qw(clave argumentos)};
+ my @argumentos = split /\s*,\s*?/, $argumentos;
+ for (@argumentos) { s/^ \s* | \s* $//gx; }
+ if ($clave eq 'options') {
+ for my $argumento (@argumentos) {
+ if ($argumento =~ /(?<key>\S+) \s* = \s* (?<valor>\S+)/x) {
+ $opts_file{$clave}{$+{'key'}} = $+{'valor'};
+ }
+ else {
+ $opts_file{$clave}{$argumento} = 1;
+ }
+ }
+ }
+ else {
+ push @{ $opts_file{ $clave } }, @argumentos;
+ }
+}
+
+### Process options from <input file>
+if(%opts_file) {
+ Infocolor('Warning', "Found options for script in $name$ext");
+ # Search and extract options from <input file>
+ Log("Searching options for script in $name$ext");
+ if (exists $opts_file{extrenv}) {
+ Log("Found \% ltximg\: extrenv\: \{...\} in $name$ext");
+ if (grep /(^\-|^\.).*?/, @{$opts_file{extrenv}}) {
+ Log('Error!!: Invalid argument for % ltximg: extrenv: {...}, some argument from list begin with -');
+ errorUsage('Invalid argument in % ltximg: extrenv: {...}');
+ }
+ Logarray(\@{$opts_file{extrenv}});
+ push @extr_env_tmp, @{$opts_file{extrenv}};
+ }
+ # Add skipenv options from <input file>
+ if (exists $opts_file{skipenv}) {
+ Log("Found \% ltximg\: skipenv\: \{...\} in $name$ext");
+ if (grep /(^\-|^\.).*?/, @{$opts_file{skipenv}}) {
+ Log('Error!!: Invalid argument for % ltximg: skipenv: {...}, some argument from list begin with -');
+ errorUsage('Invalid argument in % ltximg: skipenv: {...}');
+ }
+ Logarray(\@{$opts_file{skipenv}});
+ push @skip_env_tmp, @{$opts_file{skipenv}};
+ }
+ # Add verbenv options from <input file>
+ if (exists $opts_file{verbenv}) {
+ Log("Found \% ltximg\: verbenv\: \{...} in $name$ext");
+ if (grep /(^\-|^\.).*?/, @{$opts_file{verbenv}}) {
+ Log('Error!!: Invalid argument for % ltximg: verbenv: {...}, some argument from list begin with -');
+ errorUsage('Invalid argument in % ltximg: verbenv: {...}');
+ }
+ Logarray(\@{ $opts_file{verbenv}});
+ push @verb_env_tmp, @{$opts_file{verbenv}};
+ }
+ # Add writenv options from <input file>
+ if (exists $opts_file{writenv}) {
+ Log("Found \% ltximg\: writenv\: \{...\} in $name$ext");
+ if (grep /(^\-|^\.).*?/, @{ $opts_file{writenv}}) {
+ Log('Error!!: Invalid argument for % ltximg: writenv: {...}, some argument from list begin with -');
+ errorUsage('Invalid argument in % ltximg: writenv: {...}');
+ }
+ Logarray(\@{ $opts_file{writenv}});
+ push @verw_env_tmp, @{$opts_file{writenv}};
+ }
+ # Add deltenv options from <input file>
+ if (exists $opts_file{deltenv}) {
+ Log("Found \% ltximg\: deltenv\: \{...\} in $name$ext");
+ if (grep /(^\-|^\.).*?/, @{$opts_file{deltenv}}) {
+ Log('Error!!: Invalid argument for % ltximg: deltenv: {...}, some argument from list begin with -');
+ errorUsage('Invalid argument in % ltximg: deltenv: {...}');
+ }
+ Logarray(\@{ $opts_file{deltenv}});
+ push @delt_env_tmp, @{$opts_file{deltenv}};
+ }
+ # Add all other options from <input file>
+ if (exists $opts_file{options}) {
+ Log("Found \% ltximg\: options\: \{...\} in $name$ext");
+ # Add compilers from <input file>
+ for my $opt (qw(arara xetex luatex latex dvips dvipdf dvilua latexmk)) {
+ if (exists $opts_file{options}{$opt}) {
+ Log("Found [$opt] compiler option in $name$ext");
+ $opts_cmd{compiler}{$opt} = 1;
+ }
+ }
+ # Add image options
+ for my $opt (qw(eps ppm svg png jpg bmp tif)) {
+ if (exists $opts_file{options}{$opt}) {
+ Log("Found [$opt] image option in $name$ext");
+ $opts_cmd{image}{$opt} = 1;
+ }
+ }
+ # Add boolean options
+ for my $opt (qw(shell nopdf norun nocrop srcenv subenv zip tar gray force noprew)) {
+ if (exists $opts_file{options}{$opt}) {
+ Log("Found [$opt] option in $name$ext");
+ $opts_cmd{boolean}{$opt} = 1;
+ }
+ }
+ # Add string options
+ for my $opt (qw(dpi myverb margins prefix imgdir output runs)) {
+ if (exists $opts_file{options}{$opt}) {
+ Log("Found [$opt = $opts_file{options}{$opt}] in $name$ext");
+ $opts_cmd{string}{$opt} = $opts_file{options}{$opt};
+ }
+ }
+ # Add clean option
+ for my $opt (qw(doc off pst tkz all)) {
+ if ($opts_file{options}{clean} eq "$opt" ) {
+ Log("Found [clean = $opt] in $name$ext");
+ $opts_cmd{clean} = $opt;
+ }
+ }
+ }
+}
+
+### Validate --dpi
+if( $opts_cmd{string}{dpi} <= 0 or $opts_cmd{string}{dpi} >= 2500) {
+ Log('Error!!: Invalid argument for --dpi, argument out of range');
+ errorUsage('Invalid argument for --dpi option');
+}
+
+### Validate --runs
+if( $opts_cmd{string}{runs} <= 0 or $opts_cmd{string}{runs} >= 3) {
+ Log('Error!!: Invalid argument for --runs, argument out of range');
+ errorUsage('Invalid argument for --runs option');
+}
+
+### Check --arara and others compilers
+if ($opts_cmd{compiler}{arara}) {
+ # Search others compilers options
+ for my $opt (qw(xetex luatex latex dvips dvipdf dvilua latexmk)) {
+ if (defined $opts_cmd{compiler}{$opt}) {
+ Log("Error!!: Options --arara and --$opt are mutually exclusive");
+ errorUsage("Options --arara and --$opt are mutually exclusive");
+ }
+ }
+}
+
+### Check --srcenv and --subenv option
+if ($opts_cmd{boolean}{srcenv} && $opts_cmd{boolean}{subenv}) {
+ Log('Error!!: Options --srcenv and --subenv are mutually exclusive');
+ errorUsage('Options --srcenv and --subenv are mutually exclusive');
+}
+
+### If --srcenv or --subenv option are OK activate write <sub files>
+if ($opts_cmd{boolean}{srcenv}) {
+ $outsrc = 1;
+ $opts_cmd{boolean}{subenv} = undef;
+}
+if ($opts_cmd{boolean}{subenv}) {
+ $outsrc = 1;
+ $opts_cmd{boolean}{srcenv} = undef;
+}
+
+### Add pdf image format if --nopdf
+if (!$opts_cmd{boolean}{nopdf}) {
+ $opts_cmd{image}{pdf} = 1;
+}
+
+### Store defined image formats in $format
+my $format = join q{, },grep { defined $opts_cmd{image}{$_} } keys %{$opts_cmd{image}};
+
+### Write defined image format in log file
+if (!$opts_cmd{boolean}{norun}) {
+ Log("Defined image formats for creating: $format");
+}
+
+### Check --norun and no images type
+if (!$opts_cmd{boolean}{norun} and $format eq q{}) {
+ Log('Error!!: Option --nopdf need --norun or an image option');
+ errorUsage('Option --nopdf need --norun or an image option');
+}
+
+### Check --dvips and no eps image type
+if ($opts_cmd{compiler}{dvips} and !$opts_cmd{image}{eps} and !$opts_cmd{boolean}{norun}) {
+ Log('Error!!: Option --dvips need --eps');
+ errorUsage('Option --dvips need --eps');
+}
+
+### Validate myverb = macro option
+if (defined $opts_cmd{string}{myverb}) {
+ if ($opts_cmd{string}{myverb} =~ /^(?:\\|\-).+?/) {
+ Log('Error!!: Invalid argument for --myverb option, argument begin with - or \ ');
+ errorUsage('Invalid argument for --myverb');
+ }
+ else { Log("Set myverb = $opts_cmd{string}{myverb}"); }
+}
+
+### Validate imgdir = string option
+if (defined $opts_cmd{string}{imgdir}) {
+ if ($opts_cmd{string}{imgdir} =~ /^(?:\\|\-).+?/) {
+ Log('Error!!: Invalid argument for --imgdir option, argument begin with -, \ or /');
+ errorUsage('Invalid argument for --imgdir');
+ }
+ else { Log("Set imgdir = $opts_cmd{string}{imgdir}"); }
+}
+
+### Validate clean
+my %clean = map { $_ => 1 } @clean;
+$clean{doc} = 1; # by default clean = doc
+
+### Pass $opts_cmd{clean} to $clean{$opt}
+for my $opt (qw(doc off pst tkz all)) {
+ if ($opts_cmd{clean} eq "$opt") {
+ $clean{$opt} = 1;
+ push @currentopt, "--clean=$opt";
+ }
+}
+
+### Activate clean options for script
+if ($clean{pst} or $clean{tkz}) { $clean{doc} = 1; }
+if ($clean{all}) { @clean{qw(pst doc tkz)} = (1) x 3; }
+if ($clean{off}) { undef %clean; }
+
+### Validating the <output file> name and save extension
+my $outext;
+if (defined $opts_cmd{string}{output}) {
+ Log('Validating name and extension for output file');
+ # Capture and split
+ my ($outname, $outpath, $tmpext) = fileparse($opts_cmd{string}{output}, @SuffixList);
+ if ($outname =~ /(^\-|^\.).*?/) {
+ Log('The name of output file begin with dash -');
+ errorUsage("$opts_cmd{string}{output} it is not a valid name for output file");
+ }
+ if ($tmpext eq q{}) { # Check and set extension
+ Log("Set extension for output file to $ext");
+ $outext = $ext;
+ }
+ else {
+ Log("Set extension for output file to $tmpext");
+ $outext = $tmpext;
+ }
+ if ($outname eq $name) { # Check name
+ Log("The name of the output file must be different that $name");
+ Infoline("Changing the output file name to $name-out");
+ $opts_cmd{string}{output} = "$name-out";
+ }
+ else {
+ Log("Set name of the output file to $outname");
+ $opts_cmd{string}{output} = $outname;
+ }
+ # If output name are ok, then $outfile = 1
+ $outfile = 1;
+}
+
+### Storing the current options of script in array for ltximg.log file
+my @allopt = qw (arara xetex luatex latex dvips dvipdf dvilua latexmk
+ shell nopdf norun nocrop srcenv subenv zip tar gray force
+ noprew eps ppm svg png jpg bmp tif dpi myverb margins
+ prefix imgdir output runs
+ );
+
+for my $opt (@allopt) {
+ if (defined $opts_cmd{boolean}{$opt}) {
+ push @currentopt, "--$opt";
+ }
+ if (defined $opts_cmd{compiler}{$opt}) {
+ push @currentopt, "--$opt";
+ }
+ if (defined $opts_cmd{image}{$opt}) {
+ push @currentopt, "--$opt";
+ }
+ if (defined $opts_cmd{string}{$opt}) {
+ push @currentopt, "--$opt=$opts_cmd{string}{$opt}"
+ }
+}
+
+### Write all options in ltximg.log file
+@currentopt = sort { length $a <=> length $b } @currentopt;
+Log('The script will execute the following options:');
+Logarray(\@currentopt);
+
+### Rules to capture for regex
+my $braces = qr/ (?:\{)(.+?)(?:\}) /msx;
+my $braquet = qr/ (?:\[)(.+?)(?:\]) /msx;
+my $no_corchete = qr/ (?:\[ .*? \])? /msx;
+
+### Array for capture new verbatim environments defined in input file
+my @new_verb = qw (
+ newtcblisting DeclareTCBListing ProvideTCBListing NewTCBListing
+ lstnewenvironment NewListingEnvironment NewProgram specialcomment
+ includecomment DefineVerbatimEnvironment newverbatim newtabverbatim
+ );
+
+### Regex to capture names for new verbatim environments from input file
+my $newverbenv = join q{|}, map { quotemeta} sort { length $a <=> length $b } @new_verb;
+$newverbenv = qr/\b(?:$newverbenv) $no_corchete $braces/msx;
+
+### Array for capture new verbatim write environments defined in input file
+my @new_verb_write = qw (
+ renewtcbexternalizetcolorbox renewtcbexternalizeenvironment
+ newtcbexternalizeenvironment newtcbexternalizetcolorbox newenvsc
+ );
+
+### Regex to capture names for new verbatim write environments from input file
+my $newverbwrt = join q{|}, map { quotemeta} sort { length $a <=> length $b } @new_verb_write;
+$newverbwrt = qr/\b(?:$newverbwrt) $no_corchete $braces/msx;
+
+### Regex to capture MINTED related environments
+my $mintdenv = qr/\\ newminted $braces (?:\{.+?\}) /x;
+my $mintcenv = qr/\\ newminted $braquet (?:\{.+?\}) /x;
+my $mintdshrt = qr/\\ newmint $braces (?:\{.+?\}) /x;
+my $mintcshrt = qr/\\ newmint $braquet (?:\{.+?\}) /x;
+my $mintdline = qr/\\ newmintinline $braces (?:\{.+?\}) /x;
+my $mintcline = qr/\\ newmintinline $braquet (?:\{.+?\}) /x;
+
+### Filter input file, now $ltxfile is pass to $filecheck
+Log("Filter $name$ext \(remove % and comments\)");
+my @filecheck = $ltxfile;
+s/%.*\n//mg foreach @filecheck; # del comments
+s/^\s*|\s*//mg foreach @filecheck; # del white space
+my $filecheck = join q{}, @filecheck;
+
+### Search verbatim and verbatim write environments <input file>
+Log("Search verbatim and verbatim write environments in $name$ext");
+
+### Search new verbatim write names in <input file>
+my @newv_write = $filecheck =~ m/$newverbwrt/xg;
+if (@newv_write) {
+ Log("Found new verbatim write environments in $name$ext");
+ Logarray(\@newv_write);
+ push @verw_env_tmp, @newv_write;
+}
+
+### Search new verbatim environments in <input file> (for)
+my @verb_input = $filecheck =~ m/$newverbenv/xg;
+if (@verb_input) {
+ Log("Found new verbatim environments in $name$ext");
+ Logarray(\@verb_input);
+ push @verb_env_tmp, @verb_input;
+}
+
+### Search \newminted{$mintdenv}{options} in <input file>, need add "code" (for)
+my @mint_denv = $filecheck =~ m/$mintdenv/xg;
+if (@mint_denv) {
+ Log("Found \\newminted\{envname\} in $name$ext");
+ # Append "code"
+ $mintdenv = join "\n", map { qq/$_\Qcode\E/ } @mint_denv;
+ @mint_denv = split /\n/, $mintdenv;
+ Logarray(\@mint_denv);
+ push @verb_env_tmp, @mint_denv;
+}
+
+### Search \newminted[$mintcenv]{lang} in <input file> (for)
+my @mint_cenv = $filecheck =~ m/$mintcenv/xg;
+if (@mint_cenv) {
+ Log("Found \\newminted\[envname\] in $name$ext");
+ Logarray(\@mint_cenv);
+ push @verb_env_tmp, @mint_cenv;
+}
+
+### Remove repetead again :)
+@verb_env_tmp = uniq(@verb_env_tmp);
+
+### Capture verbatim inline macros in input file
+Log("Search verbatim macros in $name$ext");
+
+### Store all minted inline/short in @mintline
+my @mintline;
+
+### Search \newmint{$mintdshrt}{options} in <input file> (while)
+my @mint_dshrt = $filecheck =~ m/$mintdshrt/xg;
+if (@mint_dshrt) {
+ Log("Found \\newmint\{macroname\} (short) in $name$ext");
+ Logarray(\@mint_dshrt);
+ push @mintline, @mint_dshrt;
+}
+
+### Search \newmint[$mintcshrt]{lang}{options} in <input file> (while)
+my @mint_cshrt = $filecheck =~ m/$mintcshrt/xg;
+if (@mint_cshrt) {
+ Log("Found \\newmint\[macroname\] (short) in $name$ext");
+ Logarray(\@mint_cshrt);
+ push @mintline, @mint_cshrt;
+}
+
+### Search \newmintinline{$mintdline}{options} in <input file> (while)
+my @mint_dline = $filecheck =~ m/$mintdline/xg;
+if (@mint_dline) {
+ Log("Found \\newmintinline\{macroname\} in $name$ext");
+ # Append "inline"
+ $mintdline = join "\n", map { qq/$_\Qinline\E/ } @mint_dline;
+ @mint_dline = split /\n/, $mintdline;
+ Logarray(\@mint_dline);
+ push @mintline, @mint_dline;
+}
+
+### Search \newmintinline[$mintcline]{lang}{options} in <input file> (while)
+my @mint_cline = $filecheck =~ m/$mintcline/xg;
+if (@mint_cline) {
+ Log("Found \\newmintinline\[macroname\] in $name$ext");
+ Logarray(\@mint_cline);
+ push @mintline, @mint_cline;
+}
+
+### Add standart mint, mintinline and lstinline
+my @mint_tmp = qw(mint mintinline lstinline);
+
+### Join all inline verbatim macros captured
+push @mintline, @mint_tmp;
+@mintline = uniq(@mintline);
+
+### Create a regex using @mintline
+my $mintline = join q{|}, map { quotemeta } sort { length $a <=> length $b } @mintline;
+$mintline = qr/\b(?:$mintline)/x;
+
+### Reserved words in verbatim inline (while)
+my %changes_in = (
+ '%<*ltximg>' => '%<*LTXIMG>',
+ '%</ltximg>' => '%</LTXIMG>',
+ '%<*noltximg>' => '%<*NOLTXIMG>',
+ '%</noltximg>' => '%</NOLTXIMG>',
+ '%<*remove>' => '%<*REMOVE>',
+ '%</remove>' => '%</REMOVE>',
+ '\psset' => '\PSSET',
+ '\tikzset' => '\TIKZSET',
+ '\pspicture' => '\TRICKS',
+ '\endpspicture' => '\ENDTRICKS',
+ '\pgfpicture' => '\PGFTRICKS',
+ '\endpgfpicture' => '\ENDPGFTRICKS',
+ '\tikzpicture' => '\TKZTRICKS',
+ '\endtikzpicture' => '\ENDTKZTRICKS',
+ '\psgraph' => '\PSGRAPHTRICKS',
+ '\endpsgraph' => '\ENDPSGRAPHTRICKS',
+ '\usepackage' => '\USEPACKAGE',
+ '{graphicx}' => '{GRAPHICX}',
+ '\graphicspath{' => '\GRAPHICSPATH{',
+ );
+
+### Hash to replace \begin and \end in verbatim inline
+my %init_end = (
+ '\begin{' => '\BEGIN{',
+ '\end{' => '\END{',
+ );
+
+### Join changes in new hash (while) for verbatim inline
+my %cambios = (%changes_in,%init_end);
+
+### Variables and constantes
+my $no_del = "\0";
+my $del = $no_del;
+
+### Rules
+my $llaves = qr/\{ .+? \} /x;
+my $no_llaves = qr/(?: $llaves )? /x;
+my $corchetes = qr/\[ .+? \] /x;
+my $delimitador = qr/\{ (?<del>.+?) \} /x;
+my $scontents = qr/Scontents [*]? $no_corchete /ix;
+my $verb = qr/(?:((spv|(?:q|f)?v|V)erb|$opts_cmd{string}{myverb})[*]?) /ix;
+my $lst = qr/(?:(lst|pyg)inline)(?!\*) $no_corchete /ix;
+my $mint = qr/(?: $mintline |SaveVerb) (?!\*) $no_corchete $no_llaves $llaves /ix;
+my $no_mint = qr/(?: $mintline) (?!\*) $no_corchete /ix;
+my $marca = qr/\\ (?:$verb | $lst |$scontents | $mint |$no_mint) (?:\s*)? (\S) .+? \g{-1} /sx;
+my $comentario = qr/^ \s* \%+ .+? $ /mx;
+my $definedel = qr/\\ (?: DefineShortVerb | lstMakeShortInline| MakeSpecialShortVerb ) [*]? $no_corchete $delimitador /ix;
+my $indefinedel = qr/\\ (?: (Undefine|Delete)ShortVerb | lstDeleteShortInline) $llaves /ix;
+
+Log('Making changes to inline/multiline verbatim before extraction');
+
+### Changes in input file for verbatim inline/multiline
+while ($document =~
+ / $marca
+ | $comentario
+ | $definedel
+ | $indefinedel
+ | $del .+? $del
+ /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ if ($encontrado =~ /$definedel/) {
+ $del = $+{del};
+ $del = "\Q$+{del}" if substr($del,0,1) ne '\\';
+ }
+ elsif ($encontrado =~ /$indefinedel/) {
+ $del = $no_del;
+ }
+ else {
+ while (my($busco, $cambio) = each %cambios) {
+ $encontrado =~ s/\Q$busco\E/$cambio/g;
+ }
+ substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($document) = $pos_inicial + length $encontrado;
+ }
+}
+
+### Change "escaped braces" to <LTXSB.> (this label is not the one in the document)
+$document =~ s/\\[{]/<LTXSBO>/g;
+$document =~ s/\\[}]/<LTXSBC>/g;
+
+### Regex for verbatim inline/multiline with braces {...}
+my $nestedbr = qr / ( [{] (?: [^{}]++ | (?-1) )*+ [}] ) /x;
+my $fvextra = qr /\\ (?: (Save|Esc)Verb [*]?) $no_corchete /x;
+my $mintedbr = qr /\\ (?:$mintline|pygment) (?!\*) $no_corchete $no_llaves /x;
+my $tcbxverb = qr /\\ (?: tcboxverb [*]?| Scontents [*]? |$opts_cmd{string}{myverb} [*]?|lstinline) $no_corchete /x;
+my $verb_brace = qr / (?:$tcbxverb|$mintedbr|$fvextra) (?:\s*)? $nestedbr /x;
+
+### Change \verb*{code} for verbatim inline/multiline
+while ($document =~ /$verb_brace/pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ while (my($busco, $cambio) = each %cambios) {
+ $encontrado =~ s/\Q$busco\E/$cambio/g;
+ }
+ substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($document) = $pos_inicial + length $encontrado;
+}
+
+### We recovered the escaped braces
+$document =~ s/<LTXSBO>/\\{/g;
+$document =~ s/<LTXSBC>/\\}/g;
+
+### Reverse changes for extract and output file
+my %changes_out = (
+ '\PSSET' => '\psset',
+ '\TIKZSET' => '\tikzset',
+ '\TRICKS' => '\pspicture',
+ '\ENDTRICKS' => '\endpspicture',
+ '\PGFTRICKS' => '\pgfpicture',
+ '\ENDPGFTRICKS' => '\endpgfpicture',
+ '\TKZTRICKS' => '\tikzpicture',
+ '\ENDTKZTRICKS' => '\endtikzpicture',
+ '\PSGRAPHTRICKS' => '\psgraph',
+ '\ENDPSGRAPHTRICKS' => '\endpsgraph',
+ '\USEPACKAGE' => '\usepackage',
+ '{GRAPHICX}' => '{graphicx}',
+ '\GRAPHICSPATH{' => '\graphicspath{',
+ '\BEGIN{' => '\begin{',
+ '\END{' => '\end{',
+ '\DOCUMENTCLASS' => '\documentclass',
+ '\PAGESTYLE{' => '\pagestyle{',
+ '\THISPAGESTYLE{' => '\thispagestyle{',
+ );
+
+### Reverse tags, need back in all file to extract
+my %reverse_tag = (
+ '%<*LTXIMG>' => '%<*ltximg>',
+ '%</LTXIMG>' => '%</ltximg>',
+ '%<*NOLTXIMG>' => '%<*noltximg>',
+ '%</NOLTXIMG>' => '%</noltximg>',
+ '%<*REMOVE>' => '%<*remove>',
+ '%</REMOVE>' => '%</remove>',
+ );
+
+### First we do some security checks to ensure that they are verbatim and
+### verbatim write environments are unique and disjointed
+@verb_env_tmp = array_minus(@verb_env_tmp, @verw_env_tmp); #disjointed
+my @verbatim = uniq(@verb_env_tmp);
+my %verbatim = crearhash(@verbatim);
+
+Log('The environments that are considered verbatim:');
+Logarray(\@verbatim);
+
+### Create a Regex for verbatim standart environment
+my $verbatim = join q{|}, map { quotemeta } sort { length $a <=> length $b } @verbatim;
+$verbatim = qr/$verbatim/x;
+my $verb_std = qr {
+ (
+ (?:
+ \\begin\{$verbatim\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim\*?\})
+ (?!end\{$verbatim\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim\*?\}
+ )
+ )
+ }x;
+
+### Verbatim write
+@verw_env_tmp = array_minus(@verw_env_tmp, @verb_env_tmp); #disjointed
+my @verbatim_w = uniq(@verw_env_tmp);
+my %verbatim_w = crearhash(@verbatim_w);
+
+Log('The environments that are considered verbatim write:');
+Logarray(\@verbatim_w);
+
+### Create a Regex for verbatim write environment
+my $verbatim_w = join q{|}, map { quotemeta } sort { length $a <=> length $b } @verbatim_w;
+$verbatim_w = qr/$verbatim_w/x;
+my $verb_wrt = qr {
+ (
+ (?:
+ \\begin\{$verbatim_w\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim_w\*?\})
+ (?!end\{$verbatim_w\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim_w\*?\}
+ )
+ )
+ }x;
+
+### Check skip environments
+my @skipped;
+if (@skip_env_tmp) {
+ my %envcheck = map { $_ => 1 } @skip_env_tmp;
+ if (exists $envcheck{PSTexample}) {
+ Log('The [PSTexample] environment is not allowed for skipping');
+ @skip_env_tmp = grep !/PSTexample/, @skip_env_tmp;
+ }
+ if (exists $envcheck{preview}) {
+ Log('The [preview] environment is not allowed for skipping');
+ @skip_env_tmp = grep !/preview/, @skip_env_tmp;
+ }
+ # Valid environments for skip
+ for my $skip (qw(pspicture tikzpicture pgfpicture psgraph postscript)) {
+ if (exists $envcheck{$skip}) {
+ push @skipped,$skip;
+ }
+ }
+}
+
+### List of environments to be skiped from extraction
+@skipped = uniq(@skip_env_tmp);
+Log('The environments that will be skiped for extraction:');
+Logarray(\@skipped);
+
+### Create a Regex for skip environment
+my $skipenv = join q{|}, map { quotemeta } sort { length $a <=> length $b } @skipped;
+$skipenv = qr/$skipenv/x;
+my $skip_env = qr {
+ (
+ (?:
+ \\begin\{$skipenv\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$skipenv\*?\})
+ (?!end\{$skipenv\*?\})|
+ (?-1)
+ )*
+ \\end\{$skipenv\*?\}
+ )
+ )
+ }x;
+
+### Check reserved environments
+my %envcheck = map { $_ => 1 } @extr_env_tmp;
+
+if (exists $envcheck{document}) {
+ Log('The [document] environment is allowed for extraction');
+ @extr_env_tmp = grep !/document/, @extr_env_tmp;
+}
+if (exists $envcheck{nopreview}) {
+ Log('The [nopreview] environment is allowed for extraction');
+ @extr_env_tmp = grep !/nopreview/, @extr_env_tmp;
+}
+
+### An array with all environments to extract, including nopreview
+my @extract_env = qw(nopreview);
+push @extract_env,@extr_env_tmp;
+
+### Some oprations for skip environments
+@extract_env = array_minus(@extract_env, @skip_env_tmp);
+@extract_env = uniq(@extract_env);
+
+### Hash for regex
+my %extract_env = crearhash(@extract_env);
+
+Log('The environments that will be searched for extraction:');
+my @real_extract_env = grep !/nopreview/, @extract_env;
+Logarray(\@real_extract_env);
+
+### Create a regex to extract environments
+my $environ = join q{|}, map { quotemeta } sort { length $a <=> length $b } @extract_env;
+$environ = qr/$environ/x;
+my $extr_tmp = qr {
+ (
+ (?:
+ \\begin\{$environ\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$environ\*?\})
+ (?!end\{$environ\*?\})|
+ (?-1)
+ )*
+ \\end\{$environ\*?\}
+ )
+ )
+ }x;
+
+### Check delete environments
+if (@delt_env_tmp) {
+ my %envcheck = map { $_ => 1 } @delt_env_tmp;
+ if (exists $envcheck{document}) {
+ Log('The [document] environment is not allowed for delete');
+ @delt_env_tmp = grep !/document/, @delt_env_tmp;
+ }
+}
+
+### An array of environments to be removed in <output file>
+my @delete_env = uniq(@delt_env_tmp);
+my %delete_env = crearhash(@delete_env);
+
+Log('The environments that will be removed in output file:');
+Logarray(\@delete_env);
+
+### Create a Regex for delete environment in <output file>
+my $delenv = join q{|}, map { quotemeta } sort { length $a <=> length $b } @delete_env;
+$delenv = qr/$delenv/x;
+my $delt_env = qr {
+ (
+ (?:
+ \\begin\{$delenv\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$delenv\*?\})
+ (?!end\{$delenv\*?\})|
+ (?-1)
+ )*
+ \\end\{$delenv\*?\}
+ )
+ )
+ }x;
+
+
+########################################################################
+# In this first part the script only detects verbatim environments and #
+# verbatim write don't distinguish between which ones are extracted, #
+# that's done in a second pass. #
+########################################################################
+
+Log('Making changes to verbatim and verbatim write environments before extraction');
+
+### First, revert %<*TAGS> to %<*tags> in all document
+my $ltxtags = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %reverse_tag;
+$document =~ s/^($ltxtags)/$reverse_tag{$1}/gmsx;
+
+### Create an array with the temporary extraction list, no verbatim environments
+my @extract_tmp = array_minus(@extract_env, @verb_env_tmp);
+@extract_tmp = array_minus(@extract_tmp, @verw_env_tmp);
+@extract_tmp = uniq(@extract_tmp);
+my %extract_tmp = crearhash(@extract_tmp);
+
+### Hash and Regex for changes, this "regex" is re-used in ALL script
+my %replace = (%verbatim, %extract_tmp, %changes_in, %document); # revert tags again :)
+my $find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+
+### We go line by line and make the changes in verbatim's envoronments (/p for ${^MATCH})
+while ($document =~ /$verb_wrt | $verb_std /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ if ($encontrado =~ /$verb_wrt/) {
+ $encontrado =~ s/($find)/$replace{$1}/g;
+ substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($document) = $pos_inicial + length $encontrado;
+ }
+ if ($encontrado =~ /$verb_std/) {
+ %replace = (%verbatim_w, %extract_tmp, %changes_in, %document);
+ $find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+ $encontrado =~ s/($find)/$replace{$1}/g;
+ substr $document, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($document) = $pos_inicial + length $encontrado;
+ }
+}
+
+### Now split document
+my ($preamble,$bodydoc,$enddoc) = $document =~ m/\A (.+?) (\\begin\{document\} .+?)(\\end\{document\}.*)\z/msx;
+
+### Internal <dtxtag> for mark verbatim and verbatim write environments
+my $dtxverb = "verbatim$tmp";
+
+### Match <dtxtags>, if they're matched, we turn them :)
+my @tag_extract = $bodydoc =~ m/(?:^\%<\*ltximg>.+?\%<\/ltximg>)/gmsx;
+my @tag_noextract = $bodydoc =~ m/(?:^\%<\*noltximg>.+?\%<\/noltximg>)/gmsx;
+
+if (@tag_extract) {
+ Log('Pass extract tags %<*ltximg> ... %</ltximg> to \begin{preview} ... \end{preview}');
+ $bodydoc =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ^\%<\*$extrtag>(.+?)\%<\/$extrtag>/\\begin\{preview\}$1\\end\{preview\}/gmsx;
+}
+if (@tag_noextract) {
+ Log('Pass no extract tags %<*noltximg> ... %</noltximg> to \begin{nopreview} ... \end{nopreview}');
+ $bodydoc =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ^\%<\*$skiptag>(.+?)\%<\/$skiptag>/\\begin\{nopreview\}$1\\end\{nopreview\}/gmsx;
+}
+
+########################################################################
+# We now make the real changes for environment extraction. Since we #
+# don't know what kind of environments are passed, need to redefine #
+# all regex to make the changes. #
+########################################################################
+
+my @new_verb_tmp = array_minus(@verbatim, @extract_env);
+$verbatim = join q{|}, map { quotemeta } sort { length $a <=> length $b } @new_verb_tmp;
+$verbatim = qr/$verbatim/x;
+$verb_std = qr {
+ (
+ (?:
+ \\begin\{$verbatim\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim\*?\})
+ (?!end\{$verbatim\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim\*?\}
+ )
+ )
+ }x;
+
+my @new_verbw_tmp = array_minus(@verbatim_w, @extract_env);
+$verbatim_w = join q{|}, map { quotemeta } sort { length $a <=> length $b } @new_verbw_tmp;
+$verbatim_w = qr/$verbatim_w/x;
+$verb_wrt = qr {
+ (
+ (?:
+ \\begin\{$verbatim_w\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim_w\*?\})
+ (?!end\{$verbatim_w\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim_w\*?\}
+ )
+ )
+ }x;
+
+### Regex using hash
+%replace = (%extract_env);
+$find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+
+### We go line by line and make the changes (/p for ${^MATCH})
+while ($bodydoc =~ /$verb_wrt | $verb_std /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ $encontrado =~ s/($find)/$replace{$1}/g;
+ substr $bodydoc, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($bodydoc) = $pos_inicial + length $encontrado;
+}
+
+### Now put a internal dtxmark in no extraction/replace environments
+Log("Pass verbatim write environments to %<*$dtxverb> ... %</$dtxverb>");
+$bodydoc =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ($verb_wrt)/\%<\*$dtxverb>$1\%<\/$dtxverb>/gmsx;
+$preamble =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ($verb_wrt)/\%<\*$dtxverb>$1\%<\/$dtxverb>/gmsx;
+
+Log("Pass verbatim environments to %<*$dtxverb> ... %</$dtxverb>");
+$bodydoc =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ($verb_std)/\%<\*$dtxverb>$1\%<\/$dtxverb>/gmsx;
+$preamble =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ($verb_std)/\%<\*$dtxverb>$1\%<\/$dtxverb>/gmsx;
+
+### Check plain TeX syntax
+my %plainsyntax = map { $_ => 1 } @extract_env; # anon hash
+
+if (exists $plainsyntax{pspicture}) {
+ Log('Convert plain \pspicture to LaTeX syntax [skip in PSTexample]');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\begin\{PSTexample\}.+?\\end\{PSTexample\}(*SKIP)(*F)|
+ \\pspicture(\*)?(.+?)\\endpspicture/\\begin\{pspicture$1\}$2\\end\{pspicture$1\}/gmsx;
+}
+
+if (exists $plainsyntax{psgraph}) {
+ Log('Convert plain \psgraph to LaTeX syntax [skip in PSTexample]');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\begin\{PSTexample\}.+?\\end\{PSTexample\}(*SKIP)(*F)|
+ \\psgraph(\*)?(.+?)\\endpsgraph/\\begin\{psgraph$1\}$2\\end\{psgraph$1\}/gmsx;
+}
+
+if (exists $plainsyntax{tikzpicture}) {
+ Log('Convert plain \tikzpicture to LaTeX syntax');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\tikzpicture(.+?)\\endtikzpicture/\\begin{tikzpicture}$1\\end{tikzpicture}/gmsx;
+}
+
+if (exists $plainsyntax{pgfpicture}) {
+ Log('Convert plain \pgfpicture to LaTeX syntax');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\pgfpicture(.+?)\\endpgfpicture/\\begin{pgfpicture}$1\\end{pgfpicture}/gmsx;
+}
+
+### Force mode for pstricks/psgraph/tikzpiture
+if ($opts_cmd{boolean}{force}) {
+ if (exists $plainsyntax{pspicture} or exists $plainsyntax{psgraph}) {
+ Log('Try to capture \psset{...} for pstricks environments [force mode]');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\begin\{PSTexample\}.+?\\end\{PSTexample\}(*SKIP)(*F)|
+ \\begin\{postscript\}.+?\\end\{postscript\}(*SKIP)(*F)|
+ (?<code>
+ (?:\\psset\{(?:\{.*?\}|[^\{])*\}.+?)? # if exist ...save
+ \\begin\{(?<env> pspicture\*?| psgraph)\} .+? \\end\{\k<env>\}
+ )
+ /\\begin\{preview\}$+{code}\\end\{preview\}/gmsx;
+ }
+ if (exists $plainsyntax{tikzpicture}) {
+ Log('Try to capture \tikzset{...} for tikzpicture environments [force mode]');
+ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\begin\{postscript\}.+?\\end\{postscript\}(*SKIP)(*F)|
+ (?<code>
+ (?:\\tikzset\{(?:\{.*?\}|[^\{])*\}.+?)? # if exist ...save
+ \\begin\{(?<env> tikzpicture)\} .+? \\end\{\k<env>\}
+ )
+ /\\begin\{preview\}$+{code}\\end\{preview\}/gmsx;
+ }
+}
+
+Log('Pass skip environments to \begin{nopreview} ... \end{nopreview}');
+$bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ \\begin\{PSTexample\}.+?\\end\{PSTexample\}(*SKIP)(*F)|
+ ($skip_env)/\\begin\{nopreview\}$1\\end\{nopreview\}/gmsx;
+
+### Pass all captured environments in body \begin{preview} ... \end{preview}
+Log('Pass all captured environments to \begin{preview} ... \end{preview}');
+$bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ($extr_tmp)/\\begin\{preview\}$1\\end\{preview\}/gmsx;
+
+########################################################################
+# All environments are now classified: #
+# Extraction -> \begin{preview} ... \end{preview} #
+# No Extraction -> \begin{nopreview} ... \end{nopreview} #
+# Verbatim's -> %<\*$dtxverb> ... <\/$dtxverb> #
+########################################################################
+
+### The %<*remove> ... %</remove> tags need a special treatment :)
+$bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ^(\%<(?:\*|\/))(remove)(\>)/$1$2$tmp$3/gmsx;
+$preamble =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ^(\%<(?:\*|\/))(remove)(\>)/$1$2$tmp$3/gmsx;
+$atbegindoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \\begin\{preview\}.+?\\end\{preview\}(*SKIP)(*F)|
+ ^(\%<(?:\*|\/))(remove)(\>)/$1$2$tmp$3/gmsx;
+
+### Pass \begin{preview} ... \end{preview} to \START{preview} ... \STOP{preview}
+### Pass \begin{nopreview} ... \end{nopreview} to \START{nopreview} ... \STOP{nopreview}
+$bodydoc =~ s/\\begin\{((no)?preview)\}/\\START\{$1\}/gmsx;
+$bodydoc =~ s/\\end\{((no)?preview)\}/\\STOP\{$1\}/gmsx;
+
+### We restore the changes of all environments in body
+my @lineas = split /\n/, $bodydoc;
+my $NEWDEL;
+for (@lineas) {
+ %replace = (%changes_out);
+ $find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+ if (/\\START\{((no)?preview)(?{ $NEWDEL = "\Q$^N" })\}/ .. /\\STOP\{$NEWDEL\}/) {
+ s/($find)/$replace{$1}/msgx;
+ }
+ if (/\%<\*($dtxverb)(?{ $NEWDEL = "\Q$^N" })>/ .. /\%<\/$NEWDEL>/) {
+ s/($find)/$replace{$1}/msgx;
+ }
+}
+$bodydoc = join "\n", @lineas;
+
+### We restore the changes of all environments in preamble
+while ($preamble =~ /\%<\*$dtxverb>(.+?)\%<\/$dtxverb>/pgmsx) {
+ %cambios = (%changes_out);
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ while (my($busco, $cambio) = each %cambios) {
+ $encontrado =~ s/\Q$busco\E/$cambio/msxg;
+ }
+ substr $preamble, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($preamble) = $pos_inicial + length $encontrado;
+}
+
+### Set wraped environments for extraction
+my $wrapping = "$scriptname$tmp";
+Log("Set up the environment [$wrapping] to encapsulate the extraction");
+
+### Set vars for match/regex
+my $BP = "\\\\begin\{$wrapping\}";
+my $EP = "\\\\end\{$wrapping\}";
+my $BE = '\\\\begin\{PSTexample\}';
+my $EE = '\\\\end\{PSTexample\}';
+
+### Wrap environments for extraction
+Log("Pass all captured environments to \\begin{$wrapping} ... \\end{$wrapping}");
+$bodydoc =~ s/\\START\{preview\}
+ (?<code>.+? )
+ \\STOP\{preview\}
+ /\\begin\{$wrapping\}$+{code}\\end\{$wrapping\}/gmsx;
+
+$bodydoc =~ s/\\START\{nopreview\}
+ (?<code>.+? )
+ \\STOP\{nopreview\}
+ /\\begin\{nopreview\}\%$tmp$+{code}\\end\{nopreview\}\%$tmp/gmsx;
+
+### We put back ltximg tags :)
+$bodydoc =~ s/($ltxtags)/$reverse_tag{$1}/gmsx;
+$preamble =~ s/($ltxtags)/$reverse_tag{$1}/gmsx;
+
+### First search PSTexample environments for extract
+my @exa_extract = $bodydoc =~ m/(?:\\begin\{$wrapping\})($BE.+?$EE)(?:\\end\{$wrapping\})/gmsx;
+my $exaNo = scalar @exa_extract;
+
+### Set vars for log and print in terminal
+my $envEXA = $exaNo > 1 ? 'PSTexample environments' : 'PSTexample environment';
+my $fileEXA = $exaNo > 1 ? 'files' : 'file';
+
+### Check if PSTexample environment found
+if ($exaNo!=0) {
+ $PSTexa = 1;
+ Log("Found $exaNo $envEXA in $name$ext");
+ my $figNo = 1;
+ for my $item (@exa_extract) {
+ Logline("%##### PSTexample environment captured number $figNo ######%");
+ Logline($item);
+ $figNo++;
+ }
+ # Add [graphic={[...]...}] to \begin{PSTexample}[...]
+ Log('Append [graphic={[...]...}] to \begin{PSTexample}[...]');
+ $figNo = 1;
+ while ($bodydoc =~ /\\begin\{$wrapping\}(\s*)?\\begin\{PSTexample\}(\[.+?\])?/gsm) {
+ my $swpl_grap = "graphic=\{\[scale=1\]$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa";
+ my $corchetes = $1;
+ my ($pos_inicial, $pos_final) = ($-[1], $+[1]);
+ if (not $corchetes) { $pos_inicial = $pos_final = $+[0]; }
+ if (not $corchetes or $corchetes =~ /\[\s*\]/) {
+ $corchetes = "[$swpl_grap-$figNo}]";
+ }
+ else { $corchetes =~ s/\]/,$swpl_grap-$figNo}]/; }
+ substr($bodydoc, $pos_inicial, $pos_final - $pos_inicial) = $corchetes;
+ pos($bodydoc) = $pos_inicial + length $corchetes;
+ }
+ continue { $figNo++; }
+ Log('Pass PSTexample environments to \begin{nopreview} ... \end{nopreview}');
+ $bodydoc =~ s/\\begin\{$wrapping\}
+ (?<code>\\begin\{PSTexample\} .+? \\end\{PSTexample\})
+ \\end\{$wrapping\}
+ /\\begin\{nopreview\}\%$tmp$+{code}\\end\{nopreview\}\%$tmp/gmsx;
+}
+
+### Second search standart environments for extract
+my @env_extract = $bodydoc =~ m/(?<=$BP)(.+?)(?=$EP)/gms;
+my $envNo = scalar @env_extract;
+
+### Set vars for log and print in terminal
+my $envSTD = $envNo > 1 ? 'standard environments' : 'standard environment';
+my $fileSTD = $envNo > 1 ? 'files' : 'file';
+
+### If any standard environments found
+if ($envNo!=0) {
+ $STDenv = 1;
+ Log("Found $envNo $envSTD in $name$ext");
+ my $figNo = 1;
+ for my $item (@env_extract) {
+ Logline("%##### Standard environment captured number $figNo ######%");
+ Logline($item);
+ $figNo++;
+ }
+}
+
+### Run script process only if any enviroment found in <input file>
+if ($envNo == 0 and $exaNo == 0) {
+ errorUsage("$scriptname can not find any environment to extract in $name$ext");
+}
+
+### Set directory to save generated files, need full path for goog log :)
+my $imgdirpath = File::Spec->rel2abs($opts_cmd{string}{imgdir});
+
+if (-e $opts_cmd{string}{imgdir}) {
+ Infoline("The generated files will be saved in $imgdirpath");
+}
+else {
+ Infoline("Creating the directory $imgdirpath to save the generated files");
+ Infocolor('Running', "mkdir $imgdirpath");
+ Logline("[perl] mkdir($opts_cmd{string}{imgdir},0744)");
+ mkdir $opts_cmd{string}{imgdir},0744 or errorUsage("Can't create the directory $opts_cmd{string}{imgdir}");
+}
+
+### Set compiler
+my $compiler = $opts_cmd{compiler}{xetex} ? 'xelatex'
+ : $opts_cmd{compiler}{luatex} ? 'lualatex'
+ : $opts_cmd{compiler}{latex} ? 'latex'
+ : $opts_cmd{compiler}{dvips} ? 'latex'
+ : $opts_cmd{compiler}{dvilua} ? 'dvilualatex'
+ : $opts_cmd{compiler}{dvipdf} ? 'latex'
+ : $opts_cmd{compiler}{arara} ? 'arara'
+ : 'pdflatex'
+ ;
+
+if (!$opts_cmd{boolean}{norun}) {
+ if ($compiler eq 'arara') {
+ Log("The file will be processed using $compiler, no ducks will be harmed in this process");
+ }
+ else { Log("The file will be processed using $compiler"); }
+}
+
+### Set option for pdfcrop (last version of pdfcrop https://github.com/ho-tex/pdfcrop)
+my $opt_crop = $opts_cmd{compiler}{xetex} ? "--xetex --margins $opts_cmd{string}{margin}"
+ : $opts_cmd{compiler}{luatex} ? "--luatex --margins $opts_cmd{string}{margin}"
+ : $opts_cmd{compiler}{latex} ? "--margins $opts_cmd{string}{margin}"
+ : "--pdftex --margins $opts_cmd{string}{margin}"
+ ;
+
+### Set options for preview packpage
+my $opt_prew = $opts_cmd{compiler}{xetex} ? 'xetex,'
+ : $opts_cmd{compiler}{latex} ? q{}
+ : $opts_cmd{compiler}{dvipdf} ? q{}
+ : $opts_cmd{compiler}{dvips} ? q{}
+ : $opts_cmd{compiler}{dvilua} ? q{}
+ : 'pdftex,'
+ ;
+
+########################################################################
+# One problem with using arara is that we don't know what the file is #
+# really compiled with, this affects [preview] and [pdfcrop]. #
+########################################################################
+
+### Try to capture arara:compiler in preamble of <input file>
+my @arara_engines = qw (latex pdflatex lualatex xelatex luahbtex);
+my $arara_engines = join q{|}, map { quotemeta} sort { length $a <=> length $b } @arara_engines;
+$arara_engines = qr/\b(?:$arara_engines)/x;
+my $arara_rule = qr /^(?:\%\s{1}arara[:]\s{1}) ($arara_engines) /msx;
+
+### Set options for [compiler], [preview] and [pdfcrop]
+if ($compiler eq 'arara') {
+ Log('Trying to detect some suported [engine] in the rules of arara');
+ my @engine = $atbegindoc =~ m/$arara_rule/msx;
+ my %engine = map { $_ => 1 } @engine; # anon hash
+ if (exists $engine{latex}) {
+ Log('The [latex] engine was found in arara rule');
+ # Set options for [preview] and [pdfcrop]
+ $opt_crop = "--margins $opts_cmd{string}{margin}";
+ $opt_prew = q{};
+ }
+ elsif (exists $engine{lualatex} or exists $engine{luahbtex}) {
+ Log('The [lualatex] engine was found in arara rule');
+ # Set options for [preview] and [pdfcrop]
+ $opt_crop = "--luatex --margins $opts_cmd{string}{margin}";
+ $opt_prew = 'pdftex,';
+ }
+ elsif (exists $engine{xelatex}) {
+ Log('The [xelatex] engine was found in arara rule');
+ # Set options for [preview] and [pdfcrop]
+ $opt_crop = "--xetex --margins $opts_cmd{string}{margin}";
+ $opt_prew = 'xetex,';
+ }
+ elsif (exists($engine{pdflatex})) {
+ Log('The [pdflatex] engine was found in arara rule');
+ # Set options for [preview] and [pdfcrop]
+ $opt_crop = "--pdftex --margins $opts_cmd{string}{margin}";
+ $opt_prew = 'pdftex,';
+ }
+ else {
+ Log('No supported [engine] could be detected, default values will be used');
+ # Set options for [preview] and [pdfcrop]
+ $opt_crop = "--pdftex --margins $opts_cmd{string}{margin}";
+ $opt_prew = 'pdftex,';
+ }
+}
+
+### Message in command line for compiler
+my $msg_compiler = $opts_cmd{compiler}{xetex} ? 'xelatex'
+ : $opts_cmd{compiler}{luatex} ? 'lualatex'
+ : $opts_cmd{compiler}{latex} ? 'latex>dvips>ps2pdf'
+ : $opts_cmd{compiler}{dvips} ? 'latex>dvips>ps2pdf'
+ : $opts_cmd{compiler}{dvilua} ? 'dvilualatex>dvips>ps2pdf'
+ : $opts_cmd{compiler}{dvipdf} ? 'latex>dvipdfmx'
+ : $opts_cmd{compiler}{arara} ? 'arara'
+ : 'pdflatex'
+ ;
+
+### Set write18 for compiler
+if ($opts_cmd{boolean}{shell}) {
+ $write18 = '-shell-escape';
+ $write18 = '--enable-write18' if defined $ENV{'TEXSYSTEM'} and $ENV{'TEXSYSTEM'} =~ /miktex/i;
+}
+else {
+ $write18 = '-no-shell-escape';
+ $write18 = '--disable-write18' if defined $ENV{'TEXSYSTEM'} and $ENV{'TEXSYSTEM'} =~ /miktex/i;
+}
+
+### Set options for compiler
+my $opt_compiler = $opts_cmd{compiler}{arara} ? '--log'
+ : "$write18 -interaction=nonstopmode -recorder"
+ ;
+
+if (!$opts_cmd{boolean}{norun}) {
+ Log("The options '$opt_compiler' will be passed to [$compiler]");
+}
+
+### Set -q for system command line (gs, poppler-utils, dvips, dvipdfmx)
+my $quiet = $verbose ? q{}
+ : '-q'
+ ;
+
+### Set options for ghostscript in command line
+my %opt_gs_dev = (
+ pdf => '-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite',
+ gray => '-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sColorConversionStrategy=Gray -sProcessColorModel=DeviceGray',
+ png => "-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -r$opts_cmd{string}{dpi}",
+ bmp => "-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=bmp32b -r$opts_cmd{string}{dpi}",
+ jpg => "-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=jpeg -r$opts_cmd{string}{dpi} -dJPEGQ=100 -dGraphicsAlphaBits=4 -dTextAlphaBits=4",
+ tif => "-dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=tiff32nc -r$opts_cmd{string}{dpi}",
+ );
+
+### Set executable from poppler-utils
+my %cmd_poppler = (
+ eps => "pdftops",
+ ppm => "pdftoppm",
+ svg => "pdftocairo",
+ );
+
+### Set options for poppler-utils
+my %opt_poppler = (
+ eps => "$quiet -eps",
+ ppm => "$quiet -r $opts_cmd{string}{dpi}",
+ svg => "$quiet -svg",
+ );
+
+### Copy preamble and body for temp file with all environments
+my $atbeginout = $atbegindoc;
+my $preamout = $preamble;
+my $tmpbodydoc = $bodydoc;
+
+### Match \pagestyle and \thispagestyle in preamble
+my $style_page = qr /(?:\\)(?:this)?(?:pagestyle\{) (.+?) (?:\})/x;
+my @style_page = $preamout =~ m/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)| $style_page/gmsx;
+my %style_page = map { $_ => 1 } @style_page; # anon hash
+
+### Seting \pagestyle{empty} for subfiles and process
+if (@style_page) {
+ if (!exists $style_page{empty}) {
+ Log("Replacing page style for generated files");
+ $preamout =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ (\\(this)?pagestyle)(?:\{.+?\})/$1\{empty\}/gmsx;
+ }
+}
+else {
+ Log('Add \pagestyle{empty} for generated files');
+ $preamout = $preamout."\\pagestyle\{empty\}\n";
+}
+
+#### Remove wraped postscript environments provide by pst-pdf, auto-pst-pdf, auto-pst-pdf-lua pkgs
+Log("Convert postscript environments to \\begin\{$wrapping\} ... \\end\{$wrapping\} for standalone files");
+$tmpbodydoc =~ s/(?:$BP)(?:\\begin\{postscript\})(?:\s*\[ [^]]*? \])?
+ (?<code>.+?)
+ (?:\\end\{postscript\})
+ (?:$EP)
+ /\\begin\{$wrapping\}$+{code}\\end\{$wrapping\}/gmsx;
+
+### We created a preamble for standalone files
+my $sub_prea = "$atbeginout$preamout".'\begin{document}';
+
+### Revert changes
+$sub_prea =~ s/\%<\*$dtxverb>\s*(.+?)\s*\%<\/$dtxverb>/$1/gmsx;
+%replace = (%changes_out);
+$find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+$sub_prea =~ s/($find)/$replace{$1}/g;
+$sub_prea =~ s/(remove$tmp)/remove/g;
+
+### Write standalone files for environments
+if ($outsrc) {
+ my $src_name = "$name-$opts_cmd{string}{prefix}-";
+ my $srcNo = 1;
+ if ($opts_cmd{boolean}{srcenv}) {
+ Log('Extract source code of all captured environments without preamble');
+ if ($STDenv) {
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-1$ext") {
+ Log("Recreating $envNo $fileSTD [$ext] with source code for $envSTD in $imgdirpath");
+ print "Recreating $envNo $fileSTD ", color('magenta'), "[$ext]",
+ color('reset'), " with source code for $envSTD\r\n";
+ }
+ else {
+ Log("Creating $envNo $fileSTD [$ext] with source code for $envSTD in $imgdirpath");
+ print "Creating $envNo $fileSTD ", color('magenta'), "[$ext]",
+ color('reset'), " with source code for $envSTD\r\n";
+ }
+ # Write files
+ while ($tmpbodydoc =~ m/$BP\s*(?<env_src>.+?)\s*$EP/gms) {
+ open my $outexasrc, '>', "$opts_cmd{string}{imgdir}/$src_name$srcNo$ext";
+ print {$outexasrc} $+{'env_src'};
+ close $outexasrc;
+ }
+ continue { $srcNo++; }
+ }
+ if ($PSTexa) {
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-1$ext") {
+ Log("Recreating $exaNo $fileEXA [$ext] with source code for $envEXA in $imgdirpath");
+ print "Recreating $exaNo $fileEXA ", color('magenta'), "[$ext]",
+ color('reset'), " with source code for $envEXA\r\n";
+ }
+ else {
+ Log("Creating $exaNo $fileEXA [$ext] with source code for $envEXA in $imgdirpath");
+ print "Creating $exaNo $fileEXA ", color('magenta'), "[$ext]",
+ color('reset'), " with source code for $envEXA\r\n";
+ }
+ # Write files
+ while ($tmpbodydoc =~ m/$BE\[.+?(?<pst_exa_name>$opts_cmd{string}{imgdir}\/.+?-\d+)\}\]\s*(?<exa_src>.+?)\s*$EE/gms) {
+ open my $outstdsrc, '>', "$+{'pst_exa_name'}$ext";
+ print {$outstdsrc} $+{'exa_src'};
+ close $outstdsrc;
+ }
+ }
+ }
+ if ($opts_cmd{boolean}{subenv}) {
+ Log('Extract source code of all captured environments with preamble');
+ if ($STDenv) {
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-1$ext") {
+ Log("Recreating a $envNo standalone $fileSTD [$ext] for $envSTD in $imgdirpath");
+ print "Recreating a $envNo standalone $fileSTD ", color('magenta'), "[$ext]",
+ color('reset'), " for $envSTD\r\n";
+ }
+ else {
+ Log("Creating a $envNo standalone $fileSTD [$ext] for $envSTD in $imgdirpath");
+ print "Creating a $envNo standalone $fileSTD ", color('magenta'), "[$ext]",
+ color('reset'), " for $envSTD\r\n";
+ }
+ # Write files
+ while ($tmpbodydoc =~ m/$BP(?:\s*)?(?<env_src>.+?)(?:\s*)?$EP/gms) {
+ open my $outstdfile, '>', "$opts_cmd{string}{imgdir}/$src_name$srcNo$ext";
+ print {$outstdfile} "$sub_prea\n$+{'env_src'}\n\\end\{document\}";
+ close $outstdfile;
+ }
+ continue { $srcNo++; }
+ }
+ if ($PSTexa) {
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-1$ext") {
+ Log("Recreating a $exaNo standalone $fileEXA [$ext] for $envEXA in $imgdirpath");
+ print "Recreating a $exaNo standalone $fileEXA ", color('magenta'), "[$ext]",
+ color('reset'), " for $envEXA\r\n";
+ }
+ else {
+ Log("Creating a $exaNo standalone $fileEXA [$ext] for $envEXA in $imgdirpath");
+ print "Creating a $exaNo standalone $fileEXA ", color('magenta'), "[$ext]",
+ color('reset'), " for $envEXA\r\n";
+ }
+ # Write files
+ while ($tmpbodydoc =~ m/$BE\[.+?(?<pst_exa_name>$opts_cmd{string}{imgdir}\/.+?-\d+)\}\]\s*(?<exa_src>.+?)\s*$EE/gms) {
+ open my $outexafile, '>', "$+{'pst_exa_name'}$ext";
+ print {$outexafile} "$sub_prea\n$+{'exa_src'}\n\\end\{document\}";
+ close $outexafile;
+ }
+ }
+ }
+}
+
+### Store options for preview and pst-pdf (add at begin document)
+my $previewpkg = <<"EXTRA";
+\\PassOptionsToPackage\{inactive\}\{pst-pdf\}%
+\\AtBeginDocument\{%
+\\RequirePackage\[inactive\]\{pst-pdf\}%
+\\RequirePackage\[${opt_prew}active,tightpage\]\{preview\}%
+\\renewcommand\\PreviewBbAdjust\{-60pt -60pt 60pt 60pt\}\}%
+EXTRA
+
+### Store options for pst-pdf (add at begin document)
+my $pstpdfpkg = <<'EXTRA';
+\PassOptionsToPackage{inactive}{pst-pdf}
+\AtBeginDocument{%
+\RequirePackage[inactive]{pst-pdf}}%
+EXTRA
+
+### First match preview package in preamble (prevent option clash)
+my $REQPACK = quotemeta'\RequirePackage';
+my $USEPACK = quotemeta'\usepackage';
+my $CORCHETES = qr/\[ [^]]*? \]/x;
+
+my $PALABRAS = qr/\b (?: preview )/x;
+my $FAMILIA = qr/\{ \s* $PALABRAS (?: \s* [,] \s* $PALABRAS )* \s* \}(\%*)?/x;
+
+Log('Remove preview package (if found) in preamble [memory]');
+$preamout =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ ^ $USEPACK (?: $CORCHETES )? $FAMILIA \s*//msxg;
+$preamout =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ (?: ^ $USEPACK \{ | \G) [^}]*? \K (,?) \s* $PALABRAS (\s*) (,?) /$1 and $3 ? ',' : $1 ? $2 : ''/gemsx;
+$preamout =~ s/^\\usepackage\{\}(?:[\t ]*(?:\r?\n|\r))+/\n/gmsx;
+
+### Remove %<*$dtxverb> ... %</$dtxverb> in tmpbodydoc and preamout
+$tmpbodydoc =~ s/\%<\*$dtxverb>(.+?)\%<\/$dtxverb>/$1/gmsx;
+$preamout =~ s/\%<\*$dtxverb>(.+?)\%<\/$dtxverb>/$1/gmsx;
+
+### Adjust nopreview environments
+$tmpbodydoc =~ s/\\begin\{nopreview\}\%$tmp
+ (?<code> .+?)
+ \\end\{nopreview\}\%$tmp
+ /\\begin\{nopreview\}\n$+{code}\n\\end\{nopreview\}\n/gmsx;
+
+### Adjust $wrapping environments (need \n after close for some environments, like a Verbatim)
+$tmpbodydoc =~ s/\\begin\{$wrapping\}
+ (?<code>.+?)
+ \\end\{$wrapping\}
+ /\\begin\{$wrapping\}\n$+{code}\n\\end\{$wrapping\}/gmsx;
+
+### Reverse changes for temporary file with all env (no in -exa file)
+$tmpbodydoc =~ s/($find)/$replace{$1}/g;
+$tmpbodydoc =~ s/(\%$tmp)//g;
+$tmpbodydoc =~ s/(remove$tmp)/remove/g;
+$preamout =~ s/($find)/$replace{$1}/g;
+$atbeginout =~ s/(remove$tmp)/remove/g;
+$atbeginout =~ s/($find)/$replace{$1}/g;
+
+### We created a preamble for individual files with all environments
+$sub_prea = $opts_cmd{boolean}{noprew} ? "$atbeginout$pstpdfpkg$preamout".'\begin{document}'
+ : "$atbeginout$previewpkg$preamout"
+ ;
+
+### Create a one file with "all" PSTexample environments extracted
+if ($PSTexa) {
+ @exa_extract = undef;
+ Log("Adding packages to $name-$opts_cmd{string}{prefix}-exa-$tmp$ext");
+ Logline($pstpdfpkg);
+ Log('Convert plain Tex syntax for pspicture and psgraph to LaTeX syntax in PSTexample environments');
+ while ($tmpbodydoc =~ m/$BE\[.+? $opts_cmd{string}{imgdir}\/.+?-\d+\}\] .+?$EE/pgsmx ) { # search
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ $encontrado =~ s/\\pspicture(\*)?(.+?)\\endpspicture/\\begin\{pspicture$1\}$2\\end\{pspicture$1\}/gmsx;
+ $encontrado =~ s/\\psgraph(\*)?(.+?)\\endpsgraph/\\begin\{psgraph$1\}$2\\end\{psgraph$1\}/gmsx;
+ substr $tmpbodydoc, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($tmpbodydoc) = $pos_inicial + length $encontrado;
+ }
+ # Write files
+ Infoline("Creating $name-$opts_cmd{string}{prefix}-exa-$tmp$ext with $exaNo $envEXA extracted");
+ while ($tmpbodydoc =~ m/$BE\[.+? $opts_cmd{string}{imgdir}\/.+?-\d+\}\](?<exa_src>.+?)$EE/gmsx ) { # search
+ push @exa_extract, $+{'exa_src'}."\\newpage\n";
+ open my $allexaenv, '>', "$name-$opts_cmd{string}{prefix}-exa-$tmp$ext";
+ print {$allexaenv} "$atbeginout$pstpdfpkg$preamout".'\begin{document}'."@exa_extract"."\\end\{document\}";
+ close $allexaenv;
+ }
+ # Remove [graphic={...}] in PSTexample example environments
+ $tmpbodydoc =~ s/($BE)(?:\[graphic=\{\[scale=1\]$opts_cmd{string}{imgdir}\/.+?-\d+\}\])/$1/gmsx;
+ $tmpbodydoc =~ s/($BE\[.+?)(?:,graphic=\{\[scale=1\]$opts_cmd{string}{imgdir}\/.+?-\d+\})(\])/$1$2/gmsx;
+ # Moving and renaming
+ if ($opts_cmd{boolean}{norun}) {
+ Infoline("Moving and renaming $name-$opts_cmd{string}{prefix}-exa-$tmp$ext to $name-$opts_cmd{string}{prefix}-exa-all$ext");
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-all$ext") {
+ Infocolor('Warning', "The file [$name-$opts_cmd{string}{prefix}-exa-all$ext] already exists and will be rewritten");
+ Log("Rewriting the file $name-$opts_cmd{string}{prefix}-exa-all$ext in $imgdirpath");
+ }
+ else {
+ Log("Writing the file $name-$opts_cmd{string}{prefix}-exa-all$ext in $imgdirpath");
+ }
+ if ($verbose) {
+ Infocolor('Running', "mv $workdir/$name-$opts_cmd{string}{prefix}-exa-$tmp$ext $imgdirpath/$name-$opts_cmd{string}{prefix}-exa-all$ext");
+ }
+ else {
+ Infocolor('Running', "mv $name-$opts_cmd{string}{prefix}-exa-$tmp$ext ./$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-all$ext");
+ }
+ Logline("[perl] move($workdir/$name-$opts_cmd{string}{prefix}-exa-$tmp$ext, $imgdirpath/$name-$opts_cmd{string}{prefix}-exa-all$ext)");
+ move("$workdir/$name-$opts_cmd{string}{prefix}-exa-$tmp$ext", "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-all$ext")
+ or die "* Error!!: Couldn't be renamed $name-$opts_cmd{string}{prefix}-exa-$tmp$ext to ./$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-exa-all$ext";
+ }
+}
+
+### Create a one file with "all" standard environments extracted
+if ($STDenv) {
+ if ($opts_cmd{boolean}{noprew}) {
+ Log("Creating $name-$opts_cmd{string}{prefix}-$tmp$ext with $envNo $envSTD extracted [no preview]");
+ print "Creating $name-$opts_cmd{string}{prefix}-$tmp$ext with $envNo $envSTD extracted",
+ color('magenta'), " [no preview]\r\n",color('reset');
+ }
+ else {
+ Log("Creating $name-$opts_cmd{string}{prefix}-$tmp$ext with $envNo $envSTD extracted [preview]");
+ print "Creating $name-$opts_cmd{string}{prefix}-$tmp$ext with $envNo $envSTD extracted",
+ color('magenta'), " [preview]\r\n",color('reset');
+ }
+ open my $allstdenv, '>', "$name-$opts_cmd{string}{prefix}-$tmp$ext";
+ if ($opts_cmd{boolean}{noprew}) {
+ my @env_extract;
+ while ($tmpbodydoc =~ m/(?:$BP)(?<env_src>.+?)(?:$EP)/gms) {
+ push @env_extract, $+{'env_src'}."\\newpage\n";
+ }
+ Log("Adding packages to $name-$opts_cmd{string}{prefix}-$tmp$ext");
+ Logline($pstpdfpkg);
+ print {$allstdenv} $sub_prea."@env_extract"."\\end{document}";
+ }
+ else {
+ Log("Adding packages to $name-$opts_cmd{string}{prefix}-$tmp$ext");
+ Logline($previewpkg);
+ Log("Convert $wrapping to preview environments in $name-$opts_cmd{string}{prefix}-$tmp$ext");
+ # Convert $wrapping to preview environments
+ $tmpbodydoc =~ s/\\begin\{$wrapping\}(?<code>.+?)\\end\{$wrapping\}
+ /\\begin\{preview\}$+{code}\\end\{preview\}\n/gmsx;
+ print {$allstdenv} $sub_prea.$tmpbodydoc."\n\\end{document}";
+ }
+ close $allstdenv;
+ if ($opts_cmd{boolean}{norun}) {
+ # Moving and renaming
+ Infoline("Moving and renaming $name-$opts_cmd{string}{prefix}-$tmp$ext to $name-$opts_cmd{string}{prefix}-all$ext");
+ if (-e "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-all$ext") {
+ Infocolor('Warning', "The file [$name-$opts_cmd{string}{prefix}-all$ext] already exists and will be rewritten");
+ Log("Rewriting the file $name-$opts_cmd{string}{prefix}-all$ext in $imgdirpath");
+ }
+ else {
+ Log("Writing the file $name-$opts_cmd{string}{prefix}-all$ext in $imgdirpath");
+ }
+ if ($verbose) {
+ Infocolor('Running', "mv $workdir/$name-$opts_cmd{string}{prefix}-$tmp$ext $imgdirpath/$name-$opts_cmd{string}{prefix}-all$ext");
+ }
+ else {
+ Infocolor('Running', "mv $name-$opts_cmd{string}{prefix}-$tmp$ext ./$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-all$ext");
+ }
+ Logline("[perl] move($workdir/$name-$opts_cmd{string}{prefix}-$tmp$ext, $imgdirpath/$name-$opts_cmd{string}{prefix}-all$ext)");
+ move("$workdir/$name-$opts_cmd{string}{prefix}-$tmp$ext", "$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-all$ext")
+ or die "* Error!!: Couldn't be renamed $name-$opts_cmd{string}{prefix}-$tmp$ext to ./$opts_cmd{string}{imgdir}/$name-$opts_cmd{string}{prefix}-all$ext";
+ }
+}
+
+### Compiler and generate PDF files
+if (!$opts_cmd{boolean}{norun}) {
+Log('Generate a PDF file with all captured environments');
+my @compiler = (1..$opts_cmd{string}{runs});
+opendir (my $DIR, $workdir);
+ while (readdir $DIR) {
+ if (/(?<name>$name-$opts_cmd{string}{prefix}(-exa)?)(?<type>-$tmp$ext)/) {
+ Log("Compiling the file $+{name}$+{type} using [$msg_compiler]");
+ print "Compiling the file $+{name}$+{type} using ", color('magenta'), "[$msg_compiler]\r\n",color('reset');
+ for (@compiler){
+ RUNOSCMD("$compiler $opt_compiler","$+{name}$+{type}",'show');
+ }
+ # Compiling file using latex>dvips>ps2pdf
+ if ($compiler eq 'dvips' or $compiler eq 'latex' or $compiler eq 'dvilualatex') {
+ RUNOSCMD("dvips $quiet -Ppdf", "-o $+{name}-$tmp.ps $+{name}-$tmp.dvi",'show');
+ RUNOSCMD("ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None", "$+{name}-$tmp.ps $+{name}-$tmp.pdf",'show');
+ }
+ # Compiling file using latex>dvipdfmx
+ if ($compiler eq 'dvipdf') {
+ RUNOSCMD("dvipdfmx $quiet", "$+{name}-$tmp.dvi",'show');
+ }
+ # Moving and renaming temp files with source code
+ Infoline("Moving and renaming $+{name}$+{type} to $+{name}-all$ext");
+ if (-e "$opts_cmd{string}{imgdir}/$+{name}-all$ext") {
+ Infocolor('Warning', "The file [$+{name}-all$ext] already exists and will be rewritten");
+ Log("Rewriting the file $+{name}-all$ext with all source for environments in $imgdirpath");
+ }
+ else {
+ Log("Writing the file $+{name}-all$ext with all source for environments in $imgdirpath");
+ }
+ if ($verbose){
+ Infocolor('Running', "mv $workdir/$+{name}$+{type} $imgdirpath/$+{name}-all$ext");
+ }
+ else {
+ Infocolor('Running', "mv $+{name}$+{type} ./$opts_cmd{string}{imgdir}/$+{name}-all$ext");
+ }
+ Logline("[perl] move($workdir/$+{name}$+{type}, $imgdirpath/$+{name}-all$ext)");
+ move("$workdir/$+{name}$+{type}", "$opts_cmd{string}{imgdir}/$+{name}-all$ext")
+ or die "* Error!!: Couldn't be renamed $+{name}$+{type} to $opts_cmd{string}{imgdir}/$+{name}-all$ext";
+ # pdfcrop
+ if (!$opts_cmd{boolean}{nocrop}) {
+ Infoline("Cropping the file $+{name}-$tmp.pdf");
+ RUNOSCMD("pdfcrop $opt_crop", "$+{name}-$tmp.pdf $+{name}-$tmp.pdf",'show');
+ }
+ # gray
+ if ($opts_cmd{boolean}{gray}) {
+ Infoline("Creating the file $+{name}-all.pdf [gray] in $tempDir");
+ RUNOSCMD("$gscmd $quiet $opt_gs_dev{gray} ","-o $tempDir/$+{name}-all.pdf $workdir/$+{name}-$tmp.pdf",'show');
+ }
+ else {
+ Infoline("Creating the file $+{name}-all.pdf in $tempDir");
+ if ($verbose){
+ Infocolor('Running', "mv $workdir/$+{name}-$tmp.pdf $tempDir/$+{name}-all.pdf");
+ }
+ else { Infocolor('Running', "mv $+{name}-$tmp.pdf $tempDir/$+{name}-all.pdf"); }
+ # Renaming pdf file
+ Logline("[perl] move($workdir/$+{name}-$tmp.pdf, $tempDir/$+{name}-all.pdf)");
+ move("$workdir/$+{name}-$tmp.pdf", "$tempDir/$+{name}-all.pdf")
+ or die "* Error!!: Couldn't be renamed $+{name}-$tmp.pdf to $tempDir/$+{name}-all.pdf";
+ }
+ }
+ }
+closedir $DIR;
+}
+
+### Create image formats in separate files
+if (!$opts_cmd{boolean}{norun}) {
+ Log("Creating the image formats: $format, working on $tempDir");
+ opendir(my $DIR, $tempDir);
+ while (readdir $DIR) {
+ # PDF/PNG/JPG/BMP/TIFF format suported by ghostscript
+ if (/(?<name>$name-$opts_cmd{string}{prefix}(-exa)?)(?<type>-all\.pdf)/) {
+ for my $var (qw(pdf png jpg bmp tif)) {
+ if (defined $opts_cmd{image}{$var}) {
+ Log("Generating format [$var] from file $+{name}$+{type} in $imgdirpath using $gscmd");
+ print 'Generating format', color('blue'), " [$var] ", color('reset'),"from file $+{name}$+{type}\r\n";
+ RUNOSCMD("$gscmd $quiet $opt_gs_dev{$var} ", "-o $workdir/$opts_cmd{string}{imgdir}/$+{name}-%1d.$var $tempDir/$+{name}$+{type}",'show');
+ }
+ }
+ }
+ # EPS/PPM/SVG format suported by poppler-utils
+ if (/(?<name>$name-$opts_cmd{string}{prefix}-exa)(?<type>-all\.pdf)/) { # pst-exa package
+ for my $var (qw(eps ppm svg)) {
+ if (defined $opts_cmd{image}{$var}) {
+ Log("Generating format [$var] from file $+{name}$+{type} in $imgdirpath using $cmd_poppler{$var}");
+ print 'Generating format', color('blue'), " [$var] ", color('reset'),"from file $+{name}$+{type}\r\n";
+ if (!$verbose){
+ Infocolor('Running', "$cmd_poppler{$var} $opt_poppler{$var}");
+ }
+ for (my $epsNo = 1; $epsNo <= $exaNo; $epsNo++) {
+ RUNOSCMD("$cmd_poppler{$var} $opt_poppler{$var}", "-f $epsNo -l $epsNo $tempDir/$+{name}$+{type} $workdir/$opts_cmd{string}{imgdir}/$+{name}-$epsNo.$var",'only');
+ }
+ }
+ }
+ }
+ if (/(?<name>$name-$opts_cmd{string}{prefix})(?<type>-all\.pdf)/) {
+ for my $var (qw(eps ppm svg)) {
+ if (defined $opts_cmd{image}{$var}) {
+ Log("Generating format [$var] from file $+{name}$+{type} in $imgdirpath using $cmd_poppler{$var}");
+ print 'Generating format', color('blue'), " [$var] ", color('reset'),"from file $+{name}$+{type}\r\n";
+ if (!$verbose){
+ Infocolor('Running', "$cmd_poppler{$var} $opt_poppler{$var}");
+ }
+ for (my $epsNo = 1; $epsNo <= $envNo; $epsNo++) {
+ RUNOSCMD("$cmd_poppler{$var} $opt_poppler{$var}", "-f $epsNo -l $epsNo $tempDir/$+{name}$+{type} $workdir/$opts_cmd{string}{imgdir}/$+{name}-$epsNo.$var",'only');
+ }
+ }
+ }
+ }
+ } # close while
+ closedir $DIR;
+ # Renaming PPM image files
+ if (defined $opts_cmd{image}{ppm}) {
+ Log("Renaming [ppm] images in $imgdirpath");
+ if ($verbose){
+ print 'Renaming', color('blue'), " [ppm] ", color('reset'),"images in $imgdirpath\r\n";
+ }
+ opendir(my $DIR, $opts_cmd{string}{imgdir});
+ while (readdir $DIR) {
+ if (/(?<name>$name-$opts_cmd{string}{prefix}(-exa)?-\d+\.ppm)(?<sep>-\d+)(?<ppm>\.ppm)/) {
+ if ($verbose){
+ Infocolor('Running', "mv $+{name}$+{sep}$+{ppm} $+{name}");
+ }
+ Logline("[perl] move($imgdirpath/$+{name}$+{sep}$+{ppm}, $imgdirpath/$+{name})");
+ move("$opts_cmd{string}{imgdir}/$+{name}$+{sep}$+{ppm}", "$opts_cmd{string}{imgdir}/$+{name}")
+ or die "* Error!!: Couldn't be renamed $+{name}$+{sep}$+{ppm} to $+{name}";
+ }
+ }
+ closedir $DIR;
+ }
+} # close run
+
+### Constant
+my $findgraphicx = 'true';
+
+### pst-exa package
+my $pstexa = qr/(?:\\ usepackage) \[\s*(.+?)\s*\] (?:\{\s*(pst-exa)\s*\} ) /x;
+my @pst_exa;
+my %pst_exa;
+
+### Possible packages that load graphicx
+my @pkgcandidates = qw (
+ rotating epsfig lyluatex xunicode parsa xepersian-hm gregoriotex teixmlslides
+ teixml fotex hvfloat pgfplots grfpaste gmbase hep-paper postage schulealt
+ schule utfsym cachepic abc doclicense rotating epsfig semtrans mgltex
+ graphviz revquantum mpostinl cmpj cmpj2 cmpj3 chemschemex register papercdcase
+ flipbook wallpaper asyprocess draftwatermark rutitlepage dccpaper-base
+ nbwp-manual mandi fmp toptesi isorot pinlabel cmll graphicx-psmin ptmxcomp
+ countriesofeurope iodhbwm-templates fgruler combinedgraphics pax pdfpagediff
+ psfragx epsdice perfectcut upmethodology-fmt ftc-notebook tabvar vtable
+ teubner pas-cv gcard table-fct pdfpages keyfloat pdfscreen showexpl simplecd
+ ifmslide grffile reflectgraphics markdown bclogo tikz-page pst-uml realboxes
+ musikui csbulobalka lwarp mathtools sympytex mpgraphics miniplot.sty:77
+ dottex pdftricks2 feupphdteses tex4ebook axodraw2 hagenberg-thesis dlfltxb
+ hu-berlin-bundle draftfigure quicktype endofproofwd euflag othelloboard
+ pdftricks unswcover breqn pdfswitch latex-make figlatex repltext etsvthor
+ cyber xcookybooky xfrac mercatormap chs-physics-report tikzscale ditaa
+ pst-poker gmp CJKvert asypictureb hletter tikz-network powerdot-fuberlin
+ skeyval gnuplottex plantslabels fancytooltips ieeepes pst-vectorian
+ phfnote overpic xtuformat stubs graphbox ucs pdfwin metalogo mwe
+ inline-images asymptote UNAMThesis authorarchive amscdx pst-pdf adjustbox
+ trimclip fixmetodonotes incgraph scanpages pst-layout alertmessage
+ svg quiz2socrative realhats autopdf egplot decorule figsize tikzexternal
+ pgfcore frontespizio textglos graphicx tikz tcolorbox pst-exa
+ );
+
+my $pkgcandidates = join q{|}, map { quotemeta } sort { length $a <=> length $b } @pkgcandidates;
+$pkgcandidates = qr/$pkgcandidates/x;
+my @graphicxpkg;
+
+### \graphicspath
+my $graphicspath= qr/\\ graphicspath \{ ((?: $llaves )+) \}/ix;
+my @graphicspath;
+
+### Replacing the extracted environments with \\includegraphics
+if ($outfile) {
+ Log("Convert standard extracted environments to \\includegraphics for $opts_cmd{string}{output}$outext");
+ my $grap = "\\includegraphics[scale=1]{$name-$opts_cmd{string}{prefix}-";
+ my $close = '}';
+ my $imgNo = 1;
+ $bodydoc =~ s/$BP.+?$EP/$grap@{[$imgNo++]}$close/msg;
+ $preamble = "$atbegindoc$preamble";
+ my @tag_remove_preamble = $preamble =~ m/(?:^\%<\*remove$tmp>.+?\%<\/remove$tmp>)/gmsx;
+ if (@tag_remove_preamble) {
+ Log("Removing the content between <*remove> ... </remove> tags in preamble for $opts_cmd{string}{output}$outext");
+ $preamble =~ s/^\%<\*remove$tmp>\s*(.+?)\s*\%<\/remove$tmp>(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+ }
+ # To be sure that the package is in the main document and not in a
+ # verbatim write environment we make the changes using the hash and
+ # range operator in a copy
+ my %tmpreplace = (
+ 'graphicx' => 'TMPGRAPHICXTMP',
+ 'pst-exa' => 'TMPPSTEXATMP',
+ 'graphicspath' => 'TMPGRAPHICSPATHTMP',
+ );
+ my $findtmp = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %tmpreplace;
+ my $preambletmp = $preamble;
+ my @lineas = split /\n/, $preambletmp;
+ # We remove the commented lines
+ s/\%.*(?:[\t ]*(?:\r?\n|\r))?+//msg foreach @lineas;
+ # We make the changes in the environments verbatim write
+ my $DEL;
+ for (@lineas) {
+ if (/\\begin\{($verbatim_w\*?)(?{ $DEL = "\Q$^N" })\}/ .. /\\end\{$DEL\}/) {
+ s/($findtmp)/$tmpreplace{$1}/g;
+ }
+ }
+ $preambletmp = join "\n", @lineas; # Join lines in $preambletmp
+ $preambletmp =~ s/^(?:[\t ]*(?:\r?\n|\r))?+//gmsx; # We removed the blank lines
+ # Now we're trying to capture
+ @graphicxpkg = $preambletmp =~ m/($pkgcandidates)/gmsx;
+ if (@graphicxpkg) {
+ Log("Found graphicx package in preamble for $opts_cmd{string}{output}$outext");
+ $findgraphicx = 'false';
+ }
+ # Second search graphicspath
+ @graphicspath = $preambletmp =~ m/graphicspath/msx;
+ if (@graphicspath) {
+ Log("Found \\graphicspath in preamble for $opts_cmd{string}{output}$outext");
+ $findgraphicx = 'false';
+ while ($preamble =~ /$graphicspath /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ if ($encontrado =~ /$graphicspath/) {
+ my $argumento = $1;
+ if ($argumento !~ /\{$opts_cmd{string}{imgdir}\/\}/) {
+ $argumento .= "\{$opts_cmd{string}{imgdir}/\}";
+ my $cambio = "\\graphicspath{$argumento}";
+ substr $preamble, $pos_inicial, $pos_final-$pos_inicial, $cambio;
+ pos($preamble) = $pos_inicial + length $cambio;
+ }
+ }
+ }
+ }
+ # Third search pst-exa
+ @pst_exa = $preambletmp =~ m/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|$pstexa/xg;
+ %pst_exa = map { $_ => 1 } @pst_exa;
+ if (@pst_exa) {
+ Log("Comment pst-exa package in preamble for $opts_cmd{string}{output}$outext");
+ $findgraphicx = 'false';
+ $preamble =~ s/(\\usepackage\[)\s*(swpl|tcb)\s*(\]\{pst-exa\})/\%$1$2,pdf$3/msxg;
+ }
+ if (exists $pst_exa{tcb}) {
+ Log("Suport for \\usepackage[tcb,pdf]\{pst-exa\} for $opts_cmd{string}{output}$outext");
+ $bodydoc =~ s/(graphic=\{)\[(scale=\d*)\]($opts_cmd{string}{imgdir}\/$name-$opts_cmd{string}{prefix}-exa-\d*)\}/$1$2\}\{$3\}/gsmx;
+ }
+}
+
+### Capture graphicx.sty in .log of LaTeX file
+if ($findgraphicx eq 'true' and $outfile) {
+ Log("Couldn't capture the graphicx package for $opts_cmd{string}{output}$ext in preamble");
+ my $ltxlog;
+ my @graphicx;
+ my $null = devnull();
+ Log("Creating $name-$opts_cmd{string}{prefix}-$tmp$ext [only preamble]");
+ if ($verbose) { say "Creating [$name-$opts_cmd{string}{prefix}-$tmp$ext] with only preamble"; }
+ open my $OUTfile, '>', "$name-$opts_cmd{string}{prefix}-$tmp$ext";
+ print {$OUTfile} "$preamble\n\\stop";
+ close $OUTfile;
+ # Set compiler
+ if ($opts_cmd{compiler}{arara}) {
+ my @engine = $preamble =~ m/$arara_rule/msx;
+ my %engine = map { $_ => 1 } @engine;
+ if (%engine) {
+ for my $var (@arara_engines) {
+ if (defined $engine{$var}) {
+ $compiler = $var;
+ }
+ }
+ }
+ else { $compiler = 'pdflatex'; }
+ }
+ if ($opts_cmd{compiler}{latex}) { $compiler = 'pdflatex'; }
+ if ($opts_cmd{compiler}{dvilua}) { $compiler = 'lualatex'; }
+ # Compiling file
+ RUNOSCMD("$compiler $write18 -interaction=batchmode", "$name-$opts_cmd{string}{prefix}-$tmp$ext >$null", 'only');
+ # Restore arara compiler
+ if ($opts_cmd{compiler}{arara}) { $compiler = 'arara'; }
+ Log("Search graphicx package in $name-$opts_cmd{string}{prefix}-$tmp.log");
+ open my $LaTeXlog, '<', "$name-$opts_cmd{string}{prefix}-$tmp.log";
+ {
+ local $/;
+ $ltxlog = <$LaTeXlog>;
+ }
+ close $LaTeXlog;
+ # Try to capture graphicx
+ @graphicx = $ltxlog =~ m/.+? (graphicx\.sty)/xg;
+ if (@graphicx) {
+ Log("Found graphicx package in $name-$opts_cmd{string}{prefix}-$tmp.log");
+ }
+ else {
+ Log("Not found graphicx package in $name-$opts_cmd{string}{prefix}-$tmp.log");
+ Log("Add \\usepackage\{graphicx\} to preamble of $opts_cmd{string}{output}$outext");
+ $preamble= "$preamble\n\\usepackage\{graphicx\}";
+ }
+}
+
+### Regex for clean file (pst) in preamble
+$PALABRAS = qr/\b (?: pst-\w+ | pstricks (?: -add | -pdf )? | psfrag |psgo |vaucanson-g| auto-pst-pdf(?: -lua )? )/x;
+$FAMILIA = qr/\{ \s* $PALABRAS (?: \s* [,] \s* $PALABRAS )* \s* \}(\%*)?/x;
+
+if ($clean{pst}) {
+ Log("Remove pstricks packages in preamble for $opts_cmd{string}{output}$outext");
+ $preamble =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ ^ $USEPACK (?: $CORCHETES )? $FAMILIA \s*//msxg;
+ $preamble =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ (?: ^ $USEPACK \{ | \G) [^}]*? \K (,?) \s* $PALABRAS (\s*) (,?) /$1 and $3 ? ',' : $1 ? $2 : ''/gemsx;
+ $preamble =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\psset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))+//gmsx;
+ $preamble =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
+ \\SpecialCoor(?:[\t ]*(?:\r?\n|\r))+//gmsx;
+ $preamble =~ s/^\\usepackage\{\}(?:[\t ]*(?:\r?\n|\r))+/\n/gmsx;
+}
+
+if (@pst_exa) {
+ Log("Uncomment pst-exa package in preamble for $opts_cmd{string}{output}$outext");
+ $preamble =~ s/(?:\%)(\\usepackage\[\s*)(swpl|tcb)(,pdf\s*\]\{pst-exa\})/$1$2$3/msxg;
+}
+
+### Add last lines
+if ($outfile) {
+ if (!@graphicspath) {
+ Log("Not found \\graphicspath in preamble for $opts_cmd{string}{output}$outext");
+ Log("Add \\graphicspath\{\{$opts_cmd{string}{imgdir}/\}\} to preamble for $opts_cmd{string}{output}$ext");
+ $preamble= "$preamble\n\\graphicspath\{\{$opts_cmd{string}{imgdir}/\}\}";
+ }
+ Log("Add \\usepackage\{grfext\} to preamble for $opts_cmd{string}{output}$ext");
+ $preamble = "$preamble\n\\usepackage\{grfext\}";
+ Log("Add \\PrependGraphicsExtensions\*\{\.pdf\} to preamble for $opts_cmd{string}{output}$ext");
+ $preamble = "$preamble\n\\PrependGraphicsExtensions\*\{\.pdf\}";
+ $preamble =~ s/\%<\*$dtxverb>\s*(.+?)\s*\%<\/$dtxverb>/$1/gmsx;
+ $preamble =~ s/^\\usepackage\{\}(?:[\t ]*(?:\r?\n|\r))+/\n/gmsx;
+ $preamble =~ s/^(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+}
+
+### We remove environments from the output file
+if (%delete_env and $outfile) {
+ Log("Remove environments in body of $opts_cmd{string}{output}$ext");
+ %replace = (%delete_env);
+ $find = join q{|}, map { quotemeta } sort { length $a <=> length $b } keys %replace;
+ # We must prevent eliminating somewhere wrong
+ # We re-create the regular expressions to make the changes
+ my @new_verb_tmp = array_minus(@verbatim, @delete_env);
+ $verbatim = join q{|}, map { quotemeta } sort { length $a <=> length $b } @new_verb_tmp;
+ $verbatim = qr/$verbatim/x;
+ $verb_std = qr {
+ (
+ (?:
+ \\begin\{$verbatim\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim\*?\})
+ (?!end\{$verbatim\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim\*?\}
+ )
+ )
+ }x;
+
+ my @new_verbw_tmp = array_minus(@verbatim_w, @delete_env);
+ $verbatim_w = join q{|}, map { quotemeta } sort { length $a <=> length $b } @new_verbw_tmp;
+ $verbatim_w = qr/$verbatim_w/x;
+ $verb_wrt = qr {
+ (
+ (?:
+ \\begin\{$verbatim_w\*?\}
+ (?:
+ (?>[^\\]+)|
+ \\
+ (?!begin\{$verbatim_w\*?\})
+ (?!end\{$verbatim_w\*?\})|
+ (?-1)
+ )*
+ \\end\{$verbatim_w\*?\}
+ )
+ )
+ }x;
+ while ($bodydoc =~ /$verb_wrt | $verb_std /pgmx) {
+ my ($pos_inicial, $pos_final) = ($-[0], $+[0]);
+ my $encontrado = ${^MATCH};
+ $encontrado =~ s/($find)/$replace{$1}/g;
+ substr $bodydoc, $pos_inicial, $pos_final-$pos_inicial, $encontrado;
+ pos ($bodydoc) = $pos_inicial + length $encontrado;
+ }
+ # Now remove
+ $bodydoc =~ s/($delt_env)(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+}
+
+### Create a <output file>
+if ($outfile) {
+ # Options for out_file (add $end to outfile)
+ my $out_file = $clean{doc} ? "$preamble\n$bodydoc\n\\end\{document\}"
+ : "$preamble\n$bodydoc\n$enddoc"
+ ;
+ # Clean \psset content in output file
+ if ($clean{pst}) {
+ $out_file =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \%<\*$dtxverb> .+? \%<\/$dtxverb>(*SKIP)(*F)|
+ \\psset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+ }
+ # Clean \tikzset content in output file
+ if ($clean{tkz}) {
+ $out_file =~ s/\\begin\{nopreview\}.+?\\end\{nopreview\}(*SKIP)(*F)|
+ \%<\*$dtxverb> .+? \%<\/$dtxverb>(*SKIP)(*F)|
+ \\tikzset\{(?:\{.*?\}|[^\{])*\}(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+ }
+ # Revert all changes in outfile
+ $out_file =~ s/\\begin\{nopreview\}\%$tmp\s*(.+?)\s*\\end\{nopreview\}\%$tmp/$1/gmsx;
+ my @tag_remove_outfile = $out_file =~ m/(?:^\%<\*remove$tmp>.+?\%<\/remove$tmp>)/gmsx;
+ if (@tag_remove_outfile) {
+ Log("Removing the content between <*remove> ... </remove> tags in all $opts_cmd{string}{output}$outext");
+ $out_file =~ s/^\%<\*remove$tmp>\s*(.+?)\s*\%<\/remove$tmp>(?:[\t ]*(?:\r?\n|\r))?+//gmsx;
+ }
+ # Remove internal mark for verbatim and verbatim write environments
+ $out_file =~ s/\%<\*$dtxverb>\s*(.+?)\s*\%<\/$dtxverb>/$1/gmsx;
+ %replace = (%changes_out);
+ $find = join q{|}, map {quotemeta} sort { length $a <=> length $b } keys %replace;
+ $out_file =~ s/($find)/$replace{$1}/g;
+ if (-e "$opts_cmd{string}{output}$outext") {
+ Log("Rewriting the file $opts_cmd{string}{output}$outext in $workdir");
+ Infocolor('Warning', "The file [$opts_cmd{string}{output}$outext] already exists and will be rewritten");
+ }
+ else{
+ Infoline("Creating the file $opts_cmd{string}{output}$outext");
+ Log("Write the file $opts_cmd{string}{output}$outext in $workdir");
+ }
+ # Write <output file>
+ open my $OUTfile, '>', "$opts_cmd{string}{output}$outext";
+ print {$OUTfile} $out_file;
+ close $OUTfile;
+}
+
+### Set compiler for process <output file>
+$compiler = $opts_cmd{compiler}{xetex} ? 'xelatex'
+ : $opts_cmd{compiler}{luatex} ? 'lualatex'
+ : $opts_cmd{compiler}{dvips} ? 'latex'
+ : $opts_cmd{compiler}{dvilua} ? 'lualatex'
+ : $opts_cmd{compiler}{dvipdf} ? 'latex'
+ : $opts_cmd{compiler}{arara} ? 'arara'
+ : $opts_cmd{compiler}{latexmk} ? 'latexmk'
+ : 'pdflatex'
+ ;
+
+### Set options for latexmk
+my $ltxmkopt = $opts_cmd{compiler}{xetex} ? "-pdfxe -silent -xelatex=\"xelatex $write18 -recorder %O %S\""
+ : $opts_cmd{compiler}{luatex} ? "-pdflua -silent -lualatex=\"lualatex $write18 -recorder %O %S\""
+ : $opts_cmd{compiler}{dvilua} ? "-pdflua -silent -lualatex=\"lualatex $write18 -recorder %O %S\""
+ : $opts_cmd{compiler}{dvips} ? "-pdfps -silent -latex=\"latex $write18 -recorder %O %S\""
+ : $opts_cmd{compiler}{dvipdf} ? "-pdfdvi -silent -latex=\"latex $write18 -recorder %O %S\""
+ : "-pdf -silent -pdflatex=\"pdflatex $write18 -recorder %O %S\""
+ ;
+
+### Set options for compiler <output file>
+$opt_compiler = $opts_cmd{compiler}{arara} ? '--log'
+ : $opts_cmd{compiler}{latexmk} ? "$ltxmkopt"
+ : "$write18 -interaction=nonstopmode -recorder"
+ ;
+
+### Now set latexmk
+if ($opts_cmd{compiler}{latexmk}) {
+ $compiler = $msg_compiler = 'latexmk';
+}
+
+### Compiling <output file>
+if (!$opts_cmd{boolean}{norun} and $outfile) {
+ Log("Compiling the file $opts_cmd{string}{output}$outext using [$msg_compiler]");
+ print "Compiling the file $opts_cmd{string}{output}$outext using ", color('magenta'), "[$msg_compiler]\r\n",color('reset');
+ RUNOSCMD("$compiler $opt_compiler", "$opts_cmd{string}{output}$outext",'show');
+ # Compiling <output file> using dvips>ps2pdf
+ if ($opts_cmd{compiler}{dvips}) {
+ RUNOSCMD("dvips $quiet -Ppdf", "$opts_cmd{string}{output}.dvi",'show');
+ RUNOSCMD("ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None", "$opts_cmd{string}{output}.ps $opts_cmd{string}{output}.pdf", 'show');
+ }
+ # Compiling <output file> using latex>dvipdfmx
+ if ($opts_cmd{compiler}{dvipdf}) {
+ RUNOSCMD("dvipdfmx $quiet", "$opts_cmd{string}{output}.dvi", 'show');
+ }
+}
+
+### Remove temporary files
+my @tmpfiles;
+my @protected = qw();
+my $flsline = 'OUTPUT';
+my @flsfile;
+
+### Protect generated files
+if (defined $opts_cmd{string}{output}) {
+ push @protected, "$opts_cmd{string}{output}$outext", "$opts_cmd{string}{output}.pdf";
+}
+
+### Find files
+find(\&aux_files, $workdir);
+sub aux_files{
+ my $findtmpfiles = $_;
+ if (-f $findtmpfiles && $findtmpfiles =~ m/$name-$opts_cmd{string}{prefix}(-exa)?-$tmp.+?$/) { # search
+ push @tmpfiles, $_;
+ }
+ return;
+}
+
+### Add if exists
+if (-e 'arara.log') {
+ push @flsfile, 'arara.log';
+}
+if (-e "$name-$opts_cmd{string}{prefix}-$tmp.fls") {
+ push @flsfile, "$name-$opts_cmd{string}{prefix}-$tmp.fls";
+}
+if (-e "$name-$opts_cmd{string}{prefix}-exa-$tmp.fls") {
+ push @flsfile, "$name-$opts_cmd{string}{prefix}-exa-$tmp.fls";
+}
+if (-e "$opts_cmd{string}{output}.fls") {
+ push @flsfile, "$opts_cmd{string}{output}.fls";
+}
+
+### Read .fls file
+for my $filename(@flsfile){
+ open my $RECtmp, '<', $filename;
+ push @tmpfiles, grep /^$flsline/,<$RECtmp>;
+ close $RECtmp;
+}
+foreach (@tmpfiles) { s/^$flsline\s+|\s+$//g; }
+push @tmpfiles, @flsfile;
+@tmpfiles = uniq(@tmpfiles);
+@tmpfiles = array_minus(@tmpfiles, @protected);
+
+Log('The files that will be deleted are:');
+Logarray(\@tmpfiles);
+
+### Remove only if exist
+if (@tmpfiles) {
+ Infoline("Remove temporary files created in $workdir");
+ foreach my $tmpfiles (@tmpfiles) {
+ move($tmpfiles, $tempDir);
+ }
+}
+
+### Find dirs created by minted
+my @deldirs;
+my $mintdir = "\_minted\-$name-$opts_cmd{string}{prefix}-$tmp";
+my $mintdirexa = "\_minted\-$name-$opts_cmd{string}{prefix}-exa-$tmp";
+if (-e $mintdir) { push @deldirs, $mintdir; }
+if (-e $mintdirexa) { push @deldirs, $mintdirexa; }
+
+Log('The directory that will be deleted are:');
+Logarray(\@deldirs);
+
+### Remove only if exist
+if (@deldirs) {
+ Infoline("Remove temporary directories created by minted in $workdir");
+ foreach my $deldirs (@deldirs) {
+ remove_tree($deldirs);
+ }
+}
+
+### Compress ./images with all generated files
+my $archivetar;
+if ($opts_cmd{boolean}{zip} or $opts_cmd{boolean}{tar}) {
+ my $stamp = strftime("%Y-%m-%d", localtime);
+ $archivetar = "$opts_cmd{string}{imgdir}-$stamp";
+
+ my @savetozt;
+ find(\&zip_tar, $opts_cmd{string}{imgdir});
+ sub zip_tar{
+ my $filesto = $_;
+ if (-f $filesto && $filesto =~ m/$name-$opts_cmd{string}{prefix}-.+?$/) { # search
+ push @savetozt, $File::Find::name;
+ }
+ return;
+ }
+ Log("The files are compress found in $imgdirpath are:");
+ Logarray(\@savetozt);
+ if ($opts_cmd{boolean}{zip}) {
+ if (-e "$archivetar.zip") {
+ Infocolor('Warning', "The file [$archivetar.zip] already exists and will be rewritten");
+ Log("Rewriting the file $archivetar.zip in $workdir");
+ }
+ else{
+ print "Creating the file ", color('magenta'), "[$archivetar.zip]",
+ color('reset'), " with generate files in ./$opts_cmd{string}{imgdir}\r\n";
+ Log("Writen the file $archivetar.tar.gz in $workdir");
+ }
+ zip \@savetozt => "$archivetar.zip";
+ }
+ if ($opts_cmd{boolean}{tar}) {
+ if (-e "$archivetar.tar.gz") {
+ Infocolor('Warning', "The file [$archivetar.tar.gz] already exists and will be rewritten");
+ Log("Rewriting the file $archivetar.tar.gz in $workdir");
+ }
+ else{
+ print "Creating the file ", color('magenta'), "[$archivetar.tar.gz]",
+ color('reset'), " with generate files in ./$opts_cmd{string}{imgdir}\r\n";
+ Log("Writen the file $archivetar.tar.gz in $workdir");
+ }
+ my $imgdirtar = Archive::Tar->new();
+ $imgdirtar->add_files(@savetozt);
+ $imgdirtar->write( "$archivetar.tar.gz" , 9 );
+ }
+}
+
+### End script process
+if (!$opts_cmd{boolean}{norun} and ($opts_cmd{boolean}{srcenv} or $opts_cmd{boolean}{subenv})) {
+ Log("The image files: $format and generated files are in $imgdirpath");
+}
+if (!$opts_cmd{boolean}{norun} and (!$opts_cmd{boolean}{srcenv} and !$opts_cmd{boolean}{subenv})) {
+ Log("The image files: $format are in $imgdirpath");
+}
+if ($opts_cmd{boolean}{norun} and ($opts_cmd{boolean}{srcenv} or $opts_cmd{boolean}{subenv})) {
+ Log("The generated files are in $imgdirpath");
+}
+if ($outfile) { Log("The file $opts_cmd{string}{output}$ext are in $workdir"); }
+
+Infocolor('Finish', "The execution of $scriptname has been successfully completed");
+
+Log("The execution of $scriptname has been successfully completed");
+
+__END__
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
index 7fa161a6f6..daeec6b302 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb
@@ -26,11 +26,11 @@ depend container_split_src_files/1
depend frozen/0
depend minrelease/2016
depend release/2020
-depend revision/56126
+depend revision/56129
name 00texlive.image
category TLCore
-revision 56125
+revision 56129
shortdesc TeX Live files only in the source repository
longdesc The files here are not copied by the installer and containers
longdesc are not built for them; they exist only in the source
@@ -32213,16 +32213,16 @@ catalogue-version 0.2
name beebe
category Package
-revision 56109
+revision 56128
catalogue biblio
shortdesc A collection of bibliographies
relocated 1
longdesc A collection of BibTeX bibliographies on TeX-related topics
longdesc (including, for example, spell-checking and SGML). Each
longdesc includes a LaTeX wrapper file to typeset the bibliography.
-containersize 867928
-containerchecksum f3e3ef5a3967b6f33468a44e7da8e76af81c5f86257d1d5f0568f53ca2beeeec95c8795b0fd9622840039450edf4fc641e04105aeeb289cd9e89064cbbedfd3e
-runfiles size=2156
+containersize 867904
+containerchecksum 462d647d9c3ca3832b7a226c5407f3211972a3c5f5288c4bf1c4b0e45ae6f5b4de100bd7a2714dc9febed74a0a1449bb60d3a8ec7d8e7611a99922d3f56be913
+runfiles size=2157
RELOC/bibtex/bib/beebe/epodd.bib
RELOC/bibtex/bib/beebe/font.bib
RELOC/bibtex/bib/beebe/printing-history.bib
@@ -176338,34 +176338,31 @@ catalogue-version 0.2.0
name ltximg
category Package
-revision 51951
+revision 56129
shortdesc Extract LaTeX environments into separate image files
longdesc ltximg is a Perl script that automates the process of
longdesc extracting and converting environments provided by TikZ,
-longdesc PStricks and other packages from input file to image formats in
-longdesc individual files using ghostscript and poppler-utils. It
-longdesc generates a file with only extracted environments, and another
-longdesc with environments converted to \includegraphics.
+longdesc PStricks and other packages from input file to image formats
+longdesc and standalone files using ghostscript and poppler-utils. It
+longdesc generates a file with only extracted environments and another
+longdesc with all extracted environments converted to \includegraphics.
depend ltximg.ARCH
-containersize 16336
-containerchecksum 28486dc83e37120eb5c8e0218541f17f6d9f631087b56890cb0bb9a10e3599d4afb31e997f736ce99476491ffae01ed9ae3b4194205e366dd0a2ea09dc2dd565
-doccontainersize 137184
-doccontainerchecksum c8d688e451537c6b08556f3d021cd552ba491f0b031c253e0f914945604b492c4d2cb2b7423ad2f95cdd4ed180c8b0bee1501e28f7fc0b20a551b735a47a2094
-docfiles size=39
+containersize 24900
+containerchecksum 2bcd5831f58121edc659957e2e582b1cff9c8984520f347796e454b387fd41805d35000a2ba43d15b51b27516ac6492fb55efdd333ca7685fc750ccf9152b19c
+doccontainersize 227428
+doccontainerchecksum 3fe1a8cb53606b4e4078a3d194f4b5c6b97f002ab4fdf71e8fe8583b9d40affe4403a3071f224119e5710be559108e2175281a13f23a25bbe40ffe6673fe7cf0
+docfiles size=83
texmf-dist/doc/support/ltximg/README.md details="Readme"
texmf-dist/doc/support/ltximg/ltximg-doc.pdf details="Package documentation"
-srccontainersize 15936
-srccontainerchecksum ffaa0f7f2d7a6bdffa12aa333a50e3729853f61684ad85a06e6583fde646e968e9ae3ba12a98655f3cd230c9cdd7618715bfb6b268928a06b3361e8194bdb1d0
-srcfiles size=16
- texmf-dist/source/support/ltximg/ltximg-doc.dtx
-runfiles size=17
+ texmf-dist/doc/support/ltximg/ltximg-doc.tex
+runfiles size=31
texmf-dist/scripts/ltximg/ltximg.pl
catalogue-contact-bugs https://github.com/pablgonz/ltximg/issues
catalogue-contact-repository https://github.com/pablgonz/ltximg
catalogue-ctan /support/ltximg
catalogue-license gpl3+
-catalogue-topics chunks
-catalogue-version 1.7
+catalogue-topics chunks graphics subdocs
+catalogue-version 1.8
name ltximg.aarch64-linux
category Package
@@ -287122,15 +287119,15 @@ docfiles size=592
name texlive-docindex
category TLCore
-revision 56124
+revision 56128
shortdesc top-level TeX Live doc.html, etc.
longdesc These files are regenerated as needed, which is often, so we
longdesc make them a separate package. See the tl-update-auto script for
longdesc the process.
containersize 388
-containerchecksum fe41331c80762e90f4f34fe3e88bfcb454842055fb2c318197a978b9262865b7bef181523fdf9bdeb06763a1cb5190729b96bacd4ca75140c08ff50f2ea67122
-doccontainersize 168264
-doccontainerchecksum a6eedcc3f1f58877fff063130b18253bfb53a49fb4efe205ab8a1a8dcfbe96fd09a2a223553089d01fa35ce2f20c890a26bf46641f9b479c8e35a8c64e21001f
+containerchecksum fff1422b31bd56fcfe2fbddf7fe209a7f542f299c66ade7271f1ea543d8e11e1817e6c07b0559122e329489e36c4a86c73071a4760af2a67c52520a230a52023
+doccontainersize 168164
+doccontainerchecksum 037bc6c0d9ffe6534b9e7f6ad624356ce546767deed4aca60725cce5b9bbab111c31d784db900918738dca1cee0a688ec5d13b4dd94ac2166785b63673cde8ca
docfiles size=333
doc.html
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
index ff30422b65..d55af90603 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.md5
@@ -1 +1 @@
-b61ca06a92da1248f2ad67513e78f1ce texlive.tlpdb
+25a492b01e748140063a2304e6e23712 texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512 b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
index b5e0be41f1..4f27a18948 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512
@@ -1 +1 @@
-c0e2ad81031c7ad4a51e6a855dfe8d3e6849aca96c07f8f65706688803cd92d78375014896ad5922d9abf893871e695bc03cf748abff63e1674736b488a91d82 texlive.tlpdb
+8e84b569dfc25b767dcb6a154311323c8ba488b63228e43c21419e2eeb2b7cedce75ee82f0ed57da06cbd5bf3cfeaf294377ca212e934d56460c38da0d04e8df texlive.tlpdb
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
index fbc7a522fb..62658246c0 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.sha512.asc
@@ -1,10 +1,10 @@
-----BEGIN PGP SIGNATURE-----
-iQEcBAEBCgAGBQJfOxlKAAoJEEzhh34ZQ4xw+isH/1/bbBvzLR4xoG0mGJGhe5fL
-f9OiTuPRkhDN8ms/MeW7xdNom3Pk8IO608NlKDicNp2NUUZnDmEc2vBD0IYHRL0s
-HCpy9+Z+dMw1HXYBIjtBJU7L4XbOW7LexhptLsRIskLgudfAxPN4Wc0A0qYeoj+e
-o/IpGyZ+miGz/630/KKDnCFH340sGqDBEcfSLem5p/Dy/IQM+uXsBEC//v5U3H68
-IlEeToM+QKWKtxNKOdgVGBcwCuAsNBLYf/0jJP/+46oloROkE0fH1wSCzJMzMS1O
-t8PolEwFGGSpFw+Tf0hpw/vD+wWrGsKkbKaTtZzUy1Jn+YfG5+IwQFycGYwPoQo=
-=GXKo
+iQEbBAEBCgAGBQJfPGrHAAoJEEzhh34ZQ4xwF5EH+K0k2s30+KkgMLosD8/u0Rjs
+jJACaqr/f3xjDJKrl4yd1WRFc8nr/yu1vRRduHhFIEEAfVQj5abcjO9MErCvRmZQ
+1TsIOR9WmFvpHNE+aGir16IFt8A1YcBchEWPdHJ9SB/F64Ed0ILEavG+RKhTmcxa
+qepU9CKV/PK4yDSckJWGiv+jUQvvoz6JmQKRsp4lVE3PD/puiaWgAMTpHhsUesQH
+pmdGJJqVtq+f/dfXzmjfyPBmsAH50lI0ITnR3/1F1kA5uY5sfCVQDZjRq/18uY5S
+9brvYWDjLzuzaEDWjPrH5HEB70MljV8jmJ0CqRiPNRzRy0PIqps0kgY5IIUcyw==
+=jLLQ
-----END PGP SIGNATURE-----
diff --git a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
index ee35435957..f5c0af82e2 100644
--- a/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
+++ b/systems/texlive/tlnet/tlpkg/texlive.tlpdb.xz
Binary files differ
diff --git a/systems/win32/miktex/tm/packages/next/pr.ini b/systems/win32/miktex/tm/packages/next/pr.ini
index 886ec684dd..ffe0277549 100644
--- a/systems/win32/miktex/tm/packages/next/pr.ini
+++ b/systems/win32/miktex/tm/packages/next/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1597695358
+date=1597781708
lastupd=miktex-arctrl-bin-2.9 miktex-arctrl-bin-x64-2.9 miktex-asymptote-bin-2.9 miktex-asymptote-bin-x64-2.9 miktex-autosp-bin-2.9 miktex-autosp-bin-x64-2.9 miktex-axohelp-bin-2.9 miktex-axohelp-bin-x64-2.9 miktex-bibarts-bin-2.9 miktex-bibarts-bin-x64-2.9 miktex-bibtex-bin-2.9 miktex-bibtex-bin-x64-2.9 miktex-bibtex8bit-bin-2.9 miktex-bibtex8bit-bin-x64-2.9 miktex-bzip2-bin-2.9 miktex-bzip2-bin-x64-2.9 miktex-cairo-bin-2.9 miktex-cairo-bin-x64-2.9 miktex-chktex-bin-2.9 miktex-chktex-bin-x64-2.9
-lstdigest=f468adf37c7f12f934ff73629e540a0a
+lstdigest=59aace8de3b3300eb38004c57e379ce1
numpkg=3963
relstate=next
-version=7534
+version=7535
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: iD9RTlP6GD3LYosE/4Mwdbq6dl908V0YEP2FwIxQ9p1oXoQG9Ggz9NI8RbgmkbkhDWVspG+hUh/da8xEjzcL4TPxNbLo172xk4YANlsQCybYXX0F9Mt9NAxvAT8d2yThL34PBfz+SoszwMZLDFUSyf5g+trQManuN/EouTa5eRiJGiwYX9rd/tj0Z+WYxuPgKyU0Opgr8M8GFF8Ch1pMSUBPMOwFkr3njouySz3VUzGrjmCgKsC3NiJZS0dFsUYpTgZQUgltyjUcz6/uFKp7z9Twomx5MW0UeiGeSSUEzJ5ZsbKz5qnEmEEZ32s6XjQDPGQ8QkqMDs+uhhaabdxxAw==
+;;;; signature/miktex: urJ42MV/m+8JESJ3JHfL9IKKxDWrnuA++91/6PlhlDARGWoBi5vmgyacXM6i9nbBASed0UR8Ek5QCniI61HSLB5MAwaYtW/uqMYxd7KzWiZr/Ye9pLbO0l+kMkDyuWU2EEfyf5AAy6tqQksQFa4EEU6Sg+nT63IL+YuZ3abLXQVLTh/X2SF/rCFHf/QRVal+tDcVAmxdFEJhfuV9T2QTQ8FiCP7j25yOVu+iSTRW1GGflnXoFdcmOBQoacEDKxAhUYIahMX2v7tP9PeMrjwEXnOP9EMTtsm5QtQYjWBstwo+YiAkwGo8Ug8j3a2YokUELFYHqFrIUmwrwXrf5Bg+ZA==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/systems/win32/miktex/tm/packages/pr.ini b/systems/win32/miktex/tm/packages/pr.ini
index 7030704e6b..fffe1efa8a 100644
--- a/systems/win32/miktex/tm/packages/pr.ini
+++ b/systems/win32/miktex/tm/packages/pr.ini
@@ -1,13 +1,13 @@
[repository]
-date=1597695072
+date=1597781466
lastupd=academicons acmart algpseudocodex apa7 asmeconf beamerauxtheme biblatex-ext chhaya ekdosis expkv-opt fontsetup frpseudocode hopatch logix luaprogtable marathi mcf2graph newcomputermodern oberdiek overlock
-lstdigest=38f93405bdcf17c1f6900b06f57b6fe6
+lstdigest=db43d366a7b5463c34201398de847f9c
numpkg=3963
relstate=stable
-version=7534
+version=7535
;;;;This configuration file is signed by a MiKTeX maintainer. The signature follows.
;;;;-----BEGIN MIKTEX SIGNATURE-----
-;;;; signature/miktex: fJMNvAvb15mqnbrG9uU43S0ivKWz8sicBsRMZtOOOv/5l4rXdtyCf/YwKZidEzjhKqtARs+vO3EH6QxFht0yqK6QJDEF7i+IPoQ0d21Tl8gBX6aemsV9caHBuJoE74CKFT2S8CbWvkiKumaCLjErBoEJNshiEU1bS/1u6fiAF8BgeWi8/GF9UuffUAlsYjUCgbCEcL83pcp1QztU2oDczN/MTA6eIMVGLbjyNOS5SgbM0QW/Vicd9pRUP2mUL3tuNJvaORj5TMv06+ia8DbIUvvoTfPGzBTPSomJx5QQWaGUTlj5/V9Ws0iehRshejI6HUi2u//TZBDRZtkXU0xgvg==
+;;;; signature/miktex: lH0EjcHGrxb5EFWcTLsLfa31u10iFRk9r4jZ6dn640bfboXFWnQAySZhWL95a2MQ83zfX6z0+mYV8yi/WVvUvXgKMuZP8sDQYaTNk7c8EumytK5BKC2tk/whBDS1R+YwrpEzyUHCQIZTNaUhpIduc8QVrff1zn2sJK4ghdoC4VQOCryCa2yxs05PqhxVJ366saliWXmNJu8GCZXhMIJZmFFxrqp/e2reC39ISuyMF28YBDLPewyzD4A0XXGTkJ5HOIRFMOdQdDRyZt0dopQBf5UNvRKp1mWaoScNRcSqxqIHGuYDe1utUOc8ix98Mt98iBesARi74F3w2P/o9IAAfg==
;;;;-----END MIKTEX SIGNATURE-----
diff --git a/timestamp b/timestamp
index 4484dbc428..865ce37e1f 100644
--- a/timestamp
+++ b/timestamp
@@ -2,4 +2,4 @@
# The source CTAN of this site's material:
dante.ctan.org
# The year-month-day-hour-minute of this site's material:
-2020-08-18-02-02
+2020-08-19-02-02