Skip to content

Commit 4ee73a1

Browse files
committed
Changed LaTex $\bot$s to ⊥
In the HTML version of the documentation, it isn't rendered so might as well use the unicode representation. Part of the problem was that putting a math unicode character wasn't rendering properly in the pdf, so extra steps were needed to define the unicode charecter ⊥ in reference.tex closes #15285
1 parent 95c2ed3 commit 4ee73a1

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

mk/docs.mk

+8-3
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \
4949
RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css
5050

5151
PANDOC_BASE_OPTS := --standalone --toc --number-sections
52-
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \
53-
--from=markdown --include-before-body=doc/footer.tex --to=latex
52+
PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --from=markdown --to=latex \
53+
--include-before-body=doc/version.tex \
54+
--include-before-body=doc/footer.tex \
55+
--include-in-header=doc/uptack.tex
5456
PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub
5557

5658
# The rustdoc executable...
@@ -155,6 +157,9 @@ doc/footer.tex: $(D)/footer.inc | doc/
155157
@$(call E, pandoc: $@)
156158
$(CFG_PANDOC) --from=html --to=latex $< --output=$@
157159

160+
doc/uptack.tex: $(D)/uptack.tex | doc/
161+
$(Q)cp $< $@
162+
158163
# HTML (rustdoc)
159164
DOC_TARGETS += doc/not_found.html
160165
doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/
@@ -180,7 +185,7 @@ doc/$(1).epub: $$(D)/$(1).md | doc/
180185

181186
# PDF (md =(pandoc)=> tex =(pdflatex)=> pdf)
182187
DOC_TARGETS += doc/$(1).tex
183-
doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
188+
doc/$(1).tex: $$(D)/$(1).md doc/uptack.tex doc/footer.tex doc/version.tex | doc/
184189
@$$(call E, pandoc: $$@)
185190
$$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@
186191

src/doc/reference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1259,8 +1259,8 @@ We call such functions "diverging" because they never return a value to the
12591259
caller. Every control path in a diverging function must end with a `panic!()` or
12601260
a call to another diverging function on every control path. The `!` annotation
12611261
does *not* denote a type. Rather, the result type of a diverging function is a
1262-
special type called $\bot$ ("bottom") that unifies with any type. Rust has no
1263-
syntax for $\bot$.
1262+
special type called ("bottom") that unifies with any type. Rust has no
1263+
syntax for .
12641264

12651265
It might be necessary to declare a diverging function because as mentioned
12661266
previously, the typechecker checks that every control path in a function ends

src/doc/uptack.tex

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\usepackage{newunicodechar}
2+
\newunicodechar⊥{{$\bot$}}

0 commit comments

Comments
 (0)