0

According to my prior question here I'm trying to highlight code in LaTeX and the minted package is not working properly. Now I wanted to ask if there is a possibility to do something like the following:

\newCommand\CustomHighlight{asdf=blue, text=red, test=green}

then use it like this \CustomHighlight{asdf text Test} to get the following result: enter image description here

The syntax highlighting shouldn't be case-sensitive.

  • 1
    I am not sure you can do that easily with minted as it uses external programs to parse the code, but with listings it is pretty easy by using the keywords parameter (or defining a new language) – Bordaigorl Nov 14 '16 at 21:14
  • I don't want to use minted as it doesn't work... :( Can I do syntax highlighting with listing? I thought it is only making letters bold... Actually I want to highlight PL/SQL language like Notepad++ does... image – FranzHuber23 Nov 14 '16 at 21:23
  • Mhm, you're right, it looks quite good with listings: link – FranzHuber23 Nov 14 '16 at 21:26
  • minted could not do your example but it does have a lexer for SQL, so if your real example is a language known to pygmentize then minted is probably the system of choice. – David Carlisle Nov 14 '16 at 22:03
  • As I already told, minted doesn't work... – FranzHuber23 Nov 14 '16 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.