TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made a new language definition for a .NET template engine where part of the strings in the C# code are markup.


string templateString = @"{% for name in names %} 
Hallo {{ name }} 
{% endfor %}";

Everything between {% and %} and {{ and }} is part of the template engine and should be formatted different from the string.

My language definition looks like this:


When I have normal C# code with template code inside (not inside a string) it works fine, but in the example above the complete string is formatted one way.

Is there any way to achieve this? I experimented with moredelim and deletestring but didn't manage to get the wanted result.

share|improve this question

closed as unclear what you're asking by Marco Daniel, lockstep, Claudio Fiandrino, Stefan Kottwitz Jul 7 '13 at 11:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Hi. Were you already able to solve this problem? Perhaps this does not have an answer until now because it is difficult to set up this problem without enough background. Please provide a minimal working example (MWE) for solvers to play with. – hpesoj626 Feb 28 '13 at 22:07

Browse other questions tagged or ask your own question.