Tinderbox v11 Icon

Working with LaTeX

Tinderbox can export, via custom templates and HTML Export, data that includes LaTeX mark-up. The limitations discussed below reflect the fact that alternate mark-up types are a by-product of the export design rather than a deliberate feature. Tinderbox does not claim, as a standard feature, to export LaTeX.

Obtaining LaTeX output involves consideration of the template used and per-note attribute values:

Given the number of attributes that may require customisation, it may prove useful to employ prototypes to set up for this process. Thus, just as HTML and LaTeX export templates can be swapped over with ease, so too can LaTeX mark-up customisations be swapped by setting a prototype and letting the customisations inherit to the note(s).

Tinderbox's ^text^ export operator can manage the following $Text features as LaTeX mark-up

But, do be aware that some $Text features are not suitable for LaTeX export. This is because the user does not have full control of the mark-up generation for some features:

Do not be tempted to turn off $HTMLMarkup as that then disables all $Text mark-up generation.

^text^ auto-markup you can re-set for LaTeX use

LaTeX coding for Underline & Strikethrough require presence of the non-default 'ulem' package and header declaration: \usepackage[normalem]{ulem}. If planning to export underlined or struck-through text, remember to add this declaration in your template(s). Further detail is beyond the scope of aTbRef and should be research in LaTeX documentation.

As the changes below are set in attributes, these need only be altered only for those notes exporting to LaTeX thus allowing it to mix with default HTML export (or other export formats). If the same note may need to export to different format depending on need, it would make sense to set the attribute customisations and switch in the LaTeX values by setting the exporting note(s) to use the prototype and thus inherit its customisations.

Edit the following HTML export attributes, noting that:

Text Styles

$HTMLBoldStart: "\textbf{"

$HTMLBoldEnd: "} "

$HTMLItalicStart: "\textit{"

$HTMLItalicEnd: "} "

$HTMLUnderlineStart: "\uline{"

$HTMLUnderlineEnd: "} "

$HTMLStrikeStart: "\sout{"

$HTMLStrikeEnd: "} "

$HTMLSubscriptStart: "\textsubscript{"

$HTMLSubscriptEnd: "} "

$HTMLSuperscriptStart: "\textsuperscript{"

$HTMLSuperscriptEnd: "} "

$HTMLCodeStart: "\texttt{"

$HTMLCodeEnd: "} "

Lists

$HTMLIndentedParagraphStart: "\n\begin{quote}\n"

$HTMLIndentedParagraphEnd: "\n\end{quote}\n"

$HTMLListStart: "\begin{itemize} "

$HTMLListEnd: "\end{itemize} "

$HTMLOrderedListStart: "\n\begin{enumerate}\n

$HTMLOrderedListEnd: "\n\end{enumerate}n\ "

$HTMLListItemStart: "\item "

$HTMLListItemEnd: " "

$HTMLOrderedListItemStart: "\item "

$HTMLOrderedListItemEnd: " "

Paragraphs

Paragraph initial indenting, and first-vs.-subsequent differences is handled in general LaTeX setup (i.e. in the in-LaTeX template) so no paragraph start tag is needed. So set the following to no value: $HTMLParagraphStart, $HTMLFirstParagraphStart, and $HTMLIndentedParagraphStart.

A paragraph is indicated by one (or more) blank lines. However, $Text should use normal paragraphs and $HTMLParagraphEnd, $HTMLFirstParagraphEnd, and $HTMLIndentedParagraphEnd and should use a literal line break character as the closing tag. Do not use a literal string "\n", but copy the line return from some $Text and paste this invisibly character into the appropriate input boxes.

Images

Including images should be done via LaTeX codes in the text and not via Tinderbox's HTML export as images inclusion is not as simple as a single LaTeX code Therefore set both the following to no value (remove any existing value): $HTMLImageStart, $HTMLImageEnd.

Tag clouds

The text size chosen is left to the user but these are suggested values:

$HTMLCloud1Start: "{\scriptsize"

$HTMLCloud1End: "} "

$HTMLCloud2Start: "{\normal"

$HTMLCloud2End: "} "

$HTMLCloud3Start: "{\Large"

$HTMLCloud3End: "} "

$HTMLCloud4Start: "{\huge"

$HTMLCloud4End: "} "

$HTMLCloud5Start: "{\Huge"

$HTMLCloud5End: "} "

Other HTML group attributes

Any other attributes containing HTML code should be set to an empty string.

$HTMLEntities: false (un-ticked) - this ensures no further HTML is generated, as it with confuse the LaTeX parser. It will also suppress HTML links for both internal and web links.

$HTMLExportExtension: might best be set to ".tex"

Footnotes

LaTeX footnotes use a \footnote{} code in the $Text position of the footnote marker, with the footnote content within the braces. An ^include()^ call could be used to insert the text of Tinderbox footnote notes.

Citations

Citation anchors (BibTeX citekeys) can be inserted inline in $Text as \cite{citekeyValue}. For LaTeX use pre-supposes an associated Reference Manager app will generate the BibTeX citekey for insertion in the $Text. The Reference Manager app also generates the '.bib' bibliography file needed for LaTeX-render citekey → citation formatting and creating the styled bibliography in the LaTeX output document.

Minimum Viable Document (from a single note)

At the beginning of $Text add:

\documentclass{article}
\usepackage{ulem} % used for strikethrough 
\begin{document}

... text content, then

\end{document}

Minimum Viable Tinderbox Template

\documentclass{article}
\usepackage{ulem} % used for strikethrough 
\begin{document}
^text(Working with LaTeX,5-basic_all):: text tries to include itself 
\end{document}