1

I want to attach a PDF output of a source code using graphic option of LTXinputExample. Shortly speaking, how to resize the attached graphic?

enter image description here

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{source.tex}
\documentclass[tikz]{standalone}
\begin{document}
\tikz \draw (0,0) circle (1);
\end{document}
\end{filecontents*}

\immediate\write18{pdflatex source}

\usepackage{showexpl}
\lstset
{
    frame=single,
}

\begin{document}
\LTXinputExample[graphic=source,pos=b]{source.tex}
\end{document}

Edit:

I don't want to change the width of the formatted source code.

1 Answers1

2

You can use the width option. It will change the available space for the output and the graphic will adapt:

\LTXinputExample[width=4cm,graphic=source,pos=b]{source.tex}
Ulrike Fischer
  • 327,261