File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,24 @@ pygmentize -f html -O full -o output.html /path/to/input.tla
2828```
2929
3030For syntax highlighting inside Latex docuemtns, we use [ minted] ( https://ctan.org/pkg/minted?lang=en ) package. For more
31- information see the provided [ example] ( latex/main.tex ) .
31+ information see the provided [ example] ( latex/main.tex ) .
32+
33+ ### Overleaf
34+ To use the MPCal and TLA+ lexers provided here on [ Overleaf] ( overleaf.com ) :
35+ 1 . Upload the ` mpcallexer/lexer.py ` file to your Overleaf project's top-most level (i.e., root directory).
36+ 2 . Change your TeX Live version to 2022 or earlier, see (link)[ https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted#Custom_lexers ] .
37+ 3 . Use ` \begin{minted}{lexer.py:TLAplusLexer -x} ` to redirect highlighting to the custom lexer.
38+ - For TLA+: ` {lexer.py:TLAPlusLexer -x} `
39+ - For MPCal: ` {lexer.py:MPCalLexer -x} `
40+
41+ 4 . A minted environment can be defined to avoid repetition:
42+ - definition:
43+ ``` latex
44+ \newminted[tlaplus]{lexer.py:TLAplusLexer -x}{fontsize=\small, linenos}
45+ ```
46+ - usage:
47+ ```latex
48+ \begin{tlaplus}
49+ ...
50+ \end{tlaplus}
51+ ```
You can’t perform that action at this time.
0 commit comments