4

I want to replicate the following fraction: large fraction with sums

However, I don't know, how I can get this nice diagonal fraction line. The nicefrac package did not display it like I would like to.

So far I used

\frac{dN}{dS} = \nicefrac{\frac{\sum_{p \in G}i_p^N}{T_G^N}}{\frac{\sum_{p \in G}i_p^S}{T_G^S}}

but that looks like this: enter image description here

Thanks in advance!

0

2 Answers 2

5

enter image description here

\middle but adjust the space slightly

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\[
\frac{dN}{dS} = \left.\frac{\sum_{p \in G}i_p^N}{T_G^N}
                \!\middle/\,
               \frac{\sum_{p \in G}i_p^S}{T_G^S}\right.
\]
\end{document}

2
  • Thanks! I didn't even know I can use \left. to produce an invisible character. What exactly does `\! ... ` do?
    – skranz
    Apr 5, 2022 at 8:47
  • 1
    @skranz \!is negative thin space (same width as \,but in the other direction) so here the total width of / is the same but I pulled it slightly under the numerator on the left and spaced it a little from the right. Try it without the \!and \,and see Apr 5, 2022 at 9:58
3

You can use \left/ and \right. to get what you want, and so the nicefrac package isn't necessary.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[\frac{dN}{dS} = \frac{\sum_{p \in G}i_p^N}{T_G^N}\left/~\frac{\sum_{p \in G}i_p^S}{T_G^S}\right.\]

\end{document}

enter image description here

You must log in to answer this question.

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