The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [math-mode]

{math-mode} is about typesetting mathematical content, e.g. tweaking the appearance of spacing and symbols in a formula, or producing specific mathematical constructs. For questions about "wrapper" environments like equation or align, consider the tag {equations}.

Filter by
Sorted by
Tagged with
2
votes
1answer
43 views

Number of long equation not below but above it

Is there a way to display the number of a long equation (which usually appears below it if place is missing) above the equation? That is, instead of what would appear if you compile the code below ...
3
votes
1answer
105 views

How to draw “flag format” lambda derivation diagrams as used in the book Type Theory and Formal Proof: An Introduction

I'd like to draw "flag format" diagrams for lambda derivation as used in the book "Type Theory and Formal Proof: An Introduction". Below is an example in Chapter 2 of the book. How can I do it? Thanks....
0
votes
0answers
22 views

How can I use shorter minus signs in math subscripts?

How can I automatically replace minus signs in subscripts $x_{y-z}$ with text mode minus signs $x_{y\text{-}z}$ without having to type the longer form every time?
0
votes
2answers
58 views

Too much empty space underneath \sqrt

The following math command $\sqrt{GM/a_p^3}$ produces excessive unnecessary empty space between the argument of the \sqrt and the horizontal line of the sqrt, which in turn makes the containing text ...
1
vote
0answers
33 views

How to add white space to variables?

I use variables in math mode with subscripts before and after the variable name itself, like {}_{B}\vec{a}_{GP}^{} In case I have equations where these are multiplied, one cannot tell which ...
8
votes
2answers
73 views

Regular sized fonts in oubraces package

I am using the oubraces package to get overlapping over/underbraces in an equation. My equation is in the following MWE: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{oubraces} \...
2
votes
1answer
45 views

Capital Greek \mathtt not showing in arxiv

I need to write something like \mathtt{\Pi}, which renders nicely on my mac but both on arxiv and on coworkers' laptops does not work. How can i typeset \mathtt{\Pi} in any latex document? Bonus ...
7
votes
2answers
93 views

Custom align environment which auto breaks line before = and aligns at =

\documentclass{article} \usepackage{mathtools} \DeclareMathOperator{\lcm}{lcm} \begin{document} \begin{align*} \lcm(13, 7) &= (13 \cdot 7):\gcd(13, 7) \\ &= (13 \cdot 7):1 \\...
8
votes
2answers
182 views

Define a command differently in inline vs display mode

I would like to have a command \catlim which behaves differently in inline vs in display mode. Namely, in inline mode, it should be equivalent to \lim and in display mode, it should be equivalent to \...
3
votes
1answer
40 views

`lmodern` package reduces the size of automatically sized delimiters in math mode

Including lmodern package reduces the size of \left and \right delimiters. For example, try this with and without lmodern: %!TEX encoding = UTF-8 Unicode \documentclass[a4paper,12pt]{article} \...
-1
votes
2answers
68 views

How to type some special mathematical expressions or symbols

I have a problem with typing some special mathematical expressions or symbols. They are 1: 2: 3: and I need a refined form of in which the \right> is typed better than it is.
4
votes
1answer
36 views

Inserting unicode symbol through glyph code in math

I realise many similar questions have been made but, after two weeks googling the net and searching on this site without results, I too must ask about this. I have a document, to compile in XeTeX, ...
4
votes
0answers
79 views

Logic quantifiers displayed wrong when using newpxmath

When using the package newpxmath, the quantifiers \foralland \exists are displayed as \hslash and \hbar, respectively. See the following MWE: \documentclass{article} \usepackage[T1]{fontenc} \...
0
votes
1answer
62 views

`\int` and `\Sigma` not showing in `kaobook`

Project can be found in Overleaf here: https://www.overleaf.com/read/txwdgwzrfmyk For some reason, \int, \iint and \Sigma do not show up anymore and I cannot seem to solve the problem. Any ideas?
0
votes
0answers
16 views

Left and right brackets with line breaks [duplicate]

