Tag Info

Hot answers tagged

10

You need the amssymb package in order to use the \leqslant and \geqslant symbols. \documentclass{article} \usepackage{amssymb} \begin{document} \[ a-b\geqslant 0 \iff a \geqslant b \iff b \leqslant a.\] \end{document}


10

\documentclass{article} \usepackage{amsmath} \usepackage{showframe} %% just for demo \begin{document} \begin{flalign} \lim_{ x \to 0} \frac{\log {10 + \log(x+ \frac{1}{10})}}{x} = 10 && \end{flalign} \end{document} If you want all your equations to start from left, add [fleqn] option to the \documentclass. Further, you may want to set ...


9

You should not use $$ $$ with LaTeX: it's a plainTeX command, and you have incorrect vertical spacings; it's replaced with \[ \]. If you want numbers with displayed equations, use \begin{equation} \end{equation} for just one equation, and, from the amsmath package, \begin{gather} \end{gather} for a group of centred displayed equations. If you want several ...


9

Here's a solution that uses the directive \displaystyle in both the numerator and the denominator of the fraction. (The align structure is used purely to simplify the before/after comparison.) \documentclass{article} \usepackage{amsmath} % for \DeclareMathOperator macro \DeclareMathOperator{\kl}{kl} % what does "kl" stand for? ...


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 ...


8

There is also \eqslantless and \eqslantgtr from amssymb: \documentclass{article} \usepackage{amssymb} \begin{document} $a \eqslantless b$ $a \eqslantgtr b$ \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 - ...


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, ...


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 \\ ...


6

You'll need to include the whole thing in a math environment, as \frac is a math command. \documentclass[]{article} \usepackage[width=2in]{geometry} \begin{document} Inline: $ \frac{2}{\|w\|}$ \\[2em] Display: \[ \frac{2}{\|w\|} \] Numbered Display: \begin{equation} \frac{2}{\|w\|} \end{equation} \end{document} Result:


6

In addition to removing the $ as cmhughes suggested, the blank lines in the equation environment confuse things. This may be why you added the dollar signs - with the blanks, LaTeX otherwise complains about missing $ symbols in the code. Here's a working version: \documentclass{article} \begin{document} \begin{equation} ...


5

Here's a comparison; note that you should always avoid fractions in one of the arguments to \binom (which is preferred over the infix \choose). \documentclass{article} \usepackage{amsmath} \begin{document} Bad Text style: $\binom{n}{\lfloor \frac{n}{2}\rfloor}$ Display: $\displaystyle\binom{n}{\lfloor \frac{n}{2}\rfloor}$ Good Text style: ...


5

The environments \begin{equation} ... \end{equation} and \[ ... \] are not interchangeable, as the first will produce an equation number, while the latter will not. A \label{...} command in the latter will not produce an error, but it has no effect since there is no counter it may refer to. The equivalent to the latter would be the starred version ...


5

okay. here are some problems with your definition. any starred math display environment is intended to suppress numbering. you can put a \tag{...} on a starred environment, but the number won't be incremented automatically. however, a \label on such a tag will be honored by \ref or \eqref. (all \eqref really does is format the argument of a \ref to be ...


5

This seems to do the trick. You can adjust the amplitude and frequency of the two snakes fairly straightforwardly. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,arrows,decorations.pathmorphing,decorations.markings} \begin{document} % How big you want the black circles on the ellipse \newcommand\nodesize{.035cm} \begin{tikzpicture} % ...


5

beamerposter contains a line \renewcommand*{\normalfont}{\normalsize} which is the cause of the problem. Setting \renewcommand*{\normalfont}{\relax} locally solves the problem. MWE: \documentclass{beamer} \usepackage{tcolorbox} \usepackage{beamerposter} \setlength{\paperwidth}{11in} \setlength{\paperheight}{8.5in} \begin{document} \begin{frame} ...


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, ...


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 ...


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.


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 ...


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 ...


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} ...


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 = ...


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

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} \[ ...


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} ...


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} ...


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 method that works with all display math environments, if you don't want all equation to be aligned on the left margin, is the following. We define a new command \newcommand{\mathleft}{\@fleqntrue\@mathmargin0pt} that simulates the option fleqn with \mathindent=0pt, and a new command to restore the normal behavior ...


4

Use the siunitx package for typesetting physical quantities: \documentclass{article} \usepackage{amsmath} \usepackage[ locale = DE % comma as decimal mark ]{siunitx} \begin{document} \begin{equation} \label{eq:Bsp_OhmsLaw} R_{2} = \frac{U_{2}}{I_{2}} = \frac{\SI{2.95}{\volt}}{\SI{0.03e-3}{\ampere}} = \SI{7.10}{\kilo\ohm}. \end{equation} Ohm's ...



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