在整个文档中重复 Latex 中的一个短语
Repeat a phrase in Latex throughout document
我想在 Latex 文档的开头设置一个引用短语,这样我可以在文档后面引用它,它会插入我的短语。
目的是创建适合每个公司的求职信模板。稍后我可以只更改参考短语,其余的由 Latex 完成,更改整个文档中的公司名称。
例如,
\documentclass[]{letter}
\include{*company reference package*}
\ref{Company XYZ}{Manufacturing and Distribution Company of the Americas, Inc.}
\begin{document}
Dear \ref{Company XYZ}, I have heard it is great to work at \ref{Company XYZ}. As a member of \ref{Company XYZ}
\end{document}
你可以使用 \newcommand
,像这样:
\documentclass[]{letter}
\newcommand{\CompanyXYZ}{Manufacturing and Distribution Company of the Americas, Inc.}
\begin{document}
Dear \CompanyXYZ, I have heard it is great to work at \CompanyXYZ. As a member of \CompanyXYZ
\end{document}
我想在 Latex 文档的开头设置一个引用短语,这样我可以在文档后面引用它,它会插入我的短语。
目的是创建适合每个公司的求职信模板。稍后我可以只更改参考短语,其余的由 Latex 完成,更改整个文档中的公司名称。
例如,
\documentclass[]{letter}
\include{*company reference package*}
\ref{Company XYZ}{Manufacturing and Distribution Company of the Americas, Inc.}
\begin{document}
Dear \ref{Company XYZ}, I have heard it is great to work at \ref{Company XYZ}. As a member of \ref{Company XYZ}
\end{document}
你可以使用 \newcommand
,像这样:
\documentclass[]{letter}
\newcommand{\CompanyXYZ}{Manufacturing and Distribution Company of the Americas, Inc.}
\begin{document}
Dear \CompanyXYZ, I have heard it is great to work at \CompanyXYZ. As a member of \CompanyXYZ
\end{document}