The code below generates the following formula: \begin{aligned} \nabla (D_{i,j}\nabla u_{i,j}) = &-\frac{1}{2(\Delta x)^2}[(D_{i,j}+D_{i,j-1}) (u_{i,j}-u_{i,j-1}) + (D_{i,j}+D_{i,j+1})(u_{i,j+1}-...
2
votes
0answers
49 views

Converting MathML to LaTeX: Issue on limits positions on Summation symbol

When using David Carlisle's stylesheet to convert MathML to LaTeX, in most cases, the upper and lower limits on Summation symbol are correctly placed on above and below the summation symbol. But when ...
1
vote
1answer
15 views

How to control the distances above and below array environment when putting it inside \left| and right|?

I am trying to write custom commands to allow faster writing of 2 by 2 matrices without having to use array each time I need that. The output is good, but since the matrices will be a part of larger ...
2
votes
1answer
43 views

WileyNJD-v2.cls is not printing the exact math equation I typed

\documentclass[AMA,STIX1COL]{WileyNJD-v2} \begin{document} \begin{equation} \dot{x}=\tilde{x}+\hat{x} \end{equation} \end{document} gives me the following pdf view Is anyone experiencing ...
5
votes
2answers
608 views

How to write Gaussian reduction?

I am still a newbie in LaTeX and I am trying to write something like that but I couldn't find how to do so. Is there an efficient way to write this and if I have multiple steps to show in the ...
0
votes
0answers
15 views

How can I have a column separator after an equals sign in an “aligned” environment?

I understand that the "aligned" environment is meant to be used like this: \[ \begin{aligned} A &= bc \\ &= cd \end{aligned} \] This works and looks quite nice. But what if both the A part ...
3
votes
1answer
54 views

How can I put a unary minus sign after a column separator?

I am using the aligned environment in order to have a sequence of left-aligned equations. In this latex code: \[ \begin{aligned} & a = b \\ & -c = d \end{aligned} \] There is some space ...
0
votes
0answers
36 views

Better-looking absolute signs?

There are already several questions about absolute signs, like this one. My question is different in that I'm not satisfied with the typesetting of the absolute sign offered by any of the options I ...
0
votes
0answers
27 views

hyperreferencing \hat, \tilde and other math accents

I am unsuccessfully trying to have variants of the macros: \hat, \tilde, \check, \grave, ... such that the accent is possibly clickable and gives a link to some other part of the document (using \...
2
votes
2answers
87 views

How to define the symbol by command?

There is a notation: \mathbf{P}^{m}_{b}(n) How can it be defined using \newcommand ? PS The variables m, b, n should be as arguments
2
votes
3answers
50 views

Math expressions in italic text have more space on the right side than the left side

Minimal reproducible example: \documentclass{article} \usepackage{amsmath} \newtheorem{lemma}{Lemma} \begin{document} \begin{lemma} Suppose that \(a\) and \(b\) are integers. \end{lemma} \end{...
0
votes
0answers
24 views

Reliably use \overline in minted code

How can I (reliably) use \overline in minted code? For example, these work: \documentclass{article} \usepackage{newpxtext} \usepackage{newpxmath} \usepackage{minted} \newmintinline{ocaml}{...
4
votes
1answer
56 views

ConTeXt: custom \intertext

In a ConTeXt file, I would like to insert a line of text inside \eqalign. When I use \intertext: \starttext \startalignment[middle] $\eqalign{ a &= b \cr \intertext{and} b &= c \cr }$ \...
9
votes
7answers
561 views

Big Bracket for equations

How can I add the big bracket at the side of my equations, just like in the photo? Below is my code for the equations. \begin{align} \frac{dS_d}{dt}&= A + \lambda_dR_d + \sigma_d(1-\gamma_d)E_d -...
1
vote
1answer
58 views

luatex / tex without tex / parse math

Inspired by the article TeX without TeX on the LuaTeX wiki, I am curious if I can replicate the whole LaTeX parsing-to-rendering pipeline in a lua script. I am currently stuck with math -- the ...
1
vote
1answer
35 views

Сommon font for formulas and text

I use PSCyr to use TimesNewRoman. This command \renewcommand{\rmdefault}{ftm} does it succesfully for text and doesn't make corrections to math-mode. How can I use TimesNewRoman for formulas without ...
6
votes
3answers
196 views

Use `\big\vert f(x) \big\vert` or `\big\lvert f(x) \big\rvert` or `\bigl\lvert f(x) \bigr\rvert`

For typesetting the absolute value of $f(x)$, which of the following gives the proper spacing about "$f(x)$"? $\big\vert f(x) \big\vert$ $\big\lvert f(x) \big\rvert$ $\bigl\lvert f(x) \bigr\rvert$
0
votes
0answers
34 views

{xe|lua}latex + LTL symbols + glossaries = bad spacing around LTL symbols

Continuing hyperref + glossaries + latex = bad spacing around math relations, let us consider an example of typesetting linear-time logic formulas: \documentclass{article} \usepackage{mathtools}%%% ...
0
votes
2answers
67 views

Different sizes of \Delta and \nabla

Math symbols \Delta and \nabla display different sizes in the following code within a text, $\Delta P_1 \rightarrow \nabla q_1 $ giving me the result shown on this pic Any suggestion? MWE: \...
0
votes
1answer
23 views

How to prevent spaces around a binary relation in math mode?

I'm trying to add a subscript both before and after the \cong symbol, but the problem I'm having is that because it is a binary operator, I'm getting spacing between the prescript and the symbol. I ...
0
votes
2answers
34 views

I need to solve the problem of Missing delimiter (. inserted)?

{\small \begin{multline} \label{eq:kinem} ^{i-1}\mathit{T}_i = \left[ \begin{matrix} \cos^2\phi_i(\cos\kappa_i s_i -1)+1 \\ \sin\phi_i \cos\phi_i (\cos\kappa_i s_i -1) \\ \cos\phi_i \sin\kappa_i s_i\...
-3
votes
1answer
79 views

How Can I write this equation in latex [duplicate]

I am still new in latex...I have tried many times to write this equation in latex, but no way...always error...any help, please. My Regards.
3
votes
1answer
137 views

What is the \v{} in $\v{x}$ stands for?

It seems \v is like \emph or \textbf to represent the letter or number in other forms. But what does it stand for? Is there some other not common character transformation in LaTeX?
0
votes
1answer
144 views

Is this a bug in LaTeX?

I have tried to use this symbol in one of my equations: \mathfrak{\mathcal{l}} But, instead of showing that letter in mathcal and mathfrak styles, it shows updownarrow?! I mean: \mathfrak{\mathcal{...
3
votes
2answers
44 views

Norm with triple vertical lines using `DeclarePairedDelimiter`

I would like to declare a paired delimiter for a "triple norm". A answer to this question already exists (cf. Spacing between triple vertical lines), however, as I'm already using mathtools' ...
3
votes
1answer
83 views

odd (?) spacing for logic notation

I write code: $\sim(p\land q)\iff (\sim p\lor \sim q)$ and my output is like this: As you can see, the \land symbol is nice in between 'p' and 'q', but the \lor symbol stick somehow to the left, to ...
2
votes
1answer
26 views

Inserting uppercase greek directly into mathmode with fontspec

This solution for inserting lowercase greek directly in mathmode works just fine for me. However I have not yet been able to use the same trick for uppercase letters. What went wrong? Here is a ...
1
vote
1answer
33 views

How to realise curved slash in mathmode?

As in the picture, there is a X//H with the double slash curved. It seems \wr is similar to this symbol, but not oblique enough and \big does not work for \wr. How can I type this double curved ...
0
votes
0answers
56 views

Index mathematical symbols

I want to put mathematical symbols in my index. For example, \vec and @. To this end I wrote a command that sorts mathematical index entries to the beginning of the index. Sometimes the command works ...
2
votes
2answers
60 views

Problem with units in math mode

I'm having problems with the following equation: \[\frac{dT(t)}{dt} =-1^{\circ}F \text{per hour}\] it displays: How do I make "per hour" in normal text form rather than italicized?
0
votes
2answers
34 views

Trying to Display ' apostrophe

I need to get what's on the screenshot. I have tried it by using this: $\text{\textbf{x}}^{'}$ but it does not work.
2
votes
2answers
103 views

Change font of single greek letter in math environment for all equations (classicthesis.sty)

I am using the classicthesis style (not the whole package, just the .sty) to write a (very long) document, and I don't like the Euler font for \xi in the math environment. This is an example with the ...
1
vote
1answer
26 views

Notation for a sample space

I would like to write the sample space for rolling two fair six-sided dice once. It would look like this: S = {(1, 1), (1, 2), ..., (1, 6), (2, 1), (2, 2), ..., (2, 6), ... ... ... ...
1
vote
1answer
44 views

How are proofs normally constructed in a write up, in one line or split up into multiple lines?

Here is the same proof formatted two different ways. My questions is what is the standard for a writeup like a homework assignment? I think the first one looks better but I don't think that is the way ...
1
vote
1answer
33 views

What's the code for “evaluated at” line with separate limits? [duplicate]

I want the limits separated, like in the second one here: TOO CLOSE: $\int_{a}^{b}$ RIGHT: $\int\limits_{a}^{b}$ How to I do the same thing with the vertical line "evaluated at"-limits? TOO CLOSE: $...
2
votes
1answer
30 views

automated arrow length

I am looking for an automated way to fix arrows' length in an aligned arrangement. There are two-level approaches, such as https://tex.stackexchange.com/a/413486/195378, where the length of the second ...