thomasjo / atom-latex

Compile LaTeX or knitr documents from within Atom
https://atom.io/packages/latex
MIT License
223 stars 42 forks source link

LaTeX Log incorrectly references .Rnw file in summary - should reference generated .tex #370

Closed mathuin closed 7 years ago

mathuin commented 7 years ago

I have an .Rnw file named fullscale.Rnw which I compile with this tool. The LaTeX log includes lines like this:

Overfull \hbox (1.49698pt too wide) at fullscale.Rnw at line 64 [from fullscale.log at line 161]

Only the .Rnw file has fewer than 64 lines. :-) However! When I look at fullscale.tex which is generated from fullscale.Rnw, line 64 is definitely the one causing the overfull \hbox.

If necessary, I can generate a working example, just ask!

yitzchak commented 7 years ago

The line number probably refers to the intermediate LaTeX file fullscale.tex. I'll look into it.

yitzchak commented 7 years ago

@mathuin Do you have a sample knitr file?

mathuin commented 7 years ago

This file saved as an Rnw file will demonstrate the problem:

% minimum working example
\documentclass{article}
\begin{document}
    <<overfill-hbox-coming-up, echo=TRUE>>=
    long <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
    @
\end{document}

Here is the message I get in the LaTeX log:

Overfull \hbox (180.0pt too wide) at mwe.Rnw at line 58 [from mwe.log at line 167]

Line 58 in mwe.tex is the long line, and the overfull \hbox complaint is indeed on lines 167-168 of mwe.log.

yitzchak commented 7 years ago

Should be fixed in v0.44.0