Problem with raw LaTeX Code since Update to MMD 6

Hi, I‘ve had a Scrivener Project for quite some time now and since a recent Update of Scrivener my Export does not work as expected and as it did before. Hopefully someone can help me figure out what I’m doing wrong…

So I write in mostly Markdown but I need some raw LaTeX in my Scrivener Project. I did configure a Paragraph Style “LaTeX Code Block” and last I checked in my compile settings under Styles I had this Code Block prefixed by [code]

[/code] but this post: https://forum.literatureandlatte.com/t/how-to-make-a-box-like-in-the-scrivener-user-manual/39710/6 led me to a change in MMD 6 (see also fletcher.github.io/MultiMarkdow … #rawsource) and I figured I now need my raw LaTeX prefixed by [code]

[/code] and suffixed by [code]

[/code]:

[attachment=0]Screenshot of Scrivener (07-02-21, 10-56-32).png[/attachment]

This compiles to this LaTeX file:

\begin{document}
   
\section{Test}
\label{test}

\subsection{Grundlegendes}
\label{grundlegendes}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna a liqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillim dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non provident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Some LaTeX:

\texttt{{=latex\}\textbackslash{}begin\{figure\}[!ht]}
\texttt{{=latex\}\textbackslash{}centering\textbackslash{}includegraphics[width=0.8\textbackslash{}textwidth]\{\slash Users\slash xxx\slash PDFtoinlcude.pdf\}}
\texttt{{=latex\}\textbackslash{}caption\{Alle Sprachen\}}
\texttt{{=latex\}\textbackslash{}label\{fig:someexamplefigure\}}
\texttt{{=latex\}\textbackslash{}end\{figure\}}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna liqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillim dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non provident, sunt in culpa qui officia deserunt mollit anim id est laborum.

\end{document}

What am I missing? Thanks!

after even more trial and error I figured it out myself:

[attachment=0]Screenshot of Scrivener (07-02-21, 11-24-52).png[/attachment]

So it‘s ` as prefix and `{=latex} as suffix.

Yeah… though I would caution that it looks like you’ve inserted the inline code variation into a style that will work better for code blocks (it’s a paragraph style). The triple-backtick, also referred to as a “code fence” in modern Markdown, is a replacement for using a tab in front of every code line. It is placed entirely around the chunk of code. If you assigned it to multiple lines of text in the editor, you would get this on output:

```{=latex}
\begin{something}
First line...
Second line\\
Third line
\end{something}
```

With the way you’ve got it set up, it would result in broken Markdown syntax, with a single backtick at the start of line one, and a single backtick and latex marker at the end of line five.

If you need simple inline LaTeX injection, where the rest of the line is Markdown, then the form you’ve got in the screenshot is correct (but you would want to use a Character style), with no carriage returns around it, so:

This is a *Markdown* line with raw `\LaTeX`{=latex} in it.

So in effect, you can think of this new syntax as an extension of the “code span” and “code block” syntax. The rules are the same, the only addition is the {=syntax} marker.