New answers tagged


How to create a custom .cwl-file for TXS: Open any ASCII-Text editor of your choice, e.g. vi, Notepad++. Alternatively: use TXS. Create and save a new text file with the file extension .cwl. If created for a package, the .cwl-file needs to be named in compliance to the package name. Add all commands you created as follows: #<author> <date> \&...


There is no standard option to do this, but you can create your own preamble file for latexdiff to replace the highlighting commands. All you need to do after a standard run of latexdiff is to copy the lines latexdiff writes in to the header of the diff file and change those that do not fit your style. In your case the command to change is \DIFadd that by ...


The syntax colored listings are solved by OPmac tricks 0124 (C syntax), 126 (html syntax) or 0152 (Python syntax). You can simply extend these macros for another language, if you need. Note that referred macros need not any special external processor. All is done in classical TeX.


Knuth has developed the list.tex macros to produce code listings. To produce a listing of the file test.c with the content #include <stdio.h> int main() { printf("Hello World!\n"); } we input on the terminal $ pdftex list.tex test.c <<< "\\bye" and obtain the following output Drawbacks: No syntax highlighting Overly long lines ...

Top 50 recent answers are included