How to display the pdf and not the latex code :
def index():
    m = "Hello **world** [[link http://web2py.com]]";
    from gluon.contrib.markmin.markmin2latex import markmin2latex
    print markmin2latex(m)
    return locals()

{{extend 'layout.html'}}
 {{=markmin2latex(m)}}

I am getting this but I want the pdf :
\documentclass[12pt]{article} \usepackage{hyperref} \usepackage{listings} 
\usepackage{upquote} \usepackage{color} \usepackage{graphicx} 
\usepackage{grffile} \usepackage[utf8x]{inputenc} 
\definecolor{lg}{rgb}{0.9,0.9,0.9} \definecolor{dg}{rgb}{0.3,0.3,0.3} 
\def\ft{\small\tt} \lstset{ basicstyle=\footnotesize, breaklines=true, 
basicstyle=\ttfamily\color{black}\footnotesize, keywordstyle=\bf\ttfamily, 
commentstyle=\it\ttfamily, stringstyle=\color{dg}\it\ttfamily, 
numbers=left, numberstyle=\color{dg}\tiny, stepnumber=1, numbersep=5pt, 
backgroundcolor=\color{lg}, tabsize=4, showspaces=false, 
showstringspaces=false } \title{Title} \author{} \begin{document} 
\maketitle \tableofcontents \newpage Hello {\bf world} 
{\footnotesize\href{http://web2py.com}{link}} \end{document}

On Thursday, April 7, 2016 at 5:14:08 PM UTC+5:30, villas wrote:
>
> Markmin is already available in the environment.
>
> {{extend 'layout.html'}}
> {{=MARKMIN(m)}}
>
>
> On Thursday, 7 April 2016 12:23:59 UTC+1, Stephen Duisberg wrote:
>>
>> I am doing this but I get errors because markmin isn't there.
>>
>> from markmin import markmin2html
>> def index():
>>     m = "Hello **world** [[link http://web2py.com]]";
>>     return locals()
>>
>> {{extend 'layout.html'}}
>>  {{=markmin2html(m)}}
>> <type 'exceptions.NameError'> name 'markmin2html' is not defined
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to