My PhD thesis --- read it at this link!
This thesis is written using quarto, documentation here.
The dependencies are managed with uv (installation).
If uv is installed, the commands defined in the Makefile can be used:
make showwill render the HTML version of the thesis in a browser window, updated in real time as the underlying files change;make htmlwill render the HTML version of the thesis as a static website;make pdfwill render the PDF version of the thesis.make showpwill render the revealjs version of the defense presentation.
A figure based on code can be made like:
#| label: fig-my-figure
#| fig-cap: "Caption"
# Matplotlib calls
Code execution can be controlled with the freeze argument.
Figures can be rendered optionally only when making html, see here.
Examples with figures on the side.
Alternatively, importing an existing figure can be simply achieved with the pandoc syntax:
{#fig-my-figure}
See the example here. Arbitrary-width columns and divs.
# Import dependencies
import plotly
import plotly.graph_objs as go
# Configure Plotly to be rendered inline in the notebook.
plotly.offline.init_notebook_mode()
# Configure the trace.
trace = go.Scatter3d(
x=[1, 2, 3], # <-- Put your data instead
y=[4, 5, 6], # <-- Put your data instead
z=[7, 8, 9], # <-- Put your data instead
mode='markers',
marker={
'size': 10,
'opacity': 0.8,
}
)
# Configure the layout.
layout = go.Layout(
margin={'l': 0, 'r': 0, 'b': 0, 't': 0}
)
data = [trace]
plot_figure = go.Figure(data=data, layout=layout)
# Render the plot.
plotly.offline.iplot(plot_figure)
See here. To vary the citation style see here.
- Section title:
## Title {#sec-title} - Equation:
{#eq-title}after the final$$
Example:
$$
e^{i \pi} + 1 = 0
$$ {#eq-euler-identity}
Example with multiple lines. Do not use the align environment!
$$
\begin{aligned}
e^{i \pi} + 1 &= 0 \\
e^{i \pi} &= -1
\end{aligned}
$$ {#eq-euler-identity}
Reference as @eq-title or [Equation @eq-title]
Generally, @citekey, [@citekey], [@citekey, some page]
To get aligned multiple lines, use the aligned environment instead of align.
All mathjax symbols: see here.
Using Unicode characters such as ☾ in equations works for HTML output, but they do not render correctly to LaTeX.
Snippet:
::: {#nte-title .callout-note collapse="true"}
##### Title
Text
:::
where note can be substituted by warning, important, tip or caution, see the docs.
Info here.
See the tables documentation.
Simple example:
import astropy.units as u
from IPython.display import Markdown
x = 10 * u.m
Markdown(f'The value of $x$ is {x.to_string(precision=2, format="latex_inline")}')
- even when activating the
link-citations: trueoption in the document yaml, the citations do not appear as links in the pdf output (but they do in the html output)
uv run quarto render path/to/file.qmd
- press
gto jump to a slide number - press
oto go into "overview mode" - press
sto get the speaker view - navigate without pauses with
Alt+arrow - press
rfor scroll view Ctrl+clickto zoomcto get the canvas:xto cycle colorsbackspaceto erase the drawing