Questions tagged [fractions]

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

Filter by
Sorted by
Tagged with
1
vote
3answers
52 views

How to put the numerator in same size as denominator while using brackets

I would like to know how to put the numerator of a fraction of the same size or at least proportional to the denominator when I use square brackets and fractions, as in the following example: \begin{...
1
vote
1answer
19 views

Size of fractions and spaces in arrays

I have the following code: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} $$\hat{x}_n(t)=\left\{ \begin{array}{cc} 1 & -1\leq t \leq -\frac{1}{n+1} \\ -(n+1) t &...
1
vote
0answers
33 views

! File ended while scanning use of \frac

I did not change anything since last time, but I am getting the error message: ! File ended while scanning use of \frac Btw I am a total noob when it comes to LATEX! I've already checked the questions ...
3
votes
1answer
30 views

Increase and decrease horizontal overline and the vertical distance

If I have this MWE, \documentclass[12pt]{article} \usepackage{amsmath,amssymb} \begin{document} \[\overline{\left(\frac{a}{b}\right)}\] \end{document} it is possible increase (without to use a rule-...
0
votes
0answers
33 views

How to display overline above a fraction?

I'd like to add a bar / overline above a fractional statement, such as the one in this image: I am using tasks package and this inside a \subparagraph inside a \paragraph.I have tried in some manners:...
5
votes
2answers
112 views

How to add space between variables and fraction lines

In this \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{...
5
votes
5answers
1k views

How to reduce the number “0” size to fit fraction “1/2”?

\documentclass{article} \usepackage{amsmath} \usepackage{array} \usepackage{mathtools} \begin{document} \renewcommand{\arraystretch}{1.2} \newcommand{\minus}{\scalebox{0.4}[1.0]{$-$}} \[ \begin{...
1
vote
2answers
32 views

equation environment and large fractions

Hello i am currently using the equation environment and trying to "prettily" write down the probability distribution function of the chi-distribution (https://en.wikipedia.org/wiki/...
9
votes
2answers
468 views

Combinatorial notation (\choose) not working with \frac

I want to display the following $p_N= \frac{{200 \choose 11}{ 200 \choose {N-189}}}{200 \choose N}$ However, texmaker gives me this error: Does anybody know why is that? I have tried replacing the ...
4
votes
2answers
201 views

How to type a formula as below? [duplicate]

The plus operator is not center aligned. Please help.
4
votes
1answer
245 views

Minus sign and fraction line perfectly aligned

The minus sign and the fraction line aren't perfectly aligned, probably due to the presence of brackets. So I've found a way to make them be, using \parbox \documentclass[12pt]{article} \usepackage{...
1
vote
2answers
54 views

Make all fraction bars have the same lenght in a set of equations

I am a begginer at LaTex Bassically i want every fraction bar to have the same lenght as the natural lenght of the biggest one I dont know if it would be better to use other command instead of ...
2
votes
2answers
339 views

How to split this into two lines

This is my code: \begin{equation} \text{Diluted EPS}=\frac{\text{Net Income}}{\text{Weighted average number of shares outstanding + New common shares that would have been issued at conversion}} \end{...
10
votes
2answers
832 views

Interpret a/(b+c) as \frac{a}{b+c}

Is it possible to make LaTeX, or a similar software, interpret a/b as \frac{a}{b}? Writing out (x+1)/((x)(x+2)) seems much easier than writing \frac{x+1}{(x)(x+2)}.
3
votes
2answers
72 views

Continued fraction

I am currently working on my bachelor thesis. I want to visualize a general continued fraction. I concatenate the fractions with the command \cfrac. The result is okay, but I rather want the last link ...
16
votes
2answers
549 views

Interesting recursive behaviour with \frac error

I have this code below. Obviously it's not actually valid code because there's no second argument to \frac, but nonetheless I'm curious why it produces what it does. \[ \text{abc$\frac{123}$} \] ...
0
votes
1answer
39 views

Graph a function with \frac

I need to graph the function f(s)=\frac{s^3+7s^2+9s-128} {s^2+15s+24} ,where s greater than zero, please help me...
0
votes
1answer
40 views

How do you end the “over” command?

I am trying to write something similar to $\frac{a}{b} more words$ but using over (it must be with over) but when writing $a\over b more words$ the "more words" appear in the denominator. ...
0
votes
0answers
26 views

Properly formatting a big fractional equation [Line won't change]

On solving a boundary value problem I have attained two coefficients which are huge even after simplification. I have the Latex code from Mathematica which I tried copy pasting in Overleaf and a ...
0
votes
0answers
37 views

dfrac/frac keeps repeating [duplicate]

I want to create this equation in overleaf: Here is my code trying to do so: \begin{equation} \textit{S = \dfrac{R - U}{1 - U}} \end{equation} However, I get this: It seems to be some sort of ...
2
votes
2answers
69 views

How to vertically align a math fraction inside table cell?

Consider the following minimal working example \documentclass[10pt]{article} \usepackage{amsmath} \usepackage{booktabs} \begin{document} \begin{table} \begin{center} \begin{tabular}{p{3cm}p{4cm}} \...
0
votes
0answers
21 views

Vertical align fractions and non fractions by their “=” in align*

Let's say I have something of the form: \begin{align*} (\lambda x.M)N &= M[x:=N] \\ M &= M \\ \frac{M = N}{N = M}\\ \frac{M=N \quad N=L}{M=L} \end{align*} Now how can I align the ...
1
vote
1answer
32 views

Horizontal spacing in fraction

Followed is a small fraction code. As you can see, the spacing around "+" is too small. We can add \: or \; around "+" to increase the spacing. But, if the equation is complex, adding \: for where it ...
0
votes
2answers
196 views

Math: How to typeset a fraction that is part of a fraction?

Kindly help me to typeset this equation using latex
0
votes
0answers
11 views

Enforce TeX math font size [duplicate]

I want to stop the math size from automatically shrinking in math mode. Usually when, for example, having a lot of nested fractions, the size automatically shrinks to make it all fit. But I want to ...
1
vote
1answer
71 views

How to write a horizontal partial derivative rather than vertical form in text?

I want to write below: (How can I write horizontally, rather than vertically)? My MWE: The partial derivative $\frac{\partial J}{\partial x_1}$ is car Output:
2
votes
1answer
65 views

Better dots for infinite continued fraction

My question is related to the out put of following code. I want the \ddots to start from the center of the plus sign and continue diagonally. The way it is right now is bit odd. Any help is much ...
1
vote
1answer
31 views

Overline and subscripts interfere with the fraction horizontal rule if I use small text

I am trying to typeset headings in a small tabular environment. I get interference with the horizontal rule in the fractional sign. I managed to fix it in a crude way. Is there a better solution? ...
4
votes
2answers
138 views

latex summation notation getting compressed

I have this code in latex \begin{equation} \hat{k}=\dfrac{1}{\Delta t}\ln{\left(\dfrac{n\sum_{t=0}^{n-\Delta t}r_t^2- \left(\sum_{t=0}^{n-\Delta t}r_t\right)^2}{n\sum_{t=0}^{n-\Delta t}r_{t+\...
0
votes
1answer
72 views

simplifying fractions/greatest common divisor

I'm pretty new to using LaTeX as a teacher and I'm experimenting with fractions. Most things seem to work fine, but I'm just not able to simplify these fractions. I guess I'd need to find the greatest ...
2
votes
1answer
56 views

Writing enlarged fractional exponents

I'm not able to write enlarged fractional exponents. For that purpose, '\frac' gives too small exponents, and '\dfrac' gives too large ones. $x^{\dfrac{12}{7}}-x^{\dfrac{5}{7}}$ This yields: But I ...
1
vote
3answers
50 views

Horizontally center fractions (and expressions) in table

I am trying to center my fractions, but it seems to be shifted upward relative to the center of the boxes. Here is the code: \documentclass[12pt]{article} \usepackage{amssymb, graphicx} \usepackage{...
0
votes
1answer
58 views

Why does (6-3x)/2 fail to render here?

I have the following code: $$f_ {Y\mid X}(y\mid x)=\frac{f_ {X,Y}(x,y)}{f_ {X}(x)}=\left\{ \begin{array}{ll} {\displaystyle \frac{1/2}{x/2}=\frac{1}{x}}, &\text{if}~0\leq x\leq 1~\text{and}~0\...
1
vote
1answer
82 views

Same height for matrices regardless of fractions inside [closed]

How can I force matrices (bmatrix) with the same number of rows to be the same height when only some entries include fractions (\frac)? I would prefer to increase the size of matrices displayed ...
2
votes
2answers
406 views

\frac not working as expected in \newcommand

I'm trying to create some shortcut for the Leibniz notation for partial derivatives. Here the code \newcommand{\px}[1][]{\frac{\partial{#1}}{\partial x}} When I invoke this without arg, it's work ...
1
vote
0answers
99 views

How to display UNICODE fraction characters in verbatim?

I have the following snippet in my document, but the ⅔ is not displaying: \begin{verbatim} This is not displayed: ⅔ \end{verbatim} The rendered version looks like this: Is there any document ...
0
votes
0answers
36 views

Vertical spacing of \circ used for degree within \frac [duplicate]

I noticed the different vertical spacing of \circ used for degree within \frac command. MWE: \documentclass{article} \begin{document} \[ \frac{180^\circ}{180^\circ} \] \end{document} Output: ...
3
votes
1answer
130 views

How to use tikzmark to label steps in math mode with fractions?

I have an equality between to fractions in math mode and want to be able to show how we got from one to another. I want to use arrows and label them. Ideally, it should look like this: I have the ...
4
votes
1answer
111 views

Triangle Fraction Diagrams: Segments Instead of Gaps

I would like to modify Mark Wibrow's triangular fraction diagrams so that black segments are drawn, rather than leaving a blank white space between the triangles. As I do not understand how the code ...
3
votes
2answers
223 views

Generalize TikZ Fraction Diagrams to any n-sided Polygon

I would like to extend Mark Wibrow's answer in this question to general polygons. The user would be able to type something like \begin{tikzpicture} \pic {fraction={style=8-gon, segment=radius, color=...
2
votes
1answer
71 views

Font feature +frac not applied on EBGaramond italic

I'm running into a problem using the +frac feature in italic text, though it seems to me that it should work. The feature doesn't seem to be applied properly unless I force the text into \upshape. It ...
3
votes
3answers
104 views

Increase the vertical space in a fraction

I intend to create a vertical space between the number 39 and the horizontal bar of the fraction, so as not to get crowded. How can I create the vertical space? \documentclass[a4paper,11pt]{book} \...
3
votes
2answers
83 views

Circuitikz: incorrect position of displaystyle fraction in bipoles (e.g. inductors, capacitors)

I have met a problem when drawing a circuit. I want to draw a circuit with "fraction" in label such as L/2, R_1/4, etc. However, if I use \dfrac, the denominator will overlap with some part of the ...
1
vote
1answer
105 views

Medium sized fraction macro, instead of using the nccmath package

We could get good looking medium sized fractions using the nccmath package. However, there may be some incompatibilities with other packages and I would prefer to get rid of that package, since I ...
0
votes
1answer
437 views

Typesetting commas in bracket vector notation

This is my first post so please go easy on me. I am writing a vector using the bracket notation as shown below: \[ \vec{u} = \left\langle \frac{1}{10} , \frac{1}{3} \right\rangle \] The comma ...
1
vote
1answer
68 views

fraction format problems in automated answer of linear systems

I'm trying to make an automated answer of linear systems, but I have some problems with fraction format. \documentclass{article} \usepackage{xparse,xfp,xfrac,amsmath,amsfonts} \usepackage[nice]{...
1
vote
1answer
82 views

Fraction mode using LaTeX

I'm trying to automate my class lessons to gen "standard answer". My problem is related to fraction mode. Let's take the answer: 0.33333333..., I would like it appears like 1/3
0
votes
1answer
76 views

Numerator jumping outside fraction inside tcolorbox/hbox

What's going on with my fraction???? \documentclass[a4paper,12pt]{report} \usepackage[many]{tcolorbox} \tcbset{enhanced,boxrule=0.8pt,bottomrule=1.6pt,arc=0pt,auto outer arc,lifted shadow={1mm}{-1mm}...
4
votes
2answers
146 views

How to color a fraction bar in mathematical mode?

when I use the solution given here, this is what I get: \documentclass{article} \usepackage[output-decimal-marker={,}]{siunitx} \usepackage[right]{eurosym} % from https://tex.stackexchange.com/a/...
4
votes
2answers
260 views

How to use a forward slash to display a fraction?

Using $\frac{x + 5}{y - 4}$ can make equations very long and difficult to read. I'd prefer to be able to write $(x + 5)/(y - 4)$ and have it interpreted as $\frac{x + 5}{y - 4}$. How could I write a ...

1
2 3 4 5
9