Skip to content

converts tex manuscript containing tikz pictures into tex without tikz + separate tikz files for each figure; can convert tikz files to pdf

Notifications You must be signed in to change notification settings

lokmantsui/tikz2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

tikz2pdf

usage:

python extract_tikz.py <input_file> <output_file> [--to_pdf=<bool>]

Options:

--to_pdf=<bool>                   compile tikz files to pdf[default: False]

extracts .tikz figures from input .tex file and output separated .tikz files for each tikz figure, along with a modified .tex file with each figure replaced by an \input{figure_name.tikz} statement or \includegraphics{figure_name} statement, depending on whether the to_pdf boolean flag.

More precisely, replaces every block in input .tex

\begin{tikzpicture}...
...
\end{tikzpicture}...
\label{figure_name}

by (if to_pdf is False)

\input{figure_name.tikz}
%\includegraphics{figure_name}
\label{figure_name}

or (if to_pdf is True)

%\input{figure_name.tikz}
\includegraphics{figure_name}
\label{figure_name}

and creates a new figurename.tikz file with contents:

\begin{tikzpicture}...
...
\end{tikzpicture}...

if to_pdf is True, will also call tikz2tex.sh script which runs pdf2latex to convert every .tikz file into a .pdf file, assuming WSL in windows

About

converts tex manuscript containing tikz pictures into tex without tikz + separate tikz files for each figure; can convert tikz files to pdf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published