From 4ee73a124c828831e97201649a6e71f6d5b4f83c Mon Sep 17 00:00:00 2001 From: th0114nd Date: Thu, 18 Dec 2014 18:27:50 -0500 Subject: [PATCH] =?UTF-8?q?Changed=20LaTex=20$\bot$s=20to=20=E2=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mk/docs.mk | 11 ++++++++--- src/doc/reference.md | 4 ++-- src/doc/uptack.tex | 2 ++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 src/doc/uptack.tex diff --git a/mk/docs.mk b/mk/docs.mk index 6d1a3bfa7a3..09f3580a3c8 100644 --- a/mk/docs.mk +++ b/mk/docs.mk @@ -49,8 +49,10 @@ RUSTDOC_HTML_OPTS_NO_CSS = --html-before-content=doc/version_info.html \ RUSTDOC_HTML_OPTS = $(RUSTDOC_HTML_OPTS_NO_CSS) --markdown-css rust.css PANDOC_BASE_OPTS := --standalone --toc --number-sections -PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --include-before-body=doc/version.tex \ - --from=markdown --include-before-body=doc/footer.tex --to=latex +PANDOC_TEX_OPTS = $(PANDOC_BASE_OPTS) --from=markdown --to=latex \ + --include-before-body=doc/version.tex \ + --include-before-body=doc/footer.tex \ + --include-in-header=doc/uptack.tex PANDOC_EPUB_OPTS = $(PANDOC_BASE_OPTS) --to=epub # The rustdoc executable... @@ -155,6 +157,9 @@ doc/footer.tex: $(D)/footer.inc | doc/ @$(call E, pandoc: $@) $(CFG_PANDOC) --from=html --to=latex $< --output=$@ +doc/uptack.tex: $(D)/uptack.tex | doc/ + $(Q)cp $< $@ + # HTML (rustdoc) DOC_TARGETS += doc/not_found.html doc/not_found.html: $(D)/not_found.md $(HTML_DEPS) | doc/ @@ -180,7 +185,7 @@ doc/$(1).epub: $$(D)/$(1).md | doc/ # PDF (md =(pandoc)=> tex =(pdflatex)=> pdf) DOC_TARGETS += doc/$(1).tex -doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/ +doc/$(1).tex: $$(D)/$(1).md doc/uptack.tex doc/footer.tex doc/version.tex | doc/ @$$(call E, pandoc: $$@) $$(CFG_PANDOC) $$(PANDOC_TEX_OPTS) $$< --output=$$@ diff --git a/src/doc/reference.md b/src/doc/reference.md index 3d4791e916e..cd1e6f74ee1 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1259,8 +1259,8 @@ We call such functions "diverging" because they never return a value to the caller. Every control path in a diverging function must end with a `panic!()` or a call to another diverging function on every control path. The `!` annotation does *not* denote a type. Rather, the result type of a diverging function is a -special type called $\bot$ ("bottom") that unifies with any type. Rust has no -syntax for $\bot$. +special type called ⊥ ("bottom") that unifies with any type. Rust has no +syntax for ⊥. It might be necessary to declare a diverging function because as mentioned previously, the typechecker checks that every control path in a function ends diff --git a/src/doc/uptack.tex b/src/doc/uptack.tex new file mode 100644 index 00000000000..32158ea5496 --- /dev/null +++ b/src/doc/uptack.tex @@ -0,0 +1,2 @@ +\usepackage{newunicodechar} +\newunicodechar⊥{{$\bot$}}