1

Below is an example of an asymmetrical limit (or uncertainty)

enter image description here

How can I typeset this in a \LaTeX equation? Such pair of numbers should be vertically stacked while being vertically center-aligned with rest of the equation.

Solution

$X^{+Y}_{-Z}$

user3728501
  • 1,021
  • @reportaman In such cases, one cannot write x=1 +0.1 -0.09 cm because this would look like an arithmetic expression, not an experimental measurement. The reader would think that this is equivalent to x=1.01 cm, and confusion would arise. In such cases, we have to present the uncertainty (the "plus and minus" \pm part) "stacked" so that the positive limit is stacked on top of the negative limit. – user3728501 Oct 11 '20 at 09:08
  • Related: https://tex.stackexchange.com/questions/200301/metrology-tolerance-and-fits – Steven B. Segletes Oct 22 '20 at 11:36

2 Answers2

5

Here's a way to stack asymmetrical limits using macro \Vectorstack from package stackengine (based on further clarification you provide in comments to your question):

Output: Screenshot of output

Code:

\documentclass{article}
\usepackage{stackengine}
\begin{document}
\[
  %\setstackgap{L}{\baselineskip} % Uncomment and change this if you want to adjust vertical spacing between stacked content
  A = B 
  \enskip \Vectorstack{+0.60 -0.59}
  \enskip \textrm{cm}
\]
\end{document}
codepoet
  • 1,316
1

I propose this solution using nccmath with the \mrel.

\documentclass[12pt]{article} 
\usepackage{nccmath}
\begin{document} $L=+0.39\!\mrel{+0.60\\[.12ex]-0.59} \mathrm{cm}$
\end{document}

Increasing the value of [...ex]:

\documentclass[12pt]{article} 
\usepackage{nccmath}
\begin{document} $L=+0.39\!\mrel{+0.60\\[2ex]-0.59} \mathrm{cm}$
\end{document}

enter image description here

Sebastiano
  • 54,118