[Docs] Fix some bugs in readthedocs pdf build. (#383)
* Add escape symbols for underscores in formulas. * Support Chinese characters in pdf output.pull/384/head
parent
469d88c21b
commit
e8822ebaec
20
docs/conf.py
20
docs/conf.py
|
@ -74,6 +74,26 @@ html_theme = 'sphinx_rtd_theme'
|
|||
|
||||
master_doc = 'index'
|
||||
|
||||
latex_elements = {
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
'preamble': r'''
|
||||
\hypersetup{unicode=true}
|
||||
\usepackage{CJKutf8}
|
||||
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
|
||||
\DeclareUnicodeCharacter{2203}{\ensuremath{\exists}}
|
||||
\DeclareUnicodeCharacter{2200}{\ensuremath{\forall}}
|
||||
\DeclareUnicodeCharacter{2286}{\ensuremath{\subseteq}}
|
||||
\DeclareUnicodeCharacter{2713}{x}
|
||||
\DeclareUnicodeCharacter{27FA}{\ensuremath{\Longleftrightarrow}}
|
||||
\DeclareUnicodeCharacter{221A}{\ensuremath{\sqrt{}}}
|
||||
\DeclareUnicodeCharacter{221B}{\ensuremath{\sqrt[3]{}}}
|
||||
\DeclareUnicodeCharacter{2295}{\ensuremath{\oplus}}
|
||||
\DeclareUnicodeCharacter{2297}{\ensuremath{\otimes}}
|
||||
\begin{CJK}{UTF8}{gbsn}
|
||||
\AtEndDocument{\end{CJK}}
|
||||
''',
|
||||
}
|
||||
|
||||
def builder_inited_handler(app):
|
||||
subprocess.run(['./stat.py'])
|
||||
|
|
|
@ -93,8 +93,8 @@ class RandAugment(object):
|
|||
When magnitude_std=0, we calculate the magnitude as follows:
|
||||
|
||||
.. math::
|
||||
\text{magnitude} = \frac{\text{magnitude_level}}
|
||||
{\text{total_level}} \times (\text{val2} - \text{val1})
|
||||
\text{magnitude} = \frac{\text{magnitude\_level}}
|
||||
{\text{total\_level}} \times (\text{val2} - \text{val1})
|
||||
+ \text{val1}
|
||||
"""
|
||||
|
||||
|
|
|
@ -721,8 +721,8 @@ class CenterCrop(object):
|
|||
to perform the center crop with the ``crop_size_`` as:
|
||||
|
||||
.. math::
|
||||
\text{crop_size_} = \frac{\text{crop_size}}{\text{crop_size} +
|
||||
\text{crop_padding}} \times \text{short_edge}
|
||||
\text{crop\_size\_} = \frac{\text{crop\_size}}{\text{crop\_size} +
|
||||
\text{crop\_padding}} \times \text{short\_edge}
|
||||
|
||||
And then the pipeline resizes the img to the input crop size.
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue