Math and citations
https://blog.kiarashs.ir/blog/math-and-citations
Contents6 sections
Math is written between dollar signs and rendered by KaTeX when the site is built. Nothing is rendered in the reader's browser, and no KaTeX JavaScript is downloaded — only its stylesheet and fonts.
Inline and display
Inline math sits between single dollars: the variance of is . Display math uses double dollars:
Environments work, which is what most real derivations need:
Strict mode is off and errors do not throw, so a malformed expression renders in red where it stands instead of blanking the page.
Notation
A post that leans on symbols can list them once, near the top. Write the list as a table: symbols are short and their meanings are a line each, which is what a table's two columns are for, and math works inside the cells.
| Symbol | Meaning |
|---|---|
| the design matrix, one row per observation | |
| the least-squares estimate of the coefficients | |
| the parameter being estimated | |
| the observed data | |
| the number of observations | |
| the mean and variance of each observation | |
| the density of given |
A | inside math would end the cell, so write \mid or \vert for a bar, as
does. For concepts rather than symbols, where a definition runs
to a sentence or two, a definition list reads better; the
Code, tables and notes post shows one.
Numbering an equation
Every display equation is numbered, which is why the two above carry (1) and (2): a reader can point at one in the comments the way they would in a paper. Label an equation to refer to it yourself:
Refer to it with \eqref{bayes} and the reference becomes a link to the
equation carrying its number: substituting (3) into the likelihood is
the usual first step. The numbers are assigned in document order at build time,
so inserting an equation above this one renumbers everything below it and every
reference follows. A reference to a label that does not exist renders as (?)
and warns during the build rather than failing it.
A display that is an illustration rather than a step can stay out of the count
with \notag:
To number only labelled equations, set math.numbering to 'labelled' in
src/site.config.ts.
The work behind a post
A post that accompanies published work can say so in its frontmatter, and the box at the top of this one is the result:
publication:
title: A title for the paper
status: Preprint # or Under review, Published, To appear
venue: Journal of Statistical Software
year: 2026
doi: 10.5281/zenodo.123
url: https://arxiv.org/abs/2601.01234
pdf: /posts/my-post/paper.pdf
code: https://github.com/you/replication
data: https://doi.org/10.5281/zenodo.124Every field is optional. The DOI moves out of the header line and into the box
so it is not printed twice, and it is the DOI the citations below use. A pdf,
code or data path under public/ picks up the deployment's base path; a
full URL is left alone. The values in this post are placeholders — that DOI
resolves to nothing.
Not every piece of work becomes a paper. A post about a library, a dataset or
something still running says so with kind: project, which is the same box with
its links named for where they lead:
publication:
kind: project
title: hazard-tools
status: Maintained # or In progress, Archived
url: https://hazard-tools.example.org
code: https://github.com/you/hazard-tools
data: https://doi.org/10.5281/zenodo.125
pdf: https://hazard-tools.example.org/guide.pdfA project has a name where a paper has a venue, so title is the line that
carries it. url is labelled Project rather than Paper, code Repository,
data Dataset and pdf Documentation. A DOI still works — Zenodo will mint one
for a release — and the citations use it exactly as they would a paper's.
Citations
Write [@key] and the key is resolved against src/content/references.bib at
build time, then a reference list is appended to the post. Literate programming
came out of Knuth's work on TeX (Knuth, 1984), and the sandwich variance
estimator's standard treatment is White's (White, 1982).
The bibliography below is generated. Add entries to the .bib file, cite them
by key, and the list follows.
Citing the post itself
Each post carries a "cite this post" block under the text, built from the frontmatter in four forms — BibTeX, APA, IEEE and a plain sentence — each with its own copy button. Names are reshaped for each style: APA wants the surname first and given names as initials, IEEE wants the initials first, and the plain form leaves them as you wrote them. A DOI, from the post or its publication block, goes into all four; APA uses it in place of the URL, which is what the style asks for.
The date cited is the date of the version being read, so a post that has been revised is cited by its revision. The point of all this is that someone quoting you does not reconstruct the fields by hand and get your name wrong.
A post that is not meant to be cited, such as an announcement or a draft sent
to co-authors, can leave the block off with cite: false in its frontmatter.
Like the share links, it is on unless a post says false.
Cite this post
@misc{soleimanzadeh2026math,
author = {Soleimanzadeh, Kiarash},
title = {Math and citations},
year = {2026},
url = {https://blog.kiarashs.ir/blog/math-and-citations},
urldate = {2026-01-19},
doi = {10.0000/placeholder},
howpublished = {A journal you submitted to}
}Soleimanzadeh, K. (2026, January 19). Math and citations. Kiarash Soleimanzadeh. https://doi.org/10.0000/placeholderK. Soleimanzadeh, "Math and citations," Kiarash Soleimanzadeh, Jan. 19, 2026. [Online]. Available: https://blog.kiarashs.ir/blog/math-and-citations. doi: 10.0000/placeholderKiarash Soleimanzadeh. “Math and citations.” Kiarash Soleimanzadeh, 19 January 2026. https://blog.kiarashs.ir/blog/math-and-citations (doi:10.0000/placeholder)
Comments