here is a possible solution that also forcibly causes the cited item number to use
\textup
, so it will not be entirely appropriate if non-numeric labels are used
for the bibliography.
it redefines several commands from latex.ltx
. it could be more compactly expressed
using a "patch" mechanism, but i'm not so adept at that technique yet.
the third "theorem" uses the redefined mechanism.
\documentclass{article}
\usepackage{amsthm,amsmath}
\newtheorem*{thm}{Theorem}
\makeatletter
\DeclareRobustCommand\thmcite{%
\@ifnextchar [{\@tempswatrue\@thmcitex}{\@tempswafalse\@thmcitex[]}}
\def\@thmcitex[#1]#2{\leavevmode
\let\@citea\@empty
\@thmcite{\@for\@citeb:=#2\do
{\@citea\def\@citea{,\penalty\@m\ }%
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\hbox{\reset@font\bfseries ?}%
\G@refundefinedtrue
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\@cite@ofmt{\csname b@\@citeb\endcsname}}}}{#1}}
\def\@thmcite#1#2{\textup{[}{\textup{#1}\if@tempswa , #2\fi}\textup{]}}
\makeatother
\begin{document}
\begin{thm}
There is no biggest prime number \textup{(}see \textup{[1,}
Theorem \textup{30} at page \textup{100]}.
\end{thm}
\begin{thm}
There is no biggest prime number (see [1,
Theorem 30 at page 100].
\end{thm}
\begin{thm}
There is no biggest prime number \textup{(}see
\thmcite[Theorem \textup{30} at page \textup{100}]{A}.
\end{thm}
\begin{thebibliography}{1}
\bibitem{A}
author, title
\end{thebibliography}
\end{document}
cite
ornatbib
? Would you be OK with putting all material, rather than just the numbers, inside the square brackets in upright font?\cite
, and that's why you can't change them? (certainly,\textup
applied directly to brackets works as expected.)