Skip to content

Commit

Permalink
Add sample for prime-symbol using groff
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jan 4, 2024
1 parent ea8d753 commit c33813e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/prime-symbol.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
+++
title = "The Prime Symbol"
description = "In math mode, prime-time is always a good time."
extra.typesetters = [ "typst", "sile", "xelatex" ]
extra.typesetters = [ "typst", "sile", "xelatex", "groff" ]
extra.typesetter_args = { groff = "-e -P-pA7" }
+++

Assorted ways of entering and rendering the troublesome prime symbol.
Expand Down
29 changes: 29 additions & 0 deletions data/prime-symbol/groff.ms
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.nr HM .4cm
.nr PO .4cm
.nr LL 6.2cm
.nr PI 0
.nr PS 12p
.nr VS 18p
\# TODO convert OpenType fonts to something groff can use
.fam P
.LP
Math mode manners:
.LG
.LG
.EQ C
f(x) mark = x sup 2 + 1
.EN
.LG
.LG
.EQ C
f'(x) lineup = 2x
.EN
\# TODO complete prime input test with two fonts
.LP
Prose poses problems:
.LP
60*10'16"N 24*55'52"E (plain)
.br
60°10′16″N 24°55′52″E (unicode)
.br
60\[de]10\[fm]16\[sd]N 24\[de]55\[fm]52\[sd]E (native)

0 comments on commit c33813e

Please sign in to comment.