不使用大量数学运算时格式化文本的正确方法

不使用大量数学运算时格式化文本的正确方法

我对文本格式感到困惑,我几乎到处都能看到这个\text命令,我相信它是amsmath包的一部分?

如果我主要进行写作,并且只进行一点数学运算,那么是否\text最好使用命令,或者是否有另一种更适合 Latex 的方法,而无需使用amsmath用于格式化文本的包?

答案1

要编写一份不需要太多数学运算的简单文档,您不需要做任何特殊的事情;当然您也不需要宏\text

\documentclass[a4paper,10pt]{article}

%% Uncomment the following line to use an AMSmath equation
%\usepackage{amsmath}

\title{A simple document consisting mostly of text}
\author{Niel de Beaudrap}

\begin{document}
\maketitle

\section{A section title}

The following is a simple displayed un-numbered equation.
\[
  E = mc^2
\]
%% Uncomment the following as desired.
% In many cases, it's useful to use an equation environment
% from the AMSmath package. The following is a simple example
% which gives the displayed equation a number:
%\begin{equation}
%  \mathbf{F} := \frac{\mathrm{d}}{\mathrm{d}t} \mathbf{p}
%\end{equation}
You can write as much prose as you want outside of the math environments
you use (indeed, you don't have to use \emph{any} math environments if
you don't want to).

\end{document}

试试看。你可能想调查一下一些简单的 LaTeX 入门参考,如果您从头开始。

相关内容