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

Automatic Lua injection in lua commands and environments #1699

Merged
merged 3 commits into from
Dec 17, 2020

Conversation

slideclimb
Copy link
Collaborator

@slideclimb slideclimb commented Dec 16, 2020

Summary of additions and changes

  • Make LatexParameter injectable.
  • Add Lua commands to inline verbatim.
  • Automatically inject Lua in Lua commands when a language with id Lua, lua, or LUA exists, i.e., when a Lua plugin is installed (tested with EmmyLua).

How to test this pull request

Check that language injection in environments still works, and that specifying the language with a magic comment takes precedence over Lua (for environments only, magic comments specifying the language are not supported for commands).

\documentclass{article}
\usepackage{listings}
\usepackage{luacode}

\begin{document}
    \directlua{tex.write()}
    \luaexec{tex.write()}

    \begin{luacode*}
        tex.write()
    \end{luacode*}

    
    %! language = Bibtex
    \begin{lstlisting}
        @article{identifier,
        author = {author},
        title = {title},
        journal = {journal},
        year = {year},
        }
    \end{lstlisting}
\end{document}

Wiki

  • Updated the wiki:

@slideclimb slideclimb added this to the b0.7.2 milestone Dec 16, 2020
@slideclimb slideclimb self-assigned this Dec 16, 2020
@PHPirates PHPirates merged commit 711380a into master Dec 17, 2020
@PHPirates PHPirates deleted the lua-injection branch December 17, 2020 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants