It seems to be impossible to use any TikZ packages in the JHEP class (theoretical high energy physics: link)
The clash seems to be that JHEP does not like colors (except for the classical ones blue, green, red, etc). Still, I need to make commutative diagrams.
Does anyone know how to either
1) Combine TikZ and JHEP style
or
2) Write NICE commutative diagrams on a different way than TikZ?
P.S. The error I get is:
! Undefined control sequence.
\set@color ...\@pdfcolorstack push{\current@color
}\aftergroup \reset@color
P.S.2 This is the code I use and fails to work with TikZ:
\RequirePackage{ifpdf}
\documentclass[12pt,letterpaper]{JHEP3}
\usepackage{amscd,amsmath,amssymb,amsfonts,xspace,mathrsfs}
\usepackage[utf8]{inputenc}
\usepackage{tikz-cd}
%\usetikzlibrary{cd}
% \usetikzlibrary{arrows,intersections}
% \usepackage{lipsum}
% \usepackage{setspace}
\usepackage{graphicx}
\title{Some Title}
% Remove any unused author tags
% author one information
\author{Author 1 and Author 2\\
{\it Some University}\\
\vspace*{2mm} {\tt e-mail:
\email{author1@somewhere.com},
\email{author2@somewhere.com}}
}
\abstract{ Abtract for JHEP.}
\preprint{}
\begin{document}
Hi. This is a test.
\end{document}
colorwith options (e.g.\usepackage[usenames]{color}) after loadingjheppub. Becausejheppubloadscolorwithout options, that causes an error, similar to https://tex.stackexchange.com/questions/51488/. But without more details about what you did, this is pure guesswork. – Torbjørn T. May 16 '18 at 14:08JHEP3.clsbe found? In the link you provided only thejheppubpackage is to be found. – Torbjørn T. May 16 '18 at 20:49JHEP3class, but thejheppubpackage, as instructed on the journal page. Further, if I use the class from the link given by @marmot, and do\documentclass[12pt,letterpaper]{JHEP3} \author{..} \abstract{..} \title{..} \begin{document} foo \end{document}I do not get the error you mention. So if you want a sure answer for what happens, please add a complete example of code that produces the error, and a link to the class. – Torbjørn T. May 16 '18 at 21:00jheppubpackage allows you to get a feeling for how the thing will look like when it gets published. – May 16 '18 at 21:02\pdfannotbeing undefined, and after adding\usepackage{hyperref}some errors about\Hy@colorlinkand similar being undefined. After that, if acolorpackage is loaded, you get the error you mention in your question. If you google these errors, you might find that they occur when stuff is typeset in the preamble, ... (ctd.) – Torbjørn T. May 17 '18 at 11:15\AtBeginDocument. Which is why I think, without being able to accurately judge the code myself, that the class is poorly written, and has bugs. So I'm back to what I said earlier, don't use the class. – Torbjørn T. May 17 '18 at 11:17