hplgit / doconce

Lightweight markup language - document once, include anywhere
http://hplgit.github.io/doconce/doc/web/index.html
Other
312 stars 60 forks source link

Support PHP language #142

Closed ricpelo closed 6 years ago

ricpelo commented 6 years ago

DocOnce supports several programming languages (C, Python, Ruby...) but lacks support for PHP language.

Is there an easy way to include PHP language support?

Thanks in advance.

KGHustad commented 6 years ago

It is supported. See the list of available lexers.

!bc php
<?php
  echo "Hello World!";
?>
!ec
ricpelo commented 6 years ago

When I try the above using doconce format pdflatex hello.do.txt --xelatex --latex_code_style=pyg --latex_admon=grayicon, I get:

\begin{minted}[fontsize=\fontsize{9pt}{9pt},linenos=false,mathescape,baselinestretch=1.0,fontfamily=tt,xleftmargin=2mm]{text}
<?php
echo "Hello World!";
?>                                                    
\end{minted}                                                                    

I get no syntax highlighting.

I'm using DocOnce version 1.4.4.

KGHustad commented 6 years ago

Interesting. Apparently, there's some special handling for LaTeX. Will look into it.

KGHustad commented 6 years ago

Should be fixed with d304ea2f