Skip to main content
25 votes
Accepted

How to create an overlapped colored equation?

An attempt using annotate-equations package. \PassOptionsToPackage{svgnames}{xcolor} \documentclass{article} \usepackage{amsmath} \usepackage{annotate-equations} \begin{document} \newcommand\...
muzimuzhi Z's user avatar
21 votes

How can I write a complex exponential in LaTeX so that it looks presentable?

Is there a 'better' way to represent this? Use inline-math fraction or "slash" notation: e^{-i 2\pi/5}. Depending on the field you're in, it may be customary to place the 2\pi factor ahead ...
Mico's user avatar
  • 515k
15 votes
Accepted

Make single-dollar equation wrap

I would argue that your approach to inputting the numbers is faulty. What you're conveying to your readers is a collection of individual numbers; this makes the commas part of the textual or sentence ...
Mico's user avatar
  • 515k
15 votes

Why there is space in latex equation

I think there are two separate issues with your code. Do replace Z{^\prime}_{n+1} with either Z^{\prime}_{n+1} or, more succinctly, Z'_{n+1}. While $TBMSA$ and $LF$ clearly are not right, more ...
Mico's user avatar
  • 515k
13 votes

Square root symbols that don't match

Getting square roots signs right is a kind of black art. For the particular case, I'd ignore the depth of the radicands and add a phantom after the second square root to get the vertical spacing right....
egreg's user avatar
  • 1.1m
12 votes

How can I write a complex exponential in LaTeX so that it looks presentable?

My suggestions would be any of the following: \[ e^{-2\pi i/5} \qquad \exp\left(\frac{-2\pi i}{5}\right) \qquad \exp\left(-\frac{2}{5}\pi i\right) \] Other variants are also possible/...
karlh's user avatar
  • 774
12 votes
Accepted

Why there is space in latex equation

Math italic is designed with wide sidebearings to separate the letters so they do not look like a word, as adjacent letters usually denote multiplication of 1-letter variables. Use \mathrm{TBSMSA} to ...
David Carlisle's user avatar
11 votes
Accepted

What's the best way to line up equals on a line of text?

You can use aligned environment with t option: \documentclass{article} \usepackage{upgreek,amsmath} \begin{document} Le périmètre d'un cercle. L'aire d'un cercle. L'aire $\mathcal{A}$ d'un disque de ...
hair-splitter's user avatar
8 votes

Make single-dollar equation wrap

