Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nested syntax support for pyluatex similar to pythontex #2460

Closed
kiryph opened this issue Aug 17, 2022 · 3 comments
Closed

Add nested syntax support for pyluatex similar to pythontex #2460

kiryph opened this issue Aug 17, 2022 · 3 comments

Comments

@kiryph
Copy link
Contributor

kiryph commented Aug 17, 2022

I have used pythontex for quite some time. However, it always requires to have a more complicated compilation setup (see this latexmkrc, pythontex always requires the python package pygments, but my system python remains clean, so I have to enable via pyenv a python version meeting the requirements, ...).

There is a new package pyluatex which only needs the luatex engine instead of pdftex (single compilation run, no need for additional python packages except which I personally use).

However, it has different environment names

\documentclass{article}
\usepackage{pyluatex} 

\begin{document} 

\begin{python} 
print("I am python but vimtex syntax highlighting does not know me")
\end{python}

\begin{pythonq} 
print("I am python but vimtex syntax highlighting does not know me")
\end{pythonq}

\begin{pythonrepl} 
print("I am python but vimtex syntax highlighting does not know me")
\end{pythonrepl}

\end{document} 

Can nested syntax highlighting added for these as well?

This document can be compiled with

$ lualatex --shell-escape document.tex
lervag added a commit that referenced this issue Aug 17, 2022
@lervag
Copy link
Owner

lervag commented Aug 17, 2022

Pushed an initial support now.

@kiryph
Copy link
Contributor Author

kiryph commented Aug 17, 2022

Thanks for the addition. I hope you are doing well.

@kiryph kiryph closed this as completed Aug 17, 2022
@lervag
Copy link
Owner

lervag commented Aug 17, 2022

I'm well, thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants