[Tex/LaTex] How to typeset entropy function H

symbols

What's the right way to write Shannon's entropy, which is represented as H(…)? $H(...)$ will render it in italic H, while Wikipedia seems to render it in normal H(…) instead.

Which one is more right? And if Wiki is the right one, then how to write it so in math mode?

Best Answer

Asking which typographical conventions are "more right" than others is not likely to generate unanimous consent.

Here are eight ways to generate the Latin-alphabet letter "upright-H" in math mode, for various choices of font shape, weight, and family. Choose your favorite -- and be sure to alert your readers as to which typographic choice you make regarding the symbol for Shannon's entropy.

enter image description here

\documentclass{article}
\usepackage{amssymb}  % for \mathfrak and \mathbb
\usepackage{mathrsfs} % for \mathscr
\begin{document}
$H$ $\mathrm{H}$ $\mathbf{H}$ $\mathsf{H}$ 
$\mathcal{H}$ $\mathfrak{H}$ $\mathscr{H}$ $\mathbb{H}$
\end{document}
Related Question