{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}.

learn more… | top users | synonyms (2)

5
votes
2answers
2k views

Underbraces in Matrix Divided in Blocks

How to put underbraces, inside the parenthesis of a matrix, to name both sides of the blocks? \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{array} \begin{document} . . . \[ ...
16
votes
1answer
5k views

How To Change Math Font Only?

I'd like to keep my text in Helvetica as usual but would like to have my equations and formulas in Roman or MT Extra. So far, I've tried using different packages but that changes both the text and the ...
13
votes
3answers
13k views

Supremum of the infimum

Consider the following snippet: $$\text{d}_{H}(A,B) = \max\left\{ \sup_{a\in A} \inf_{b\in B} \text{d}(a,b),\sup_{b\in B} \inf_{a\in A}\text{d}(a,b)\right\}$$ In the output, the text under the ...
12
votes
4answers
3k views

How to edit the linear programming in LaTeX?

How to edit a linear programming as the following: Max z = x1 + 12x2 s.t. 3x1 + x2 + 12x3 ≤ 5 x1 + x3 ≤ 16 15x1 + x2 = 14 xj ≥ 0, j=1,2,3. I want the format to be ...
11
votes
6answers
502 views

Typesetting 144…4 with “n times” under the 4's is easy, but what about \sqrt{144…4}?

Inspired by this question on the math StackExchange, suppose you want to typeset the square root of the number 144...4, that is, 1 followed by n 4's. If you write $\sqrt{1\underbrace{44\ldots4}_{n\ ...
10
votes
3answers
1k views

How to create vertical and horizontal dotted lines in a matrix?

Similar to this question, I am trying to output a similar matrix with dotted line instead of dashed line. Is there anyway to do this? I also try to use these three packages: ...
10
votes
2answers
2k views

Force line break inside a \lim argument in align environment

Inside an align environment I have a \lim with two variables which should be displayed in two lines: \begin{align} ... f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\ ...
14
votes
2answers
397 views

Why does \widehat behave differently if I insert \hspace{0pt}?

I am getting some inexplicable behaviour from \widehat: \documentclass[12pt,a4paper]{article} \usepackage{amsfonts} \begin{document} \[ \fbox{$\widehat{\mathcal{C}}$}, ...
8
votes
4answers
441 views

How to construct a long equation that is split in LHS and RHS to occupy a narrow column?

I have a homework document using 2-column article document class as follows. \documentclass[twocolumn]{article} \usepackage[a4paper,margin=1cm]{geometry} \usepackage{amsmath} \begin{document} ...
7
votes
1answer
1k views

Coloured math in beamer

I have a question: Is there any way to have math (everything between $s) in different colour than text (for example, green) in beamer?
5
votes
2answers
3k views

How to put something at the top of the \longrightarrow?

I would like to put something at the top of the \longrightarrow, something like \longrightarrow^{k\rightarrow\infty}. However, instead of putting k\rightarrow\infty on the top right corner, I would ...
0
votes
2answers
2k views

\begin{equation}: “Display math should end with $$” error?

I'm pretty new to LaTeX, completely new actually, and there is one thing I can't quite understand. I get the error "Display math should end with $$" when writing an equation like this: ...
14
votes
3answers
1k views

mathop shifts the baseline, DeclareMathOperator doesn't

Here is a little example that illustrates this strange behaviour: \documentclass{article} \usepackage{amsmath} \DeclareMathOperator\foo{\mathbf{l}} \begin{document} ...
13
votes
1answer
341 views

\ifmmode doesn't seem to work correctly inside an array environment

I’m struggling with getting \ifmmode to work correctly when used inside an array environment which is inside a displaymath environment. Here is a minimal example: \documentclass{article} ...
12
votes
5answers
3k views

Define strange operators

I' looking for a symbol rendering the connected sum of $n$ topological spaces (or other quite strange topological operations) in a "product-like" manner... What For example in writing $$ ...
8
votes
1answer
1k views

siunitx: Bold single numeric cells

I'm struggling to make a single numeric cell in an siunitx table bold. (A similar question for making a whole column bold is available here.) I want to define a simple macro which I can set for the ...
6
votes
2answers
295 views

Problem with typesetting maths content in an unusual font in beamer

I want to typeset math in different font called Antykwa Torunska, which supports maths. Unfortunately, when using it in beamer the math font is switched to the standard math font of beamer. How can I ...
6
votes
1answer
253 views

Automatic reduplication of equal sign in the beginning of broken formula

Suppose we have the following code \documentclass{article} \begin{document} $a=b=c=d=e=f=g=h=i=j=k=l=m=n=o=p=q=r=s=t=u=v=w=x=y=z$ \end{document} which produces the following result I want to have ...
6
votes
2answers
390 views

How can I draw a dot under a symbol in math mode?

I'm trying to find the equivalent to \d (or \textsubdot) for the math mode.
6
votes
1answer
1k views

Displaying an equation in a list

How could one get a displayed equation inside a list environment, say itemize, so that the equation is both centered horizontally and on the same line as the bullet, but with the bullet still on the ...
4
votes
2answers
479 views

How I can typeset this equation with LaTeX?

I would like to typeset the enclosed equation but placing the last a_{i, j} in the same column as the above a_{i, j}+1 and a_{i, j}-1, and the b_i in the same column as the above b_i's and not as it ...
3
votes
1answer
307 views

Typesetting mathematical formulas in line breaking

When you typeset a mathematical formula is there a rule regarding the breaking of the formula in a new line, meaning if for instanse the formula breaks in a plus sign (+) or in a equal sign (=) then ...
28
votes
2answers
3k views

Drawing a hypergraph

What is the proper way to draw a hypergraph? Is there a package to do this, or is there an easy way to draw such diagrams with a common drawing method like tikz? I'm trying to draw something like
36
votes
6answers
1k views

Microtypography on equations

Is there a way to make all three lines of math in the code below take up the same amount of length by use of font expansion? I know too little about microtype to even see if it could offer a solution. ...
57
votes
5answers
101k views

How to add a matrix to a LaTeX document

How do we add a matrix to a LaTeX document?
23
votes
1answer
386 views

Sloppy \left and \right?

The \left and \right commands often produce improvidently large delimiters. It almost always looks better to use delimiters that are just slightly too small than delimiters that are too large. With ...
19
votes
3answers
860 views

How can I create a new extensible symbol?

Given an arbitrary thin vertical symbol, can I create a new math delimiter from it (and if so, how)? Edit: Ideally, I would like to be able to create an extensible symbol, either built out an ...
30
votes
4answers
5k views

How to have overlapping under-braces and over-braces

I am trying to typeset an equation that has overlapping over and under braces as per the image below: I have managed to typeset it using a sort of a hack, by typing the equation twice, once using ...
39
votes
4answers
3k views

What is the Necessity of $…$ Around Numbers?

I typed up an assignment with a lot of numbers in LaTeX and turned it in to my adviser. When he returned it to me with some corrections, one of which was a lot of $ around my numbers. I understand ...
13
votes
1answer
1k views

Which version of LaTeX permits more than 16 alphabets?

Sometimes I receive a message: ! LaTeX Error: Too many math alphabets used in version normal. I know that there is a limit of 16 alphabets at most allowed to one article. However this message ...
17
votes
1answer
842 views

Which command should I use for textual subscripts in math mode?

Textual subscripts like in W_{total} should be typeset in an upright text font (so that code isn't good practice), as has been discussed in various questions here. Now there are several ways to ...
16
votes
2answers
909 views

How to align nested cases?

Please consider the code bellow: \begin{align*} function = \begin{cases} case1 &\mbox{if } n = 0 \\ \begin{cases} case2 &\mbox{if } n = 1 \\ ...
16
votes
3answers
9k views

How to stack limits for maths operators?

I have a question on how is it possible to create a \sum with two lower limits directly positioned right underneath each other. I have tried hard and cant seem to get anywhere with it.
20
votes
2answers
2k views

Typesetting Right-to-Left math

UPDATE: I've managed to produce something that is aesthetically correct, however with a lot of "hardcoding" and trial and error to manually measure my spaces. Not to mention that I have to write my ...
17
votes
2answers
10k views

double perpendicular symbol (for independence)

I found from http://jblevins.org/notes/latex that I could use the independence symbol: \newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} ...
14
votes
3answers
1k views

How can I illustrate decimal to binary conversion?

As part of my homework for discrete math I need to convert different decimal values, both positive and negative, to 8-bit binary representations using signed magnitude, 1's complement, and 2's ...
13
votes
3answers
336 views

How could LaTeX replace the tokens <= by the command \leq?

How could LaTeX replace the tokens <= by the command \leq efficiently? Example 1: I have this code: \[ 2x <= 4x - 2 \] And I want to get after the compilation this: Example 2: \[ ...
27
votes
6answers
20k views

Typesetting of negative versus minus?

I've occasionally seen a negative (when a number is simply negative, not a subtraction), typeset as negative sign that's slightly skinnier and above the centre line of text. Is this proper notation ...
23
votes
3answers
1k views

maths nested superscripts and subscripts displayed incorrectly inline

I am having a strange bug when using nested superscripts and subscripts in inline math (displaystyle works fine). This behaviour is the same independently of the font used or the compiler (orginally ...
17
votes
4answers
11k views

Evaluation of Differentiation and Integration

I was having some thought about what would be the syntax to make the end point evaluation of derivatives or integrals. Such as making the | with the two end points of evaluation on the top an bottom ...
16
votes
3answers
3k views

Typesetting a Row Vector

In the question typesetting a column vector, a very nice solution was given for typesetting a column vector with an arbitrary number of rows. I am attempting to modify the code to produce row vectors ...
13
votes
2answers
9k views

How to get less spacing in math mode

LaTeX commands like this: Here again, four different simulations are run on networks of size $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G} = 250 \times\ 250 = 62500$, and ...
10
votes
4answers
4k views

Coding an equation with description

I want to code this equation in LaTeX: I'd like to know how to code the equation and the description below it with a reference as well.
9
votes
1answer
520 views

Can I make siunitx commands use serif fonts like the rest of the math in beamer?

In a beamer presentation I can use \usefonttheme[onlymath]{serif} to typeset the math in a serif font while the rest of the presentation is in a sans-serif font. But the \SI command from siunitx ...
9
votes
3answers
29k views

How to make math symbols bigger?

Is there a way to make math symbols bigger? Reason: I've used \sfrac{q}{m}, and those symbols appear far to small, so I would like to make them a bit bigger. edit: I just thought that \sfrac{q}{m} ...
7
votes
1answer
315 views

Looking for a smarter \left … \right

I'm looking for an automatic fence-resizing macro like the traditional \left and \right, but I need some more features (not to mention \left and \right are quite "buggy" and poorly spaced as the ...
17
votes
2answers
8k views

Force upright Greek letters with isomath

The isomath package makes it possible to typeset upright Greek letters via \mathrm and \mathbf. Is it it possible to force all Greek letters to be typeset upright unless specified otherwise, e.g. to ...
15
votes
4answers
5k views

Intertext vertical spacing

How do I reduce the vertical spacing of \intertext?
12
votes
2answers
7k views

Is there an “underscript” command?

Is there a way to do underscripts? By "underscript" I mean a small font underneath the text object like limits or sums have. I don't want it to behave like a math operator though, where it is typeset ...
10
votes
2answers
700 views

Preventing \MakeUppercase from affecting mathematics

Is there a way to prevent \MakeUppercase from affecting in-text equations? In this example, abc should change to ABC, but n should be left as it is. \documentclass{article} \begin{document} ...