1

Followed is a small fraction code. As you can see, the spacing around "+" is too small. We can add \: or \; around "+" to increase the spacing. But, if the equation is complex, adding \: for where it needs is annoying. Can we adjust the spacings easily?

\documentclass[a4paper]{article}
\usepackage{upgreek}

\begin{document}
$\mathsf{\upxi_{x}=\frac{\bigl(\frac{\uplambda_{x}}{90}\bigr)^2+1+\upeta_{x}}{2\bigl(\frac{\uplambda_{x}}{90}\bigr)^2}=\frac{(\frac{87.1}{90})^2+1+0.240}{2\bigl(\frac{87.1}{90}\bigr)^2}=}$
\end{document}

enter image description here

Edit 1: Using \dfrac looks better. We need the package amsmath.

\documentclass[a4paper]{article}
\usepackage{upgreek,amsmath}

\begin{document}
$\mathsf{\upxi_{x}=\dfrac{\bigl(\frac{\uplambda_{x}}{90}\bigr)^2+1+\upeta_{x}}{2\bigl(\frac{\uplambda_{x}}{90}\bigr)^2}=\dfrac{(\frac{87.1}{90})^2+1+0.240}{2\bigl(\frac{87.1}{90}\bigr)^2}=}$
\end{document}

better looking fraction

1 Answer 1

1

Given the complexity of the fraction expression, you may want to typeset it in display-style math mode instead of if inline or text-style math mode. In the following screenshot, the first row employs text-style math mode (as you do in the screenshot you posted), while the second row employs shows the same material in displaymath style.

If a \frac expression is encountered while TeX is in \displaystyle mode, the numerator and denominator terms are each typeset in \textstyle mode, with whitespace inserted between objects of type math-ord and math-bin, respectively. In contrast, if a \frac expression is encountered while TeX is in \textstyle mode, the numerator and denominator terms are each typeset in \scriptstyle mode. As you have (re)discovered, TeX is programmed to typeset scriptstyle (and scriptscriptstyle) material compactly, i.e., without whitespace around binary and relational operators.

enter image description here

For this screenshot shows, I've deleted the \bigl and \bigr sizing directives in the \frac that's processed in inline math mode.

\documentclass[a4paper]{article}
\usepackage{upgreek,amsmath}
\begin{document}
\begin{align*}
\mathsf{\upxi_{x}}
&=\textstyle
  \mathsf{\frac{(\frac{\uplambda_{x}}{90})^2+1+\upeta_{x}}{%
  2(\frac{\uplambda_{x}}{90})^2}
=\frac{(\frac{87.1}{90})^2+1+0.240}{%
  2(\frac{87.1}{90})^2}=\cdots}
\tag*{\ttfamily\string\textstyle}\\[2ex]
&=\mathsf{\frac{\bigl(\frac{\uplambda_{x}}{90}\bigr)^{\!2}+1+\upeta_{x}}{%
  2\bigl(\frac{\uplambda_{x}}{90}\bigr)^{\!2}}
=\frac{\bigl(\frac{87.1}{90}\bigr)^{\!2}+1+0.240}{%
  2\bigl(\frac{87.1}{90}\bigr)^{\!2}}=\cdots}
\tag*{\ttfamily\string\displaystyle}
\end{align*}

\medskip
As a standalone displaymath object:
\[ % <- initiate a display math group
\mathsf{\upxi_{x}
=\frac{\bigl(\frac{\uplambda_{x}}{90}\bigr)^{\!2}+1+\upeta_{x}}{%
 2\bigl(\frac{\uplambda_{x}}{90}\bigr)^{\!2}}
=\frac{\bigl(\frac{87.1}{90}\bigr)^{\!2}+1+0.240}{%
 2\bigl(\frac{87.1}{90}\bigr)^{\!2}}=\cdots}
\]
\end{document}
3
  • I am producing calculation sheet. It consists of several columns. The equation shown above is in the main column, which is required to be left aligned. Using \displaystyle makes it centred in default.
    – warem
    Jun 1, 2020 at 8:32
  • 1
    @warem - I can think of (at least) two ways to change the alignment of displayed equations from centered to flush-left (aka ragged-right). (a) Instead of writing \[ <stuff> \], write $\displaystyle <stuff>$. (b) Load the amsmath package with the option fleqn (short for "flush-left equations", I suppose) and issue the instruction \setlength{\mathindent}{0pt} in the preamble.
    – Mico
    Jun 1, 2020 at 8:56
  • I didn't try the option amsmath. But, $\displaystyle <stuff>$ does work. Wonderful!
    – warem
    Jun 1, 2020 at 9:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .