Page 1 of 1

### How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 11:10 am
Hi all,

I am new to Scrivener and find it wonderful to work with. However, I can't seem to compile a LaTeX file which I can simply copy/paste into Overleaf and have Overleaf generate a LaTeX document. Any help would be much appreciated. Thanks!

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 11:36 am
Having no knowledge of what Overleaf expects, can you describe what sort of .tex data you would need? Does it want a full ready-to-typeset file where all of the material to do so is in one file? Can it accept several files that are linked together with \input statements? Does it just want the part you’d paste between \begin{document} and \end{document}?

Scrivener (and MultiMarkdown itself) is flexible enough to do any of those, and other things as well.

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 11:48 am
Thank you for the prompt reply. Unfortunately, I do not know how to answer, as I am rather new to LaTeX and Overleaf as well. I'll try in insert the errors Overleaf gives me later if I do not figure this out myself. Thank you and have a wonderful day.

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 12:35 pm
Hi again. I don't get it. My document compiled with Scrivener looks like this:

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Angsten i alle dens afskygnigninger}
\author{Stefan Hansen}
\date{September 2019}

\begin{document}

\maketitle

\part{Angsten som mulighedernes svimmelhed}
\label{angstensommulighedernessvimmelhed}

\chapter{Svimmelhed hos Kierkegaard}
\label{svimmelhedhoskierkegaard}

Dette er mit første forsøg med at skrive i MMD i Scrivener.\footnote{Og jeg gør det sgu med fodnoter. Dette er den første.} Det kører for mig, med fodnoter og det hele. Her kommer en mere.\footnote{Denne er den anden fodnote. Det er frækkere end den anden.} Lad os se hvad der sker når jeg kompilerer \emph{dette} dokument. Jeg prøver lige med lidt \textbf{fed} skrift også.

\chapter{Nietzsches økse}
\label{nietzschesøkse}

Nietzsche har sin egen indfaldsvinkel og bruger en \textbf{økse} til at smadre alt med sine ord i værket \emph{Det gode er sgu bedre end ingenting}. Sådan er det bare.\footnote{Ja, sådan er det \textbf{sgu} bare.} Men nok om det.

\part{Dette er vel det andet kapitel}
\label{detteerveldetandetkapitel}

Det er sgu sjovt at skrive i Scrivener og det er \textbf{fedt} at bruge MMD. Det er \emph{lige} noget for mig.\footnote{Og det er sjovt at indsætte fodnoter hele tiden.} Det er godt det her!

Jeg har \textbf{lige} indsat en masse mellemrum, bare for at se hvad der så sker.

\end{document}

And I get these error messages

Missing \endcsname inserted.

\OT1\o
l.5 \newlabel{nietzsches\IeC {\o }kse}{{I}{1}}

The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

main.tex, line 15
Undefined control sequence.

The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.

l.15 \chapter
{Svimmelhed hos Kierkegaard}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

LaTeX Font Info: External font cmex10' loaded for size
(Font) <7> on input line 18.
LaTeX Font Info: External font cmex10' loaded for size
(Font) <5> on input line 18.
! Undefined control sequence.
l.20 \chapter
{Nietzsches økse}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Any help is appreciated!

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 1:22 pm
Trying to pinpoint the error I've boiled it down to this

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}

\author{Stefan Hansen}
\date{September 2019}

\begin{document}

\maketitle

\part{Angsten som mulighedernes svimmelhed}

\chapter{Svimmelhed hos Kierkegaard}

Dette er mit første forsøg med at skrive i MMD i Scrivener.\footnote{Og jeg gør det sgu med fodnoter. Dette er den første.}

\end{document}

It still gives me this error

Undefined control sequence.

The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.

l.15 \chapter
{Svimmelhed hos Kierkegaard}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

LaTeX Font Info: External font cmex10' loaded for size
(Font) <7> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 17.
[1

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 2:42 pm
I’d recommend installing MiKTeX (or similar) on your system, if you haven’t already. This will make it easier to test your documents locally, and work out all of the problems in them immediately, without having to go through an upload cycle with a web page. You may also get better error messages and debugging tools.

In this case though, you are using the article document class, which does not have a “chapter” command like a book would. You should increase your “Base Header Level” metadata setting in MMD to 3, so that the highest level document in your draft is \section.

I highly recommend this website for general LaTeX questions like this. Not only can you sign up and ask questions, but you’ll find most questions have already be asked. For example:
https://tex.stackexchange.com/questions/377128/centering-the-chapter-title-in-article-class?r=SearchResults.

P.S. Hint: use the “code” button when pasting LaTeX code into the forum. It will protect every character you paste from its conversion engine, and also make it easier for us to copy and paste.

### Re: How to compile a document so it is ready to be compiled on Overleaf?

Posted: Wed Sep 25, 2019 7:40 pm
Thanks a lot, AmberV.

I just used the documentclass from the Overleaf template, since for some reason (maybe you know?) the compiled document from Scrivener did not include anything above the \begin{document}.