summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-25 22:07:47 +0000
committerKarl Berry <karl@freefriends.org>2021-01-25 22:07:47 +0000
commit0752d63900eac306a09312ddb513093bcf8e2e46 (patch)
tree4ecf3f2214ab960f4106d32c68c1d8c72bd901a1 /Master
parent6d43e49e73d6a7bead2c0f4eabe85242cf7b200b (diff)
ltximg (25jan21)
git-svn-id: svn://tug.org/texlive/trunk@57521 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/support/ltximg/README.md50
-rw-r--r--Master/texmf-dist/doc/support/ltximg/ltximg-doc.pdfbin242217 -> 316588 bytes
-rw-r--r--Master/texmf-dist/doc/support/ltximg/ltximg-doc.tex280
-rw-r--r--Master/texmf-dist/doc/support/ltximg/ltximg.1279
-rw-r--r--Master/texmf-dist/doc/support/ltximg/ltximg.man1.pdfbin0 -> 27866 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/ltximg/ltximg.pl371
6 files changed, 785 insertions, 195 deletions
diff --git a/Master/texmf-dist/doc/support/ltximg/README.md b/Master/texmf-dist/doc/support/ltximg/README.md
index c5dc89cd924..955b3b75987 100644
--- a/Master/texmf-dist/doc/support/ltximg/README.md
+++ b/Master/texmf-dist/doc/support/ltximg/README.md
@@ -1,6 +1,6 @@
-## LTXimg &ndash; LaTeX environments to image format and standalone files
+## LTXimg &ndash; LaTeX environments to image and standalone files
-Release v1.9 \[2020-08-22\]
+Release v2.0 \[2021-01-24\]
## Description
@@ -42,7 +42,7 @@ and saved in the `./images` directory using `pdflatex` and `preview` package to
```
[default]
-h, --help Display command line help and exit [off]
--v, --version Display current version (1.8) and exit [off]
+-v, --version Display current version (2.0) 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]
@@ -55,19 +55,19 @@ and saved in the `./images` directory using `pdflatex` and `preview` package to
-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>
+-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>
+-d <integer>, --dpi=<integer>
Dots per inch resolution for images [150]
--m <integer>, --margins <integer>
+-m <integer>, --margins=<integer>
Set margins in bp for pdfcrop [0]
--o <filename>, --output <filename>
+-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)
+--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]
@@ -89,11 +89,11 @@ and saved in the `./images` directory using `pdflatex` and `preview` package to
--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]
+--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
@@ -118,10 +118,16 @@ $ texdoc ltximg
For recreation all documentation use:
```
-$ arara ltximg-doc.dtx -H
+$ arara ltximg-doc.tex -H
```
-## Licence
+## Author
+
+Pablo González L, `<pablgonz@yahoo.com>`.
+
+## Copyright and Licence
+
+Copyright 2013 - 2020 Pablo González L `<pablgonz@yahoo.com>`.
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,
@@ -130,11 +136,3 @@ 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>`.
-
-## Copyright
-
-Copyright 2013 - 2020 by Pablo González L.
diff --git a/Master/texmf-dist/doc/support/ltximg/ltximg-doc.pdf b/Master/texmf-dist/doc/support/ltximg/ltximg-doc.pdf
index d11504ff8e6..0a6f44fe497 100644
--- a/Master/texmf-dist/doc/support/ltximg/ltximg-doc.pdf
+++ b/Master/texmf-dist/doc/support/ltximg/ltximg-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/ltximg/ltximg-doc.tex b/Master/texmf-dist/doc/support/ltximg/ltximg-doc.tex
index 8c625bf24b8..3d41f5c6cbf 100644
--- a/Master/texmf-dist/doc/support/ltximg/ltximg-doc.tex
+++ b/Master/texmf-dist/doc/support/ltximg/ltximg-doc.tex
@@ -85,8 +85,8 @@
% Identification
\def\myscript{ltximg}
-\def\fileversion{1.9}
-\def\filedate{2020-08-22}
+\def\fileversion{2.0}
+\def\filedate{2021-01-24}
% Logo with fetamont and libertuns font
\ExplSyntaxOn
@@ -137,10 +137,10 @@
urlcolor = magenta,%
colorlinks = true,%
linktoc = all,
- pdftitle = {.:: ltximg v\fileversion{} [\filedate] --- LaTeX environments to image format and standalone files ::.},%
+ pdftitle = {.:: ltximg v\fileversion{} [\filedate] --- LaTeX environments to image and standalone files ::.},%
pdfauthor = {Pablo Gonz\'{a}lez Luengo},%
pdfsubject = {Documentation for version \fileversion},%
- pdfcopyright = {\textcopyright 2013 - 2020 by Pablo González Luengo},
+ pdfcopyright = {\textcopyright 2013 - 2021 by Pablo González Luengo},
pdfcontacturl = {https://github.com/pablgonz/ltximg},
pdfkeywords = {extract, conversion, images, TikZ, PStricks, standalone files},
pdfstartview = {FitH},%
@@ -161,7 +161,7 @@
}
\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}}}%
+ {\parbox{\textwidth}{\raggedright \textcolor{gray}{\raisebox{-1pt}{\textcopyright}{}2013 -- 2021 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}}}%
@@ -637,7 +637,7 @@
#1,%
}% close lstset
}%
-{}% close examplecode
+{\vspace{-\parskip}}% close examplecode
% \begin{examplecmd}...\end{examplecmd}
\lstnewenvironment{examplecmd}{%
@@ -663,7 +663,7 @@
% % Reserved words (cmd line options)
classoffset=8,%
keywordstyle={\color{ForestGreen}},%
- morekeywords={gs,pdftoppm,pdftocairo,pdftops,cd,perl,pdfcrop},%
+ morekeywords={gs,ps2pdf,pdftoppm,pdftocairo,pdftops,cd,perl,pdfcrop},%
% Only for command line options
classoffset=5,%
keywordstyle=\color{blue},%
@@ -678,7 +678,7 @@
{~}{{\textcolor{blue}{\bfseries\textasciitilde}}}{1}%
}% close lstset
}%
-{}% close examplecmd
+{\vspace{-\parskip}}% close examplecmd
% \lstinline[style=inline]|...|
\lstdefinestyle{inline}
@@ -707,11 +707,11 @@
This file describes a documentation for version \fileversion, last revised \filedate.}\\[25pt]%
\author{%
\large%
- \raisebox{-1pt}{\textcopyright}{}2013--2020 by Pablo González L%
+ \raisebox{-1pt}{\textcopyright}{}2013--2021 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}{\textsc{ctan}}\,\,\,\url{https://www.ctan.org/pkg/ltximg}\\
\textcolor{gray}{\scriptsize\faIcon[regular]{github}}\,\,\,\url{https://github.com/pablgonz/ltximg}
\vspace*{-2cm}
}%
@@ -788,25 +788,30 @@ Several parts of the code have been taken and adapted from both scripts.
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{9.52} 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.
+\prgname{poppler-utils}.
+
+The script uses only packages from the core of the \prgname{perl}, the
+distribution encapsulated in \hologo{TeX} Live 2020 for \OSsystem{Windows}
+does not have the \verb|Win32::Console::ANSI| package, this does not
+affect the operation of the script, but it does affect the presentation
+of the messages when invoked from \verb|cmd|, it is recommended to use
+a more modern (and comfortable) application such as \prgname{Windows Terminal}.
+\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.
+The script has been tested on \OSsystem{Windows} v10, \prgname{cygwin} v3.1.6, \prgname{Git for Windows} v2.30 and %
+\OSsystem{Linux} (fedora 33) using \prgname{ghostscript} v9.53.3, \prgname{poppler-utils} v0.90, \prgname{perl} v5.32
+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}
@@ -896,10 +901,9 @@ Most \emph{\enquote{verbatim macro}} provide by packages \pkgname{minted}\cite{m
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}
+\setlength{\multicolsep}{2ex}
\begin{multicols}{3}
-\begin{itemize}[font=\sffamily\small,partopsep=5pt,parsep=5pt,nosep,leftmargin=*]
-\small
+\begin{itemize}[font=\sffamily\small,first=\small,partopsep=5pt,parsep=5pt,nosep,leftmargin=*]
\item \ics{mint}
\item \ics{spverb}
\item \ics{qverb}
@@ -944,9 +948,9 @@ These are the \emph{\enquote{classic}} environments for \emph{\enquote{writing c
environments. The following list (including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument)
is considered as \meta{verbatim standard} environments:
+\setlength{\multicolsep}{2ex}
\begin{multicols}{4}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\small
+\begin{itemize}[font=\sffamily\small, first=\small,noitemsep,leftmargin=*]
\item \LVenv{Example}
\item \LVenv{CenterExample}
\item \LVenv{SideBySideExample}
@@ -989,9 +993,9 @@ They are automatically detected \meta{verbatim standard} environments
(including \texttt{\small\bfseries\textcolor{MediumOrchid}{*}} argument)
generates by commands:
+\setlength{\multicolsep}{2ex}
\begin{multicols}{2}
-\begin{itemize}[font=\sffamily\small,noitemsep,leftmargin=*]
-\small
+\begin{itemize}[font=\sffamily\small,first=\small,noitemsep,leftmargin=*]
\item \ics{DefineVerbatimEnvironment}
\item \ics{NewListingEnvironment}
\item \ics{DeclareTCBListing}
@@ -1021,9 +1025,9 @@ 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:
+\setlength{\multicolsep}{2ex}
\begin{multicols}{4}
-\begin{itemize}[font=\sffamily\small, noitemsep,leftmargin=*]
-\ttfamily\small
+\begin{itemize}[font=\sffamily\small, first=\ttfamily\small,noitemsep,leftmargin=*]
\item \LWenv{scontents}
\item \LWenv{filecontents}
\item \LWenv{tcboutputlisting}
@@ -1047,8 +1051,7 @@ 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
+\begin{itemize}[font=\sffamily\small, first=\small, noitemsep,leftmargin=*]
\item \ics{renewtcbexternalizetcolorbox}
\item \ics{renewtcbexternalizeenvironment}
\item \ics{newtcbexternalizeenvironment}
@@ -1167,20 +1170,25 @@ 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:
+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. The \cmdopt{shell} option activates \prgopt*{shell-escape} for compatibility with packages
-such as \pkgname{minted} or others.
+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. The \cmdopt{shell} option activates
+\prgopt*{shell-escape} or \prgopt*{enable-write18} in \hologo{MiKTeX}
+for compatibility with packages such as \pkgname{minted} or others.
\subsection*{Create output file}
@@ -1200,7 +1208,7 @@ Now converting all extracted code to \ics{includegraphics} and save \sysfile{tes
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
+[user@machine ~:]§ `\small\meta[type=tt,cf=ForestGreen,ac=lightgray]{compiler}` -recorder -no-shell-escape test-out.tex
\end{examplecmd}
generating the file \sysfile{test-out.pdf}.
@@ -1330,9 +1338,10 @@ remove environments or arbitrary content. The script provides a convenient way t
\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
+converts all \emph{\enquote{skip}} environments to \lstinline|\begin{nopreview}| \dots
+\lstinline|\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}
@@ -1430,12 +1439,15 @@ The image format generated using \prgname{ghostscript}. The line executed by the
\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}
@@ -1455,43 +1467,44 @@ Options that accept a \meta{value} require either a blank space \verb*| | or \te
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}
+\vspace{\baselineskip}
+\DescribeCmd[h]{help}{boolean}{off}
Display a command line help and exit.
-\DescribeCmd[l]{log}{bolean}{off}
+\DescribeCmd[l]{log}{boolean}{off}
Write a \Fext{ltximg}{log} file with all process information.
-\DescribeCmd[v]{version}{bolean}{off}
+\DescribeCmd[v]{version}{boolean}{off}
Display the current version (\fileversion) and exit.
-\DescribeCmd[V]{verbose}{bolean}{off}
+\DescribeCmd[V]{verbose}{boolean}{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}
+\DescribeCmd[t]{tif}{boolean}{off}
Create a \fext{tif} images files using \prgname{ghostscript}.
-\DescribeCmd[b]{bmp}{bolean}{off}
+\DescribeCmd[b]{bmp}{boolean}{off}
Create a \fext{bmp} images files using \prgname{ghostscript}.
-\DescribeCmd[j]{jpg}{bolean}{off}
+\DescribeCmd[j]{jpg}{boolean}{off}
Create a \fext{jpg} images files using \prgname{ghostscript}.
-\DescribeCmd[p]{png}{bolean}{off}
+\DescribeCmd[p]{png}{boolean}{off}
Create a \fext{png} transparent image files using \prgname{ghostscript}.
-\DescribeCmd[e]{eps}{bolean}{off}
+\DescribeCmd[e]{eps}{boolean}{off}
Create a \fext{eps} image files using \prgname{pdftops}.
-\DescribeCmd[s]{svg}{bolean}{off}
+\DescribeCmd[s]{svg}{boolean}{off}
Create a \fext{svg} image files using \prgname{pdftocairo}.
-\DescribeCmd[P]{ppm}{bolean}{off}
+\DescribeCmd[P]{ppm}{boolean}{off}
Create a \fext{ppm} image files using \prgname{pdftoppm}.
-\DescribeCmd[g]{gray}{bolean}{off}
+\DescribeCmd[g]{gray}{boolean}{off}
Create a gray scale for all images using \prgname{ghostscript}. The line behind this options is:
\begin{examplecmd}
@@ -1499,20 +1512,20 @@ Create a gray scale for all images using \prgname{ghostscript}. The line behind
-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray
\end{examplecmd}
-\DescribeCmd[f]{force}{bolean}{off}
+\DescribeCmd[f]{force}{boolean}{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}
+\DescribeCmd[n]{noprew}{boolean}{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}.
+Set margins in \texttt{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
@@ -1527,73 +1540,93 @@ 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}}}.
+\emph{without} \enquote{\textcolor{blue!75}{\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}
+\DescribeCmd{zip}{boolean}{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}
+\DescribeCmd{tar}{boolean}{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}
+\DescribeCmd{srcenv}{boolean}{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}
+\DescribeCmd{subenv}{boolean}{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}
+\DescribeCmd{shell}{boolean}{off}
Enable \ics*{write18}\meta{shell command}.
-\DescribeCmd{norun}{bolean}{off}
+\DescribeCmd{norun}{boolean}{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}
+\DescribeCmd{nopdf}{boolean}{off}
Don't create a \fext{pdf} image files.
-\DescribeCmd{nocrop}{bolean}{off}
+\DescribeCmd{nocrop}{boolean}{off}
Don't run \scriptname{pdfcrop} in image files.
-\DescribeCmd{arara}{bolean}{off}
+\DescribeCmd{arara}{boolean}{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}
+\DescribeCmd{xetex}{boolean}{off}
Using \prgname*{xelatex} compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}.
+In the execution \prgname*{xelatex} is called with the \prgopt*{no-pdf} option
+generating a \fext{xvd} file and then it is processed using \prgname*{xdvipdfmx},
+this is only to execute \emph{faster} the conversion of environments to images
+and it is only done on the \meta[cf=optcolor]{input file}.
-\DescribeCmd{latex}{bolean}{off}
+\DescribeCmd{latex}{boolean}{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}.
+compiler in \meta[cf=optcolor]{input file} and \prgname*{pdflatex} for
+\meta[cf=optcolor]{output file}. To support transparencies in the
+updated versions of \prgname{ghostscript} the line executed by \scriptname{ps2pdf} is:
-\DescribeCmd{dvips}{bolean}{off}
+\begin{examplecmd}
+[user@machine ~:]§ ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None -dALLOWPSTRANSPARENCY
+\end{examplecmd}
+
+\DescribeCmd{dvips}{boolean}{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}.
+for compiler \meta[cf=optcolor]{input file} and \meta[cf=optcolor]{output file}. To support transparencies in the
+updated versions of \prgname{ghostscript} the line executed by \scriptname{ps2pdf} is:
-\DescribeCmd{dvilua}{bolean}{off}
+\begin{examplecmd}
+[user@machine ~:]§ ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None -dALLOWPSTRANSPARENCY
+\end{examplecmd}
+
+\DescribeCmd{dvilua}{boolean}{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}.
+for compiler \meta[cf=optcolor]{input file} and \prgname*{lualatex} for \meta[cf=optcolor]{output file}. To support transparencies in the
+updated versions of \prgname{ghostscript} the line executed by \scriptname{ps2pdf} is:
+
+\begin{examplecmd}
+[user@machine ~:]§ ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None -dALLOWPSTRANSPARENCY
+\end{examplecmd}
-\DescribeCmd{dvipdf}{bolean}{off}
+\DescribeCmd{dvipdf}{boolean}{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}
+\DescribeCmd{latexmk}{boolean}{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}
+\DescribeCmd{luatex}{boolean}{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}
@@ -1645,8 +1678,6 @@ using \prgname*{latex}\textcolor{optcolor}{\texttt{\bfseries\guillemotright}}\pr
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}
@@ -1803,7 +1834,31 @@ 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{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{Example usign \texttt{latexmk}}
@@ -1865,31 +1920,7 @@ only environments \env{picture} extracted using \prgname*{lualatex} and \pkgname
\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}
+\newpage
\section{Final notes}
@@ -1920,18 +1951,24 @@ 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]
+\setlength{\columnsep}{30pt}
+\begin{multicols}{2}
+\setlist[itemize,1]{label=\textendash,nosep,noitemsep,leftmargin=-10pt}
+\begin{description}[font=\small\sffamily,style=nextline,nosep,noitemsep]
+\item [v\fileversion\ (ctan), \filedate] \leavevmode\vspace{-\baselineskip}
+ \begin{itemize}
+ \item Add \texttt{-dALLOWPSTRANSPARENCY} to \texttt{ps2pdf}.
+ \item The \texttt{--xetex} option now uses \texttt{xelatex} and then \texttt{xdvipdfmx}.
+ \item Fix module detection under \hologo{TeX} Live on Windows.
+ \item Add \texttt{POD} and \texttt{man} documentation.
+ \end{itemize}
+\item [v1.9 (ctan), 2020-08-22] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item Fix \texttt{graphicx} detection.
\item Fix typos in documentation.
\item Add more contents to \texttt{.log} file.
\end{itemize}
-\item [v1.8 (ctan), 2020-08-18]
+\item [v1.8 (ctan), 2020-08-18] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item It is now possible to extract any environment.
\item Add \texttt{--log}, \texttt{--runs}, \texttt{--latexmk} and \texttt{--dvilua} options.
@@ -1939,35 +1976,35 @@ versions, both development (devp) and public (ctan).
\item Re-write source code acording to \texttt{Perl} v5.3x.
\item Review of documentation.
\end{itemize}
-\item [v1.7 (ctan), 2019-08-24]
+\item [v1.7 (ctan), 2019-08-24] \leavevmode\vspace{-\baselineskip}
\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]
+\item [v1.6 (ctan), 2019-07-13] \leavevmode\vspace{-\baselineskip}
\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]
+\item [v1.5 (ctan), 2018-04-12] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item Use \texttt{GitHub} to control version.
- \item Rewrite and optimize most part of source code and options.
+ \item Rewrite and optimize 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]
+\item [v1.4 (devp), 2016-11-29] \leavevmode\vspace{-\baselineskip}
\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]
+\item [v1.3 (devp), 2016-08-14] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item Rewrite some part of code (norun, nocrop, clean).
\item Suport \texttt{minted} and \texttt{tcolorbox} package.
@@ -1975,24 +2012,25 @@ versions, both development (devp) and public (ctan).
\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]
+\item [v1.2 (ctan), 2015-04-22] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item Remove unused modules.
\item Add more image format.
\item Fix regex.
\end{itemize}
-\item [v1.1 (ctan), 2015-04-21]
+\item [v1.1 (ctan), 2015-04-21] \leavevmode\vspace{-\baselineskip}
\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]
+\item [v1.0 (ctan), 2013-12-01] \leavevmode\vspace{-\baselineskip}
\begin{itemize}
\item First public release.
\end{itemize}
\end{description}
+\end{multicols}
\newpage
diff --git a/Master/texmf-dist/doc/support/ltximg/ltximg.1 b/Master/texmf-dist/doc/support/ltximg/ltximg.1
new file mode 100644
index 00000000000..81545b5470d
--- /dev/null
+++ b/Master/texmf-dist/doc/support/ltximg/ltximg.1
@@ -0,0 +1,279 @@
+.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+. ds C`
+. ds C'
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is >0, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.\"
+.\" Avoid warning from groff about undefined register 'F'.
+.de IX
+..
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+. if \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. if !\nF==2 \{\
+. nr % 0
+. nr F 2
+. \}
+. \}
+.\}
+.rr rF
+.\" ========================================================================
+.\"
+.IX Title "ltximg 1"
+.TH ltximg 1 "2021-01-24" "2.0" "General Commands Manual"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+ltximg \- LaTeX environments to image and standalone files
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBltximg\fR [<\fIoptions\fR>] [\-\-] <\fIfilename\fR>.<\fItex\fR|\fIltx\fR>
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBltximg\fR automates the process of extracting and converting
+environments from LaTeX file to image formats and \fIstandalone\fR files
+using \fIghostscript\fR and \fIpoppler-utils\fR. Generates a one file with
+only extracted environments and other with all extracted environments
+converted to \f(CW\*(C`\eincludegraphics\*(C'\fR.
+.PP
+By default the extracted environments are:
+.PP
+\&\fBpreview\fR \fBpspicture\fR \fBtikzpicture\fR \fBpgfpicture\fR \fBpsgraph\fR \fBpostscript\fR \fBPSTexample\fR
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+Options that accept a value require either a blank space or \f(CW\*(C`=\*(C'\fR between
+the option and the value. Multiple short options can be bundling and
+if the last option takes a comma separated list you need \f(CW\*(C`\-\-\*(C'\fR at the end.
+Relative or absolute paths for directories and files is not supported.
+.PP
+If used without [<\fIoptions\fR>] the extracted environments are converted
+to \fIpdf\fR image format and saved in \f(CW\*(C`./images\*(C'\fR directory using \f(CW\*(C`pdflatex\*(C'\fR
+and \fIpreview\fR package for process.
+.PP
+General script options:
+.IP "\fB\-h\fR, \fB\-\-help\fR" 4
+.IX Item "-h, --help"
+Display command line help and exit.
+.IP "\fB\-v\fR, \fB\-\-version\fR" 4
+.IX Item "-v, --version"
+Display current version and exit.
+.IP "\fB\-V\fR, \fB\-\-verbose\fR" 4
+.IX Item "-V, --verbose"
+Verbose printing information.
+.IP "\fB\-l\fR, \fB\-\-log\fR" 4
+.IX Item "-l, --log"
+Write \f(CW\*(C`.log\*(C'\fR file with debug information.
+.IP "\fB\-t\fR, \fB\-\-tif\fR" 4
+.IX Item "-t, --tif"
+Create \f(CW\*(C`.tif\*(C'\fR files using \fIghostscript\fR.
+.IP "\fB\-b\fR, \fB\-\-bmp\fR" 4
+.IX Item "-b, --bmp"
+Create \f(CW\*(C`.bmp\*(C'\fR files using \fIghostscript\fR.
+.IP "\fB\-j\fR, \fB\-\-jpg\fR" 4
+.IX Item "-j, --jpg"
+Create \f(CW\*(C`.jpg\*(C'\fR files using \fIghostscript\fR.
+.IP "\fB\-p\fR, \fB\-\-png\fR" 4
+.IX Item "-p, --png"
+Create \f(CW\*(C`.png\*(C'\fR files using \fIghostscript\fR.
+.IP "\fB\-e\fR, \fB\-\-eps\fR" 4
+.IX Item "-e, --eps"
+Create \f(CW\*(C`.eps\*(C'\fR files using \fIpdftops\fR.
+.IP "\fB\-s\fR, \fB\-\-svg\fR" 4
+.IX Item "-s, --svg"
+Create \f(CW\*(C`.svg\*(C'\fR files using \fIpdftocairo\fR.
+.IP "\fB\-P\fR, \fB\-\-ppm\fR" 4
+.IX Item "-P, --ppm"
+Create \f(CW\*(C`.ppm\*(C'\fR files using \fIpdftoppm\fR.
+.IP "\fB\-g\fR, \fB\-\-gray\fR" 4
+.IX Item "-g, --gray"
+Gray scale for images using \fIghostscript\fR.
+.IP "\fB\-f\fR, \fB\-\-force\fR" 4
+.IX Item "-f, --force"
+Capture \f(CW\*(C`\epsset\*(C'\fR and \f(CW\*(C`\etikzset\*(C'\fR to extract.
+.IP "\fB\-n\fR, \fB\-\-noprew\fR" 4
+.IX Item "-n, --noprew"
+Create images files without \fIpreview\fR package.
+.IP "\fB\-r\fR \fIinteger\fR, \fB\-\-runs\fR=\fIinteger\fR" 4
+.IX Item "-r integer, --runs=integer"
+Set the number of times the compiler will run on the \fIinput\fR file for
+environment extraction (default: 1).
+.IP "\fB\-d\fR \fIinteger\fR, \fB\-\-dpi\fR=\fIinteger\fR" 4
+.IX Item "-d integer, --dpi=integer"
+Dots per inch resolution for images (default: 150).
+.IP "\fB\-m\fR \fIinteger\fR, \fB\-\-margins\fR=\fIinteger\fR" 4
+.IX Item "-m integer, --margins=integer"
+Set margins in bp for \fIpdfcrop\fR (default: 0).
+.IP "\fB\-o\fR \fIfilename\fR, \fB\-\-output\fR=\fIfilename\fR" 4
+.IX Item "-o filename, --output=filename"
+Create \fIoutput\fR file.
+.IP "\fB\-\-imgdir\fR=\fIdirname\fR" 4
+.IX Item "--imgdir=dirname"
+Set name of directory to save images and files (default: images).
+.IP "\fB\-\-prefix\fR=\fIstring\fR" 4
+.IX Item "--prefix=string"
+Set \fIprefix\fR append to each generated files (default: fig).
+.IP "\fB\-\-myverb\fR=\fImacroname\fR" 4
+.IX Item "--myverb=macroname"
+Add \f(CW\*(C`\emacroname\*(C'\fR to verbatim inline search (default: myverb).
+.IP "\fB\-\-clean\fR=\fIdoc\fR|\fIpst\fR|\fItkz\fR|\fIall\fR|\fIoff\fR" 4
+.IX Item "--clean=doc|pst|tkz|all|off"
+Removes specific block text in \fIoutput\fR file (default: doc).
+.IP "\fB\-\-zip\fR" 4
+.IX Item "--zip"
+Compress files generated in \f(CW\*(C`.zip\*(C'\fR format.
+.IP "\fB\-\-tar\fR" 4
+.IX Item "--tar"
+Compress files generated in \f(CW\*(C`.tar.gz\*(C'\fR format.
+.IP "\fB\-\-srcenv\fR" 4
+.IX Item "--srcenv"
+Create files with only code of environments.
+.IP "\fB\-\-subenv\fR" 4
+.IX Item "--subenv"
+Create standalone files for environments.
+.IP "\fB\-\-shell\fR" 4
+.IX Item "--shell"
+Enable \f(CW\*(C`\ewrite18{SHELL COMMAND}\*(C'\fR.
+.IP "\fB\-\-latex\fR" 4
+.IX Item "--latex"
+Using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`pdflatex\*(C'\fR for compiler
+\&\fIoutput\fR.
+.IP "\fB\-\-dvips\fR" 4
+.IX Item "--dvips"
+Using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR for
+compiler \fIoutput\fR.
+.IP "\fB\-\-dvilua\fR" 4
+.IX Item "--dvilua"
+Using \f(CW\*(C`dvilualatex>dvips>ps2pdf\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`lualatex\*(C'\fR for
+compiler \fIoutput\fR.
+.IP "\fB\-\-dvipdf\fR" 4
+.IX Item "--dvipdf"
+Using \f(CW\*(C`latex>dvipdfmx\*(C'\fR for compiler \fIinput\fR and \f(CW\*(C`latex>dvipdfmx\*(C'\fR for compiler
+\&\fIoutput\fR.
+.IP "\fB\-\-xetex\fR" 4
+.IX Item "--xetex"
+Using \f(CW\*(C`xelatex\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
+.IP "\fB\-\-luatex\fR" 4
+.IX Item "--luatex"
+Using \f(CW\*(C`lualatex\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
+.IP "\fB\-\-arara\fR" 4
+.IX Item "--arara"
+Use \f(CW\*(C`arara\*(C'\fR for compiler \fIinput\fR and \fIoutput\fR.
+.IP "\fB\-\-latexmk\fR" 4
+.IX Item "--latexmk"
+Using \f(CW\*(C`latexmk\*(C'\fR for compiler \fIoutput\fR file.
+.IP "\fB\-\-norun\fR" 4
+.IX Item "--norun"
+Run script, but no create images files.
+.IP "\fB\-\-nopdf\fR" 4
+.IX Item "--nopdf"
+Don't create a \f(CW\*(C`.pdf\*(C'\fR image files.
+.IP "\fB\-\-nocrop\fR" 4
+.IX Item "--nocrop"
+Don't run \fIpdfcrop\fR.
+.IP "\fB\-\-extrenv\fR=\fIenv1,env2,...\fR" 4
+.IX Item "--extrenv=env1,env2,..."
+Add new environments to extract.
+.IP "\fB\-\-skipenv\fR=\fIenv1,env2,...\fR" 4
+.IX Item "--skipenv=env1,env2,..."
+Skip some default environments to extract.
+.IP "\fB\-\-verbenv\fR=\fIenv1,env2,...\fR" 4
+.IX Item "--verbenv=env1,env2,..."
+Add new verbatim environments.
+.IP "\fB\-\-writenv\fR=\fIenv1,env2,...\fR" 4
+.IX Item "--writenv=env1,env2,..."
+Add new verbatim write environments.
+.IP "\fB\-\-deltenv\fR=\fIenv1,env2,...\fR" 4
+.IX Item "--deltenv=env1,env2,..."
+Delete environments in \fIoutput\fR file.
+.SH "EXAMPLE"
+.IX Header "EXAMPLE"
+\&\fBltximg\fR \-\-latex \-e \-p \-\-subenv \-o test\-out.ltx test\-in.ltx
+.PP
+Create a \f(CW\*(C`./images\*(C'\fR directory (if it doesn't exist) with all extracted
+environments converted to \f(CW\*(C`.pdf\*(C'\fR, \f(CW\*(C`.eps\*(C'\fR, \f(CW\*(C`.png\*(C'\fR and \fIstandalone\fR
+files, a file \fItest\-in\-fig\-all.ltx\fR with all extracted environments
+and the file \fItest\-out.ltx\fR with all environments converted to
+\&\f(CW\*(C`\eincludegraphics\*(C'\fR using \f(CW\*(C`latex>dvips>ps2pdf\*(C'\fR and \fIpreview\fR
+package for \fItest\-in.ltx\fR and \f(CW\*(C`pdflatex\*(C'\fR for \fItest\-out.ltx\fR.
+.SH "DOCUMENTATION"
+.IX Header "DOCUMENTATION"
+For full documentation use:
+.PP
+texdoc \fBltximg\fR
+.SH "ISSUES AND REPORTS"
+.IX Header "ISSUES AND REPORTS"
+\&\fBRepository\fR : <https://github.com/pablgonz/ltximg>
+.PP
+\&\fBBug tracker\fR: <https://github.com/pablgonz/ltximg/issues>
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Pablo González Luengo, \fIpablgonz@yahoo.com\fR.
+.SH "COPYRIGHT AND LICENSE"
+.IX Header "COPYRIGHT AND LICENSE"
+Copyright 2013\-2021 Pablo González, \fIpablgonz@yahoo.com\fR.
+.PP
+This program is free software; you can redistribute it and/or modify
+it under the terms of the \s-1GNU\s0 General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+.PP
+This program is distributed in the hope that it will be useful, but
+\&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of
+\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0
+General Public License for more details.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fBgs\fR\|(1), \fBdvips\fR\|(1), \fBps2pdf\fR\|(1), \fBpdfcrop\fR\|(1), \fBpdftops\fR\|(1), \fBpdftocairo\fR\|(1), \fBpdftoppm\fR\|(1)
diff --git a/Master/texmf-dist/doc/support/ltximg/ltximg.man1.pdf b/Master/texmf-dist/doc/support/ltximg/ltximg.man1.pdf
new file mode 100644
index 00000000000..0cb98fe28c8
--- /dev/null
+++ b/Master/texmf-dist/doc/support/ltximg/ltximg.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/ltximg/ltximg.pl b/Master/texmf-dist/scripts/ltximg/ltximg.pl
index 7e703a7bf55..791c9316856 100755
--- a/Master/texmf-dist/scripts/ltximg/ltximg.pl
+++ b/Master/texmf-dist/scripts/ltximg/ltximg.pl
@@ -30,7 +30,11 @@ use autodie;
use Config;
use Cwd;
use if $^O eq 'MSWin32', 'Win32';
-use if $^O eq 'MSWin32', 'Win32::Console::ANSI'; # need for color :)
+use if $^O eq 'MSWin32', 'Module::Load::Conditional' => qw(can_load check_install requires);
+# Need on Windows cmd for colors, TeX Live not provide 'Win32::Console::ANSI'
+if($^O eq 'MSWin32' && check_install( module => 'Win32::Console::ANSI')) {
+ require Win32::Console::ANSI;
+}
use Term::ANSIColor;
### Directory for work and temp files
@@ -40,18 +44,19 @@ my $workdir = cwd;
### Script identification
my $scriptname = 'ltximg';
my $program = 'LTXimg';
-my $nv = 'v1.9';
-my $date = '2020-08-22';
+my $nv = 'v2.0';
+my $date = '2021-01-24';
my $copyright = <<"END_COPYRIGHT" ;
-[$date] (c) 2013-2020 by Pablo Gonzalez, pablgonz<at>yahoo.com
+[$date] - LaTeX environments to image and standalone files
END_COPYRIGHT
+### Standart info in terminal
my $title = "$program $nv $copyright";
### Log vars
my $LogFile = "$scriptname.log";
my $LogWrite;
-my $LogTime = strftime("%y/%m/%d %H:%M:%S", localtime);
+my $LogTime = strftime("%y-%m-%d %H:%M:%S", localtime);
### Default values
my $skiptag = 'noltximg'; # internal tag for regex
@@ -147,7 +152,7 @@ sub Infocolor {
### Write Log line and print msg (common)
sub Infoline {
my $msg = shift;
- my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ my $now = strftime("%y-%m-%d %H:%M:%S", localtime);
if ($log) { $LogWrite->print(sprintf "[%s] * %s\n", $now, $msg); }
say $msg;
return;
@@ -163,7 +168,7 @@ sub Logline {
### Write Log line (time stamp)
sub Log {
my $msg = shift;
- my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ my $now = strftime("%y-%m-%d %H:%M:%S", localtime);
if ($log) { $LogWrite->print(sprintf "[%s] * %s\n", $now, $msg); }
return;
}
@@ -187,7 +192,7 @@ sub Logarray {
### Extended print info for execute system commands using $ command
sub Logrun {
my $msg = shift;
- my $now = strftime("%y/%m/%d %H:%M:%S", localtime);
+ my $now = strftime("%y-%m-%d %H:%M:%S", localtime);
if ($log) { $LogWrite->print(sprintf "[%s] \$ %s\n", $now, $msg); }
return;
}
@@ -239,21 +244,18 @@ sub usage {
find_ghostscript();
my $usage = <<"END_OF_USAGE";
-${title}Description
- LTXimg is a "perl" script that automates the process of extracting and
+${title}Syntax
+\$ ltximg [<options>] [--] <filename>.<tex|ltx>
+
+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>
+ By default the extracted environments are:
- 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
@@ -262,6 +264,10 @@ Options
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.
+ 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.
+
[default]
-h, --help Display command line help and exit [off]
-v, --version Display current version ($nv) and exit [off]
@@ -277,25 +283,25 @@ Options
-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>
+-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>
+-d <integer>, --dpi=<integer>
Dots per inch resolution for images [150]
--m <integer>, --margins <integer>
+-m <integer>, --margins=<integer>
Set margins in bp for pdfcrop [0]
--o <filename>, --output <filename>
+-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)
+--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]
+--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
@@ -311,29 +317,31 @@ Options
--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]
+--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
+\$ ltximg --latex -e -p --subenv --imgdir mypics -o test-out.ltx 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>.
+ Create a "./mypics" directory (if it doesn't exist) with all
+ extracted environments converted to ".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 <test-in.ltx> and pdflatex for
+ <test-out.ltx>.
Documentation
For full documentation use:
\$ texdoc ltximg
Issues and reports
-Repository : https://github.com/pablgonz/ltximg
-Bug tracker : https://github.com/pablgonz/ltximg/issues
+Repository : https://github.com/pablgonz/ltximg
+Bug tracker: https://github.com/pablgonz/ltximg/issues
+Copyright(C) 2013-2021 by Pablo González, pablgonz<at>yahoo.com
END_OF_USAGE
print $usage;
exit 0;
@@ -358,7 +366,7 @@ my $result=GetOptions (
'dvipdf' => \$opts_cmd{compiler}{dvipdf}, # dvipdfmx compiler
'dvilua' => \$opts_cmd{compiler}{dvilua}, # dvilualatex compiler
'luatex' => \$opts_cmd{compiler}{luatex}, # lualatex compiler
-# bolean
+# boolean
'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
@@ -1547,7 +1555,6 @@ my $delt_env = qr {
)
}x;
-
########################################################################
# In this first part the script only detects verbatim environments and #
# verbatim write don't distinguish between which ones are extracted, #
@@ -1769,9 +1776,9 @@ $bodydoc =~ s/\%<\*$dtxverb> .+?\%<\/$dtxverb>(*SKIP)(*F)|
########################################################################
# All environments are now classified: #
-# Extraction -> \begin{preview} ... \end{preview} #
+# Extraction -> \begin{preview} ... \end{preview} #
# No Extraction -> \begin{nopreview} ... \end{nopreview} #
-# Verbatim's -> %<\*$dtxverb> ... <\/$dtxverb> #
+# Verbatim's -> %<\*$dtxverb> ... <\/$dtxverb> #
########################################################################
### The %<*remove> ... %</remove> tags need a special treatment :)
@@ -1820,7 +1827,7 @@ while ($preamble =~ /\%<\*$dtxverb>(.+?)\%<\/$dtxverb>/pgmsx) {
pos ($preamble) = $pos_inicial + length $encontrado;
}
-### Set wraped environments for extraction
+### Set wrapped environments for extraction
my $wrapping = "$scriptname$tmp";
Log("Set up the environment [$wrapping] to encapsulate the extraction");
@@ -2030,6 +2037,7 @@ else {
### Set options for compiler
my $opt_compiler = $opts_cmd{compiler}{arara} ? '--log'
+ : $opts_cmd{compiler}{xetex} ? "$write18 -interaction=nonstopmode -recorder -no-pdf"
: "$write18 -interaction=nonstopmode -recorder"
;
@@ -2355,7 +2363,7 @@ if ($STDenv) {
}
}
-### Compiler and generate PDF files
+### Compiler and generate PDF files -dALLOWPSTRANSPARENCY
if (!$opts_cmd{boolean}{norun}) {
Log('Generate a PDF file with all captured environments');
my @compiler = (1..$opts_cmd{string}{runs});
@@ -2367,10 +2375,14 @@ opendir (my $DIR, $workdir);
for (@compiler){
RUNOSCMD("$compiler $opt_compiler","$+{name}$+{type}",'show');
}
+ # Using xdvipdfmx
+ if ($compiler eq 'xelatex') {
+ RUNOSCMD("xdvipdfmx $quiet -E", "-o $+{name}-$tmp.pdf $+{name}-$tmp.xdv",'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');
+ RUNOSCMD("ps2pdf -sPDFSETTINGS=prepress -sAutoRotatePages=None -dALLOWPSTRANSPARENCY", "$+{name}-$tmp.ps $+{name}-$tmp.pdf",'show');
}
# Compiling file using latex>dvipdfmx
if ($compiler eq 'dvipdf') {
@@ -2986,7 +2998,7 @@ if ($opts_cmd{boolean}{zip} or $opts_cmd{boolean}{tar}) {
}
my $imgdirtar = Archive::Tar->new();
$imgdirtar->add_files(@savetozt);
- $imgdirtar->write( "$archivetar.tar.gz" , 9 );
+ $imgdirtar->write("$archivetar.tar.gz", 9);
}
}
@@ -3007,3 +3019,266 @@ Infocolor('Finish', "The execution of $scriptname has been successfully complete
Log("The execution of $scriptname has been successfully completed");
__END__
+=encoding UTF-8
+
+=head1 NAME
+
+ltximg - LaTeX environments to image and standalone files
+
+=head1 SYNOPSIS
+
+B<ltximg> [E<lt>I<options>E<gt>] [S<-->] E<lt>I<filename>E<gt>.E<lt>I<tex>|I<ltx>E<gt>
+
+=head1 DESCRIPTION
+
+B<ltximg> automates the process of extracting and converting
+environments from LaTeX file to image formats and I<standalone> files
+using I<ghostscript> and I<poppler-utils>. Generates a one file with
+only extracted environments and other with all extracted environments
+converted to C<\includegraphics>.
+
+By default the extracted environments are:
+
+B<preview> B<pspicture> B<tikzpicture> B<pgfpicture> B<psgraph> B<postscript> B<PSTexample>
+
+=head1 OPTIONS
+
+Options that accept a value require either a blank space or C<=> between
+the option and the value. Multiple short options can be bundling and
+if the last option takes a comma separated list you need C<--> at the end.
+Relative or absolute paths for directories and files is not supported.
+
+If used without [E<lt>I<options>E<gt>] the extracted environments are converted
+to I<pdf> image format and saved in C<./images> directory using C<pdflatex>
+and I<preview> package for process.
+
+General script options:
+
+=over 4
+
+=item B<-h>, B<--help>
+
+Display command line help and exit.
+
+=item B<-v>, B<--version>
+
+Display current version and exit.
+
+=item B<-V>, B<--verbose>
+
+Verbose printing information.
+
+=item B<-l>, B<--log>
+
+Write C<.log> file with debug information.
+
+=item B<-t>, B<--tif>
+
+Create C<.tif> files using I<ghostscript>.
+
+=item B<-b>, B<--bmp>
+
+Create C<.bmp> files using I<ghostscript>.
+
+=item B<-j>, B<--jpg>
+
+Create C<.jpg> files using I<ghostscript>.
+
+=item B<-p>, B<--png>
+
+Create C<.png> files using I<ghostscript>.
+
+=item B<-e>, B<--eps>
+
+Create C<.eps> files using I<pdftops>.
+
+=item B<-s>, B<--svg>
+
+Create C<.svg> files using I<pdftocairo>.
+
+=item B<-P>, B<--ppm>
+
+Create C<.ppm> files using I<pdftoppm>.
+
+=item B<-g>, B<--gray>
+
+Gray scale for images using I<ghostscript>.
+
+=item B<-f>, B<--force>
+
+Capture C<\psset> and C<\tikzset> to extract.
+
+=item B<-n>, B<--noprew>
+
+Create images files without I<preview> package.
+
+=item B<-r> I<integer>, B<--runs>=I<integer>
+
+Set the number of times the compiler will run on the F<input> file for
+environment extraction (default: 1).
+
+=item B<-d> I<integer>, B<--dpi>=I<integer>
+
+Dots per inch resolution for images (default: 150).
+
+=item B<-m> I<integer>, B<--margins>=I<integer>
+
+Set margins in bp for I<pdfcrop> (default: 0).
+
+=item B<-o> F<filename>, B<--output>=F<filename>
+
+Create F<output> file.
+
+=item B<--imgdir>=I<dirname>
+
+Set name of directory to save images and files (default: images).
+
+=item B<--prefix>=I<string>
+
+Set I<prefix> append to each generated files (default: fig).
+
+=item B<--myverb>=I<macroname>
+
+Add C<\macroname> to verbatim inline search (default: myverb).
+
+=item B<--clean>=I<doc>|I<pst>|I<tkz>|I<all>|I<off>
+
+Removes specific block text in F<output> file (default: doc).
+
+=item B<--zip>
+
+Compress files generated in C<.zip> format.
+
+=item B<--tar>
+
+Compress files generated in C<.tar.gz> format.
+
+=item B<--srcenv>
+
+Create files with only code of environments.
+
+=item B<--subenv>
+
+Create standalone files for environments.
+
+=item B<--shell>
+
+Enable C<\write18{SHELL COMMAND}>.
+
+=item B<--latex>
+
+Using C<latexE<gt>dvipsE<gt>ps2pdf> for compiler F<input> and C<pdflatex> for compiler
+F<output>.
+
+=item B<--dvips>
+
+Using C<latexE<gt>dvipsE<gt>ps2pdf> for compiler F<input> and C<latexE<gt>dvipsE<gt>ps2pdf> for
+compiler F<output>.
+
+=item B<--dvilua>
+
+Using C<dvilualatexE<gt>dvipsE<gt>ps2pdf> for compiler F<input> and C<lualatex> for
+compiler F<output>.
+
+=item B<--dvipdf>
+
+Using C<latexE<gt>dvipdfmx> for compiler F<input> and C<latexE<gt>dvipdfmx> for compiler
+F<output>.
+
+=item B<--xetex>
+
+Using C<xelatex> for compiler F<input> and F<output>.
+
+=item B<--luatex>
+
+Using C<lualatex> for compiler F<input> and F<output>.
+
+=item B<--arara>
+
+Use C<arara> for compiler F<input> and F<output>.
+
+=item B<--latexmk>
+
+Using C<latexmk> for compiler F<output> file.
+
+=item B<--norun>
+
+Run script, but no create images files.
+
+=item B<--nopdf>
+
+Don't create a C<.pdf> image files.
+
+=item B<--nocrop>
+
+Don't run I<pdfcrop>.
+
+=item B<--extrenv>=I<env1,env2,...>
+
+Add new environments to extract.
+
+=item B<--skipenv>=I<env1,env2,...>
+
+Skip some default environments to extract.
+
+=item B<--verbenv>=I<env1,env2,...>
+
+Add new verbatim environments.
+
+=item B<--writenv>=I<env1,env2,...>
+
+Add new verbatim write environments.
+
+=item B<--deltenv>=I<env1,env2,...>
+
+Delete environments in F<output> file.
+
+=back
+
+=head1 EXAMPLE
+
+B<ltximg> --latex -e -p --subenv -o test-out.ltx test-in.ltx
+
+Create a C<./images> directory (if it doesn't exist) with all extracted
+environments converted to C<.pdf>, C<.eps>, C<.png> and I<standalone>
+files, a file F<test-in-fig-all.ltx> with all extracted environments
+and the file F<test-out.ltx> with all environments converted to
+C<\includegraphics> using C<latexE<gt>dvipsE<gt>ps2pdf> and I<preview>
+package for F<test-in.ltx> and C<pdflatex> for F<test-out.ltx>.
+
+=head1 DOCUMENTATION
+
+For full documentation use:
+
+texdoc B<ltximg>
+
+=head1 ISSUES AND REPORTS
+
+B<Repository> : L<https://github.com/pablgonz/ltximg>
+
+B<Bug tracker>: L<https://github.com/pablgonz/ltximg/issues>
+
+=head1 AUTHOR
+
+Pablo González Luengo, I<pablgonz@yahoo.com>.
+
+=head1 COPYRIGHT AND LICENSE
+
+Copyright 2013-2021 Pablo González, I<pablgonz@yahoo.com>.
+
+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.
+
+=head1 SEE ALSO
+
+gs(1), dvips(1), ps2pdf(1), pdfcrop(1), pdftops(1), pdftocairo(1), pdftoppm(1)
+
+=cut
+