- Questo topic ha 8 risposte, 4 partecipanti ed è stato aggiornato l'ultima volta 9 anni, 5 mesi fa da .
-
Topic
-
Sto usando il pacchetto listings per importare delle sequenze di codice, ma ho riscontrato un fatto, a mio avviso, anomalo. Riporto L’EMC e dopo spiego.`
\documentclass[a4paper,11pt]{book}
\usepackage[german,italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}\begin{document}
\appendix
\chapter{Listati}
\lstset{basicstyle=\footnotesize\ttfamily, tabsize=2,showstringspaces=false}\begin{lstlisting}
&MESH IJK=30,30,60 XB=-1.5,-0.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=0 /
&MESH IJK=30,30,60 XB=-0.5,0.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=1 /
&MESH IJK=30,30,60 XB=0.5,1.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=2 /
&MESH IJK=30,30,60 XB=-1.5,-0.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=3 /
&MESH IJK=30,30,60 XB=-0.5,0.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=4 /
&MESH IJK=30,30,60 XB=0.5,1.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=5 /
&MESH IJK=30,30,60 XB=-1.5,-0.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=6 /
&MESH IJK=30,30,60 XB=-0.5,0.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=7 /
&MESH IJK=30,30,60 XB=0.5,1.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=7 /
\end{lstlisting}\begin{lstlisting}
&MESH IJK=40,40,80 XB=-1.5,-0.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=0 /
&MESH IJK=40,40,80 XB=-0.5,0.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=1 /
&MESH IJK=40,40,80 XB=0.5,1.5,-1.5,-0.5,0,2,
COLOR='RED', MPI_PROCESS=2 /
&MESH IJK=40,40,80 XB=-1.5,-0.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=3 /
&MESH IJK=40,40,80 XB=-0.5,0.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=4 /
&MESH IJK=40,40,80 XB=0.5,1.5,-0.5,0.5,0,2,
COLOR='RED', MPI_PROCESS=5 /
&MESH IJK=40,40,80 XB=-1.5,-0.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=6 /
&MESH IJK=40,40,80 XB=-0.5,0.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=7 /
&MESH IJK=40,40,80 XB=0.5,1.5,0.5,1.5,0,2,
COLOR='RED', MPI_PROCESS=7 /
\end{lstlisting}\end{document}
`
come si può vedere sia nel primo blocco che nel secondo uso le medesime istruzioni opzionali
`\begin{lstlisting}
`
e
`\begin{lstlisting}
`
Ma compilando, nel secondo blocco, invece di numerare come 1 3 5 7 9 ecc numera come 2 4 6 8 ecc
Qualcuno ha idea del perché succeda questo?
- Devi essere connesso per rispondere a questo topic.