The \cfrac
needs a denominator so it treats the first two backslash \\
as the denominator, a backslash is always followed by a command (even if it is just a space), so what you did was define the denominator as a linebreak.
$\frac{\text{numerator}}\\\text{denominator is a linebreak, text follows the fraction}
is $$\cfrac {\text{numerator}}\\\text{denominator is a linebreak, text follows the fraction}$$ but since the backslash isn't define, one has to use \backslash
, then nothing appears in the denominator.
but it changes if an additional backslash is added, like this
\frac{\text{numerator}}\ \\\text{denominator is a space, linebreak works}
and you get this
$$\frac{\text{numerator}}\ \\\text{denominator is a space, linebreak works} $$
which gives you what you want.
Notice the space after the first backslash, it means that the denominator is just a space.
Assuming there is no space
\frac{\text{numerator}}\\\\text{denominator is a linebreak, linebreak works but text doesn't}
or there is a space after the first two backslash
\frac{\text{numerator}}\\ \\text{denominator is a linebreak, linebreak works but text doesn't}
it treats the first two backslashes \\
(a linebreak) as the denominator, and the last two \\
as another linebreak, thus rendering the rest as non-formatted text and you get this
$$\frac{\text{numerator}}\\\\text{denominator is a linebreak, linebreak works but text doesn't} $$
Now let's put the space after the first three backslash
\frac{\text{numerator}}\\\ \text{denominator is a linebreak,a space follows the fraction, and text works}
$$\frac{\text{numerator}}\\\ \text{denominator is a linebreak,a space follows the fraction, and text works}$$
Let's put spaces between all backlashes
\frac{\text{numerator}}\ \ \ \text{denominator is a space, two spaces follow the fraction, and text works}
$$\frac{\text{numerator}}\ \ \ \text{denominator is a space, two spaces follow the fraction, and text works} $$
The trick is simple, every backslash is followed by a command, even if it is just a space, for a linebreak, the command is another backslash. Backslashes are treated in the order in which they are written (from the first to the last)
I'm not sure of the termilogies I used or even my argument, so if anything is wrong, add your comment below.