I utilize MMD in Scrivener on a Mac (version 3.3.6) and employ a modified Memoir format to generate LaTeX output.
For highlighting text, I use either ==
text==
or <mark>
text</mark>
, as I predominantly edit my text on iA Writer.
Despite lacking any programming background, I craft handbooks for my philosophy students, aiming to provide them with professionally typeset textbook PDFs for printing.
That being said, user rbenit68 has been immensely helpful to me in the past, and now AI has guided me in refining the LaTeX header and resolving numerous issues. I am on the verge of having everything in place after years of sporadic encounters with LaTeX.
However, the current issue is that the highlighted text in iA Writer is not rendering correctly in the PDF LaTeX. Although I have set up substitutions, they do not seem to be effective. Additionally, I am utilizing the soul package.
The substitutions I have configured are as follows:
==(.+?)==
to\\hl{$1}
, using RegEx.<mark>(.+?)</mark>
to\\hl{$1}
, also utilizing RegEx.
Yet, when I input the following text:
==Una **moral** es un conjunto o código de normas, reglas y valores que regulan lo que está bien y lo que está mal para un individuo, grupo o sociedad.==
The output appears as:
\textbackslash{}hl\{Una \textbf{moral} es un conjunto o código de normas, reglas y valores que regulan lo que está bien y lo que está mal para un individuo, grupo o sociedad.\}
Instead of the desired syntax:
\hl{Una \textbf{moral} es un conjunto o código de normas, reglas y valores que regulan lo que está bien y lo que está mal para un individuo, grupo o sociedad.}
Hence, the presence of \textbackslash{}
should be eliminated, and {
and }
should not be escaped. I have experimented with various variants but have yet to find a viable solution.
I appreciate any suggestions in advance to resolve this issue.