I'm editing my web2py files directly in the browser, Chrome, Windows 7. 
Just lok at the lines in which appears a '$', those are the characters that 
fail.

def latexfromexercises(exercises,solutions,vsep):
#cabecera y comienzo del documento
    latexworksheet=r"""\documentclass[14pt]{extreport}
\usepackage{lmodern}

More latex stuff...
"""

    latexworksheet+=r"\begin{enumerate}[label={\arabic*)}]"
    for i in range(len(exercises)):
        latexworksheet+= r'\item' + '$' + exercises[i] + '$' + r' \\'
        latexworksheet+=r"\vspace{%scm} " % vsep
    latexworksheet+=r"""\end{enumerate}"""
    if (solutions!=""):
        latexworksheet+= r"\newpage \underline{\textbf{Soluciones a los 
ejercicios}} \\"
        latexworksheet+=r"\begin{enumerate}[label={\arabic*)}]"        
        for i in range(len(exercises)):
            latexworksheet+=r"\normalsize"
            latexworksheet+= r'\item ' + '$' + solutions[i] + '$' + r' \\'
        latexworksheet+=r"""\end{enumerate}"""   

    latexworksheet+=r"""\end{document}"""
    return latexworksheet





El sábado, 29 de junio de 2013 22:39:20 UTC+2, Alan Etkin escribió:
>
> Hi all:
>>
>> I've defined a function inside a model file. It contains a string. This 
>> string is raw because it's a LaTeX expression and in order to maintain the 
>> escape characters I think it's the way to proceed.
>>
>
> What editor are you using? Can we see the part of the model that fails? 
> (before saving the file)
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to