代码拉取完成,页面将自动刷新
---
title: LaTeX Environment
format:
pdf:
include-in-header:
text: |
\usepackage{mhchem}
keep-tex: true
html: default
filters:
- latex-environment
environments: [center, enumerate]
commands: [ce, item, colorbox, fcolorbox]
---
## LaTeX Environments
::: {.center}
The contents of this div will be output in a `center`
LaTeX environment, but will appear in HTML (and any other output
format as a simple div with the class `center`)
:::
## LaTeX Commands
Will replace spans of class `ce` with the `\ce{}` command for LaTeX output, but leave the spans intact for HTML output. So `[H2SO4]{.ce}` becomes [H2SO4]{.ce}.
## Advanced Environments and Commands
You can also combine environments and commands (with options) to address more complex scenarios. Usually with LaTeX:
* `[opts]` is used for optional arguments
* `{args}` for mandatory arguments
Both environments and commands can accept an `options` and `arguments` attributes which will be properly applied in LaTeX and will be available as an attribute in HTML output.
:::{.enumerate}
[]{.item options="--"} Question 1
[]{.item options="--"} Question 2
:::
[This text is in a orange background]{.colorbox arguments="BurntOrange"}
If you have multiple arguments or options to pass to a command, use comma separated string
[This one will have a black border]{.fcolorbox arguments="black,red"}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。