Tag Info

New answers tagged

2

The first thing to try is, of course, reducing the arrow lengths. If all else fails, use \mathclap that, however, requires ampersand replacement; or enclose the diagram in an lrbox. I'll show all three possibilities. \documentclass[12pt,a4paper]{article} \usepackage{mathtools} \usepackage{tikz-cd} \newsavebox{\wideeqbox} \newcommand{\sample}{Lorem ipsum ...


13

Use eqnarray* instead of eqnarray to get an unnumbered multiline equation structure. However, you really shouldn't be using either eqnarray or eqnarray* -- both environments have been seriously deprecated for many years. Instead, use align and align*, respectively. For more in-depth references on this subject, see the posting eqnarray vs align. One of the ...


0

The scalerel package allows you to scale one object to the same vertical extent as another. Furthermore, it obeys changing math sizes. So here, I define \onearrow as an arrow scaled to the local height of a "1". It works automatically in all math sizes. \documentclass{minimal} \usepackage{scalerel} \def\onearrow{{\scalerel*{\uparrow}{1}}} ...


2

You can try writing the arrow in a resize box $x_{\uparrow}$ $x_{\resizebox{0.1cm}{0.1cm}{{$\uparrow$}}}$


1

You can get a smaller size uparrow using \scriptscriptstyle $x_{1} 1 \uparrow x_{\scriptscriptstyle\uparrow}$ I can't judge if this is a more aesthetically pleasing result, though.


0

