Text FormattingThe bar is not coming in the pdf file.

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
pallav
Posts: 170
Joined: Wed Nov 12, 2008 5:53 pm

The bar is not coming in the pdf file.

Post by pallav »

I have used order symbol. The bar is not coming in the pdf file.

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\usepackage{siunitx}

\DeclarePairedDelimiterXPP\BigOSI[2]%
  {\mathcal{O}}{(}{)}{}%
  {\SI{#1}{#2}}

\begin{document}


\begin{align}
	X&=x+\BigOSI{}{\epsilon^{3/2}}\\
	Y&=y+\BigOSI{}{{\bar{r}}^{3/2}} 
\end{align}
\end{document}
How to solve this issue
Attachments
LaTeX1111.pdf
(12.16 KiB) Downloaded 261 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

The bar is not coming in the pdf file.

Post by Stefan Kottwitz »

Here is a quick workaround, using a box:

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\usepackage{siunitx}
 
\DeclarePairedDelimiterXPP\BigOSI[2]%
  {\mathcal{O}}{(}{)}{}%
  {\SI{#1}{#2}}
 
\newsavebox\br
\sbox\br{$\bar{r}$}

\begin{document}
\begin{align}
	X&=x+\BigOSI{}{\epsilon^{3/2}}\\
	Y&=y+\BigOSI{}{\usebox{\br}^{3/2}} 
\end{align}
\end{document}
Stefan
LaTeX.org admin
Post Reply