Quarto (Revealjs) Presentation with Trees

Quarto Slides

This is a Quarto relealjs-based presentation using the tikz engine to compile LaTeX to png and place the png on a slide.

You can do the same with other Rmd (R markdown) based slide and html outputs (bookdown, etc.).

The source for this file is in the repo here.

You should see some slide viewing options in the corner.

Tree

  1. this is a numbered example (via Pandoc example lists)

this is a caption

Tree with Code

chunk options used:

Code
{tikz tikz-ex2, fig.cap = "this is a caption", fig.ext = 'png', engine.opts = list(template = "tikz2png.tex"), echo = TRUE}
# tikz2png.tex template is required (in project directory) to load special LaTeX packages like tikzqtree
Code

\begin{tikzpicture}
\Tree [.S [.NP this ] [.VP [.V is ] [.NP {another tree} ] ] ]
\label{fig:tree2}
\end{tikzpicture}

this is a caption

Referring back

As we saw in the tree in (1), blah blah.

gb4e

There’s a great lingglosses package for R but it doesn’t seem to automatically work with this Quarto setup. You can just throw some gb4e in through LaTeX and it will render as an image, but the example numbers are not linked to others (pandoc) in the document:

optional caption

math (i.e., semantics)

Inline math can be indicated with dollar signs, like so: \([\![cat]\!]\) (using $[\![cat]\!]$). Or in a block:

\[ \lambda x.\lambda y.love(x,y)\\ [\lambda x[\lambda y[love(x,y)]]]\\ \forall x[ \exists y[love(x,y)]] \]

Venn Diagrams

Code
\begin{venndiagram3sets}[labelOnlyAB={$A \cap B$},
                         labelOnlyAC={$A \cap C$},
                         labelOnlyBC={$B \cap C$},
                         labelABC={$A \cap B \cap C$},
                         radius=3cm,
                         overlap=2.5cm]
\end{venndiagram3sets}

Venn Diagram Caption

Truth Tables in Markdown

p q p \(\land\) q
T T T
T F F
F T F
F F F