Passing a backslash to Latex

jo
joe.rice
Posts: 2
Joined: Wed Dec 06, 2017 3:09 pm
Platform: Mac

Wed Dec 06, 2017 3:55 pm Post

There has been some discussion in the past on passing a backslash through to Latex. As discussed, the <!-- XXX--> solution is very tedious and quickly becomes impractical.

With the new release of Scrivener, is there a ready made solution?

If not, is there not a file within the Library where we can simply turn off the line that changes "\" to "\backslash"?

User avatar
AmberV
Posts: 20573
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed Dec 06, 2017 4:56 pm Post

For myself, I created a style for this called “Raw LaTeX”. I use that to mark any text in the editor that needs to be passed through the MMD engine. The compile format has the job of turning this styled text into something, or perhaps ignoring it or even deleting the text.

The attached demo project is set up to show three scenarios. To view how they work, open Compile and double-click on each format in the left sidebar, examining its Styles pane and what it does with the “Raw LaTeX” style:

  • MMD5 - LaTeX: uses the <!--method-->
  • MMD6 - LaTeX: uses the newer `method`{=latex} (also compatible with Pandoc, as I understand it).
  • Non-LaTeX: merely demonstrates how styled text can be completely removed from the output, much like using an inline annotation would.
Attachments
17340726-raw_latex_with_styles.zip
(66.86 KiB) Downloaded 4 times
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

jo
joe.rice
Posts: 2
Joined: Wed Dec 06, 2017 3:09 pm
Platform: Mac

Wed Dec 06, 2017 8:55 pm Post

Hi Amber,

Thanks so much. I'm not seeing the demo project. Am I missing something obvious?

User avatar
AmberV
Posts: 20573
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Wed Dec 06, 2017 9:35 pm Post

Oops! I was running into some connectivity problems when I posted that and it looks like the attachment dropped at one point. I've edited the post.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles