# Hello all from a PhD student! I have questions about LaTeX too.

edited February 24

Greetings to you all from a future PhD student specializing in Artificial Intelligence. I've been using The Archive for about a year and a half and it has been a remarkable tool for me to organize my torrent of thoughts for a variety of projects. I especially love how I'm able to record my thoughts and surf through my notes without needing to take my fingers off the keyboard.

As I have gotten deeper into my research, I've found myself using LaTeX much more frequently, especially for mathematical purposes, and I'd imagine it will be necessary for other tasks as well. Does The Archive support LaTeX? If not, are there some workarounds for this to be possible? What other note-taking software is out there that has bi-directional linking and LaTeX support as well?

Have a good day everyone

Post edited by zhangkevin on

• Try Zettlr

• I tried Zettlr for the first time today and found it clunky, not to mention a bit buggy. I'll keep it in the back of my mind, but it was certainly not what I hoped it to be--fluid. I wanted to try Roam Research, but I'll be in school in China, so the firewall blocks all Google services, unfortunately. Notable is another app I'm using, but it's also buggy.

Does anyone have any opinions on org-mode? From the first look, the learning curve seems a lot steeper.

• edited February 25

If you allow the "clever" answer: The Archive supports any text It just looks ugly, I guess.

What kind of LaTeX support are you looking for?

You can't do a lot wrong with org, if you get past the Emacs hurdle, that is, because within Emacs, you can solve any problem.

Author at Zettelkasten.de • https://christiantietze.de/

• @zhangkevin Sup. Obsidian has LaTeX support.

• Someone correct me if I'm wrong, but doesn't Marked have LaTeX (or MathJax) support, and therefore you could preview notes from The Archive in Marked that include LaTeX? I think Typora can do much the same.

Another workaround I've used is to compile any formulae in LaTeX and then take a screenshot to use The Archive's image support. It's a little cumbersome, but I like how the Archive handles so many other things that I don't want to switch to Zettlr just for that.

• edited February 25

Yes! With Marked, The Archive has full LaTex support including a beautiful live preview. Why add pain onto misery. Slip emacs and stick with The Archive.

$$\begin{array}{l} V_{\text {electrostatic }}=k_{e} q_{i} q_{j}\left(\frac{1}{r}+k_{r f} r^{2} c_{r f}\right) \\ k_{r f}=\left(\frac{1}{r_{c}^{3}}\right)\left(\frac{e_{m l}-1}{2 e_{k d}+1}\right) \\ c_{r f}=\left(\frac{1}{r_{c}}\right)\left(\frac{3 \epsilon_{w l}}{2 e_{s o l}+1}\right) \end{array}$$


Becomes using 'Stream Preview to Marked' »
Once in Marked all kinds of manipulations are possible. Export to a wide variety of formats. Citations and section folding.

Post edited by Will on

Will Simpson
“Read Poetry, Listen to Good Music, and Get Exercise”
kestrelcreek.com

• edited February 25

@zhangkevin said:
I tried Zettlr for the first time today and found it clunky, not to mention a bit buggy. I'll keep it in the back of my mind, but it was certainly not what I hoped it to be--fluid.

You might not want to go through this if there are alternatives, but if you do anything halfway serious with LaTeX in Zettlr, you'll need to export Markdown to PDF instead of previewing Markdown in HTML, which uses a KaTeX plugin, and you'd need to modify the default pandoc export settings for PDF and LaTeX output. Also, you'd probably want to obtain the pandoc LaTeX template and modify this as well (the modifications to the template are minimal, but there were several changes to the ZETTLR DEFAULTS FILE for PDF output, shown below). This took me a while (a little more than a lost weekend) and several iterations to figure out. I haven't had a need to tweak it for a while.

I'll add the edited LaTeX PDF and LaTeX only Zettlr export settings to the Zettel wiki. Here's the template [I added LatexColors.incl.sty, which is a style I created along the way to include as many definable colors as I could locate.]

