Skip to content
Joshua Shinavier edited this page Jul 3, 2017 · 9 revisions

Semantic Synchrony includes basic support for exporting notes to a LaTeX document, which can then be compiled to a PDF. Josh's PhD thesis was written entirely in SmSn, not that this necessarily saved time or effort. It can be done.

To create a LaTeX document, choose a root node and then add a tree of notes beneath it, each of which must begin with one of a handful of LaTeX prefixes, enumerated below. The graph of notes is still a graph, so you can link to LaTeX notes outside of the document, and also include non-LaTeX notes in the tree of LaTeX content. These notes and links are simply ignored when SmSn generates the document.

To use LaTeX import in SmSn-mode, open a view of the root of the document tree, then type C-c C-w l and choose the appropriate LaTeX output file.

Quoted values

Quoted values start with the double-quote character ("), and become plain text in the document. For example,

* "The Ultimate Answer is forty-two."

becomes

The Ultimate Answer is forty-two.

Verbatim blocks

Text of more than one line in SmSn becomes plain text in the document. For example,

{{{
This sentence is true.
The last sentence is false.
}}}

becomes

This sentence is true.
The last sentence is false.

Comments

Lines which start with the LaTeX comment character (%) become comments in the document; they are copied as-is. For example, the notes:

* % intro statement
* "What follows is the greatest discovery of all time."

become

% intro statement
What follows is the greatest discovery of all time.

Section headings

Any of the keywords \section, \subsection, and \subsubsection are translated into the section hierarchy of the generated LaTeX document. Rather than copying the keyword itself, SmSn will use the section hierarchy in the graph to output \section, \subsection, or \subsubsection. For example, the notes

* \section{Books by Oolon Colluphid}
    * "Oolon Colluphid was the author of the following series of philosophical blockbusters."
    * \section{Where God Went Wrong}
    * \section{Some More of God's Greatest Mistakes}
    * \section{Who is this God Person Anyway?}

become

\section{Books by Oolon Colluphid}
Oolon Colluphid was the author of the following series of philosophical blockbusters.

\subsection{Where God Went Wrong}

\subsection{Some More of God's Greatest Mistakes}

\subsection{Who is this God Person Anyway?}

Other keywords

There are various other "breaking" and "non-breaking" keywords supported by the mapper, depending on whether a newline should be written to the document before the item itself. For example, \begin, \item, and \end are non-breaking keywords:

* \begin{itemize}
    * \item Life
    * \item The Universe
    * \item Everything
* \end{itemize}

becomes:

\begin{itemize}
\item Life
\item The Universe
\item Everything
\end{itemize}

In contrast, \chapter is a breaking keyword:

* % an important observation
* "This is an important observation."
* \chapter{Conclusion and Future Work}

becomes

% an important observation
This is an important observation.

\chapter{Conclusion and Future Work}