I'm havin an issue which I cannot solve. If I have a subsubsection containing text with a verbatim
section in between, the first line after the verbatim
section is not aligned properly. If I put a \newline
command after the verbatim, everything works, but it shows the error
There's no line here to end
This is the code:
\subsubsection{Umsetzung}
C: \texttt{if(r1 > r2)$\{$statement;$\}$} \newline
Realisierung in 2 Schritten: zuerst die Register vergleichen, dann auf Grund
von Flags bedingten Sprung ausführen.
\begin{verbatim}
cp r1, r2 ; vergleiche (compare) r1 mit r1
brge L1 ; verzweige falls r1 >= r2 (mit Vorzeichen!)
...
statement
...
L1: nop ; hier geht es weiter
\end{verbatim}
C: \texttt{if(r1 > r2)$\{$statement1;$\}$else$\{$statement2;$\}$} \newline
Assembler:
\begin{verbatim}
cp r1, r2 ; vergleiche (compare) r1 mit r
brge L1 ; verzweige falls r1 >= r2
...
statement1
...
rjmp L2
L1: ...
statement2
...
L2: ... ; hier geht es weiter
\end{verbatim}
And this is the output:
Even if I remove the whole verbatim section, the described line stays on a new line and not properly aligned (and this - in my oppinion - is far stranger, shouldn't it just float at the end of the previous sentence since I never tell to break a line?).
Note that I slightly formatted the content of the verbatim
sections here for better legibility, so don't be suprised if the alignment of the Assembler-code isn't like in the picture in case you compile my code.
\noindent
? Or just omit the blank line which is causing the new paragraph if you do not want a paragraph break at that point. – David Carlisle Dec 12 '12 at 23:27\texttt
and$...$
, use\verb|...|
. – Werner Dec 12 '12 at 23:29