1

I am using Mac and I am trying to compile a .tex file using the terminal (it should work the same way as in linux, as far as I know). However, I have been trying to include a picture to my code but the terminal keeps failing to compile the document.

This is the code of the .tex file:

\documentclass[12pt]{article}

\usepackage{graphicx}

\begin{document}

Test

\begin{figure}[h]
\centering
\includegraphics{setup}
\caption{System set-up}
\label{fig:setup}
\end{figure}

\end{document}

An this are the commands I use in the terminal:

latex paper.tex
latex paper.tex
dvips paper.dvi -o paper.ps
ps2pdf paper.ps
open paper.pdf

And this is what I get:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)
 restricted \write18 enabled.
entering extended mode
(./paper.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg)
(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def)))
(./paper.aux)! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.

I don't understand why it does work with TeXShop whereas it does not work with the terminal. Moreover if I remove the includegraphics code line in the .tex file, the file can be correctly compiled using the terminal. What's happening?

I will really appreciate your help, thanks.

6
  • this looks like a problem with properly recognizing line endings -- like the command-line process assumes one form, and texshop, a different form. unfortunately, i'm unable to say how or why they differ. Nov 5, 2015 at 20:39
  • If I remove the line with includegraphics[scale=0.5]{setup}, and then execute latex paper.tex in the terminal it works. But if I do not remove it, it does not work. @barbarabeeton Nov 5, 2015 at 20:42
  • the error message is telling you that setup.eps has a line longer than 200000 characters. You could do as it says in the log that you quote and increase the buffer size, but perhaps the lines are not that long and tex is confused? Nov 5, 2015 at 20:58
  • 1
    I guess setup.eps has a format that confuses the line ending type decision process. When a file is open for input, TeX Live programs check for the first combination that can be considered a line ending: <CR> (legacy Mac type), <CR><LF> (legacy DOS), <LF> (Unix). Once found one, it assumes the same combination holds for the whole file.
    – egreg
    Nov 5, 2015 at 21:07
  • Which version of Mac OSX are you using?
    – rebatoma
    Nov 5, 2015 at 22:12

0

Browse other questions tagged .