# ZETTLR DEFAULTS FILE
# ====================
# Conversion: Markdown --> PDF (requires TeX suite to be installed)
writer: pdf
self-contained: true
variables:
# Sets the size of the document's pages.
papersize: a4 # Possible values: a0-a6, b0-b6, c0-c6,b0j, letter, executive, legal
# Further variables are documented here:
https://pandoc.org/MANUAL.html#variables-for-latex
# The following are equivalent to
# - \usepackage[euler-digits,euler-hat-accent] {eulervm}
fontfamily: eulervm
fontfamilyoptions:
- euler-digits
- euler-hat-accent
fontsize: 12pt
- \usepackage{LatexColors.incl}
- \usepackage{newpxtext}
- \usepackage{tikz}
- \usepackage{tikz-cd}
- \usetikzlibrary{matrix}
- \usetikzlibrary{arrows.meta}
- \usetikzlibrary{decorations.pathmorphing}
- \usepackage{nicematrix}
- \newtheorem{thm}{Theorem}
- \newtheorem{lem}{Lemma}
- \newtheorem{prop}{Proposition}
- \newtheorem{cor}{Corollary}
- \newtheorem{fact}{Fact}
- \newcommand{\asterism}{
\smash{
\raisebox{-.5ex}{
\setlength{\tabcolsep}{-.5pt}
\begin{tabular}{@{}cc@{}}
\multicolumn2c$-2ex]&* \end{tabular}}}} # This next was almost needed: we copied a dash instead of a minus sign! # - \DeclareUnicodeCharacter{2212}{\textendash} metadata-files: [] include-before-body: [] include-after-body: [] include-in-header: [] bibliography: [] filters: - type: citeproc file-scope: false top-level-division: default # DO NOT USE XELATEX. XELATEX CANNOT HANDLE EULER AND NEWPXTEXT PROPERLY!!! # pdf-engine: xelatex # Change this if you want to use a different engine, e.g. pdflatex pdf-engine: pdflatex # xelatex does not work well with the fonts chosen dpi: 300 toc: false # Include a table of contents? toc-depth: 2 # 2 means to only include headings level 1 and 2 in the ToC number-sections: false number-offset: - 0 - 0 - 0 - 0 - 0 - 0 shift-heading-level-by: 1 section-divs: true identifier-prefix: '' title-prefix: '' eol: lf strip-comments: false indented-code-classes: [] ascii: false default-image-extension: .jpg highlight-style: pygments tab-stop: 4 preserve-tabs: false fail-if-warnings: false template: # This is where I keep my modified template C:/Users/fleng/mytexmf/tex/latex/templates/template.tex Erdős #2. ZK software components. “If you’re thinking without writing, you only think you’re thinking.” -- Leslie Lamport. Replies sometimes delayed since life is short. • edited February 26 @zhangkevin said: I tried Zettlr for the first time today and found it clunky, not to mention a bit buggy. I'll keep it in the back of my mind, but it was certainly not what I hoped it to be--fluid. I wanted to try Roam Research, but I'll be in school in China, so the firewall blocks all Google services, unfortunately. Notable is another app I'm using, but it's also buggy. If you are looking for a Roam Research-type experience, you could try Stroll, which is a version of TiddlyWiki: https://giffmex.org/stroll/stroll.html There is a KaTeX plug-in for TiddlyWiki 5 here: https://tiddlywiki.com/plugins/tiddlywiki/katex/ I haven't played with it a lot, but it seems to work. You might want to try Stroll, import the KaTeX plugin, and play around a bit to see if that suits your purposes. Note that you do not need an internet connection for the KaTeX plug-in to work. Once the plug-in is imported into your TiddlyWiki, it will work off-line. This is not true of a lot of other plug-ins and it sounded like that would be important to you. Having said all that, I just do what @Will suggested - The Archive + Marked. On a separate point, note that you can import Markdown files directly into a TiddlyWiki (drag and drop). Post edited by GeoEng51 on • edited February 28 Wow, thanks for all your suggestions! For LaTeX support, WYSIWYG is ideal. The Marked preview works well, but I don't think I'll be able to afford the real estate later. I'm using an external monitor right now, but I'll be constrained to laptop resolution once I'm abroad. I've been able to replicate my workflow in Obsidian closely and may stick to that. The graph view is eye-opening, and I might spend a weekend cleaning up this messy room... • edited April 3 Incidentally, Markdown (\LaTeX) isn't standard (\LaTeX). Markdown (\LaTeX) uses -delimiters for inline math, and -delimiters for display math. However, Pandoc converts expression to $$expression$$ and expression to \[expression$, which is the correct thing to do. The backslash parenthesis and backslash bracket notations are the $(\LaTeX)$ standard. It's possible to work in $(\LaTeX)$ for years and not know this. The dollar signs are standard in $(\TeX)$ but non-standard in $(\LaTeX)$, although $(\LaTeX)$ will work with them. KaTeX may not work well with dollar-delimited math expressions, depending on the implementation.

To make matters worse, some web implementations require \$$$expression$$\$ to display $(\LaTeX)$.

Erdős #2. ZK software components. “If you’re thinking without writing, you only think you’re thinking.” -- Leslie Lamport. Replies sometimes delayed since life is short.