5

It is traditional in Physics to use a lowercase gamma that looks like a Y. Without going into the question of whether that tradition is wrong, how do I differentiate in math mode Latex markup between a Gamma that looks like a Y and a Gamma with a loop?

No, I do not mean either capital or upright.

I'd prefer avoiding Unicode unless ArXiV now supports xetex.

I don't know how to insert the PDF as an image, but http://mason.gmu.edu/~smetz3/humor/dirac.pdf is generated from

\documentclass{article}
\usepackage{bm}
\usepackage[paperheight=10in,paperwidth=10in,top=0.75in, bottom=0in,   left=0in, right=0in]{geometry}
\usepackage{graphicx}
\begin{document}
\pagestyle{empty}

\vspace{.5in}

\begin{center}
{\Huge \bfseries Which part of}
\end{center}

\vspace{1.75in}

{\Huge
  \[
    \bm{(\gamma^{\mu } (i\hbar \partial _{\mu } - {\frac {e}{c}}A_{\mu })-mc) \psi =0}
  \]
}

\vspace{1.75in}

\begin{center}
{\Huge \bfseries don't you understand?}
\end{center}
\end{document}
  • What is a "gamma with a loop"? – Sebastiano Dec 26 '18 at 21:53
  • Do you mean \gammaup? This is mainly a matter of the used font – user31729 Dec 26 '18 at 21:58
  • I think you try to distinguish btw. a small gamma (γ) and a capital one (Γ), which would be \gamma and \Gamma respectively. – Stefan Schroeder Dec 26 '18 at 21:59
  • 1
    @StefanSchroeder: there is no loop in \Gamma .... – user31729 Dec 26 '18 at 22:00
  • haha, sure, but perhaps the question was just inaccurate. It's just a comment, mind you. – Stefan Schroeder Dec 26 '18 at 22:02
8

Please choose one of these.

\documentclass[a4paper]{article}
\usepackage{tipa}
\usepackage{upgreek}
\begin{document}

\begin{tabular}{rl}
tipa:    & \textbabygamma\\
upgreek: & $\upgamma$\\
tipa:    & \textgamma\\
tipa:    & \textramshorns\\
default: & $\gamma$\\
\end{tabular}

\end{document}

enter image description here

| improve this answer | |
  • You made me at least smile a little. – Sebastiano Dec 27 '18 at 21:23
  • The isomath package has a pretty comprehensive list of the OML math alphabets available. There are around 50, plus LGR fonts and fonts like AMS Euler and Fourier with unique encodings. – Davislor Dec 27 '18 at 22:06
4

In the Modern Toolchain

\usepackage{unicode-math}, then check the list of Unicode-math symbols for a font specimen of all the math symbols in a half-dozen Unicode math fonts. Pick a font you like.

If you want to change only the Greek letters to another Unicode font, including any of the fonts on your desktop, add \setmathfont{Latin Modern Math}, as your default, then \setmathfont[range=it/{Greek,greek}, Scale=MatchLowercase]{Artemisia} (for example).

In general, write your new documents for the new toolchain if you can, and the legacy toolchain if you have to.

With Legacy Math Fonts

Load isomath and pick one of the Greek alphabets it supports. This package and mathalfa give you the closest thing the NFSS ecosystem has to a standard interface for selecting the math alphabets of your choice.

With Legacy Greek Text Fonts

You can use LGR-encoded legacy NFSS fonts in math mode through mathastext. This example loads GFS Bodoni:

\usepackage[LGR,T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
%\usepackage{amsmath}
\usepackage{alphabeta}
\usepackage{gfsbodoni}
\usepackage[italic, LGRgreek, itgreek]{mathastext} % or upgreek, or upGreek.

If you want to write actual Greek words, also load babel.

If You Really Want Just that One Letter

Look up the encoding of the legacy font whose symbol you want, and declare it as a symbol alphabet. This example typesets the Euler-Mascheroni constant with the γ from the font AMS Euler, in ISO style. The constant is unslanted, not italic, and I give it the de facto standard name \upgamma. The other symbols are taken from newpx, a clone of Palatino, another font by Hermann Zapf that goes well with his AMS Euler.

\documentclass[varwidth]{standalone}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc} % The default since 2018.
\usepackage{newpxtext, newpxmath}

\DeclareSymbolFont{eulerup}{U}{zeur}{m}{n}
\DeclareMathSymbol{\upgamma}{\mathord}{eulerup}{"0D}

\begin{document}
\begin{minipage}{10cm}
\[ \upgamma = \lim_{n \to \infty} \left(
      - \ln n + \sum_{k=1}^n \frac{1}{k}
   \right) \]
\end{minipage}
\end{document}

The Euler Constant

By the way, if you like this setup, here is how you get it with the modern toolchain (after downloading Khaled Hosny’s font Neo Euler from GitHub):

\documentclass[varwidth]{standalone}
\usepackage[math-style=ISO]{unicode-math}

\defaultfontfeatures{Scale=MatchLowercase}
\setmainfont{TeX Gyre Pagella}[
  Scale = 1.0 ,
  Ligatures = {Common, TeX} ]
\setmonofont{Inconsolata}
% A good matching sans serif, should you want one, is Optima.  A free clone
% is URW Classico.
\setmathfont{TeX Gyre Pagella Math}
% Neo Euler by Khaled Hosny, based on AMS Euler by Hermann Zapf:
% https://github.com/khaledhosny/euler-otf
\setmathfont[range=up/{latin,Latin,greek,Greek},
             script-style={},
             sscript-style={}]{Neo Euler}

\begin{document}
\begin{minipage}{10cm}
\[ \upgamma = \lim_{n \to \infty} \left(
      - \ln n + \sum_{k=1}^n \frac{1}{k}
   \right) \]
\end{minipage}
\end{document}
| improve this answer | |
  • No, I do not mean capital Gamma; I mean lower case Gamma in Math mode, with one of two styles: the more correct form with a loop and the more traditional form (in Physics) with a tail. I'm trying to avoid Unicode because ArXiV doesn't support XeTeX and I don't want to get into the habit of doing anything that won't work with pdfLaTeX. – shmuel Dec 27 '18 at 20:12
  • @shmuel: You can get a good help from the community here if you post an image. – AboAmmar Dec 27 '18 at 21:35
  • @shmuel That makes sense. All of those solutions work for a lowercase gamma in math mode, and all but the first work in PDFLaTeX. – Davislor Dec 27 '18 at 21:49
  • @AboAmmar What is the markup to render a block of TeX, and can I do it within a comment or only in the base message or an answer? – shmuel Dec 28 '18 at 20:57
  • @Davislor I thought that symbols beginning with text were only for use in text mode. I only mentioned capital Gamma because of a comment by Stefan Schroeder; what I want is a lower case slanted Gamma. – shmuel Dec 28 '18 at 21:06

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.