diff --git a/doc/conf.py b/doc/conf.py index 2aa48485..62b4675a 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -194,8 +194,11 @@ # Additional stuff for the LaTeX preamble. #latex_preamble = r'\DeclareUnicodeCharacter{207B}{$^-$}' latex_elements = { - # Superscript -, for pdflatex (unnecessary, with xelatex): - 'preamble': r'\DeclareUnicodeCharacter{207B}{$^-$}' + # Superscript -, etc. for pdflatex (unnecessary, with xelatex): + 'preamble': r''' +\DeclareUnicodeCharacter{207B}{$^-$} +\DeclareUnicodeCharacter{22C5}{$\cdot$} +''' } # Documents to append as an appendix to all manuals. diff --git a/doc/user_guide.rst b/doc/user_guide.rst index 8644d3c3..318edcee 100644 --- a/doc/user_guide.rst +++ b/doc/user_guide.rst @@ -167,6 +167,10 @@ completely **transparently**. Access to the uncertainty and to the nominal value ================================================== +.. index:: + pair: nominal value; scalar + pair: uncertainty; scalar + The nominal value and the uncertainty (standard deviation) can also be accessed independently: @@ -504,20 +508,6 @@ formatting options. They can be added at the end of the format string: These custom formatting options **can be combined** (when meaningful). -Customization of the pretty print and LaTeX outputs ---------------------------------------------------- - -The pretty print and LaTeX outputs themselves can be customized. - -For example, the pretty-print representation of numbers with uncertainty can -display multiplication with a centered dot (⋅) instead of the default symbol -(×), like in `(2.00±0.10)⋅10⁻¹`; this is easily done through the global setting -`uncertainties.core.PRETTY_PRINT_TIMES["pretty-print"] = "⋅"`. - -Beyond this multiplication symbol, the "±" symbol, the parentheses and the -exponent can also be customized globally. The details can be found in the -documentation of `uncertainties.core.format_num()`. - Details ------- @@ -602,9 +592,19 @@ use the shorthand notation for numbers with uncertainties: prints with the shorthand notation: ``Result = 0.20(1)``. -.. index:: - pair: nominal value; scalar - pair: uncertainty; scalar +Customization of the pretty print and LaTeX outputs +--------------------------------------------------- + +The pretty print and LaTeX outputs themselves can be customized. + +For example, the pretty-print representation of numbers with uncertainty can +display multiplication with a centered dot (⋅) instead of the default symbol +(×), like in ``(2.00±0.10)⋅10⁻¹``; this is easily done through the global +setting ``uncertainties.core.MULT_SYMBOLS["pretty-print"] = "⋅"``. + +Beyond this multiplication symbol, the "±" symbol, the parentheses and the +exponent representations can also be customized globally. The details can be +found in the documentation of :func:`uncertainties.core.format_num`. Making custom functions accept numbers with uncertainties =========================================================