Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.