Il giorno 19 ottobre 2010 23:42, Antonio Galea <antonio.galea@xxxxxxxxx> ha scritto: > 2010/10/19 matteo ruffoni <mattruffoni@xxxxxxxxx>: > > approffitto ancora un po' nella sostituzione il file si comporta un po' > male > > e sostitutisce male \cdot infatti nei file txt leggo > > \item \begin{math} 3^4 3 ot 3 ot 3 ot 3 3+3+3+3 3 ot 4 \end{math} > > al posto di > > \item \begin{math} 3^4 3 \cdot 3 \cdot 3 \cdot 3 3+3+3+3 3 \cdot 4 > > \end{math} > > come elimino quel quadratino? > > sarà un problema di utf8 o iso etc etc che capisco poco? > > Ciao, > è il Perl che vede \c e lo interpreta come un escape. > Prova con > > cat $template | \ > perl -000 -pe"s/\\/\\\\/g; s/\@ALUNNO\@/$alunno/g; s/\@BANCO\@/$banco/g" > > \ > compito-$i.tex > > purtroppo crea un errore in pdflatex ) * ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... <*> 3 ^4;3 \cdot 3 \cdot 3 \cdot 3;3+3+3+3;3 \cdot 4 ? ! Emergency stop. ... <*> 3 ^4;3 \cdot 3 \cdot 3 \cdot 3;3+3+3+3;3 \cdot 4 ! ==> Fatal error occurred, no output PDF file produced! Transcript written on compito-0.log. nel file di log *3^4;3 \cdot 3 \cdot 3 \cdot 3;3+3+3+3;3 \cdot 4 ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... <*> 3 ^4;3 \cdot 3 \cdot 3 \cdot 3;3+3+3+3;3 \cdot 4 ? ! Emergency stop. ... <*> 3 ^4;3 \cdot 3 \cdot 3 \cdot 3;3+3+3+3;3 \cdot 4 You're in trouble here. Try typing <return> to proceed. If that doesn't work, type X <return> to quit. Here is how much of TeX's memory you used: 7 strings out of 493848 278 string characters out of 1152822 47808 words of memory out of 3000000 3381 multiletter control sequences out of 15000+50000 3640 words of font info for 14 fonts, out of 3000000 for 9000 714 hyphenation exceptions out of 8191 5i,0n,4p,49b,14s stack positions out of 5000i,500n,10000p,200000b,50000s ! ==> Fatal error occurred, no output PDF file produced! > (ovviamente, con le variabili che usi tu). > La prima sostituzione raddoppia i backslash, non l'ho testato ma > dovrebbe fare quel che ti occorre. > > Antonio > -- > Per iscriversi (o disiscriversi), basta spedire un messaggio con OGGETTO > "subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx > > >