Input Latex commands into scrivener

I there,

I’m starting my thesis this month and i’m new in scrivener and MMD/Latex code.
I want to organize my text in scrivener and output to MMD->Latex so i can get the best outline.
But i’m having several problems, i’m portuguese, so when i export to latex i have to change the documentclass every time to change the language. Is there any way to input the latex commands in scrivener?
I want to change things in the document outline, is there a way to change in scrivener to?
Another problem is that i want to make subtitles and subsubtitles, and when i put textfiles into textfiles in scrivener and i export it i don’t get:
Chapter 2
2.1 (title)
2.1.1 (subtitle) (subsubtitle)



did you install the latest version of MMD? Scrivener will use this one then instead of the “built in” version that is somewhat dated.

Then take a look at the MMD documentation you find at fletcher penny´s homepage. You have to set your Meta-Data accordingly via “File>MultiMarkdown Settings”.

Let us know if it works or if you have any questions,

Like Chris said, you have to install MMD on your computer first (there are also other possibilities, but they are usually not worth exploring). The latest version can be obtained from GitHub. Unzip the archive and put the files into ~/Library/Application Support/MultiMarkdown. The default templates for LaTeX (memoir.xslt, which is also tied to xhtml2latex.xslt) are located in the XSLT subfolder. You need to modify specifically these sections in memoir.xslt:

and in xhtml2latex.xslt:

I think this has already been covered in this thread and elsewhere on the forum.

Make sure that you have checked the ‘Titles’ and ‘Text’ boxes for ‘File Groups’ in Scrivener’s Compile Draft dialog:

You can also set the top level sectioning command in Scrivener’s ‘MultiMarkdown Settings…’

Is this helpful?

Thank you,

I already changed the memoir.xslt file and works fine! :smiley:

But i can’t get the subtitles working. I have to put some latex code in xhtml2latex.xslt file?
I’m using the baseheader level 2 in MMD settings. And i have all de boxes checked like in the image.
I read all fletcher penny´s homepage documentation but i think it’s not enough for me because i never used latex. I have de MMD updated in scrivener.

Another problem:

I’m getting 2 footnotes instead of just one. I’m typing this in scrivener:

Pórticos com Alvenaria | 1/500 [^ff]

[^ff]: Valor dotado de um coeficiente de segurança de 1,5. Sem majoração:
Inicio de fissuras visíveis: <<beta=1/300>>.
Inicio de dano estrutural: <<beta=1/150>>.

I just get this error in tables, in normal text works fine.

Thanks again,

Can you tell us, what LaTeX code you get from MMD?

This looks like a LaTeX problem with the tabulary environment. You could modify xhtml2latex.xslt to use the tabularx or tabular environment, but I’m not sure if this is a good idea, given that both environments are less suitable for typesetting generated contents. :confused:

When i export MMD to Latex i get:




And when i export to pdf:
Chater 2
2.1 A

And in tables, using the example above:

\caption{Comparação entre $\beta$}
\begin{tabulary}{\linewidth}{@{}lcccr@{}} \ \toprule
Tipos de Estruturas&\multicolumn{2}{c}{$\beta $} \\midrule
&Skempton e MacDonald&Mayerhof&\multicolumn{2}{c}{Polshin e Tokar} \
&1956&1956&\multicolumn{2}{c}{1957} \

\textbf{Pórticos sem Alvenaria}&&1/300&\multicolumn{2}{c}{1/200} \\

\textbf{Pórticos com Alvenaria}&1/500 \footnote{Valor dotado de um coeficiente de segurança de 1,5. Sem majoração: 

Inicio de fissuras visíveis: $ \beta =\frac{1}{300}$.
Inicio de dano estrutural: $ \beta =\frac{1}{150}$.}&1/500&\multicolumn{2}{c}{1/500} \

&&&$\frac{L}{H}<3$&$\frac{L}{H}>3$ \\

\textbf{Alvenaria Estrutural}&&1/2000& \
Areias&&&1/3000&1/3000 \
Argilas Moles&&&1/4000&1/7000 \



Is there anything wrong in the export table code?

That’s the default setting in the memoir class. I’m not sure how to change it, but for the time being you can try this here right after the \mainmatter command

\setcounter{tocdepth}{5} \setcounter{secnumdepth}{5}

The table is fine. The problem is that tabulary doesn’t really work with footnotes.

Thank you!

It works! :smiley:
But…doesn’t appear in table of contents :\

The tabular problem i will try to solve it.

“Um novo documento deve ser compilado (“LATEXado”) duas vezes para obter uma tabela de conteúdos correcta.” :smiley:

ah ah

i know that!
but the “2.1.1” for example, the subsection, doesn’t appear there!
just, for example:
Chapter 2

\documentclass[10pt,oneside]{memoir} \usepackage[utf8]{inputenc} \setcounter{tocdepth}{5} \begin{document} \frontmatter \tableofcontents \mainmatter \setcounter{secnumdepth}{5} \part{Untitled} \chapter{Untitled} \section{Untitled} \subsection{Untitled} \subsubsection{Untitled} \paragraph{Untitled} \subparagraph{Untitled} \end{document}

Thanks a LOT! :smiley:

Now everything works fine!

I’m starting to learn how everything really works!