tobias-schwarz / latex-template

2 stars 3 forks source link

Compilation Error on large code snippets #15

Closed marvinKrae closed 4 years ago

marvinKrae commented 4 years ago

When importing a really long code snippet, the document cannot compile. It always crashes at around page 100.

Code to reproduce

\anhang{EXAMPLE}
\anhangteil{subEXAMPLE}
\lstinputlisting{appendix/json/exampleRes.json}

appendix/json/exampleRes.json is a json with > 2000 lines.

Error

All used citation keys and labels are undefined. (Error message for each)

Package hyperref Warning: old app file detected, not used; run LaTeX again.

[28] (/Users/marvinkraemer/Documents/pa2/latex-template/appendix/json/exampleRes.json [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57]

/Users/marvinkraemer/Documents/pa2/latex-template/appendix/json/exampleRes.json:1154: Package inputenc Error: Invalid UTF-8 byte sequence.

Error occures with different (valid) files, but always in line 1154.

lynxplay commented 4 years ago

Can you provide an excerpt of your json file?

cat -n exampleRes.json | sed '1100,1200!d' should deliver the 100 lines around the problematic block.

marvinKrae commented 4 years ago

Any tested JSON File with over 2000 lines produces this error (tested files are completely different)

lynxplay commented 4 years ago

I attempted to include a json file with 5702 lines and my process worked out great. What compile mechanism are you using? (Docker?) Please provide the excerpt as well anyway just for good measure.