Home > vertical alignment > equality sign and fraction bar alignments in complex fractions around braces

equality sign and fraction bar alignments in complex fractions around braces

January 21Hits:1
Advertisement

When some math expressions such as complex fractions are around the braces which should be on the same baseline, besides, equality sign should be aligned with vinculum, how can we handle? For example, in the following formula, is it possible to make the equality signs aligned with the fraction bars?

\documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{equation} S_d=\left[\begin{array}{@{}c@{}} \cfrac{\displaystyle\sum_{j=1}^{n}{(d_j-\bar{d})^2}}{n-1} \end{array}\right]^{1/2} =\left[\begin{array}{@{}c@{}} \cfrac{\displaystyle\sum_{j=1}^{n}{d_j^2}-\cfrac{1}{n}\left(\sum_{j=1}^{n}{d_j}\right)^2}{n-1} \end{array}\right]^{1/2} \end{equation} \end{document} 

equality sign and fraction bar alignments in complex fractions around braces

Answers

Here's how I would typeset this:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
S_d  = \left[ \frac{1}{n-1} \sum_{j=1}^{n} (d_j-\bar{d})^2 \right]^{1/2}
     = \left[ \frac{1}{n-1} \right]^{1/2}
       \left[ \sum_{j=1}^{n} d_j^2
              - \frac{1}{n} \left( \sum_{j=1}^{n} d_j \right)^2
       \right]^{1/2}
\end{equation}
\end{document}

Herbert is quite right, the parentheses should always be symmetrical to the math baseline, and you should not use your above construct. Just try and avoid such fractions altogether.

equality sign and fraction bar alignments in complex fractions around braces

That is not easy in fact of your unbalanced fractions. From the rules of mathematical typesetting the parentheses are always symmetrical to the math baseline:

\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
S_d = \left[ \dfrac{\sum\limits_{j=1}^{n}{(d_j-\bar{d})^2}
             \vphantom{ \left(\displaystyle\sum\limits_{j=1}^{n}{d_j} \right)^2 }
             }{n-1}
      \right]^{1/2}
    = \left[ \dfrac{\sum\limits_{j=1}^{n}{d_j^2}-\cfrac{1}{n}
             \left(\sum\limits_{j=1}^{n}{d_j}\right)^2}{n-1}
      \right]^{1/2}
\end{equation}

\end{document}

Making the parentheses smaller doesn't really look good. Examples can be found in Mathmode.pdf.

equality sign and fraction bar alignments in complex fractions around braces

As Herbert mentioned, math typesetting isn’t really done this way anymore, but it’s what Karel Wick recommends in Rules for Type-setting Mathematics (1965). If you want this sort of thing in LaTeX, you can use the nath package which reproduces these rules. The drawback is that nath has a specific syntax for math, so you may have to rewrite all your formulas and if it’s for an article you’re going to publish, the journal may not want you to use nath. If none of these disadvantages bother you, here's what your equation would look like:

equality sign and fraction bar alignments in complex fractions around braces

Personally, I find this looks a bit strange and would prefer what Hendrik suggested in his answer. Here’s the code:

\documentclass[12pt]{article}
\usepackage{nath}
\begin{document}
\begin{equation}
S_d=[\frac{\sum_{j=1}^{n}(d_j-\bar{d})^2}{n-1}]^{1/2}
=[\frac{\sum_{j=1}^{n} d_j^2 - \frac{1}{n}(\sum_{j=1}^{n}{d_j})^2}{n-1}]^{1/2}
\end{equation}
\end{document}

Notice that, with nath, there is no need for \left and \right, the correct sizes are automatically chosen for you.

