Tag Info

New answers tagged

2

Here is a reworking of what you want to achieve using amsmath's aligned environment: \documentclass{article} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \newcommand{\pfrac}[2][]{\frac{\partial #1}{\partial #2}}% \pfrac[<top>]{<bottom>} \begin{document} \begin{equation} \begin{aligned} \nabla \cdot F &= \biggl( \pfrac{x}i + ...


1

You should try \dfrac{}{} instead of \frac{}{}. Include the amsmath package. The "d" stands for displaysize(or style), you can of course do a \displaystyle on every symbol, but that would be too clumsy. EDIT: Corrected on Steven B. Segletes suggestion.


2

Here is a plain TeX version. I'm not saying this is better in anyway, it's just to show you what can be done with an old fashioned \halign. Note that on the left I've used \openup to increase the line spacing and a \strut to make the left brace more "inclusive"; compare to the cramped version on the right without them. Obviously you'd make them the same ...


1

It's much simpler than what you did : use the cases environment: \documentclass[12pt,a4paper,bothsides]{article} \usepackage[utf8]{inputenc} \usepackage[showframe, nomarginpar]{geometry} \usepackage{mathtools} \begin{document} \[ \begin{cases} \omega_{s}^{-} = 8.43 \\ \omega_{s}^{+} = 4.43 \\ ...


1

\begin{equation*} \begin{cases} \omega_{s}^{-} = 8.43 \\ \omega_{s}^{+} = 4.43 \\ \omega_{c}^{-} = -500\\ \omega_{c}^{+} = 500\\ \end{cases} \qquad\implies\qquad \begin{cases} \Omega_{s}^{-} = 9 \\ \Omega_{s}^{+} = 5 \\ \Omega_{c}^{-} = -1\\ ...


6

It's much simpler if you use amsmath: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \left\{ \begin{aligned} \omega_{s}^{-} &= 8.43 \\ \omega_{s}^{+} &= 4.43 \\ \omega_{c}^{-} &= -500\\ \omega_{c}^{+} &= 500\\ \end{aligned} \right. \qquad\Longrightarrow\qquad \left\{ \begin{aligned} \Omega_{s}^{-} &= 9 \\ ...


1

