使用 jheppub.styt 定义 \newtheorem 环境

使用 jheppub.styt 定义 \newtheorem 环境

我正在使用JHEP 风格用于在 latex 中撰写论文。我想定义新的定理\定义...环境,例如

\newtheorem{thr}{\color{Blue} Theorem}\numberwithin{thr}{section}

但是,这种特定的风格似乎不允许定义这样的环境。我想知道是否有办法绕过这个问题。

答案1

这是他们软件包中的一个示例,只需定义您的新定理并按如下方式使用它。请注意,优于\textcolor{blue}{Theorem}{\color{blue} Theorem}还请注意blue小写的b

\documentclass[a4paper,11pt]{article}
\pdfoutput=1 % if your are submitting a pdflatex (i.e. if you have
             % images in pdf, png or jpg format)

\usepackage{jheppub} % for details on the use of the package, please
                     % see the JHEP-author-manual
\usepackage[T1]{fontenc} % if needed

\title{\boldmath A title with some math: $x=1$}

% more complex case: 4 authors, 3 institutions, 2 footnotes
\author[a,b,1]{F. Irst,\note{Corresponding author.}}
\author[c]{S. Econd,}
\author[a,2]{T. Hird\note{Also at Some University.}}
\author[a,2]{and Fourth}

% The "\note" macro will give a warning: "Ignoring empty anchor..."
% you can safely ignore it.

\affiliation[a]{One University,\\some-street, Country}
\affiliation[b]{Another University,\\different-address, Country}
\affiliation[c]{A School for Advanced Studies,\\some-location, Country}

% e-mail addresses: one for each author, in the same order as the authors
\emailAdd{[email protected]}
\emailAdd{[email protected]}
\emailAdd{[email protected]}
\emailAdd{[email protected]}

\newtheorem{thr}{\color{blue} Theorem} \numberwithin{thr}{section}

\abstract{Abstract...}

\begin{document} 
\maketitle
\flushbottom

\section{Some examples and best-practices}
\label{sec:intro}

\begin{thr}
Let $f$ be a function whose derivative exists in every point, then $f$ 
is a continuous function.
\end{thr}

\end{document}

在此处输入图片描述

相关内容