I have some macros to distinguish between two varieties of similar objects. So, for example, I need \psi
to come out as expected, but \MakeUppercase{\psi}
to come out as \Psi
. (Obviously my real applications are more complicated than this.) Is this possible to do in any reasonable way?
At the moment, the non-English characters I need are limited to greek, and \eth
and \thorn
if possible. But I'm writing these papers to be posted to the arXiv, and as I understand it xelatex and lualatex just don't work on arXiv -- even pdflatex is hard enough to wrangle in my experience. So I'm basically restricted to plain old (pdf)latex.
EDIT
For reference, here's what I ended up using.
\usepackage[T1]{fontenc}
\usepackage{amsmath, amssymb}
\DeclareSymbolFont{wasy}{U}{wasy}{m}{n}
\DeclareMathSymbol{\thorn}{\mathord}{wasy}{105}
\DeclareMathSymbol{\Thorn}{\mathord}{wasy}{106}
\makeatletter
\g@addto@macro\@uclclist{%
\eth\Eth
\thorn\Thorn
\alpha\Alpha
\beta\Beta
\gamma\Gamma
\delta\Delta
\epsilon\Epsilon
\varepsilon\Varepsilon
\zeta\Zeta
\eta\Eta
\theta\Theta
\vartheta\Vartheta
\iota\Iota
\kappa\Kappa
\lambda\Lambda
\mu\Mu
\nu\Nu
\xi\Xi
\omicron\Omicron
\pi\Pi
\varpi\Varpi
\rho\Rho
\varrho\Varrho
\sigma\Sigma
\varsigma\Varsigma
\tau\Tau
\upsilon\Upsilon
\phi\Phi
\varphi\Varphi
\chi\Chi
\psi\Psi
\omega\Omega
}
\newcommand\Eth{\text{\DH}}
\newcommand\Alpha{\mathrm{A}}
\newcommand\Beta{\mathrm{B}}
\newcommand\Epsilon{\mathrm{E}}
\newcommand\Varepsilon{\mathit{E}}
\newcommand\Zeta{\mathrm{Z}}
\newcommand\Eta{\mathrm{H}}
\newcommand\Vartheta{\varTheta}
\newcommand\Iota{\mathrm{I}}
\newcommand\Kappa{\mathrm{K}}
\newcommand\Mu{\mathrm{M}}
\newcommand\Nu{\mathrm{N}}
\newcommand\omicron{o}
\newcommand\Omicron{\mathrm{O}}
\newcommand{\Varpi}{\varPi}
\newcommand\Rho{\mathrm{P}}
\newcommand\Varrho{\mathit{P}}
\newcommand\Varsigma{\varSigma}
\newcommand\Varphi{\varPhi}
\newcommand\Tau{\mathrm{T}}
\newcommand\Chi{\mathrm{X}}
\makeatother
EDIT 2
I also experimented with combining the two answers with something like the following:
\makeatletter
\newcommand\myMakeUppercase[1]{%%
\begingroup
\let\new@uclclist\@uclclist
\g@addto@macro\new@uclclist{%
\eth\Eth
...
\omega\Omega
}
\let\@uclclist\new@uclclist%
\MakeUppercase{#1}%
\endgroup
}
\makeatother
This allows me to just do the upcasing inside my command, and keep the standard casing everywhere else. I'm not totally sure why I had to make a temporary copy of the list. (I guess \g@addto@macro
actually changes the data in place???) But it seems to work.