New answers tagged

1

just answering your comment under leandriis answer, you can simply rotate the text directly there is no need for a multirow, also as I commented previously in chat I would never use tabularx for a table of data like this, tabularx is all about tables of text and line breaking in columns. \documentclass{article} \usepackage{float, enumitem, amsmath} \...


2

The following should work: \documentclass{article} \usepackage{float, enumitem, amsmath} \usepackage{rotating} \usepackage{booktabs, makecell, multirow, tabularx, threeparttable} \renewcommand\theadfont{\small\bfseries} \renewcommand\theadgape{} \usepackage{colortbl, color} %I preffer that instead of xcolor because xcolor give me errors with beamer \...


1

\DeclareMathSizes{12}{14}{10}{8} solved it. Make sure that the first parameter is equal to your used standard text font size.


4

Since this is a multiline display, because it has two numbered items, you need align and can nest split inside it. I moved the “f_x” term at the beginning to get better breaks: the “alpha” and “beta” terms cannot be squeezed in one line, unless you have a very wide text block. Note that I smashed the bottom of the fraction so not to push down the second ...


1

You could use the align environment with \nonumber, which suppresses labeling for specified rows: \begin{align} \frac{\partial x_{t,i}}{\partial t} &=&& \alpha(x_{t,i-1}-2x_{t,i}+x_{t,i+1})- \beta(x_{t,i-2}-4x_{t,i-1}+6x_{t,i}-4x_{t,i+1}+x_{t,i+2}) \nonumber\\ &&&+ f_{x}(x_{t,i},y_{t,i})\\ &=&& -\beta x_{t,i-2}+(\alpha+4\...


1

You need to provide the instruction \allowdisplaybreaks to give permission to LaTeX to insert a pagebreak somewhere in the long align* environment. I would also attempt to provide more visual "rhythm", say by not aligning all rows on the exact same (vertical) line. I would also like to suggest that the Then: statements be taken out of the equation by ...


3

A last solution with the \ArrowBetweenLines command from mathtools: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{alignat*}{2} f(x) &= \sin(x) & & \\ \ArrowBetweenLines*[,\enspace \forall x\in {[0,1]}] g(x) &= \cos(x) & & \end{alignat*} \end{document}


5

Another possibility using the empheq package \documentclass{article} \usepackage{empheq} \begin{document} \begin{empheq}[right={\empheqrbrace, \qquad x \in [0, 1]}]{align*} f(x) &= \sin(x) \\ g(x) &= \cos(x) \end{empheq} \begin{empheq}[right={, \qquad x \in [0, 1]}]{align*} f(x) &= \sin(x) \\ g(x) &= \cos(x) \end{empheq} ...


6

You can use aligned to generate an align-like block, and then place the conditions after it. I don't particularly like the placement of ,, so suggest that you remove it since it makes sense without it. Alternatively one can use an rcases environment (from mathtools), perhaps. \documentclass{article} \usepackage{mathtools} \begin{document} \[ \begin{...


2

I'd simply use a single column array (and avoid pure colors): \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} \newcommand{\redtt}[1]{\textcolor{red!90!blue}{\mathtt{#1}}} \begin{document} \[ \left[\begin{array}{@{}ccc|c@{}} 1 & 0 & 0 & \redtt{b1} \\ 0 & 1 & 1 & \redtt{b2} \\ 0 & 0 & 1 & \redtt{...


6

Please consider posting complete examples such that others do not have to reverse engineer commands like \redtt. As for your question, you can use aligned or an array. \documentclass{article} \usepackage{amsmath} \usepackage{array} \usepackage{xcolor} \newcommand{\redtt}[1]{\textcolor{red}{\mathtt{#1}}} \begin{document} \begin{align*} \left[\begin{array}...


1

According to your comments, there's a sectioning header followed by a long-ish align environment at the top of the next page. Moreover, you seem to be unsure as to whether it's a good idea to allow page breaks in align and gather environments (by making scope of \allowdisplaybreaks either global or local. If you're ok with a page break being inserted ...


2

Please always provide MWE, which reproduce your problem. Based on guessing ... \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} I_i & = O_i, && i = 1,...k \end{align} \end{document}


0

You could use \hskip x\linewidth or \hspace{x\linewidth}, vary the x to the desired space/location. I presume that you use documentclass (article.cls) and amsmath.sty package. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \hspace{0.25\linewidth} I_i = O_i, \hspace{0.25\linewidth} \forall\ i = 1,...k \end{align} \end{document}...


3

The align environment does not do what you think it should. \documentclass{article} \usepackage{amsmath} \usepackage{xcolor} % for the guide rule \begin{document} \noindent\smash{\makebox[\textwidth]{\hfill\color{black!20}\vrule depth \textheight\hfill}} First example: \begin{align*} a &= bbbbbbbbbbbbbb \\ c &= d \end{align*} \makebox[\textwidth]{...


0

align's priority is to align the relation symbols preceded by & with each other. It then centers the box wrapping the entire contents of the environment. Something like the below. General tips: don't use \\ after the last line, and put the & before, and not after, the relation symbol. Otherwise see also What's the best way to align binary operators ...


0

As far as I know, it finds the position most to the right that will fit all information after the &-sign in the same position. So, if you type \begin{align*} a &= bbbbbbbbbbbbbb \\ c &= d \end{align*} there will be no difference whether you use the &-sign or not. However, if you type \begin{align*} a &= bbbbbbbbbbbbbb \\ cccccccc &...


1

You can have equations centred and the text aligned on the right using a combination of alignat and \rlap (within certain limits): \documentclass{article} \usepackage{showframe} \renewcommand{\ShowFrameLinethickness}{0.2pt} \usepackage{mathtools} \DeclarePairedDelimiter{\norm}\lVert\rVert \begin{document} \setcounter{section}{3} \setcounter{equation}{23} ...


1

It looks like you're using an align environment, or maybe an aligned environment, but failed to provide alignment points (& characters). Moreover, you may have meant to create 2 separate columns of material, with expressions involving (x-x_0) on the left and those involving (x_0) on the right. In the following, the material within each column is aligned ...


2

\documentclass[12pt,a4paper]{report} \usepackage{mathbbol} \usepackage{mathtools} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{braket} \begin{document} \begin{align*} & \left(1-\iota\frac{J_x\epsilon}{\hbar}-\frac{\epsilon^2}{2!}\frac{J_x^2}{\hbar^2}+\ldots\right)\left(1-\iota\frac{J_y\epsilon}{\hbar}-\frac{\...


2

I am not familiar with forest package, hence my answer may contain non-standard practices and even mistakes. Note The option node options={text width=3cm, align=center, anchor=south}} is added. The block/.style={...} is redefined inside your forest environment, hence I removed that copy from \tikzset{...}. \documentclass[tikz, border=5mm]{standalone} \...


3

I see no need for the & symbol before \forall i,j,t in the second row. A \quad or \qquad spacing directive should suffice. I would use an aligned environment inside an equation environment; this setup generates a single equation number, with the optional argument of aligned ([t] or [b] indicating whether the equation number should be placed at the top ...


5

You did not show the error mesage which is: ! Undefined control sequence. <argument> \bm {K} &= \sigma _0\\ \text {foo} &= \text {bar} l.25 \end{align} ? So this is showing you that the undefined command is \bm for which you need to load the bm package.


4

There are several options, the perhaps simplest ones are set the baseline of the tikzpictures appropriately, or use remember picture to add an overlay path that contains the arrow. The first two examples set the baseline of the diagrams to the bottom nodes, the other two examples to the center. \documentclass{article} \usepackage{amssymb} \usepackage{...


0

\begin{tabular}{clcc} $ 6 \times \left( 3+5 \right)$ & $= 6 \times \left( 8 \right)$ &&= 48\\ $ 6 \times \left( 3+5 \right)$ & $= 6 \times 3 + 6 \times 5 $&$= 18 + 30$ &= 48 \end{tabular} You can try this. This looks better than align.


4

As suggested in the comments, you can use the array environment inside an equation. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} \begin{equation} \begin{array}{rc} s =& a + b + c\\ +& de + fg\\ +& h \end{array} \end{equation} \end{document}


0

\documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \begin{document} % % You can use tablar envronment with flexibility % For proper orientation of negative numbers better use r in tabular % environment \[ \left[ \begin{tabular}{rrr} 1 & -9 & 3 \\ 1 & 2 & -2 \\ -2 ...


2

Use the tocloft package. % tocauthorprob.tex SE 545459 \documentclass{article} \usepackage{tocloft} \renewcommand{\cftsubsecleader}{} % no leader between subsection title and page number \begin{document} \tableofcontents \section{A section} \subsection{TITLE \hfill \textit{AUTHOR}} \end{document} Read the documentation, texdoc tocloft for details about ...


3

It seems that you want one of the following (it wasn't clear if you wanted alignment or not as you used align but specified no alignment points) so I used gather for no alignment or align for aligned =, both center by defailt so no \centerline or \centering is needed. \documentclass{article} \usepackage{mathtools,amssymb} \begin{document} \begin{table*} \...


2

The problem is that the plus sign overshoots the minus sign, while both have the same width, as far as TeX is concerned. The \boxempty symbol of stmaryrd has the same width as both. You can work around the issue by using a slightly smaller plus, raised by a small amount so it still sits well with respect to the formula axis. The gray line in the picture ...


1

As I said in my comment, you have fallen into two bugs caused by someone else. First bug is in CM fonts, where the minus shape from cmsy10 is smaller than plus shape from cmr10. Second bug is in AMS fonts, where the symbols boxplus, boxminus from msam10 are not centered to math axis. If you use another math fonts (for example Unicode Latin Modern Math) then ...


3

It's a mis-use of the align environment to employ it for typesetting a pair of equations that are placed on one line. I'd just separate the equations by \qquad, get rid of the & symbols, and replace \begin{align*} with \begin{equation} and \end{align} with \end{equation}. The following code also places the equation number on the left rather than on the ...


2

I think you need only one column of & alignment points. Observe the use of explicit parenthesis-sizing instructions and of \mleft and \mright in lieu of \left and \right; they serve mainly to conserve on horizontal whitespace. \documentclass[a4paper,12pt]{article} \usepackage{amsmath,mleftright,derivative} \begin{document} \begin{align} [u_t]: \quad \...


3

Here's my proposal. Remove all \mleft and \mright. Use manual sizing for \langle and \rangle. Divide the alignment into two nested aligned environments. Smash the bottom when the underbrace is involved. The code: \documentclass[a4paper, 12pt]{scrreprt} \usepackage{amsmath} \usepackage{braket} \begin{document} \begin{subequations} \label{...


5

In addition to applying some judiciously-chosen \notag instructions, you should also reconsider the objective of displaying the subequations across just 2 lines. I think things would be a lot clearer, and less cramped, if they were typeset across 3 lines each. Note the use of the \smash[b]{...} directives. They serve to reduce (actually, eliminate) the ...


2

Elad Den was right in forwarding me to the linked thread on tex stack exchange. The solution for this specific case is: \begin{subequations} \label{ComputationInnProd} \begin{align} \begin{split} \label{ComputationInnProdDiscr} \langle \underbrace{ \mleft( \sum_{\alpha'} \psi_{\alpha'}^* \bra{\alpha'} \mright) }_{\bra{\psi}} \...


1

Something like this? Employ \usetagform{indented} to switch to the alternative tag format, \mytag{...} to generate the alternative tag, and \usetagform{default} to switch back to the default tag format. \documentclass[a4paper,12pt,numbers=noenddot]{scrartcl} \usepackage{mathtools} % for '\newtagform' and '\usetagform' macros \newtagform{indented}{}{\hspace*...


1

If you really need this you can add the space to the command that sets the tag: \documentclass{article} \usepackage{amsmath} \begin{document} zzz \begin{equation} 1=0 \end{equation} \makeatletter \def\tagform@#1{\maketag@@@{(\ignorespaces#1\unskip\@@italiccorr)\hspace{1cm}}} \makeatother zzz \begin{equation} 1=0 \end{equation} \end{document} Or ...


0

Here is a workaround by creating 2 columns: \documentclass{article} \usepackage{tabularx,arraycols,multirow,booktabs} \usepackage{textcomp} \usepackage{dcolumn} \begin{document} \begin{table} \centering \caption{Table.} \begin{tabular}{c D{,}{\pm}{-1} r @{\space} l c } \toprule \textbf{some text} & \multicolumn{1}{c}{\textbf{more text}} & \...


1

Two version sith either a single r type column or an r and an l type column: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tabularx,arraycols,multirow,booktabs} \usepackage{textcomp} \usepackage{dcolumn} \begin{document} \begin{table} \centering \caption{Table.} \begin{tabular}{c D{,}{\pm}{-1} r c} \toprule \textbf{some text} & \...


0

You can accomplish this with the align* environment, the fleqn and alignedleftspaceno options of amsmath, and a \@mathmargin of zero. To break a long equation, insert a split. If you just want equations flush left without alignment points, you can use the lgather environment from mathtools. The fleqn option should go to amsmath or whatever package loads ...


1

Like this? (red lines indicate text borders) \documentclass[12pt, fleqn]{article} \usepackage[letterpaper, margin=1in]{geometry} \usepackage{newtxtext} \usepackage{mathtools,amssymb,amsthm} \setlength{\mathindent}{0pt} % <---- \begin{document} \[ \mathrm{Entropy}(D) = -\sum\limits_{d \in D} p(d) \log_{2}p(d) \] some text? \[ \...


1

You can keep it much simpler. I use a displaymath environment, so there will be no page break. Inside it I use two minipages, one for the equations and one for the image. The equations just need aligned. Quite important: add ties between the name and its symbol like in susceptible~(S) so the symbol will not be detached from the name at a line break. I ...


1

I propose one of these solutions: one using flalign* and the measuredfigure environment, from threeparttable, the other using a simple  align* environment nested in a fleqn environment defined by nccmath and the \ffigbox command from floatrow. Unrelated: I simplified the typing of the derivatives in Leibniz' notation with the \diff command, from esdiff. ...


1

If you like to referencing each equation in the system of equation, than see the following solution: \documentclass{article} \usepackage{amsmath} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0.15pt} \renewcommand*\ShowFrameColor{\color{red}} %------------------------------------...


0

Here's a self-answer - I'm not sure why I didn't think of it, but you can just fake the tags using align*. The right-hand tags don't line up with the tags from normal equations, but I find that not so bad. Of course, I'm very open to better suggestions, especially since someone else want to do the same thing but using the automatic equation numbers instead ...


1

For your query 1, 3 \documentclass[11pt, letterpaper]{letter} \usepackage[includeheadfoot,margin=0.5in]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{bm} %for boldface math \usepackage{braket} \usepackage[colorlinks,citecolor=red,urlcolor=blue,bookmarks=false,hypertexnames=true]{hyperref} \usepackage{fancyhdr} \pagestyle{fancy} \...


0

you can write your equation with use only align* environment equation is wider than text width, consequently it spill out from right text border: (red lines indicate page layout) \documentclass{extarticle} \usepackage{amsmath} %---------------- show page layout. don't use in a real document! \usepackage{showframe} \renewcommand\ShowFrameLinethickness{0....


2

With alignat* you control the spacing between columns. I added some vertical spacing between the three groups: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{3} [P_\mu,P_\nu] &= 0 &&{} \xrightarrow{\hspace*{4cm}}{} & [\tilde{H},\tilde{H}] &= 0 \\ & & & & [\tilde{P_i},\tilde{H}] &= 0 ...


5

The easiest way to align everything is probably to put all of the lines in the same align environment. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} [P_\mu,P_\nu] &= 0 & \xrightarrow{\hspace*{4cm}} && [\tilde{H},\tilde{H}] &= 0 \\ &&&& [\tilde{P_i},\tilde{H}] &= 0 \\ &...


Top 50 recent answers are included