-1

I am new to LaTeX. Does anyone know how to write the above expression? I tried a lot but always with errors. This is what I have tried. Thanks in advance.

\title{\textbf{Search for the decay \emph{B$^+$}{$\rightarrow$}\emph{K$^+$} }}
Werner
  • 603,163
Jaden
  • 307

3 Answers3

4

This is a start. Make sure you read this and this plus a general introduction in LaTeX, see here and here.

\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}

\begin{document} Text $\boldsymbol{a^\pm + b ^\mp}$ Text. \end{document}

enter image description here

PS: Unrelated, but maybe consider not to use math in headings and titles. Maybe you can describe it verbally as in "Decay of the Beta Particle" instead of "Decay of the $\boldmath\beta$ Particle".

2

To get bold text and matching bold math, format your headers with \boldmath as well as \bfseries. In PDFLaTeX, you will generally get better results with \usepackage{bm}.

\documentclass{article}
\usepackage{lmodern} % Or your font package of choice.
\usepackage{amsmath}
\usepackage{bm}

\title{\boldmath\bfseries Search for the decay ( B^{+} \rightarrow K^{+}\tau^{+}\mu^{+} )} \date{} \author{}

\begin{document} \maketitle \end{document}

Latin Modern sample

You can also use the \boldsymbol command from amsmath (or amsbsy) to embolden an expression within math mode, as in Manuel Kuehner’s answer.

Both of these commands will also work on LuaLaTeX or XeLaTeX with unicode-math, if you load a bold math font. Only a few OpenType math fonts come with them, such as XITS Math and KP Math:

\documentclass{article}
\usepackage{unicode-math}

\setmainfont{KpRoman}[ UprightFont = -Light , ItalicFont = -LightItalic , BoldFont = -Semibold , BoldItalicFont = -SemiboldItalic , Extension = .otf ] \setmathfont{KpMath-Light} \setmathfont{KpMath-Semibold}[version=bold]

\title{\boldmath\bfseries Search for the decay ( B^{+} \rightarrow K^{+}\tau^{+}\mu^{+} )} \date{} \author{}

\begin{document} \maketitle

The decay ( B^{+} \rightarrow K^{+}\tau^{+}\mu^{+} ) .... \end{document}

KP Fonts sample

However, you can always fake one with FakeBold=, e.g.:

\documentclass{article}
\usepackage{unicode-math}
\usepackage{newcomputermodern}

\setmathfont{NewCMMath-Book.otf}[ version=bold, FakeBold = 0.10 ]

\title{\boldmath\bfseries Search for the decay ( B^{+} \rightarrow K^{+}\tau^{+}\mu^{+} )} \date{} \author{}

\begin{document} \maketitle

The decay ( B^{+} \rightarrow K^{+}\tau^{+}\mu^{+} ) .... \end{document}

New Computer Modern sample

Davislor
  • 44,045
1

You can use the hepnames package, but it needs a patch as explained at non-italic symbols of the hepnames package not printing with pdflatex

\documentclass{article}
\usepackage{amsmath}
\usepackage{hepnames}
\usepackage{xpatch}

\makeatletter \xpatchcmd@HepConStyle {\edef@upcode{\updefault}} {\ifdefined\shapedefault\edef@upcode{\shapedefault}\else\edef@upcode{\updefault}\fi} {}{} \makeatother

\begin{document}

\section{Search for the decay $\PBplus\to\PKplus\Ptaump\Pmupm$}

Search for the decay $\PBplus\to\PKplus\Ptaump\Pmupm$

\end{document}

Note that boldface in section titles is automatically taken into account.

enter image description here

If you prefer italic for all particle names, you do

\usepackage[italic]{hepnames}

and the output would be

enter image description here

egreg
  • 1,121,712