Skip to content

Instantly share code, notes, and snippets.

@netj
Last active May 20, 2016 06:54
Show Gist options
  • Save netj/f61c5931598d0c6ff704 to your computer and use it in GitHub Desktop.
Save netj/f61c5931598d0c6ff704 to your computer and use it in GitHub Desktop.
An example for reproducing an errorformat bug in vim-latex for filename tracking

An example for vim-latex/vim-latex#20. With vim-latex installed, run the following command

vim -o a.tex b.tex a.log +'set ft=tex autoread makeprg=pdflatex\ \\\\nonstopmode\ \\\\input\\{%} | make | copen'

The quickfix window should show b.tex as the file names, but the bug in errorformat makes vim lose track of filenames.

\relax
\citation{nonexistent}
\citation{nonexistent2}
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2015.5.24) 19 MAY 2016 23:43
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**\nonstopmode \input{a.tex}
(./a.tex (/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (./a.aux)
\openout1 = `a.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
(./b.tex
Overfull \hbox (218.72433pt too wide) in paragraph at lines 3--4
[]\OT1/cmr/m/n/10 b.tex line3 has un-wieldy lines xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[]
Overfull \hbox (77.22412pt too wide) in paragraph at lines 3--4
\OT1/cmr/m/n/10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
[]
Overfull \hbox (77.22412pt too wide) in paragraph at lines 3--4
\OT1/cmr/m/n/10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx
[]
Overfull \hbox (80.0019pt too wide) in paragraph at lines 3--4
\OT1/cmr/m/n/10 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxx.
[]
LaTeX Warning: Citation `nonexistent' on page 1 undefined on input line 5.
)
LaTeX Warning: Citation `nonexistent2' on page 1 undefined on input line 10.
[1
{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./a.aux)
LaTeX Warning: There were undefined references.
)
Here is how much of TeX's memory you used:
208 strings out of 493089
2175 string characters out of 6134842
53199 words of memory out of 5000000
3775 multiletter control sequences out of 15000+600000
3948 words of font info for 15 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
24i,4n,21p,423b,107s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
></usr/local/texlive/2015/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on a.pdf (1 page, 25467 bytes).
PDF statistics:
16 PDF objects out of 1000 (max. 8388607)
10 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
\documentclass{article}
\begin{document}
a.tex line 3 has nothing to do with Overfull warnings.
a.tex line 5 has nothing to do with Citation either.
\input{b} % here's where b is included
a.tex line 10 has its own Citation problem~\cite{nonexistent2}.
\end{document}
% b.tex which has some problems
b.tex line3 has unwieldy lines xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
b.tex line5 has dangling citation~\cite{nonexistent}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment