\documentclass{article} % \documentclass{} is the first command in any LaTeX code. It is used to define what kind of document you are creating such as an article or a book, and begins the document preamble \usepackage{amsmath} % \usepackage is a command that allows you to add functiona...
\emph Although it also changes fonts, the \emph{text} commandis semantic, for text to be emphasized, and should not be used as asubstitute for \textit. For example, \emph{starttext \emph{middle text} end text} will result in thestart text and end text in italics, but middle textwill...
definecolor{orangeshade}{rgb}{1.00,0.88,0.82} % 橙色,竖线颜色设为 DarkOrange \definecolor{lightblueshade}{rgb}{0.8,0.92,1} % 淡蓝色,竖线颜色设为 LightSkyBlue \theoremstyle{definition} \newtheorem{defn}{\indent 定义}[section] \newtheorem{lemma}{\indent 引理}[section] \newtheorem{thm}[...
黑板粗体(Blackboardbold)一般用于表示数学和物理学中的向量或集合的符号。 备注: 花括号 中只有使用大写拉丁字母才能正常显示,使用小写字母或数字会得到其他符号。 正粗体 语法 \mathbf{012…abc…ABC…} 效果 备注 花括号{}内只能使用拉丁字母和数字,不能使用希腊字母如\alpha等。斜粗体 语法 \boldsymbol{012…a...
我们可以手动创建计数器,或者使用\newtheorem环境来实现带编号的环境: \documentclass{article} % Define our numbered environment within the preamble \newcounter{example}[section] \newenvironment{example}[1][]{\refstepcounter{example}\par\medskip
As you probably have guessed, the parameters inside the brackets[width=3cm, height=4cm]define the width and the height of the picture. You can usedifferent unitsfor these parameters. If only thewidthparameter is passed, the height will be scaled to keep the aspect ratio. ...
Background colour of a column. This one is a bit tricky, but the easiest way is to define a new column type. The command \newcolumntype{s}{>{\columncolor[HTML]{AAACED}} p{3cm}} define a column type called s whose alignment is p, the column width is 3cm and the colour is ...
{XeLaTeX}compiler. If you have to write some code you can use the\texttt{verbatim}environment:\begin{verbatim}Usually this environment is used to display code, so here's a simple C program. #include <stdio.h> #define NUMYAYS 10 int main(){int i; for (i = 0; i <= NUMYAYS; i+...
\clearpage \newpage 4.4defining a new environment https://www.overleaf.com/learn/latex/Environments syntax: \newenvironment{name} To define aboxedenvironment: \newenvironment{boxed} {\begin{center} \begin{tabular}{|p{0.9\textwidth}|} \hline\\ ...
For example, an smcmemo class might be called with an option to read in a file with a list of people for the to-head, as \documentclass[mathto]{smcmemo}, and therefore needs to define a command \newcommand{\setto}[1]{\def\@tolist{#1}} used in that file. In the handle ...