1

I'm using revtex 4.2 (with overleaf) and I'd like to writes commas in the adresses.

For instance in :

\documentclass[sor,jor,amsmath,amssymb,reprint,]{revtex4-2}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\begin{document}
\title[Sample title]{Title}
\author{A. Author}
\affiliation{Authors' institution and/or address}
\maketitle
\end{document}

If I write commas in affiliation, it writes in the next line.

2 Answers 2

2
\documentclass[sor,jor,amsmath,amssymb,reprint,]{revtex4-2}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\begin{document}
\title[Sample title]{Title}
\author{A. Author}
\affiliation{Authors' institution and/or address\char`,{} next part}
\maketitle
\end{document}

enter image description here

Here's another way

\documentclass[sor,jor,amsmath,amssymb,reprint,]{revtex4-2}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\begin{document}
\title[Sample title]{Title}
\author{A. Author}
\let\comma,
\affiliation{Authors' institution and/or address\comma{} next part}
\maketitle
\end{document}
1

To deactivate commas inside \affiliation:

\def\cat@comma@active{\catcode`\,12}%

Note that \cat@comma@active is only used inside \affiliation, so redefining it will not cause problems in other places.

MWE

\documentclass[sor,jor,amsmath,amssymb,reprint,]{revtex4-2}
\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
\makeatletter
\def\cat@comma@active{\catcode`\,12}%
\makeatother

\begin{document}
    \title[Sample title]{Title}
    \author{A. Author}
    \affiliation{Authors' institution, and/or address\\ 
        Another institution}
    \maketitle
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .