1

I use the OPL language for optimization and I’m writing some notes on Latex using "listings". I defined the language and the keywords, so far no problems. However I have a keyword “subject to” and a keyword “to SheetWrite” that I need to be colored differently. The problem is the word “to” that appears in both keywords. Is there a way to define two word keywords in listings or otherwise solve this problem?

marked as duplicate by jub0bs, user13907, Werner, Mico, Henri Menke Feb 10 '15 at 20:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself with our format. Regarding to your question, I guess one of these links will answer your question: 1, 2, 3. But I'm not sure if it's a duplicate... – Pouya Feb 10 '15 at 16:57

Browse other questions tagged or ask your own question.