How to write upper case \varepsilon in LaTeX math environment?
Found the answer here:
It turns out, it's not an epsilon, but a curved letter "E". To enter it in LaTeX, simply do
\mathcal{E}
.
There is a Unicode symbol U+2107 "Euler Constant" that at least looks like an uppercase variant of \varepsilon
. The following example shows the symbol for different Unicode math fonts for users of XeLaTeX or LuaLaTeX:
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
%\setmathfont{Asana-Math.otf}
%\setmathfont{xits-math.otf}
\begin{document}
\newcommand*{\cs}[1]{%
\texttt{\textbackslash#1}%
}
\newcommand*{\test}[1]{%
{\setmathfont{#1}$\varepsilon$} &
{\setmathfont{#1}$\Eulerconst$}%
}
\begin{tabular}{lll}
Macro name: & \cs{varepsilon} & \cs{Eulerconst} \\
Unicode code point: & U+03F5 & U+2107 \\
\hline
Latin Modern Math: & \test{latinmodern-math.otf} \\
Asana Math: & \test{Asana-Math.otf} \\
XITS Math: & \test{xits-math.otf} \\
\end{tabular}
\end{document}
The letter is available in the T4 encoding for African languages, which is not very widespread: in the standard TeX distributions, only the CMR family is supported.
On the other hand, several OpenType or TrueType fonts have the glyph, precisely U+0190 LATIN CAPITAL LETTER OPEN E, rendered Ɛ.
So it depends on your setting. If you use pdflatex
and Computer Modern fonts, a variant of this answer allows to define a glyph that changes size in subscripts/superscripts:
\documentclass{article}
\usepackage[T4,T1]{fontenc}
\makeatletter
\newcommand{\do@openE}[1]{%
\mbox{\fontsize{#1}\z@\usefont{T4}{cmr}{m}{n}\symbol{130}}%
}
\newcommand{\openE}{\mathord{\mathchoice
{\do@openE\tf@size}
{\do@openE\tf@size}
{\do@openE\sf@size}
{\do@openE\ssf@size}
}}
\makeatother
\begin{document}
$E\ne\openE_{E\ne\openE}$
\end{document}
However the T4 encoded font is only available as bitmap and you might need to increase the default resolution (which is 600dpi) and creation mode for METAFONT.
If you're in a XeLaTeX/LuaLaTeX setting, then any font that has the glyph can be used, here CMU Serif (similar to the default Latin Modern)
\documentclass{article}
\usepackage{unicode-math}
\newfontfamily{\cmuserif}{CMU Serif}
\makeatletter
\newcommand{\do@openE}[1]{%
\mbox{\fontsize{#1}\z@\cmuserif\symbol{"0190}}%
}
\newcommand{\openE}{\mathord{\mathchoice
{\do@openE\tf@size}
{\do@openE\tf@size}
{\do@openE\sf@size}
{\do@openE\ssf@size}
}}
\makeatother
\begin{document}
$E\ne\openE_{E\ne\openE}$
\end{document}