mysql - syntax highlighting while rendering SQL using knitr -
knitr execute sql code using engine='mysql' not highlight syntax:
\documentclass{article} \begin{document} <<engine='mysql', engine.opts="-h localhost">>= show databases; @ \end{document} on other hand using engine='highlight' highlight code not execute it.
\documentclass{article} \begin{document} <<engine='highlight', engine.opts='-s sql -o latex'>>= show databases; @ \end{document} is there way have code executed and syntax highlighted using 1 chunk?
Comments
Post a Comment