Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\includedot: avoid left-margin because of unwanted spaces #2

Merged
merged 1 commit into from Jan 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions graphviz.sty
Expand Up @@ -39,13 +39,13 @@

\ProvidesPackage{graphviz}

\newcommand{\includedot}[2][scale=1]{ %
\ifnum\pdfshellescape=1
\newcommand{\includedot}[2][scale=1]{%
\ifnum\pdfshellescape=1
% Yes, enabled
\immediate\write18{bash -c "dot -Tpdf #2.dot -o #2.pdf 2> #2.log"}
\immediate\write18{bash -c "dot -Tpdf #2.dot -o #2.pdf 2> #2.log"}%
\IfFileExists{#2.pdf}
% the pdf exists: include it
{ \includegraphics[#1]{#2} }
{\includegraphics[#1]{#2}}
% the pdf was not created - show a hint
{ \fbox{ \begin{tabular}{l}
The file \texttt{#2.pdf} hasn't been created from
Expand All @@ -57,7 +57,6 @@
"\texttt{\input{#2.log}}"
\end{tabular}}
}

\else
\fbox{ \begin{tabular}{l}
You need to execute `\texttt{pdflatex}' with the `\texttt{-shell-escape}' option.\\
Expand All @@ -75,3 +74,4 @@
}