GeneralVerbatimInput Stopping Compiler

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ArchieinSpace
Posts: 4
Joined: Sat Dec 07, 2019 8:27 am

VerbatimInput Stopping Compiler

Post by ArchieinSpace »

Hey there, i was hoping somebody could give me some direction regarding an error the \Verbatiminput command from the Verbatim package is giving me.

I'm trying to include some of the code I wrote for the project in the appendix using this, but when I try it gives me the following error:

l.2 \VerbatimInput{Weiszfeld.txt}

Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.

Runaway definition?
-> dist = math.sqrt( (U[j]-mdnU) if dist < 0.00\ETC.
! File ended within \read.
<read 2>

l.2 \VerbatimInput{Weiszfeld.txt}

This \read has unbalanced braces.

)
Runaway argument?
dist = math.sqrt( (U[j]-mdnU) if dist < 0.001:\ETC.
! File ended while scanning use of \FV@@ReadLine.
<inserted text>
\par
l.114 \input{chapters/AppendixI.tex}

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

)
! Emergency stop.
<*> thesis_template_astro.tex


where the line following the runaway argument is from my code. Is LaTeX seeing my python code as something it needs to execute and, if this is the case, how do I avoid this command seeing my python code as LaTeX commands?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

VerbatimInput Stopping Compiler

Post by Johannes_B »

Please show us a minimal working example, along with the log-file.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ArchieinSpace
Posts: 4
Joined: Sat Dec 07, 2019 8:27 am

VerbatimInput Stopping Compiler

Post by ArchieinSpace »

Johannes_B wrote:Please show us a minimal working example, along with the log-file.
The following is how the command is defined in my main file:

Code: Select all

\RecustomVerbatimCommand{\VerbatimInput}{VerbatimInput}%
{fontsize=\footnotesize,
 %
 frame=lines,  % top and bottom rule only
 framesep=2em, % separation between frame and text
 rulecolor=\color{Gray},
 %
 %
 commandchars=\|\(\), % escape character and argument delimiters for
                      % commands within the verbatim
 commentchar=*        % comment character
}


Here's an example of the command working inside my appendix section:

Code: Select all

\section{EXAMPLE TEXT}
\VerbatimInput{Example.txt}
output:
Appendix A %appendix is being printed from my main .tex file
Commented Code
A.1 EXAMPLE TEXT
This is a text file %where verbatiminput is printing out the contents of an uploaded text file

With the Working Output.log in the attachments.

Then, when I run it with the same command, but on a text file I am trying to implement it stops the compiler. Here are the logs for that in Failed output.log

Finally, the text file in question that's causing issues, Weiszfeld.txt
Attachments
Weiszfeld.txt
(880 Bytes) Downloaded 130 times
Working output.log
(31.73 KiB) Downloaded 136 times
Failed Output.log
(31.09 KiB) Downloaded 142 times
Post Reply