Risposte nei forum create
-
AutoreRisposte
-
::
scusami ancora, visto che ci sto azzardo un’altra domanda.. 🙂mi capita spesso che dei listati lunghi prima o dopo dei quali devo inserire un’immagine vengano spezzati dall’immagine stessa.. Non esiste un modo per impedire che un listato venga interrotto con figure o tabelle?
Grazie 10000! 🙂 ciao
::L’errore sparisce quando aggiungi la virgola dopo “morecomment=[l]{//}”. Vedi pagina 21 della documentazione di listings:
And if you encounter unexpected characters after selecting a language (or style), you have probably forgotten a different comma or you have given to many arguments to a key, for example, morecomment=[l]{–}{!}
Aggiungo il colore rosso al tuo messaggio originale in modo che tu possa vedere dov’era l’inghippo.
Ciao
Enricoè vero mi ero perso una virgola e non me ne ero accorto! Grazie 1000! 🙂
::
ciao! Ecco un esempio (il comando listxtend è definito sopra):`\listxtend
\begin{lstlisting}[label={cap1list2},caption={checks.chk}]
import data;(*@\label{cap1list2:import}@*)context Attribute ERROR “Names must be more than one char long” : name.length > 1;
context Entity ERROR “Names must be more than one char long” : name.length > 1;
context Entity ERROR “Names of Entity attributes must be unique”:
attribute.forAll(a1| attribute.notExists(a2| a1 != a2 && a1.name == a2.name ) );(*@\label{cap1list2:vincolo3}@*)
\end{lstlisting}`output:
`/ import data ; /
2
3 cont ext Attribute ERROR ” Names must be more than one char long ” : name . –
length > 1 ;
4
5 cont ext Entity ERROR ” Names must be more than one char long ” : name . length > –
1 ;
6
7 cont ext Entity ERROR ” Names of Entity attributes must be unique ” :
8 attribute . forAll ( a1 j attribute . notExists ( a2 j a1 != a2 && a1 . name == a2 . –
name ) ) ; /`come puoi vedere ci sono degli / indesiderati in corrispondenza delle etichette…
grazie ancora! a presto!
-
AutoreRisposte