13

Currently I have my electron neutrino & beta particle marco defined as

\newcommand{\eneutrino}{\ensuremath{\nu_e}}
\newcommand{\belectron}{\ensuremath{\beta^{-}}}
\newcommand{\bpositron}{\ensuremath{\beta^{+}}}

So that it works in math mode, text mode, and with mhchem. However this gives an italic nu and betas, which seems wrong since we don't italicize protons (p or p^{+}, or neutrons (n).

How would I change this to give me non-italic greek letters? The closes question I can find on this is Force upright Greek letters with isomath, but that uses DeclareMathSymbol and has some notes about getting it to work with T1 vs OT1 fonts and seems to overwrite the default \nu and \beta, which I don't want to do since I need the normal versions for other things.

So, how do I alter the above definitions to give me non-italic greek in math mode using \ensuremath?

Bonus points if someone can tell me if this is the correct typesetting of neutrinos and beta particles.

Edit: I would really like an answer using Latin Modern, since it is listed as supporting every European alphabet.

3
  • There's the package upgreek, but the results are disputable. The fonts provided by fourier and kpfonts have upright lowercase Greek.
    – egreg
    Jan 22, 2012 at 17:35
  • @egreg What about Latin Modern? Doesn't it support pretty much every European alphabet?
    – Canageek
    Jan 22, 2012 at 18:10
  • @egreg Can you also expand that into an answer on how I would use those fonts with the upright characters?
    – Canageek
    Jan 22, 2012 at 18:13

3 Answers 3

3

As others have said in their answers there are a number of packages that provide upright Greek letters, e.g., upgreek, textgreek, kpfonts, fourier, newtxmath, ... which one to choose is in my eyes mainly a design question: which one fits best to the document's main font?

Since in chemistry upright Greek letters are used in a number of different places (particle symbols such as in your question, IUPAC names, ...) the chemgreek package defines a number of mappings for those different packages to macros \chemalpha, \chembeta, etc. (48 in total) and also allows to define own mappings. It does not load any of those packages so the choice is still up to the user. The advantage is that chemmacros (or other chemistry packages like mhchem) can simply use the \chem<letter> commands internally and the corresponding output will match the choice made by the user.

This can be used to define particle macros yourself:

\documentclass{article}
\usepackage[T1]{fontenc}

% three different packages for demonstration purposes:
\usepackage{upgreek}
\usepackage{textgreek}
\usepackage{kpfonts}

\usepackage{chemmacros}[2014/01/24]% loads `chemgreek'

% just to overwrite kpfonts as default font:
\usepackage{lmodern}

% define the particles; the second argument is placed in`chemformula's \chcpd
% command
% the negative space before the `e' should be chosen depending on the actual
% choice:
\NewChemParticle{\eneutrino}{\chemnu_{$\!\!e$}}
\NewChemParticle{\belectron}{\chembeta-}
\NewChemParticle{\bpositron}{\chembeta+}

\newcommand*\pkg[1]{\textsf{#1}}

\begin{document}

\selectchemgreekmapping{upgreek}
\pkg{upgreek}: \eneutrino\ \belectron\ \bpositron

\selectchemgreekmapping{textgreek}
\pkg{textgreek}: \eneutrino\ \belectron\ \bpositron

\selectchemgreekmapping{kpfonts}
\pkg{kpfonts}: \eneutrino\ \belectron\ \bpositron

\end{document}

enter image description here

11

You could use the package upgreek (part of the "was" bundle of LaTeX packages, where "was" is short for Walter A. Schmidt...), which provides the math-mode macros \upalpha, \upbeta, etc.

\usepackage[Symbol]{upgreek}
\newcommand{\eneutrino}{\ensuremath{\upnu_e}}
\newcommand{\belectron}{\ensuremath{\upbeta^{-}}}
\newcommand{\bpositron}{\ensuremath{\upbeta^{+}}}

The package gensymb, also by Walter Schmidt, provides very similar functionality that may meet you needs.

Addendum Still another method is available with the textgreek package:

\documentclass{article}
\usepackage{amsmath,xspace,textgreek}
\newcommand{\eneutrino}{\ensuremath{\text{\textnu}_e}\xspace}
\newcommand{\belectron}{\ensuremath{\text{\textbeta}^{-}}\xspace}
\newcommand{\bpositron}{\ensuremath{\text{\textbeta}^{+}}\xspace}
\begin{document}
$\nu$ $\beta$ \eneutrino \belectron \bpositron \textbeta\ \textnu
\end{document}

enter image description here

Second addendum Another option is to use the kpfonts package, which provides both slanted and upright Greek letters (though I'd say that the difference between \nu and \othernu is rather minor). If you choose to go this route, I'd recommend snugging up the subscript-e to the \othernu character by inserting a negative thinspace, \!.

\documentclass{article}
\usepackage{xspace,kpfonts}
\newcommand{\eneutrino}{\ensuremath{\othernu_{\!e}}\xspace}
\newcommand{\belectron}{\ensuremath{\otherbeta^{-}}\xspace}
\newcommand{\bpositron}{\ensuremath{\otherbeta^{+}}\xspace}
\begin{document}
$\nu$ $\othernu$ $\beta$ $\otherbeta$

\eneutrino \belectron \bpositron 
\end{document}

enter image description here

8
  • I was just about to ask about this: Which is better/what is the difference?
    – Canageek
    Jan 22, 2012 at 17:45
  • Ok, that works, but since it loads them from another font face they are ugly as sin compared to the surrounding text.
    – Canageek
    Jan 22, 2012 at 17:53
  • 2
    +1 for textgreek
    – egreg
    Jan 22, 2012 at 21:36
  • 1
    You didn't mention in your first posting which font you use for text. I agree that the Adobe Symbol font doesn't harmonize very well with Computer/Latin Modern. See the addendum I've provided to my answer, in which I suggest you give the textgreek package a try. In the addendum, I've also included the xspace package to automatically add whitspace (if needed) following the new macros. I believe its upright-greek characters harmonize quite well with Latin Modern.
    – Mico
    Jan 22, 2012 at 21:36
  • Very nice-- I'll try to remember to look into that, though I am actually really liking kpfonts for notes: They give individual lines of text a bit more oommph. Not great for paragraphs though.
    – Canageek
    Jan 26, 2012 at 3:52
8

Here's a comparison between the results obtained by compiling three files. In the first row the normal italic greek letters, in the second row the corresponding upright letters. One can easily see that the result in the first case is questionable, as the upright letters are taken from the Euler font, while in the latter examples the letter blend with the overall design. For very limited use, upgreek can be a choice: \nu, for instance, but \beta is quite different.

Default setting with upgreek

\documentclass{article}
\usepackage{upgreek}
\begin{document}
$\alpha\beta\gamma\nu$

$\upalpha\upbeta\upgamma\upnu$
\end{document}

enter image description here


With fourier

\documentclass{article}
\usepackage{fourier}
\begin{document}
$\alpha\beta\gamma\nu$

$\otheralpha\otherbeta\othergamma\othernu$
\end{document}

enter image description here


With kpfonts

\documentclass{article}
\usepackage{kpfonts}
\begin{document}
$\alpha\beta\gamma\nu$

$\alphaup\betaup\gammaup\nuup$
\end{document}

enter image description here

2
  • But if I use your solutions I have to stop using Latin Modern in the rest of my document, correct?
    – Canageek
    Jan 22, 2012 at 21:00
  • @Canageek Yes, of course.
    – egreg
    Jan 22, 2012 at 21:06

You must log in to answer this question.

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