3

A simple task: I require a user-defined command \greeklower that accepts any Greek character recognized by math mode and returns the lowercase version of the character.

Ideally the command syntax would be e.g. \greeklower{\Phi} and \greeklower{\phi} both expanding to \phi, \greeklower{\Gamma} and \greeklower{\gamma} both expanding to \gamma, etc.

However, the syntax \greeklower{Phi}, \greeklower{phi} is also acceptable.

I have attempted the following:

\lowercase{\Gamma}: does nothing

\MakeLowercase{\Gamma}: does nothing

\newcommand {\greeklower} [1] {\expandafter\csname\lowercase{#1}\endcsname}: "error: missing \endcsname"

\newcommand {\greeklower} [1] {\expandafter\csname\MakeLowercase{#1}\endcsname}: "error: missing \endcsname"

\edef\elower#1{\lowercase{#1}}
\newcommand {\greeklower} [1] {\expandafter\csname\elower{#1}\endcsname}

"error: missing \endcsname"

\edef\elower#1{\MakeLowercase{#1}}
\newcommand {\greeklower} [1] {\expandafter\csname\elower{#1}\endcsname}

"error: TeX capacity exceeded"

Hence once again TeX has defeated me. :(

MWE:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\newcommand {\greeklower} [1] { -make Greek symbol lowercase- }

\begin{document}
This is a $\gamma$ tensor: $\boldsymbol{\greeklower{\Gamma}}$.

This is also a $\gamma$ tensor: $\boldsymbol{\greeklower{\gamma}}$.
\end{document}
  • 1
    why lowercase in math mode? That doesn't make much sense, lower casing is something that should affect text. – Ulrike Fischer May 12 at 17:36
  • 1
    @UlrikeFischer: I have an equivalence between matrix operators and type-(1,1) tensors in the document I'm writing. The convention in the working domain is that the tensors use lowercase versions of the symbols used for the operators, whose characters are fungible to a degree and can be Greek symbols. – COTO May 12 at 17:45
5

Just redefine locally the uppercase Greek characters to become their lowercase counterparts.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand{\LowerGreek}[1]{\begingroup
\let\Gamma\gamma
\let\Delta\delta
\let\VarTheta\vartheta
\let\Lambda\lamda
\let\Theta\theta
\let\Pi\pi
\let\Sigma\sigma
\let\Upsilon\upsilon
\let\Phi\phi
\let\Psi\psi
\let\Omega\omega
#1
\endgroup}

\begin{document}
This is a $\gamma$ tensor: $\boldsymbol{\LowerGreek{\Gamma}}$ but $\Gamma$ still
works.

This is also a $\gamma$ tensor: $\boldsymbol{\LowerGreek{\gamma}}$.
\end{document}

enter image description here

| improve this answer | |
  • Hm. Crude... but it works. Thanks. :) – COTO May 12 at 17:37
  • 2
    @COTO You're welcome! (I am always excited to meet other cats. ;-) – user194703 May 12 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.