Edit: I cleaned up this first post to make it all a bit more clear.

I am trying to compile my tex files using XeLaTeX. This is the minimal code I wrote to try:

% !TEX program = xelatex

% Standard packages
\usepackage[right=2.8cm,left=2.8cm,top=3.2cm,bottom=3.0cm, headheight=16pt]{geometry}

% Other packages




The compile command I use: xelatex file.tex

The error:

... (normal behaviour)
(d:/texlive/2018/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (./file.aux)
*geometry* driver: auto-detecting
*geometry* detected driver: xetex
[1] (./file.aux) )xelatex.exe: fwrite: Broken pipe

Whenever I compile using xelatex --no-pdf file.tex and after that xdvipdfmx file.xdv it seems to work fine. Another way is by executing latexmk --xelatex file.tex. I am trying to understand why I get a Broken pipe error.

  • please add code inline not as external links (the question is archived for ever but those links will break) The log shows no error, it is just incomplete so hard to debug with no code available, can you make a small test file that shows this behaviour and add it to your question? Also what happens if you directly run xeetx on the commandline with this file rather than via the editor? – David Carlisle Mar 25 at 20:46
  • The logs are pretty big but if you want to have it all embedded, I'll do that. When I compile my code using xelatex Resume.pdf I get the same error. Edit, I can't add the log as you requested, too many characters (I don't even understand why you'd like a thread being bloated with a big log) – FPSUsername Mar 25 at 21:04
  • If you posted an example we could generate a log... it doesn't need to be your real cv, you can make it shorter and fake the words as long as it shows the same error (not terminating?) if you run it on the comandline do you get a tex error? the log you linked to shows no error it just stops unfinished? – David Carlisle Mar 25 at 21:07
  • 1
    as you see code in comments doesn't really work, best to add it to teh question in a code block (the {} button) also I won't be able to run that without layout.tex – David Carlisle Mar 25 at 21:20
  • 1
    I can't see how it can fail:-) Something very odd going on. – David Carlisle Mar 26 at 9:52

For Visual Code with LaTeX-Workshop, my workaround is to use latexmk as mentioned above. This however is a workaround and not a fix.

I edited my visual studio recipe "latex-workshop.latex.tools" to:

    "name": "xelatex",
    "command": "latexmk",
    "args": [

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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