You can use flalign* environment for getting the desired result Code: \documentclass[11pt,a4paper,oneside]{report} \usepackage[T1]{fontenc} \usepackage{fouriernc} \usepackage{mathtools} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} \begin{flalign*} N &=\frac{\theta _{1}-\theta _{2}}{f}\left( \left( \theta ...


0

You probably just need to load amsmath, as in the second line below: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation}\label{eq:sinuramp} I(x)= \begin{cases} s(x) & \text{if $x \le L/n$,} \\ s'(L/n)*x - s'(L/n)*L/n+s(L/n) &\text{if $x>L/2$.} \end{cases} \end{equation} \end{document}


0

For anyone in future who comes looking, and as this didn't quite fit in a comment, the spacing between the paragraph and the align can be reduced by using a \vspace with negative spacing after the \singlespacing. Note that there must be a blank line between the preceding paragraph and the \singlespacing otherwise it will make that paragraph single spaced. ...


4

You better use pmatrix: \documentclass[11pt,a4paper]{article} \usepackage{blindtext} \usepackage{amsmath} \begin{document} Preliminary Theorem 1.1.2. If $(\lambda_1,\dots,\lambda_n)$, $(\mu_1,\dots,\mu_n)$, and $(k_1,\dots,k_n)$ are arrangements of $(1,\dots,n),$ then \begin{align*} &ϵ\begin{pmatrix} \lambda_1,\dots,\lambda_n \\ ...


5

The Answer of Mico will definitly work, but will be very costly if you'll write a much longer piece of text (e.g. Master Thesis). Using a koma-script class with the option fleqn (flush left equation) will "align" all equations on the left side: \documentclass[fleqn]{scrartcl} \usepackage{amsmath} \begin{document} \section*{Polynomials} Do the following ...


5

Your objective may be achieved easily by placing the sectioning instructions and short paragraphs inside an \intertext wrapper. In the example below, there is now only one align environment that spans a \section* directive. Do note that some material can not be placed inside \intertext. To play it safe, one should probably provide the instruction ...


2

As the manual for IEEEtran explains, just add the label after \IEEEyesnumber: \documentclass{article} \usepackage{amsmath,IEEEtrantools} \begin{document} \begin{IEEEeqnarray}{CC} \IEEEyesnumber\label{eq:both} \IEEEyessubnumber* bla bla & blub blub \label{eq:sub1}\\ bla bla & bla bla \label{eq:sub2} \end{IEEEeqnarray} where the set of equations ...


4

The cuted package (from the sttools bundle) can temporarily leave two columns mode with its strip environment. An example with the equation entered in the second column: \documentclass[twocolumn]{ltxdoc} \usepackage{mathtools, cuted} \usepackage{lipsum, color} \begin{document} \lipsum[1-2] \lipsum[1] \textsf{\color{red}Equation entered here: } ...


6

I don't think you have a much better option than this. Btw, you seem to use q_A for two different things. \documentclass[twocolumn]{ltxdoc} \usepackage{amsmath} \begin{document} \begin{equation} \sum_{q_\mathrm{tot}=0}^{Q_A+Q_B-2}\sum_{q_A=0}^{q_\mathrm{tot}}{\textstyle\binom{Q_A-1}{q_A}\binom{Q_B-1}{q_B}}x^{q_\mathrm{tot}}, \end{equation} where ...


4

Resizebox should work. \documentclass[twocolumn]{ltxdoc} \usepackage{amsmath} \usepackage{lipsum} \usepackage{graphics} \begin{document} \lipsum[1] \begin{equation} ...


11

You are already using amssymb I hope. Why not look in to the amsmath manual (texdoc amsldoc from command prompt/line). It provides many environments for typing mathematics. For these two equations, you can use gather* (no number). \documentclass[11pt,openany]{book} \usepackage{amsmath,amssymb,showframe} %% showframe for demo only \begin{document} ...


1

I know this has been solved for a while, but can't you just use OP's second solution with \displaystyle? \[ \begin{array}{rcccl} \displaystyle\sum a &\le& \displaystyle\sum b &\le& \displaystyle\sum c \\ \displaystyle\log \sum a &\le& \displaystyle\log \sum b &\le& \displaystyle\log \sum c \end{array} \]


1

Labels should contain only ASCII characters, otherwise special characters, that are internally represented with control sequences, expand and you find terrible things in referring to such labels; if you change your label to equ:eqauation, getting rid of that é, everything will run smoothly. It is less French, but it works; after all labels should not be read ...


7

Content inside \tag is not in math mode! (I am surprised too). As \clubsuit is to be used in math mode, add $ around \clubsuit. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \lvert x^2 - 2y^2 \rvert = 1 \tag{$\clubsuit$} \end{equation} \end{document}


2

Here is how I would do it: \documentclass{article} \usepackage{mathtools} \usepackage{fourier} \newcommand*\horse{\noindent Text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text, text.} \newcommand*\differential{\mathop{}\!\mathrm{d}} \newcommand*\diff[3][\differential]{\frac{#1 #2}{#1 #3}} ...


1

Combine @daleif suggestion with the empheq package to emulate a numcases environment. You don't have to load mathtools as empheq does it for you. If you want only one number for the whole system, use aligned inside equation: \documentclass{article} \usepackage[overload]{empheq}% \begin{document} \begin{align}[left = \empheqlbrace]% x &\equiv ...


6

The split environment is meant to be used inside another environment, say, anequation environment. The split environment does not provide its own numbering and labeling support; instead, it is assumed that the "outer" environment (in your case: equation) handles those chores. You appear to have "discovered" a way to get around this constraint through the use ...


1

With aligned inside a gather environment. Note there already exists a faktor package that uses \diagup from amssymb and typesets nicely quotient structures; you'll compare in the proposed code. Your definition of \abs does not introduce correct spacing and has fixed height, whatever the content; it's better to use \DeclarePairedDelimiter from the mathtools ...


1

Some suggestions: You could use \parbox macros to typeset the shorter pieces in each of the two groups of statements. The widths of the parboxes would be those of the corresponding longer pieces. Use two separate, nested equation and split environments instead of one large align environment. This will give you the equation number placement and numbering ...


2

You can use aligned: \documentclass{article} \usepackage{amsmath,natbib} \begin{document} \begin{equation} \begin{aligned} \lambda_{N} &= \ln N && \text{{\itshape NBIC/SC} \citep{t}}\\ \lambda_{N} &= 2 && \text{{\itshape AIC} \citep{a}}\\ \lambda_{N} &= 1 +\ln N && \text{{\itshape CAIC} ...


4

No warranty. ;-) \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \makeatletter \newif\ifdavid@number \preto\equation{\david@numberfalse} \preto\endequation{\ifdavid@number\else\notag\fi} \patchcmd\label@in@display{\@empty}{\@empty\david@numbertrue}{}{} \makeatother \begin{document} Text \begin{equation} \text{this has a ...


8

You have a possibility, with the mathtools package (that loads amsmath, so it's useless to load the latter): write \mathtoolsset{showonlyrefs,showmanualtags} in your preamble, and only the referenced equations will be numbered (use \eqref). It's not exactly what you ask (number labelled equations), but you can try to make ‘fake references’ at the very ...


3

I assume you want to replace (AP) with a (I) (II) etc. One can just as easily use (AP.1) or (A), etc. The \rule is there just to check alignment. The disadvantage of this approach is that the equations are not quite centered. The advantage is that you can include text or very long equations without overlap. You might even consider moving the assignment ...


0

May be redefining $ so it behaves like \[ and \]? This is an option (although it probably isn't perfect and give problems, it could possibly be enhaced easily). \usepackage{fixltx2e} \usepackage{mathtools} \makeatletter \catcode`\$=\active \protected\def${\new@ifnextchar$\faleichik@dmath\faleichik@math} \def\faleichik@math#1${\(#1\)} ...


2

This may have been asked before. I hope you're flexible with the alignat environment. I switched to align. Sorry, force of habit. If that doesn't work for you, leave a comment. \documentclass{article} \usepackage{amsmath} \makeatletter \newenvironment{mysubeqns}[1] {% \addtocounter{equation}{-1}% \begin{subequations} ...


3

The problem with your code are the packages fourier and lmodern. You have lo load lmodern before fourier. And of course, type your equation like this $\overline{X} = \sum_{i = 1}^{n}\frac{x_i}{n}$


1

This code gives what you want \begin{equation} \overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n} \end{equation} If you have to use math mode, then this works, but it displays differently at least with my compiler $\overline{X} = \sum_{i = 1}^{n} \frac{x_i}{n}$


4

EDIT BASED ON MWE The use of fourier and lmodern is what causing the equal symbol to "disappear". Look at this question. If you try to load lmodern before fourier, then all your equations will be typesetted on Utopia-based fonts. Using the code you gave in a MWE: \documentclass{article} \begin{document} $\overline{X}$ = $\sum_{i = 1}^{n}$ ...


0

There's probably nothing that a typographer wouldn't have frowned at, but you can allow the equation to extend into the margins by temporarily extending the width of the text reduce font size smash the condition under \min and \max and `\sum' introduce shorthand notation just prior to the equation and rewrite your equation accordingly


7

The "equation" in question contains not one but two entities that many people would interpret to be equations; moreover, both the text and the equations are very important. I therefore think you (and likely your paper's readers as well) would be better off if you chose a theorem-like environment to typeset the material, rather than insist on it being "just ...


6

May be you can do this. \documentclass{article} \usepackage{amsmath} %%% habitual addition \usepackage{amsfonts} \usepackage{calc} \newlength{\mylen} \setlength{\mylen}{\widthof{(99)}} \begin{document} \begin{equation}\label{key} \left.\begin{minipage}{\dimexpr\textwidth-2\mylen\relax} The product of two complex numbers $z_1$, ...


1

In my (naturally not so humble and unapologetically subjective...) opinion, the improvements brought about by \mathsmaller in the subscript and superscript position of the expression k_0^2 do not go quite far enough. Specifically, I think both the subscript 0 and the superscript 2 "squat" too low. Consider adding the instruction \mathstrut to the numerator: ...


1

Here is a solution that switches to \scriptscriptstyle instead of \scriptstyle for digits only, thanks to a code I borrowed and adapted from @egreg. Incdentally, I think that rather than using \bar, I would use \widebarfrom the mathx font (mathabx package, it doesn't exist in the basic fonts), and \widehat from the same font (the one from the basic font is ...


5

If you need to refer to the equations as a group, you probably want to use the subequations environment: \documentclass{article} \usepackage{amsmath} \begin{document} Some text with a reference to the following group~\eqref{eq:group}; now the equations \begin{subequations}\label{eq:group} \begin{align} A &= B \label{eq:A}\\ C &= D \label{eq:B} ...


1

I would rather separate the last equation from the others, not aligning it, but using a multlined environment. Semantically, it seems to be different, as it uses the left members of the six first equations. It makes this equation more readable, in my opinion. Still for readability I changed a pair of \big to \Big: \documentclass{article} ...


6

Actually, you did request the output exactly as shown. An & specifies that the text to the left is right aligned, and the text to the right of the & is left aligned. Thus, the first & in each line specified that the text following it is to be left aligned, which is did for the first 7 lines. Then on the last three lines you added a single & ...


0

You can choose this alternative. \begin{equation*} \begin{split} \iint_S \eta =& \iint_S \Bigl\{F(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} + G(x(u,v), y(u,v), z(u,v)) \frac{\partial(x,y)} \partial(u,v)}+ \\ &H(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} \Bigr\} \end{split} ...


3

I would use the multline* environment, as there's to align naturally: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[nomarginpar, showframe]{geometry} \usepackage{mathtools} \begin{document} \begin{multline*} \iint_S \eta = \iint_S \left[F(x(u,v), y(u,v), z(u,v)) \frac{\partial(x,y)}{\partial(u,v)} \right. \\\left.{} + ...


1

Try the align environment from the amsmath package: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \iint_S \eta = \iint_S \Bigl[& F(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)} + G(x(u,v), y(u,v), z(u,v)) \ \frac{\partial(x,y)}{\partial(u,v)}\\ & + H(x(u,v), y(u,v), z(u,v)) \ ...


3

Here is a possible solution: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} \usetikzlibrary{automata} \usetikzlibrary{graphs} \usetikzlibrary{shadows} \def\nd{% \begin{tikzpicture}% [font=\scriptsize, baseline=1ex,shorten >=.1pt,node distance=6mm,on grid, ...


2

I guess you are looking for a way to scale not only the global coordinates but also every single node. In this case you just have to introduce every node/.style={scale=0.65}, like \documentclass{article} \usepackage{amsmath, amsthm, amssymb} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} ...


3

Try this: \documentclass[12pt,a4paper]{article} \usepackage[a4paper, total={6in, 8in}]{geometry} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{fourier} \begin {document} \[ \frac{dP}{dr}=\frac{-(P+\rho c^2 )\nu'} {2} \tag {Oppenheimer \& Volkoff 1939} \] \end{document} You forgot \[ ... \] and ...


2

A variant with a slighly simpler code, thanks to the empheq package (that loads mathtools, from the same author, and amsmath): \documentclass{article} \usepackage[overload]{empheq} \begin{document} \begin{align*}[right = \empheqrbrace] KP &= e^{-\lambda} \Big( \frac {\nu'}{r}+ \frac {1}{r^2}\Big)-\frac {1}{r^2} \\ KP &= ...


3

Setting the breakable portion in a \parbox of sufficient width allows you to break it at will as well as properly align the content: \documentclass{article} \usepackage{mathtools} \usepackage[boxed,vlined,linesnumbered,noresetcount]{algorithm2e} \begin{document} \begin{algorithm}[tp] \texttt{out} $\vcentcolon=$ \textsc{foo}($\texttt{x} \rightarrow ...


4

You can add a brace on just one side with a \left. on one side and an \right\} to add the brace on the right. References: Why is \[ ... \] preferable to $$ ... $$? Code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \left. \begin{aligned} KP &= e^{-\lambda} \Big( \frac {\nu'}{r}+ \frac ...



Top 50 recent answers are included