New answers tagged

0 votes
Accepted

Labeling Equations in TOC

I don't know which document class you use. However from the pieces of code you shown, I didn't see how it will create a list of equations. Here is an example how to achieve it in report class. \...
user avatar
  • 4,578
3 votes

Equation with two sums but just one min and max

You make \sum\sum into a single mathop. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \underbrace{\mathop{\sum\sum}^{N_{el}}_{I=1} \frac{Z_I}{r_{iI}}}_{\hat{V_{ee}}} \] \end{...
user avatar
  • 994k
4 votes
Accepted

Changing the \sum symbol in fraction

As I don't know what \color{dca} is, I replaced it with IndianRed (from svgnames). Here is a simple solution: \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{amsmath} ...
user avatar
  • 261k
1 vote
Accepted

How do I write two equations next to each other and reference them?

Here is a way to do it (not knowing which packages you load): \documentclass{article} \usepackage{geometry} \usepackage{amsmath} \usepackage{esdiff} \usepackage{wasysym} \...
user avatar
  • 261k
0 votes

Align equation left

It has been some time, but let me mention another way. You can use '\hspace{10em}' at the end of any line and within few try you can figure out what value (instead 10) works best.
user avatar
  • 165
3 votes

Big optimization expression spanning both the columns of IEEE paper

The main problem is using a math font that is visually incompatible with the text font has an average character width quite larger than the text font Now, IEEEtran uses Times as the main text font ...
user avatar
  • 994k
3 votes

Big optimization expression spanning both the columns of IEEE paper

I suggest you abbreviate both instances of subject to to s.t. and the lone instance of Minimise to Min.. \documentclass{IEEEtran} \usepackage{amsmath} \DeclareMathOperator{\rk}{Rank} \usepackage{...
user avatar
  • 439k
0 votes

How to type this optimization problem in latex without equation number

Finally it doesn't seem to be possible to make it work with optidef. So I propose a solution with two alignedat environments: \documentclass{article} \usepackage{amsmath, optidef} \DeclareMathOperator{...
user avatar
  • 261k
2 votes
Accepted

how do I get an equation to look like this? \begin{cases} doesnt seem to do exactly

You can use \middle and array: \documentclass{article} \usepackage{amsmath} \begin{document} \[ S_{i}^{(l_k)}= \left\{ [f_j^{(l_k)};v_{j}^{(l_k)}-p_i]^T \;\middle|\; \begin{array}{@{}l@{}}...
user avatar
  • 994k
1 vote

how do I get an equation to look like this? \begin{cases} doesnt seem to do exactly

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} S = \left\{ [stuff]^T \middle\vert \begin{array}{l} Cond.1 \\ Cond.2 \\ Cond.3 \end{array}\right\} \end{equation} \end{...
user avatar
0 votes

Tilde character spacing too large while using fractions

I found the cause of this problem : it's in the use of the "accents" package : \usepackage{accents} I don't know the real reason behind this issue but it seems like this package interferes ...
user avatar
  • 185
0 votes

Tilde character spacing too large while using fractions

I am also unable to reproduce the behavior of the "tilde" accent character shown in the screen shot you posted. I'd like so suggest that you replace all \left and \right sizing directives ...
user avatar
  • 439k
1 vote

Tilde character spacing too large while using fractions

I have no problem with vertical spacing of the tildes. On another hand, the formula overflows into the default margin, so I added a third line and use the geometry package. I took the opportunity to ...
user avatar
  • 261k
1 vote

How to get sub-numbering on equations?

You can do it. But don't abuse flalign. \documentclass[fleqn,leqno]{article} \usepackage{amsmath} \usepackage{lipsum} % for context \makeatletter % from https://tex.stackexchange.com/a/261647/4427 % ...
user avatar
  • 994k
4 votes
Accepted

double-underline notation for matrices and single-underline notation for vectors

I still think that underlining is evil and really old-fashioned notation. Anyway, here's a working solution. \documentclass{article} \usepackage{amsmath} \makeatletter % overline \newcommand{\...
user avatar
  • 994k
3 votes

Enumerate specific equations with Roman numerals with stars

I would use \tag. After all, you just have one special group of equations and you'll need a label for each one of them. Using (modified) Mico's code \documentclass{article} \usepackage{amsmath} % for ...
user avatar
  • 994k
3 votes
Accepted

Enumerate specific equations with Roman numerals with stars

(I've updated the answer to handle the possibility -- not mentioned by the OP, but likely of some relevance to at least some readers -- that the hyperref package is loaded and that correct ...
user avatar
  • 439k
5 votes
Accepted

How to issue a warning if trying to reference a label in a starred equation environment?

The following causes \label calls from within equation* to print a warning: \documentclass{article} \usepackage{amsmath} \makeatletter \AddToHook{env/equation*/begin}{% \renewcommand*{\label@in@...
user avatar
  • 22.9k
4 votes
Accepted

How to enter the following two equations in Latex?

I guess there are (at least) two ways to interpret your question: mimic the "look" of the screenshot you posted, with its turgid arrow symbols, needlessly oversized delimiter symbols, and ...
user avatar
  • 439k
3 votes

Align multiple equations centering

Use gathered or gather depending whether you want a shared equation number \documentclass{article} \usepackage{amssymb,amsmath} \begin{document} equation \begin{equation} \begin{gathered} \Delta ...
user avatar
0 votes

Latex: auxiliary calculation

Finally, I did it the following way: \documentclass[12pt]{article} % create boxes: \usepackage{tikz} \usepackage[most]{tcolorbox} \tcbset{enhanced,boxrule=0pt, colback=white, borderline north={1mm}...
user avatar
2 votes

How to correctly Indent the equation?

If you want your = signs aligned, use a single align* environment. Also, Use \sin not sin to get the proper spacing and shape. Similarly for \cos, \tan, \log, \ln, etc. The {} after y' is unnecessary....
user avatar
  • 21.5k
0 votes

LaTeX software to evaluate expressions

I felt I should add this as an answer demonstrating the numerica package rather than just a comment, and because I feel it is probably the simplest answer. I note your example contains a complex ...
user avatar
4 votes

How set the bounding box for \middle

There are two independent aspects in your problem: in the standard Computer Modern math fonts, the largest size of \langle and \rangle covers a display style fraction; the delimiters' size is anyway ...
user avatar
  • 994k
8 votes
Accepted

How set the bounding box for \middle

This is an prime illustration for why relying on \left, \middle, and \right can be a poor idea. Just employ 4 instances each of \biggl\langle, \biggm\vert (and lose the \, spacers!), and \biggr\rangle,...
user avatar
  • 439k
2 votes

How set the bounding box for \middle

| can grow to the requested size, but <> has no arbitrary size extension so is limited to a fixed font-dependent set of sizes
user avatar
0 votes
Accepted

Cases error $ is added

The cases environment should be in math mode. (It doesn't start math mode itself.) \documentclass[12pt]{exam} \usepackage{amsmath} \begin{document} \(f(x)= \begin{cases} x+2,& \text{if } x\...
user avatar
  • 36.9k
1 vote
Accepted

How do I plot the solutions of an equation of a 3D Plot?

\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[view={10}{45}, zmin=0] \addplot3 [ domain=0:10, domain y=...
user avatar
3 votes

How to display or break a long equation properly?

If you are ok with the space, another way is to use sub-expressions with their definitions \documentclass[journal]{IEEEtran} \usepackage{kantlipsum} % \usepackage{blindtext} \usepackage{booktabs,...
user avatar
  • 849
4 votes
Accepted

How to display or break a long equation properly?

Mixing Computer Modern math with Times is really bad. If you load newtx (or mathptmx, if you want to be old-fashioned), the math will be compatible. \documentclass[journal]{IEEEtran} \usepackage{...
user avatar
  • 994k
2 votes

How to display or break a long equation properly?

Just make it smaller to fit the page (taken from here, example 1.1) \documentclass[journal]{IEEEtran} \usepackage{blindtext} \usepackage{booktabs,capt-of} \usepackage{graphicx} \usepackage{amsmath,...
user avatar
5 votes

How to display or break a long equation properly?

I suggest loading mathtools, which is a superset of amsmath and use its \splitfrac command: \documentclass[journal]{IEEEtran} \usepackage{blindtext} \usepackage{booktabs,capt-of} \...
user avatar
  • 261k
7 votes
Accepted

eqnarray.sty (equationarray) spacing

Why not using array? And why the b argument specifier? It's a standard environment, no need for it. Now let's look at the problem. The output log shows for the line before the first display ....\OT1/...
user avatar
  • 994k
2 votes
Accepted

Vertical spacing between equation and itemize environments

Here is a solution: with a patch for lists in beamer. using gather* (from amsmath package) instead of equation* Note: An equation in the last item of a list is only distinguished from an equation ...
user avatar
  • 68.1k
1 vote

How to adjust position of parameter description in an equation?

I'd not look for awkward alignments. The “where” text is not part of the equation and you can safely place it just after the equations. You readers will see the specification and mentally do the ...
user avatar
  • 994k
3 votes
Accepted

How to adjust position of parameter description in an equation?

Simply move it to text? \documentclass[journal]{IEEEtran} \usepackage{blindtext} \usepackage{amsmath, amssymb} \begin{document} \blindtext \begin{equation} \label{eq: label} \begin{split} x_{a,\Phi_1}...
user avatar
  • 255k
0 votes
Accepted

Eliminating dot separators in list of equations

Replace eqn with myequations in two lines \renewcommand{\cfteqnleader}{} \renewcommand{\cfteqnafterpnum}{\cftparfillskip} (currently I get errors complaining \cfteqnleader and \cfteqnafterpnum are ...
user avatar
  • 22.1k
3 votes

LaTeX long subequation

In the following answer, the focus of the formatting work is on balancing the "outer" parentheses (which I've converted to curly braces) across the three subequations. This is achieved by ...
user avatar
  • 439k
8 votes

LaTeX long subequation

I'd first get rid of all \left and \right commands that do nothing useful and something harmful. Next I'd use more lines even if some could fit in a merged line. Most important: blank lines inside ...
user avatar
  • 994k
3 votes

LaTeX long subequation

After rid of all unnecessary \left( and \right), replaced outer parenthesis with square brackets, use for the \bigl[ and \bigr] sizes, in each split breake long equation line into two parts and put ...
user avatar
  • 255k
0 votes

How continue an equation next line

I faced this situation today and the simplest solution is to use {align*} within the equation environment and double back slash \\ command at the location you want to start the next line. Although not ...
user avatar
0 votes

How to plot equation (not function) with TikZ

This (standing on the shoulder of giants) works. There is a warning Missing character: There is no ` in font nullfont! which I do not like at all, but I am not sure where it comes from. You must ...
user avatar
  • 30.4k
1 vote
Accepted

How to fit the matrix in the text block?

I shall focus on the final code chunk, i.e., \newline Now, $A \times Y =\begin{vmatrix} a_{1}+a_{2}\alpha_{1}+a_{3}\alpha_{1}^{2}+\cdots+a_{n}\alpha_{1}^{n-1} & a_{1}+a_{2}\alpha_{2}+a_{n}\...
user avatar
  • 439k
2 votes
Accepted

How to use page site for citation inside equation

With the shown definition \eqcite (and thus also \cite inside of equations) only takes one mandatory argument. This means it does not support biblatex's usual two optional arguments. With the ...
user avatar
  • 160k
0 votes

Locally prevent page break after a displayed equation

Elements you want be typeset together can be enclosed in minipage but it sometimes produces unexpected gaps. It's probably better to use floats. EDIT. In the example below, if I remove the second The ...
user avatar
  • 849
1 vote

Aligning equations with align

You asked in a follow-up comment: Do you know if it is somehow possible to control the spacing between the left-hand column of equations (m's) and the right-hand one? That's actually where the ...
user avatar
  • 439k
4 votes
Accepted

Alignat: column not flushing right to the margin

I suggest you use an align* environment and place the comments in \tag* "wrappers"; \tag* is a macro provided by the amsmath package. User @Celdor has already made this suggestion in a ...
user avatar
  • 439k
1 vote

Alignat: column not flushing right to the margin

You can create your own macro \commentedmath with two parameters: math and comment based on TeX primitive: \hbox to\hsize {$math$ \hss comment} For example, like this: \def\commentedmath#1#2{\par \...
user avatar
  • 53.6k
3 votes
Accepted

How to change number font in equation to text number font in LaTeX?

Is this the template for your university? If yes, you don't need to change it at all. Because this the default setting for the template. If you really want change it, everything you need was written ...
user avatar
  • 4,578
0 votes
Accepted

How to align equation on several characters

There are multiple ways to achieve your desired output. The code below shows 2 possible solutions. After i struggled a lot with it myself someone recommended me the array environment. Also an ...
user avatar
  • 136

Top 50 recent answers are included