Related Articles

  • equality sign and fraction bar alignments in complex fractions around braces

    equality sign and fraction bar alignments in complex fractions around bracesJanuary 21

    When some math expressions such as complex fractions are around the braces which should be on the same baseline, besides, equality sign should be aligned with vinculum, how can we handle? For example, in the following formula, is it possible to make

  • Not equal sign (≠) with a vertical bar

    Not equal sign (≠) with a vertical barApril 11

    Is it possible to get a \neq but with a vertical bar instead of a slanted one? There are inequality operators like AMS's \gvertneqq that feature this kind of "not equal" but not without mixing it with other signs. \documentclass[a5paper]{article

  • How to align the equal signs in this equation such that the first line and last 2 lines align

    How to align the equal signs in this equation such that the first line and last 2 lines alignApril 28

    so I have an equation below. My latex code for it is: \begin{align*} CoJPoD_{ \{I_1, \cdots, I_{k-1}, I_{k+1}, \cdots, I_{n}\} | I_{k} } = CoJPoD_{ \{system \backslash I_{k}\} | I_k} \\ = P\left( X_1 \ge X_d^{I_1}, \cdots, X_{k-1} \ge X_d^{I_{k-1}},

  • Using tables to typeset proof - how to align equal signs?January 22

    I'm a student teaching myself to use LaTeX (and related tools) to type up my homework. It's going great, and I'm already very happy with what I've been able to do so far. Though, I have questions. I'm trying to type up a proof with steps in one colum

  • Alignment of equals sign in multiple align environments

    Alignment of equals sign in multiple align environmentsFebruary 23

    I have multiple align environments in my document, separated by a small paragraph of text: \begin{align*} foo &= something very very long compared to the other align \end{align*} explanation what I shall do now \begin{align*} foo' &= foo + short \

  • Problems with escaping the equals sign in a Watir Robot argumentJune 3

    We're currently using the very lovely Robot Framework for our automation. Unfortunately, we've run into a hitch with the '=' character - we have a number of places in the app where we have a link to click, and no other options for identifying that el

  • overset text over equal sign in in an Align environmentJanuary 7

    Look at the following example \begin{align} & x \\ \overset{\text{some long explanation}}= & foo \\ & = bar \end{align} what is the best way to get the equal signs aligned? Now I have seen different solution such as adding \overset{\hphantom{\

  • What is the meaning of an equal sign = or == at the end of a SSH public key?February 9

    I just noticed that most of the ssh pubkeys in my authorized_keys end on == or = E.g. ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA9ZUwxXn2HZAAUswoaV8t2sQPvolVWDI053f0giNN154Zyi9FtWJKvyLHXoxW4IzFxgx+m6EYqXG/XCtfamLhwvGZv9FXkgQKeF6HJv/rjyKRBHPRyX0vV4S9uQU+xQV7

  • How to get align or similar equation environment to use the whole line instead of centering around the equality sign

    How to get align or similar equation environment to use the whole line instead of centering around the equality signJanuary 13

    I'm creating a Beamer presentation in which a line in the equation environment should fill the whole screen and should not only be centered arround the equality sign. I think this looks nicer and is much more readable for the audience. Actually using

  • How to control the font size in complex fractions?

    How to control the font size in complex fractions? January 17

    This question already has an answer here: equal size numerator and denominator 1 answer I am writing an equation and for part of that, I have the following fraction: \begin{eqnarray} \frac{u_{fe}\frac{\frac{u_{i,j,k}^n+u_{i,j,k}^{*}}{2}+ \frac{u_{i+1

  • Haskell syntax for type definitions: why the equality sign?July 29

    I am a bit confused by the choice of Haskell syntax for type definitions, like in data Foo = Bar Namely: does the equality sign here really mean an equality in some subtle sense, or is it just a random notation choice? For example, in foo x y = bar y

  • Equal sign incorrectly aligns with subscript

    Equal sign incorrectly aligns with subscriptMarch 19

    If I type \mu_\bar{x}=\mu_x Then the equal sign aligns with the subscript \bar{x}. However, what I want is align the equal sign with the mu, which is the big character, on the left side. How should I change it? Also I want spaces surrounding the equa

  • Align long equation after equals sign

    Align long equation after equals signJune 14

    I see there are plenty of questions posted here with similar topics, but I can't find a solution to my question. Below is my latex code for a few equations. How can I force text on the 2nd, 3rd (and so on) lines to appear right below the equals sign?

  • "missing equal sign" with minimal OpenSSL configuration fileAugust 17

    I am trying to setup a certificate request generator script and having issues with missing equal sign errors. The config is not that big and I did not found any syntax errors. Having the original OpenSSL configuration file as template with the values

  • Equals sign in the pdftitle using hyperrefAugust 27

    I have a paper with an equation in the title, and I would like to include the equals sign in the pdf metadata by using the hyperref key "pdftitle", by including it as in the following: \hypersetup{pdftitle={P = NP}} But when I typeset this, the

  • Alternate "colon equals" sign

    Alternate "colon equals" sign October 17

    I like to use $:=$ for "is defined to be equal to", but this is never typeset with the symmetry one would like, as the colon is always too low relatively to the equals sign. Is there any way of getting this to appear correctly? --------------Sol

  • Extendible equals signNovember 2

    I have a command that has been floating around in my standard preamble for a while: \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:} It is meant to mimic the AMS-LaTeX extendible arrow symbols \xleftarrow and \xrightarrow. It's not

  • Align equals sign in table

    Align equals sign in tableNovember 5

    I am trying to align an equals sign between two sets of cells. The first table here doesn't want to align, whilst the second table does. Is there a more elegant way of doing this? \documentclass{article} \begin{document} \begin{table} \centering \beg

  • Question mark over equals sign January 20

    This question already has an answer here: Typeset an = with an ! above 5 answers I'd like to have output an equals sign that has a small question mark over the top of it. (I'm proving an equation, but it is not obvious until the final step that the e

  • =~ (equal-sign tilde) and m" - " in .htaccess directiveFebruary 8

    I saw this bit of code on an old forum post: SSLRequire %{HTTP_HOST} =~ m"\.secure\.powweb\.com" And I was just wondering what the =~ and m" ... " meant. I've been searching online and in the Apache documentation for any mention of the

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.551 s.