How to write LaTeX directly inside Scrivener?

Hello.

How do we write LaTeX code directly in Scrivener to meet advanced formatting or structuring needs? For example I don’t want Scrivener to output \chapter{Abstract}for my Abstract section since that would use use chapter numbering. Instead I want it to output \chapter*{Abstract}, so I wrote the following replacement rule:

!# $@ #! --> \chapter*{$@}

However, this does not work as intended. The output is this:

\textbackslash{}chapter*\{Abstract\} 

I also tried HTML escaping as I read somewhere that should work: <!- \chapter*{$@} -> but it doesn’t work. How do I make this work?

Regards,
John

The simplest solution to this problem is addressed here: http://literatureandlatte.com/forum/viewtopic.php?f=21&t=19269

In summary, don’t try to adjust the header of the Scrivener doc, but put the latex into the text, with HTML escaping:

Then, compile that file ‘as is’ so the Scrivener doc title doesn’t get used.

Thanks, that works! I wrote originally that I had already tried the HTML escaping, but actually I hadn’t, since I did it wrong: I used <!- LaTeX code -> instead of - so it worked all along!