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!


2 Answers 2


enter image description here

\middle but adjust the space slightly




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

  • Thanks! I didn't even know I can use \left. to produce an invisible character. What exactly does `\! ... ` do?
    – skranz
    Commented 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 Commented Apr 5, 2022 at 9:58

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



\[\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.\]


enter image description here

You must log in to answer this question.

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