[Ach] file.tex and file_generated.tex

Tobias Dussa (SCC) tobias.dussa at kit.edu
Wed Dec 18 00:33:37 CET 2013


Hi,

On Wed, Dec 18, 2013 at 12:04:06AM +0100, Adi Kriegisch wrote:
> Yup, the issue is simple: The lstlisting does not do linebreaks for comands
> it expanded (this is even somewhere in the docs, I think). So for simple
> things the esaping of a self-made command that expands to a few characters
> won't get you into troubles and is pretty easy and straight forward.
> For cipher B there won't be line breaks. Just in case you, think you can
> handle that -- go ahead! I'd like to have an inline solution too...

There is a solution to this.  If the linebreaks for the cipher string are set
manually (which isn't much of a problem), then the problem that you mention goes
away -- to be replaced by another problem though, namely the background gray
color.  The backdrop is not correctly set by lstlisting if an escaped sequence
produces multiple output lines.  The solution to this is not to use the
lstlisting background feature, but to place the entire listing within a
colorbox.  This, in turn, requires the use of a savebox for internal reasons.
It is a tiny bit ugly, but it can be done.  In practice, this means that
 \begin{lstlisting}
   ...
 \end{lstlisting}
needs to be replaced with
 \begin{MyListing}
  \begin{lstlisting}
    ...
  \end{lstlisting}
 \end{MyListing}

I have branched the code and replaced all occurences of @@@CIPHERSTRINGB@@@
as described.  Works in general (but does produce a slightly different behavior
in terms of spacing... don't think it matters though).

If y'all would prefer to get rid of the perl script, then I can merge my branch.

Cheers,
Toby.
-- 
Want a new feature?  You can have it cheap, good or fast.  Choose two.  

----

Karlsruhe Institute of Technology (KIT)
Steinbuch Centre for Computing (SCC)
KIT-CERT

Tobias Dussa
CERT Manager, CA Manager

Zirkel 2
Building 20.21
76131 Karlsruhe, Germany

Phone: +49 721 608-42479
Fax: +49 721 608-9-42479
Email: tobias.dussa at kit.edu
Web: http://www.kit.edu/

KIT – University of the State of Baden-Wuerttemberg and
National Laboratory of the Helmholtz Association



More information about the Ach mailing list