There are many ways, one of them: \documentclass{article} \usepackage{amsmath} \usepackage{array} \begin{document} \[ \left\{ \begin{array}{@{}l@{}>{{}}l@{}} \omega_s^- &= 8.43 \\ \omega_s^+ &= 4.43 \\ \omega_c^- &= -500 \\ \omega_c^+ &= 500 \end{array} \right.\kern-\nulldelimiterspace \quad \Rightarrow ...


2

An option using a \parbox inside a \fcolorbox inside a \makebox, and the whole construct inside \intertext; some changes to the original mark-up were done (in particular, the code was greatly simplified), but the original alignment of expressions before and after the box was preserved: \documentclass{article} \usepackage{mathtools} ...


1

The simplest way is using align*. In order to have a correct spacing around the = sign, you need to ass a pair of{} at least in the line that contains the longest number. I loaded empheqto have an easy way of adding the vertical line at the right of the equations. Ot loads mathtools, that in turn loads (and corrects 2 bugs of) amsmath. ...


1

You could use an array environment inside an equation* environment and auto-generate the = symbols. \documentclass{scrbook} \usepackage{amsmath} % for "\text" macro and "equation*" environment \begin{document} \begin{equation*} \begin{array}{r@{{}={}}r} % "@{{}={}}" inserts correctly-spaced equal sign between the columns \text{first value} & ...


4

Like this? \documentclass{scrbook} \usepackage{amssymb,amsmath,amsthm} \begin{document} \begin{equation*} \begin{alignedat}{2} \text{first value} &={}& 12 \\ \text{second value} &={}& 1234 \\ \text{third one} &={}& 1234567 \end{alignedat} \end{equation*} \end{document} I have just moved the & before the ...


4

Another attempt where tikzmark is defined so that each term is a node and simply connect the node with \draw (A) to[bend left=angle] (B); \newcommand\tikzmark[1]{% \tikz[remember picture,baseline=(#1.base)] \node[inner sep=0,outer sep=3pt] (#1) {#1}; } Code \documentclass[border=2cm]{standalone} \usepackage{amsmath} \usepackage{tikz} ...


5

Based on code blatantly stolen from JLDiaz's answer: \documentclass{article} \usepackage{amsmath, amssymb} \usepackage{tikz} \usetikzlibrary{arrows,matrix,positioning}% For nice arrow tips \begin{document} \tikzset{ mymatrix/.style = { matrix of math nodes, nodes={minimum width=6ex}, } } \begin{tikzpicture} \matrix[mymatrix, ...


0

Some remarks about punctuation within displayed math from the practice of professional typesetting : Displayed equation usually are considered to be part of the preceding sentence, that is it will get the very same punctuation as if it was inline math: if the sentence ends in a displayed equation it gets a period, if a where … is … or something like that ...


1

egreg explains why you probably shouldn't do this, and gives better practices. If you want to do it anyway, one way is with package scalerel, and its \scaleleftright command. The syntax is \scaleleftright[max width]{left delimeter}{stuff}{right delimeter}. \documentclass{amsart} \usepackage{scalerel} \begin{document} \begin{align} f(x) & = ...


4

You seem to be thinking that the summation symbol should be scaled to cover all the material it applies to: it's not true. Word processing software may do it, but it's not the right thing to do, as it produces humongously big symbols that are just distracting. It's better to keep the material not to grow vertically too much: \documentclass{article} ...


5

I suggest scaling up the \_ceils and introducing a little space before the \rceil and in between ) and |. I'd omit extra spacing before ( because this glyph is already curved away from the \lceil a bit. \documentclass{article} \begin{document} first $\bigl\lceil (cN-n)\, |S_{n+1}| \,\bigr\rceil$ points \end{document} Consider reading chapter 18 of ...


0

If you stick with the default article class, you may need 3 pages, but I squeeze it onto 2 pages, just for demonstration. \documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article} \input epsf \usepackage{amsmath, amssymb, graphics} \newcommand{\mathsym}[1]{{}} \usepackage{amsthm} \usepackage{amsfonts} \marginparwidth 0pt \oddsidemargin 0pt ...


1

If really need to this then you should use a simple align* environment rather than aligned inside equation, and issue \allowdisplaybreaks first, preferably contained in a group. \documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article} \usepackage{mathtools, amssymb, graphics} \newcommand{\mathsym}[1]{{}} \usepackage{amsthm} \usepackage{amsfonts} ...


0

You could make it as a \parenVectorstack in \textstyle math, if you wished. \documentclass[11 pt,a4paper,oneside,openany, notitlepage]{article} \input epsf \usepackage{amsmath, amssymb, graphicx} \newcommand{\mathsym}[1]{{}} \newcommand{\unicode}[1]{{}} \newcounter{mathematicapage} \usepackage{amsthm} \usepackage{amsfonts} \marginparwidth 0pt \oddsidemargin ...


1

(By request, here's my comment posted as an answer. You should be on the lookout for a specialised chemistry package to typeset such equations in a clear and consistent way — the advice in this answer is generic to displayed math in general.) You only need to use a displayed math environment such as equation or gather, if you want to display a single ...


6

We go colorful. \documentclass{article} \usepackage[svgnames,hyperref]{xcolor} \usepackage{empheq} \usepackage[many]{tcolorbox} \tcbset{highlight math style={enhanced, colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt, drop fuzzy shadow}} \newtcbox{\otherbox}[1][]{nobeforeafter,math upper,tcbox raise base,arc=0pt, ...


2

With the empheq package (providing the overload option) there is a much simpler solution: you can put about anything you please on the left or on the right of an amsmath environment. Please note that empheq loads mathtools that in turn loads amsmath : \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage[overload]{empheq} \begin{document} ...


3

You can also use the environment empheq from the empheq package: \documentclass{article} \usepackage{empheq} \begin{document} \begin{empheq}[left=\empheqlvert\;\;]{align*} &2A + 2B = 0\\ &A - B = 1, \end{empheq} \end{document}


8

The equations can be put in environment array, e.g.: \documentclass{article} \begin{document} \[ \begin{array}{|l@{}} 2A + 2B = 0\\ A - B = 1, \end{array} \] \end{document} Or with ensuring \displaystyle: \documentclass{article} \usepackage{array} \begin{document} \[ \begin{array}{|>{\displaystyle}l@{}} 2A + 2B = 0\\ A - ...


4

Will this do? \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{enumitem} \SetLabelAlign{myright}{\hss\llap{$#1$}} \newlist{where}{description}{1} \setlist[where]{labelwidth=2cm,labelsep=1em, leftmargin=!,align=myright,font=\normalfont} \begin{document} \[ ...


0

Math in words can also be put in equation environments, e.g.: \documentclass{article} \usepackage{amstext}% % or \usepackage{amstext} that defines \text and is loaded by amsmath \usepackage{lipsum} \begin{document} \lipsum[47] \begin{equation} \text{Centered text with equation number.} \end{equation} \end{document}


5

I have two versions, depending on what you perhaps need. \documentclass{scrbook} \usepackage{amsmath} \begin{document} \[ \phi(\varepsilon) \xrightarrow[\varepsilon \to 0]{} 0 \] \[ \lim_{\varepsilon \to 0} \phi(\varepsilon) = 0 \] \end{document} I prefer the \lim style, it is mathematical cleaner, but that is also a matter of taste.


1

You can use scrextend and paralist \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{scrextend} \usepackage{paralist} \usepackage{enumitem} \usepackage{blindtext} \begin{document} \blindtext \begin{equation} \label{eq:mylabel} ...


1

A reasonable way to define \argmin is via the \DeclareMathOperator command of amsopn loaded most conveniently via mathtools. To get limits to behave like those on \lim you should use the starred version of the declaration: \DeclareMathOperator*{\argmin}{argmin} Then in displayed mathematics limits will be placed under the text "argmin". If you are in ...


2

Multiplying the exponentials and factoring out a common expression makes this a little shorter, and perhaps a little easier to read. If 2/\alpha (which appears five times in your expression) has semantic significance you could consider naming it, say \beta. \documentclass[a4paper]{article} \usepackage[showframe,margin=1in]{geometry} \usepackage{amsmath} ...


1

When there's a trade-off between (a) minimizing the space taken up by a long and complicated expression, e.g., by making it fit on one line (and, in the process, making various subformulas so small as to make them hard to parse) and (b) maximizing good readability and parsability, I'd usually give extra weight to maintaining good readability. Assuming your ...


9

You have apparently used the fleqn option and so all LaTeX environments shown in your image are flush left. $$ is not latex syntax and does its own thing, it is not deprecated it just doesn't work, the most obvious and well documented, aspect of that is that it does not obey fleqn option. If the class (or user) doesn't specify fleqn then the LaTeX ...


1

I'd be for avoiding \left and \right here, using, as others have shown, \substack: \documentclass{article} \usepackage{amsmath, amssymb, amsthm, amsfonts} \renewcommand\vec[1]{\mathbf{#1}} \newcommand\cJ{\mathcal{J}} \newcommand\bE{\mathbb{E}} \begin{document} \begin{equation} v_t(\vec{K}) = \bE\biggl[\, \max_{\substack{ \vec{x} \in \cJ(\vec{K}) \\ ...


4

I agree with daleif's answer that this is not a subscript to the left square bracket but a second subscript line for \max. The following example also plays with the sizes of the fences until the size of the subscripts are ignored for the fences in the last equation: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mleftright} ...


3

I would second the advice in daleif's answer: specifically, using \substack and using \Biggl, \Biggr, \biggl, \biggr, etc. when appropriate to help make the expression easier to read. (I would add: using the spacing commands \!, \,, \:, and \; to improve the space to keep things from being too cluttered or too offset.) The following example is meant to ...


4

Several problems No need for \tag, one should never manually number equations; let LaTeX do its thing Don't use \left...\right excessively as in the example, it makes it much harder to read; use manual scaling, ie \big, \Big or \bigg (there is one level more) That is not a subscript to the [; that is a two level limit to max, typeset via ...


5

I suggest you load the mathtools package and define a new macro, say \norm, as follows: \DeclarePairedDelimiter{\norm}{\lVert}{\rVert} While doing so incurs (slight) setup cost, it has several important advantages: Your code will become more readable (and easier to debug...) because you'll be writing things like \norm{(a,b,c)}^2, which focuses attention ...


1

for example: Q(\theta):= \Big\|(a,b,c) \Big\|^2 There is \big, \bigg, \Big, and \Bigg


1

I think that there is a slight mistake here. If: \DeclareRobustCommand\maybe[1]{\ifnum#1=\value{chapter}\relax\else\thechapter.\fi} is used, then the current chapter will be displayed, and not the referred chapter. I propose to use instead: \DeclareRobustCommand\maybe[1]{\ifnum#1=\value{chapter}\relax\else\uppercase\expandafter{\romannumeral#1}.\fi} ...


1

I introduce \notateeqn{equation}{notation} to do the trick. \documentclass[12pt,a4paper]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage[leqno]{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{makeidx} \usepackage{graphicx} \usepackage{stackengine} \stackMath \newcommand\notateeqn[2]{% ...


4

You can do that with the \flalign environment and mathtools (which loads amsmath): it has many enhancements to amsmath, corrects a couple of bugs, and of special interest in your case, defines a math version of \llap. \documentclass[12pt,a5paper]{article} \usepackage[utf8x]{inputenc} \usepackage{ucs} \usepackage[leqno]{mathtools} \usepackage{amsfonts} ...


4

To elaborate on Argos suggestion. In this case I'd use \begin{gather*} I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, \quad Y = \begin{pmatrix} 0 & \imath \\ -\imath & 0 \end{pmatrix}, \\ Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, \quad H = ...


0

Try using align from the AMS-math package for multi-line equations, it's a lot easier. \begin{align} I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, X = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, Y = \begin{pmatrix} 0 & \imath \\ -\imath & 0 \end{pmatrix}, \\ Z = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}, H = ...


1

Using mathtools (that loads amsmathanyway) and its DeclarePairedDelimiterX command, you can have a better spacing for |, and a better control on the size of the braces: \documentclass[12pt,a4paper,leqno]{article} \usepackage[utf8]{inputenc} \usepackage{amssymb, mathtools} \usepackage{textcomp} \DeclarePairedDelimiterX{\set}[2]{\{}{\}}{#1 ...


3

Please always post a complete document not just a fragment: \documentclass[12pt]{article} \begin{document} \[ \max_{x\in\mathcal{J}(k)}\left\{ \sum_a^b something \middle| something\right\} \] \end{document}


2

You can define a new environment. \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{environ} \NewEnviron{myequation}{% \par\vspace{-\baselineskip} \small \begin{equation}% \BODY \end{equation} } \begin{document} \noindent Some text here $y=x$ Some text here Some text here Some text here Some text here Some text here Some text here Some text ...


0

Define a newcommand for setting equation font size. \documentclass[10pt]{article} \newcommand{\se}[1]{\fontsize{9}{0} % 1pt smaller then normal text. Set it whatever you want \begin{equation} {#1} \end{equation} \fontsize{10}{0} } \begin{document} This is $f(x)=g(x)$ an inline equation. This is display mode equation. \se{\lim_{x \to \infty} \exp(-x) = ...


1

The idea is to overlay a thicker line over the two joined lines. \documentclass{standalone} \usepackage{mathtools} \newsavebox{\mybox} \newlength{\mywidth} \newlength{\myheight} \newlength{\myline} \newlength{\myoffset} \newcommand{\mysqrt}[1]% {\setlength{\myline}{.1ex}% \addtolength{\myline}{.06pt}% \setlength{\myoffset}{.9em} ...


0

Thank you all for your help! This mystery was solved finally. In one section, I mistakely used the \label{eq:eq1} to reference the figure. Latex thinks the equation is a subsection and hence mark it with sect.number. Because I'm unlucky that the number is exactly the same with the number of the equation, which causes me more trouble to identify the ...



Top 50 recent answers are included