An old-style implementation: \documentclass{article} \usepackage{amsmath} \makeatletter \newcommand{\lon}[1]{% list of numbers \ifmmode \if@display \ERROR \else \lon@{#1}% \...
egreg's user avatar
  • 1.1m
8 votes

Inline Math in the end of the document

In plain TeX, we can use \everymath primitive register: \def\eqlist{} \def\collectedequations{\everymath={} \ifx\eqlist\empty no equations\else \eqlist \fi} \everymath={\savemath} \def\savemath#1${#...
wipet's user avatar
  • 75.7k
8 votes
Accepted

Long equation doesn't fit within text block

Here are two solutions that employ the same approach to line breaking as in @nplatis's answer. In the first solution, I use \exp notation instead of e^{...} notation. In the second, I additionally ...
Mico's user avatar
  • 515k
7 votes
Accepted

Align \vdots at the center of an `aligned` environment

You can define \cvdots macro which omits the \halign preamble and does centering of \vdots over two columns. \def\cvdots {\omit\span\omit \hfil$\vdots$\hfil} \begin{align*} a_{11}x_1 + \ldots + ...
wipet's user avatar
  • 75.7k
7 votes

What is the error(s) in this latex code for ECC equation?

You have two obvious errors: \mathbb{Z_\textit{p} lacks a closing brace and, at the end, \Big} lacks a backslash before }. However, you should be aware that LaTeX allows for much easier input: ...
egreg's user avatar
  • 1.1m
7 votes

How to have two & in align?

I would like to suggest you employ an alignat{2} environment. Do note that I wrote \mathopen] 0,\infty \mathclose[ rather than just ] 0,\infty [. This brings about an improved, i.e., larger, amount ...
Mico's user avatar
  • 515k
7 votes
Accepted

Smoothing a gaussian curve in tikz

Why not just add the two bell curves together? \documentclass[margin=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ declare function={gauss(\x)=3*exp(-(\x/3)^2);}, ...
John Kormylo's user avatar
  • 81.2k
7 votes
Accepted

How to add a left-hand brace to this system of equations?

The following solution employs the empheq package and its eponymous environment. Note that it's not necessary to employ {alignat}{3} for the equations at hand -- align will do just fine. \...
Mico's user avatar
  • 515k
7 votes

Inline Math in the end of the document

Beware of methods suggesting \everymath: \def\eqlist{} \def\collectedequations{\everymath={} \ifx\eqlist\empty no equations\else \eqlist \fi} \everymath={\savemath} \def\savemath#1${#1$\global\...
egreg's user avatar
  • 1.1m
7 votes
Accepted

Long equation doesn't go to a new line

equation is a display construct that adds vertical space so can not be used in \scalebox (you should anyway avoid scaling text) also equation will give an error if a blank line appears in the source. ...
David Carlisle's user avatar
7 votes

Is it possible to get the LaTeX command for special symbol, like J calligraphic with bar in the middle

I believe that what you call a "special J with bar in the middle" is actually an "F". % !TEX TS-program = pdflatex \documentclass{article} \usepackage[scr=esstix]{mathalpha} \...
Mico's user avatar
  • 515k
7 votes

How to split two answers from quadratic formula with arrows

You can do this with TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \node(formula){$x_{1,2}=\frac{-2\pm\sqrt{2^2-4\cdot1\cdot(-...
Ubiquitous's user avatar
  • 2,608
6 votes

Align \vdots at the center of an `aligned` environment

For the particular case, I'd trick TeX into thinking that 1 has the same width as q in the subscripts, so the alignment is automatic. \documentclass{article} \usepackage{amsmath} \begin{document} \[ ...
egreg's user avatar
  • 1.1m
6 votes
Accepted

Write group of equations on separate lines with "where" and "and" in between

You're quite likely using IEEEtran. Use aligned inside equation; don't use \left and \right when not needed; note \dots and not \ldots; check the double subscripts. \documentclass{IEEEtran} \...
egreg's user avatar
  • 1.1m
6 votes

How to have two & in align?

It works with align too. You only need to separate math columns with ampersand. Edit: However, using it you will not have (manual) control over distance between bit columns (as mentioned @Mico in his ...
Zarko's user avatar
  • 300k
6 votes
Accepted

Removing space generated by box of multiline sum subscript

I suggest you encase the material to the left of \equiv in a \smash[b]{...} directive. Observe that I've also inserted {} particles ("empty math atoms") at the ends of rows 1 and 2 in order ...
Mico's user avatar
  • 515k
6 votes

How to add a left-hand brace to this system of equations?

With {DispWithArrows} of witharrows. \documentclass[12pt,a4paper]{article} \usepackage{witharrows} \usepackage{amsmath} \begin{document} \begin{DispWithArrows}<> a_1x + b_1y + c_1z &= ...
F. Pantigny's user avatar
  • 43.2k
6 votes
Accepted

How can I number each line in a \split environment?

Something like this? \documentclass{article} % or some other suitable document class \usepackage{amsmath} % for 'alignat' environment \begin{document} \begin{alignat}{3} 0x_1& && ...
Mico's user avatar
  • 515k
6 votes
Accepted

Creating a complex aligned equation with blockarray

Here is a possibility with nicematrix. One way to guarantee alignment in different arrays is to make them both part of the same array (or in this case, the same NiceMatrix). \documentclass{article} \...
Sandy G's user avatar
  • 46.6k
6 votes
Accepted

How can I represent a math formula as a figure?

Despite the name, the figure environment can contain anything. For instance an equation, a picture, some text, whatever. \documentclass{article} \usepackage{mathtools}% Loads amsmath \usepackage{...
egreg's user avatar
  • 1.1m
6 votes

How to split two answers from quadratic formula with arrows

Without TikZ (update : Following NBur's reply, I have changed the position of the &). For the choice between cases and array, an interesting answer is given by : Cases vs. Array environments . \...
Alain Matthes's user avatar
6 votes

How to split two answers from quadratic formula with arrows

Without TikZ, but with cases and prettier alignment \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} x_{1,2}=\frac{-2\pm\sqrt{2^2-4\cdot1\cdot(-15)}}{2}=\frac{-2\...
NBur's user avatar
  • 5,166

Only top scored, non community-wiki answers of a minimum length are eligible