Sign up ×
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 am running pdftex from command line and the images are getting clipped. When I run the same commands from a saved tex file, no clipping occurs. I have attached the commands and rendered outputs also available (if you bump up my reputation points I can upload them). I do not see any unusual differences in the log files.

This seems like a bug and pdftex's tracking system would not let me register to file a bug (

Can some please confirm this as bug, recommend how I can report it, and perhaps provide a workaround. I am trying to render a circuitikz via commandline.

:: PDF from Files
    pdflatex -interaction=nonstopmode -halt-on-error -jobname circuit_file circuit.tex circuit.pdf

:: PDF from String   
    pdflatex -interaction=nonstopmode -halt-on-error -jobname circuit_string \documentclass[class=minimal,border=4pt]{standalone} \usepackage{tikz} \usepackage{circuitikz} \usepackage{siunitx} \pagestyle{empty} \begin{document} \begin{circuitikz}[european]\draw(0,0) to [V, v=$V_1$, i_=$I_1$] (0,2)to [R, l^=${R_1}$] (2,2)to [R, l^=${R_2}$, v^<=$V_2$] (2,0) -- (0,0); \end{circuitikz} \end{document}

enter image description here

share|improve this question
Welcome to! I get the same result provided I remove class=minimal, which is wrong. –  egreg Jan 20 '13 at 19:07
You should quote the string to protect it from changes by the OS. Use double quotes on MS Windows and single quotes on Linux/Unix and probably Mac OS X. Also, as author of standalone I really agree with @egreg here about not using the minimal "class". See also Why not use the minimal class. –  Martin Scharrer Jan 22 '13 at 6:58

1 Answer 1

As Martin suggested, putting quotes around the latex string solved the clipping problem.

pdflatex -interaction=nonstopmode -halt-on-error -jobname circuit_string "\documentclass[border=4pt]{article} \usepackage{tikz} \usepackage{circuitikz} \usepackage{siunitx} \pagestyle{empty} \begin{document} \begin{circuitikz}[european]\draw(0,0) to [V, v=$V_1$, i_=$I_1$] (0,2)to [R, l^=${R_1}$] (2,2)to [R, l^=${R_2}$, v^<=$V_2$] (2,0) -- (0,0); \end{circuitikz} \end{document}"
share|improve this answer
Ok, I recently switched from Miktex on Windows to texlive on Linux. I type the same command above and now I get an error in Linxux: [Loading MPS to PDF converter (version 2006.09.02).] ) ! Extra }, or forgotten $. \@let@token ...{ \pgf@circ@finallabel {voltage/} } <*> ...european]\draw(0,0) to [V, v=$, i_=$] (0,2) to [R, l^=$] (2,2)to [R, l... ! ==> Fatal error occurred, no output PDF file produced! Transcript written on circuit_string.log. –  gpitel Mar 13 '13 at 2:20
Try single quotes instead of double. Some of your $ characters are being interpreted as the start of shell variables. –  Mike Renfro Mar 13 '13 at 2:41

Your Answer


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.