LaTeX 定制¶
The latex target does not benefit from prepared themes.
The LaTeX输出的选项, and particularly among them the latex_elements variable provides much of the interface for customization.
For some details of the LaTeX/PDF builder command line
invocation, refer to LaTeXBuilder.
例¶
Keep in mind that backslashes must be doubled in Python string literals to avoid interpretation as escape sequences, or use raw strings (as is done here).
# inside conf.py
latex_engine = 'xelatex'
latex_elements = {
'fontpkg': r'''
\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
''',
'preamble': r'''
\usepackage[titles]{tocloft}
\cftsetpnumwidth {1.25cm}\cftsetrmarg{1.5cm}
\setlength{\cftchapnumwidth}{0.75cm}
\setlength{\cftsecindent}{\cftchapnumwidth}
\setlength{\cftsecnumwidth}{1.25cm}
''',
'fncychap': r'\usepackage[Bjornstrup]{fncychap}',
'printindex': r'\footnotesize\raggedright\printindex',
}
latex_show_urls = 'footnote'
latex_elements配置设置¶
A dictionary that contains LaTeX snippets overriding those Sphinx usually puts
into the generated .tex files. Its 'sphinxsetup' key is described
separately.
Keys that you may want to override include:
'papersize'Paper size option of the document class (
'a4paper'or'letterpaper'), default'letterpaper'.'pointsize'Point size option of the document class (
'10pt','11pt'or'12pt'), default'10pt'.'pxunit'the value of the
pxwhen used in image attributeswidthandheight. The default value is'0.75bp'which achieves96px=1in(in TeX1in = 72bp = 72.27pt.) To obtain for example100px=1inuse'0.01in'or'0.7227pt'(the latter leads to TeX computing a more precise value, due to the smaller unit used in the specification); for72px=1in, simply use'1bp'; for90px=1in, use'0.8bp'or'0.803pt'.1.5 新版功能.
'passoptionstopackages'A string which will be positioned early in the preamble, designed to contain
\\PassOptionsToPackage{options}{foo}commands. Default empty.1.4 新版功能.
'babel'“babel” package inclusion, default
'\\usepackage{babel}'(the suitable document language string is passed as class option, andenglishis used if no language.) For Japanese documents, the default is the empty string.With XeLaTeX and LuaLaTeX, Sphinx configures the LaTeX document to use polyglossia, but one should be aware that current babel has improved its support for Unicode engines in recent years and for some languages it may make sense to prefer
babeloverpolyglossia.提示
After modifiying a core LaTeX key like this one, clean up the LaTeX build repertory before next PDF build, else left-over auxiliary files are likely to break the build.
在 1.5 版更改: For
latex_engineset to'xelatex', the default is'\\usepackage{polyglossia}\n\\setmainlanguage{<language>}'.在 1.6 版更改:
'lualatex'uses same default setting as'xelatex'在 1.7.6 版更改: For French,
xelatexandlualatexdefault to usingbabel, notpolyglossia.'fontpkg'Font package inclusion, the default is
'\\usepackage{times}'which uses Times for text, Helvetica for sans serif and Courier for monospace.在 1.2 版更改: 当
language使用西里尔文脚本时,默认为''。在 2.0 版更改: 支持希腊和西里尔字母:
In order to support occasional Cyrillic (физика частиц) or Greek letters (Σωματιδιακή φυσική) in a document whose language is English or a Latin European one, the default set-up is enhanced (only for
'pdflatex'engine) to do:\substitutefont{LGR}{\rmdefault}{cmr} \substitutefont{LGR}{\sfdefault}{cmss} \substitutefont{LGR}{\ttdefault}{cmtt} \substitutefont{X2}{\rmdefault}{cmr} \substitutefont{X2}{\sfdefault}{cmss} \substitutefont{X2}{\ttdefault}{cmtt}
but this is activated only under the condition that the
'fontenc'key is configured to load theLGR(Greek) and/orX2(Cyrillic) pdflatex-font encodings (if thelanguageis set to a Cyrillic language, this'fontpkg'key must be used as “times” package has no direct support for it; then keep onlyLGRlines from the above, if support is needed for Greek in the text).The
\substitutefontcommand is from the eponymous LaTeX package, which is loaded by Sphinx if needed (on Ubuntu xenial it is part oftexlive-latex-extrawhich is a Sphinx requirement).Only if the document actually does contain Unicode Greek letters (in text) or Cyrillic letters, will the above default set-up cause additional requirements for the PDF build. On Ubuntu xenial,
texlive-lang-greek,texlive-lang-cyrillic, and (with the above choice of fonts) thecm-super(orcm-super-minimal) package.For
'xelatex'and'lualatex', the default is to use the FreeFont family: this OpenType font family supports both Cyrillic and Greek scripts and is available as separate Ubuntu xenial packagefonts-freefont-otf, it is not needed to install the big packagetexlive-fonts-extra.'platex'(Japanese documents) engine supports individual Cyrillic and Greek letters with no need of extra user set-up.
'fncychap'Inclusion of the “fncychap” package (which makes fancy chapter titles), default
'\\usepackage[Bjarne]{fncychap}'for English documentation (this option is slightly customized by Sphinx),'\\usepackage[Sonny]{fncychap}'for internationalized docs (because the “Bjarne” style uses numbers spelled out in English). Other “fncychap” styles you can try are “Lenny”, “Glenn”, “Conny”, “Rejne” and “Bjornstrup”. You can also set this to''to disable fncychap.The default is
''for Japanese documents.'preamble'Additional preamble content, default empty. One may move all needed macros into some file
mystyle.tex.txtof the project source repertory, and get LaTeX to import it at run time:'preamble': r'\input{mystyle.tex.txt}', # or, if the \ProvidesPackage LaTeX macro is used in a file mystyle.sty 'preamble': r'\usepackage{mystyle}',
It is then needed to set appropriately
latex_additional_files, for example:latex_additional_files = ["mystyle.sty"]
'figure_align'Latex figure float alignment, default ‘htbp’ (here, top, bottom, page). Whenever an image doesn’t fit into the current page, it will be ‘floated’ into the next page but may be preceded by any other text. If you don’t like this behavior, use ‘H’ which will disable floating and position figures strictly in the order they appear in the source.
1.3 新版功能.
'atendofbody'Additional document content (right before the indices), default empty.
1.5 新版功能.
'footer'额外的页脚内容(在索引之前),默认为空。
1.5 版后已移除: Use
'atendofbody'key instead.
除非在特殊情况下,否则不需要覆盖的键是:
'extraclassoptions'The default is the empty string. Example:
'extraclassoptions': 'openany'will allow chapters (for documents of the'manual'type) to start on any page.1.2 新版功能.
在 1.6 版更改: 添加了此文档。
'maxlistdepth'LaTeX allows by default at most 6 levels for nesting list and quote-like environments, with at most 4 enumerated lists, and 4 bullet lists. Setting this key for example to
'10'(as a string) will allow up to 10 nested levels (of all sorts). Leaving it to the empty string means to obey the LaTeX default.警告
- Using this key may prove incompatible with some LaTeX packages or special document classes which do their own list customization.
- The key setting is silently ignored if
\usepackage{enumitem}is executed inside the document preamble. Use then rather the dedicated commands of this LaTeX package.
1.5 新版功能.
'inputenc'“inputenc” package inclusion, defaults to
'\\usepackage[utf8]{inputenc}'when using pdflatex. Otherwise empty.在 1.4.3 版更改: Previously
'\\usepackage[utf8]{inputenc}'was used for all compilers.'cmappkg'“cmap” package inclusion, default
'\\usepackage{cmap}'.1.2 新版功能.
'fontenc'“fontenc” package inclusion, defaults to
'\\usepackage[T1]{fontenc}'.If
'pdflatex'is thelatex_engine, one can addLGRfor support of Greek letters in the document, and alsoX2(orT2A) for Cyrillic letters, like this:r'\usepackage[LGR,X2,T1]{fontenc}'
注意
Prior to 2.0, Unicode Greek letters were escaped to use LaTeX math mark-up. This is not the case anymore, and the above must be used (only in case of
'pdflatex'engine) if the source contains such Unicode Greek.On Ubuntu xenial, packages
texlive-lang-greekandcm-super(for the latter, only if the'fontpkg'setting is left to its default) are needed forLGRto work. In place ofcm-superone can install smallercm-super-minimal, but it requires the LaTeX document to execute\usepackage[10pt]{type1ec}before loadingfontenc. Thus, use this key with this extra at its start if needed.在 1.5 版更改: Defaults to
'\\usepackage{fontspec}'whenlatex_engineis'xelatex'.在 1.6 版更改:
'lualatex'usesfontspecper default like'xelatex'.在 2.0 版更改:
'lualatex'executes\defaultfontfeatures[\rmfamily,\sffamily]{}to disable TeX ligatures.在 2.0 版更改: Detection of
LGR,T2A,X2to trigger support of occasional Greek or Cyrillic ('pdflatex'only, as this support is provided natively by'platex'and only requires suitable font with'xelatex'/'lualatex').'textgreek'The default (
'pdflatex'only) is'\\usepackage{textalpha}', but only if'fontenc'was modified by user to includeLGRoption. If not, the key value will be forced to be the empty string.This is needed for
pdfLaTeXto support Unicode input of Greek letters such as φύσις. Expert users may want to load thetextalphapackage with its optionnormalize-symbols.提示
Unicode Greek (but no further Unicode symbols) in
mathcan be supported by'pdflatex'from setting this key tor'\usepackage{textalpha,alphabeta}'. Then:math:`α`(U+03B1) will render as \(\alpha\). For wider Unicode support in math input, see the discussion oflatex_engine.With
'platex'(Japanese),'xelatex'or'lualatex', this key is ignored.2.0 新版功能.
'geometry'“geometry” package inclusion, the default definition is:
'\\usepackage{geometry}'with an additional
[dvipdfm]for Japanese documents. The Sphinx LaTeX style file executes:\PassOptionsToPackage{hmargin=1in,vmargin=1in,marginpar=0.5in}{geometry}which can be customized via corresponding ‘sphinxsetup’ options.
1.5 新版功能.
在 1.5.2 版更改:
dvipdfmoption iflatex_engineis'platex'.1.5.3 新版功能: The ‘sphinxsetup’ keys for the margins.
在 1.5.3 版更改: The location in the LaTeX file has been moved to after
\usepackage{sphinx}and\sphinxsetup{..}, hence also after insertion of'fontpkg'key. This is in order to handle the paper layout options in a special way for Japanese documents: the text width will be set to an integer multiple of the zenkaku width, and the text height to an integer multiple of the baseline. See the hmargin documentation for more.'hyperref'“hyperref” package inclusion; also loads package “hypcap” and issues
\urlstyle{same}. This is done aftersphinx.styfile is loaded and before executing the contents of'preamble'key.注意
Loading of packages “hyperref” and “hypcap” is mandatory.
1.5 新版功能: Previously this was done from inside
sphinx.sty.'maketitle'“maketitle” call, default
'\\sphinxmaketitle'. Override if you want to generate a differently styled title page.提示
If the key value is set to
r'\newcommand\sphinxbackoftitlepage{<Extra material>}\sphinxmaketitle', then<Extra material>will be typeset on back of title page ('manual'docclass only).在 1.8.3 版更改: Original
\maketitlefrom document class is not overwritten, hence is re-usable as part of some custom setting for this key.1.8.3 新版功能:
\sphinxbackoftitlepageoptional macro. It can also be defined inside'preamble'key rather than this one.'releasename'value that prefixes
'release'element on title page, default'Release'. As for title and author used in the tuples oflatex_documents, it is inserted as LaTeX markup.'tableofcontents'“tableofcontents” call, default
'\\sphinxtableofcontents'(it is a wrapper of unmodified\tableofcontents, which may itself be customized by user loaded packages.) Override if you want to generate a different table of contents or put content between the title page and the TOC.在 1.5 版更改: Previously the meaning of
\tableofcontentsitself was modified by Sphinx. This created an incompatibility with dedicated packages modifying it also such as “tocloft” or “etoc”.'transition'Commands used to display transitions, default
'\n\n\\bigskip\\hrule\\bigskip\n\n'. Override if you want to display transitions differently.1.2 新版功能.
在 1.6 版更改: Remove unneeded
{}after\\hrule.'printindex'“printindex” call, the last thing in the file, default
'\\printindex'. Override if you want to generate the index differently or append some content after the index. For example'\\footnotesize\\raggedright\\printindex'is advisable when the index is full of long entries.'fvset'Customization of
fancyvrbLaTeX package. Sphinx does by default'fvset': '\\fvset{fontsize=\\small}', to adjust for the large character width of the monospace font, used in code-blocks. You may need to modify this if you use custom fonts.1.8 新版功能.
在 2.0 版更改: Due to new default font choice for
'xelatex'and'lualatex'(FreeFont), Sphinx does\\fvset{fontsize=\\small}also with these engines (and not\\fvset{fontsize=auto}).
Keys that are set by other options and therefore should not be overridden are:
'docclass''classoptions''title''release''author''makeindex'
'sphinxsetup' 键¶
The 'sphinxsetup' key of latex_elements
provides a LaTeX-type customization interface:
latex_elements = {
'sphinxsetup': 'key1=value1, key2=value2, ...',
}
It defaults to empty. If non-empty, it will be passed as argument to the
\sphinxsetup macro inside the document preamble, like this:
\usepackage{sphinx}
\sphinxsetup{key1=value1, key2=value2,...}
1.5 新版功能.
提示
It is possible to insert further uses of the \sphinxsetup LaTeX macro
directly into the body of the document, via the help of the raw
directive. Here is how this present chapter is styled in the PDF output:
.. raw:: latex
\begingroup
\sphinxsetup{%
verbatimwithframe=false,
VerbatimColor={named}{OldLace},
TitleColor={named}{DarkGoldenrod},
hintBorderColor={named}{LightCoral},
attentionborder=3pt,
attentionBorderColor={named}{Crimson},
attentionBgColor={named}{FloralWhite},
noteborder=2pt,
noteBorderColor={named}{Olive},
cautionborder=3pt,
cautionBorderColor={named}{Cyan},
cautionBgColor={named}{LightCyan}}
at the start of the chapter and:
.. raw:: latex
\endgroup
at its end.
The colors used in the above are provided by the svgnames option of the
“xcolor” package:
latex_elements = {
'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
}
LaTeX boolean keys require lowercase true or false values.
Spaces around the commas and equal signs are ignored, spaces inside LaTeX
macros may be significant.
hmargin, vmarginThe dimensions of the horizontal (resp. vertical) margins, passed as
hmargin(resp.vmargin) option to thegeometrypackage. The default is1in, which is equivalent to{1in,1in}. Example:'sphinxsetup': 'hmargin={2in,1.5in}, vmargin={1.5in,2in}, marginpar=1in',
Japanese documents currently accept only the one-dimension format for these parameters. The
geometrypackage is then passed suitable options to get the text width set to an exact multiple of the zenkaku width, and the text height set to an integer multiple of the baselineskip, with the closest fit for the margins.提示
For Japanese
'manual'docclass with pointsize11ptor12pt, use thenomagextra document class option (cf.'extraclassoptions'key oflatex_elements) or so-called TeX “true” units:'sphinxsetup': 'hmargin=1.5truein, vmargin=1.5truein, marginpar=5zw',
1.5.3 新版功能.
marginparThe
\marginparwidthLaTeX dimension, defaults to0.5in. For Japanese documents, the value is modified to be the closest integer multiple of the zenkaku width.1.5.3 新版功能.
verbatimwithframe- default
true. Boolean to specify ifcode-blocks and literal includes are framed. Setting it tofalsedoes not deactivate use of package “framed”, because it is still in use for the optional background colour. verbatimwrapslines- default
true. Tells whether long lines incode-block’s contents should wrap. literalblockcapposdefault
tfor “top”. Decides the caption position. Alternative isb(“bottom”).1.7 新版功能.
verbatimhintsturnoverdefault
true. Iftrue, code-blocks display “continued on next page”, “continued from previous page” hints in case of pagebreaks.1.6.3 新版功能.
在 1.7 版更改: the default changed from
falsetotrue.verbatimcontinuedalign,verbatimcontinuesaligndefault
r. Horizontal position relative to the framed contents: eitherl(left aligned),r(right aligned) orc(centered).1.7 新版功能.
parsedliteralwrapsdefault
true. Tells whether long lines in parsed-literal’s contents should wrap.1.5.2 新版功能: set this option value to
falseto recover former behaviour.inlineliteralwrapsdefault
true. Allows linebreaks inside inline literals: but extra potential break-points (additionally to those allowed by LaTeX at spaces or for hyphenation) are currently inserted only after the characters. , ; ? ! /. Due to TeX internals, white space in the line will be stretched (or shrunk) in order to accomodate the linebreak.1.5 新版功能: set this option value to
falseto recover former behaviour.verbatimvisiblespace- default
\textcolor{red}{\textvisiblespace}. When a long code line is split, the last space character from the source code line right before the linebreak location is typeset using this. verbatimcontinuedA LaTeX macro inserted at start of continuation code lines. Its (complicated…) default typesets a small red hook pointing to the right:
\makebox[2\fontcharwd\font`\x][r]{\textcolor{red}{\tiny$\hookrightarrow$}}
在 1.5 版更改: The breaking of long code lines was added at 1.4.2. The default definition of the continuation symbol was changed at 1.5 to accomodate various font sizes (e.g. code-blocks can be in footnotes).
TitleColor- default
{rgb}{0.126,0.263,0.361}. The colour for titles (as configured via use of package “titlesec”.)
警告
Colours set via 'sphinxsetup' must obey the syntax of the
argument of the color/xcolor packages \definecolor command.
InnerLinkColor- default
{rgb}{0.208,0.374,0.486}. A colour passed tohyperrefas value oflinkcolorandcitecolor. OuterLinkColor- default
{rgb}{0.216,0.439,0.388}. A colour passed tohyperrefas value offilecolor,menucolor, andurlcolor. VerbatimColor- default
{rgb}{1,1,1}. The background colour forcode-blocks. The default is white. VerbatimBorderColor- default
{rgb}{0,0,0}. The frame color, defaults to black. VerbatimHighlightColordefault
{rgb}{0.878,1,1}. The color for highlighted lines.1.6.6 新版功能.
注解
Starting with this colour key, and for all others coming next, the actual names declared to “color” or “xcolor” are prefixed with “sphinx”.
verbatimsep- default
\fboxsep. The separation between code lines and the frame. verbatimborder- default
\fboxrule. The width of the frame aroundcode-blocks. shadowsep- default
5pt. The separation between contents and frame for contents and topic boxes. shadowsize- default
4pt. The width of the lateral “shadow” to the right. shadowrule- default
\fboxrule. The width of the frame around topic boxes. noteBorderColor,hintBorderColor,importantBorderColor,tipBorderColor- default
{rgb}{0,0,0}(black). The colour for the two horizontal rules used by Sphinx in LaTeX for styling a note type admonition. noteborder,hintborder,importantborder,tipborder- default
0.5pt. The width of the two horizontal rules.
warningBorderColor,cautionBorderColor,attentionBorderColor,dangerBorderColor,errorBorderColor- default
{rgb}{0,0,0}(black). The colour for the admonition frame.
warningBgColor,cautionBgColor,attentionBgColor,dangerBgColor,errorBgColor- default
{rgb}{1,1,1}(white). The background colours for the respective admonitions. warningborder,cautionborder,attentionborder,dangerborder,errorborder- default
1pt. The width of the frame. AtStartFootnote- default
\mbox{ }. LaTeX macros inserted at the start of the footnote text at bottom of page, after the footnote number. BeforeFootnotedefault
\leavevmode\unskip. LaTeX macros inserted before the footnote mark. The default removes possible space before it (else, TeX could insert a linebreak there).1.5 新版功能.
HeaderFamily- default
\sffamily\bfseries. Sets the font used by headings.
LaTeX宏和环境¶
Here are some macros from the package file sphinx.sty and class files
sphinxhowto.cls, sphinxmanual.cls, which have public names
thus allowing redefinitions. Check the respective files for the defaults.
宏¶
text styling commands
\sphinx<foo>with<foo>being one ofstrong,bfcode,email,tablecontinued,titleref,menuselection,accelerator,crossref,termref,optional.1.4.5 新版功能: Use of
\sphinxprefixed macro names to limit possibilities of conflict with LaTeX packages.more text styling:
\sphinxstyle<bar>with<bar>one ofindexentry,indexextra,indexpageref,topictitle,sidebartitle,othertitle,sidebarsubtitle,theadfamily,emphasis,literalemphasis,strong,literalstrong,abbreviation,literalintitle,codecontinued,codecontinues1.5 新版功能: these macros were formerly hard-coded as non customizable
\texttt,\emph, etc…1.6 新版功能:
\sphinxstyletheadfamilywhich defaults to\sffamilyand allows multiple paragraphs in header cells of tables.1.6.3 新版功能:
\sphinxstylecodecontinuedand\sphinxstylecodecontinues.the table of contents is typeset via
\sphinxtableofcontentswhich is a wrapper (defined differently insphinxhowto.clsand insphinxmanual.cls) of standard\tableofcontents. The macro\sphinxtableofcontentshookis executed during its expansion right before\tableofcontentsitself.在 1.5 版更改: formerly, the meaning of
\tableofcontentswas modified by Sphinx.在 2.0 版更改: hard-coded redefinitions of
\l@sectionand\l@subsectionformerly done during loading of'manual'docclass are now executed later via\sphinxtableofcontentshook. This macro is also executed by the'howto'docclass, but defaults to empty with it.a custom
\sphinxmaketitleis defined in the class filessphinxmanual.clsandsphinxhowto.clsand is used as default setting of'maketitle'latex_elementskey.在 1.8.3 版更改: formerly,
\maketitlefrom LaTeX document class was modified by Sphinx.for
'manual'docclass a macro\sphinxbackoftitlepage, if it is defined, gets executed at end of\sphinxmaketitle, before the final\clearpage. Use either the'maketitle'key or the'preamble'key oflatex_elementsto add a custom definition of\sphinxbackoftitlepage.1.8.3 新版功能.
the citation reference is typeset via
\sphinxcitewhich is a wrapper of standard\cite.
环境¶
a figure may have an optional legend with arbitrary body elements: they are rendered in a
sphinxlegendenvironment. The default definition issues\small, and ends with\par.1.5.6 新版功能: formerly, the
\smallwas hardcoded in LaTeX writer and the ending\parwas lacking.for each admonition type
<foo>, the used environment is namedsphinx<foo>. They may be\renewenvironment‘d individually, and must then be defined with one argument (it is the heading of the notice, for exampleWarning:for warning directive, if English is the document language). Their default definitions use either the sphinxheavybox (for the first listed directives) or the sphinxlightbox environments, configured to use the parameters (colours, border thickness) specific to each type, which can be set via'sphinxsetup'string.在 1.5 版更改: use of public environment names, separate customizability of the parameters, such as
noteBorderColor,noteborder,warningBgColor,warningBorderColor,warningborder, …the contents directive (with
:local:option) and the topic directive are implemented by environmentsphinxShadowBox.1.4.2 新版功能: former code refactored into an environment allowing page breaks.
在 1.5 版更改: options
shadowsep,shadowsize,shadowrule.the literal blocks (via
::orcode-block), are implemented usingsphinxVerbatimenvironment which is a wrapper ofVerbatimenvironment from packagefancyvrb.sty. It adds the handling of the top caption and the wrapping of long lines, and a frame which allows pagebreaks. Inside tables the used environment issphinxVerbatimintable(it does not draw a frame, but allows a caption).在 1.5 版更改:
Verbatimkeeps exact same meaning as infancyvrb.sty(also under the nameOriginalVerbatim);sphinxVerbatimintableis used inside tables.1.5 新版功能: options
verbatimwithframe,verbatimwrapslines,verbatimsep,verbatimborder.1.6.6 新版功能: support for
:emphasize-lines:option1.6.6 新版功能: easier customizability of the formatting via exposed to user LaTeX macros such as
\sphinxVerbatimHighlightLine.the bibliography uses
sphinxthebibliographyand the Python Module index as well as the general index both usesphinxtheindex; these environments are wrappers of thethebibliographyand respectivelytheindexenvironments as provided by the document class (or packages).在 1.5 版更改: formerly, the original environments were modified by Sphinx.
杂记¶
the section, subsection, … headings are set using titlesec’s
\titleformatcommand.for the
'manual'docclass, the chapter headings can be customized using fncychap’s commands\ChNameVar,\ChNumVar,\ChTitleVar. Filesphinx.styhas custom re-definitions in case of fncychap optionBjarne.在 1.5 版更改: formerly, use of fncychap with other styles than
Bjarnewas dysfunctional.
提示
As an experimental feature, Sphinx can use user-defined template file for
LaTeX source if you have a file named _templates/latex.tex_t in your
project.
1.5 新版功能: currently all template variables are unstable and undocumented.
Additional files longtable.tex_t, tabulary.tex_t and
tabular.tex_t can be added to _templates/ to configure some aspects
of table rendering (such as the caption position).
1.6 新版功能: currently all template variables are unstable and undocumented.