The 2024 Developer Survey results are live! See the results

Questions tagged [fractions]

This tag is for questions regarding the display of fractions and related problems.

571 questions
Filter by
Sorted by
Tagged with
114k views

How do I typeset arbitrary fractions like the standard symbol for .5 = ½?

I know I've seen somewhere how to typeset 1/2 as ½, but with arbitrary fractions (that is, a macro that takes two arguments and makes the first denominator and the second numerator...). Now I can't ...
• 15.6k
100k views

What is the difference between \over and \frac?

What is the difference between {some-expression}\over{another-expression} and \frac{some-expression}{another-expression} ? Which is preferable?
• 1,226
101k views

How to get a little frac

I am wondering how to make a fraction in LaTeX small enough to fit on a line, or at least just a little larger. I could have sworn I had seen this before but I just cannot find it. In particular, I ...
• 4,209
3k views

Improved kerning in fractions?

Question How can I apply selective kerning within the numerator and denominator of an inline fraction? Specifically, I'd like to: Tighten kerning after the numerator if it ends in 7 Loosen kerning ...
• 14k
147k views

• 29.1k
6k views

How can you change the width of a fraction bar?

I have an equation using fractions of fractions - much like \frac{\frac{a}{b}}{\frac{c}{d}} However, all of the fraction bars are the same width. I'd like to make the central bar wider than the ...
• 265
15k views

Annotating individual math terms with braces

I am trying to annotate individual terms of a mathematical expression, as depicted below. The problem I get is that the comment seems to be taken as part of the fraction, which unnecessarily extends ...
• 2,425
5k views

Reformat \frac depending on numerator/denominator size difference

Is it possible to detect cases where the second argument of \frac is much smaller than the first argument, and split it? Namely (I'm using a new macro name \wfrac to simplify things), \wfrac{x}{2} % ...
• 45.1k
10k views

How to typeset a continued fraction in the following format?

How does one typeset the following continued fraction as shown below? Source: Notes on continued fractions and recurrence sequences by Alfred van der Poorten. Note: Alf van der Poorten's style is ...
• 1,756
6k views

TikZ Fill for Fraction Diagram

I'm trying to shade in one third of this circle. Obviously, it's not working. What did I do wrong? I got no error messages for either of my attempts in the code below, but neither filled anything in....
• 3,041
3k views

Frac or inference rule with dotted line

I would like to have a \frac or mathpartir-style inference rule with a dotted rather than solid line, so that I can put fractions into inference rules without overloading horizontal bar. The ...
• 4,231
1k views

Automatically add fractions and reduce the result (if neccessary)

I'm trying to figure out how to reduce fractions. Adding fractions is no problem, see this example: \documentclass[parskip]{scrartcl} \usepackage[margin=15mm]{geometry} \usepackage{tikz} \newcommand{...
• 40.3k
11k views

too little space between the bar on the denominator and the horizontal line

Please see below: There is too little space between the horizontal line from \frac and the bar from \bar{h_1}. So, it is a little hard to read. Any alternative way to represent the upper bar? And, ...
• 9,588
9k views

Fraction with longer line

I'm trying to display some axioms and operational rules with LaTeX. Those are basically . They work quite well when used with frac, but it's not really nice, I'd like the fraction line to be a bit ...
18k views

displaystyle, dfrac, dcases

Am I correct in saying that the dcases environment replaces \frac with \dfrac? The replacement only occurs at the outer-most level of \frac, so if I have \documentclass{article} \usepackage{...
• 757
538 views

Aesthetic issue in fractions

While I was typing a document related to special relativity, I came across this slight misalignment in \frac{V}{c}(shown with huge text size so that the effect is easily seen) The 'problem' is that ...
598 views

Fractions' stretch and shrink [duplicate]

When TeX shrinks an equation, it only uses the shrink component of glue "at the outer level". For instance, numerator/denominator of fractions are not shrunk, as shown by the example below: first I ...
• 45.1k
2k views

In math mode, how do I make the fraction bar "invisible"?

I am trying to typeset a "fraction" without the fraction bar. I have tried to do this using the genfrac, but as in the example below, the numerator and denominator in genfrac are farther ...
• 1,269
1k views

How and whether to fine-tune the vertical placement of a fraction line

This is a question about the aesthetics of mathematical typesetting, as well as a technical question about LaTeX. I'm writing a lot of expressions like this: (\log\frac{p_{i\to j}}{p_{j\to i}} in a ...
• 4,289
1k views

How do I typeset continued fractions in Pringsheim's concise notation?

I would like to obtain the following formatting so as to write continued fractions in my equations without wasting vertical space. What I need is one command named \cFrac which writes one fraction ...
• 13.4k
838 views

How to align 2 equations in fraction at =?

I was trying to answer this question on another stackexchange forum, to say that they could use Latex instead, only to find I can't figure how to do this in Latex myself. Is it possible to have 2 ...
• 20.3k
12k views

Practical consequences of using \over vs. \frac?

This question explains the difference between \over and \frac and it seems as though the most experienced members unanimously agree that \over is inferior (if not something to be outright regretted); ...
• 1,767
3k views

\frac command: height of the numerator vs height of denominator

I have the following code: \underline{W}^1_{\,q,\rho} = \left\lceil \frac{\sum\limits_{v \in Q, v \neq q}\underline{C}_{\,v} + \sum\limits_{i=\rho+1}^{|\Omega^{(U)}_q|}p_i+ \sum\...
• 123
9k views

Increase size of fractions on multiple lines

Inside a matrix, I have some very loaded (subscripts, greek letters, \breve) fractions: Q_r = \begin{bmatrix} \frac{\partial \breve{y}_r}{\partial \theta_1}\bigg|_{t_1} & \...
• 449
2k views

• 1,177