# Tag Info

4

Not sure what the desired result being sought is, but here \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} Single line equations: \begin{description} \item[(a)] $x_{1} + x_{2} = a_{1} + b_{1}\sqrt{t^2-1} + a_{2} + b_{2}\sqrt{t^2-1} = (a_{1} + a_{2} ) + (b_{1} + b_{2})\sqrt{t^2-1} \mapsto (a_1+a_2, b_1+b_2)$ ...

0

If your main interest is to replace | with \mid if it exists, you can perform a search-and-replace via etoolbox's \patchcmd: \documentclass{article} \usepackage{mleftright,etoolbox,xparse} \makeatletter \DeclareDocumentCommand{\Pr}{R(){}}{% % \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>} ...

0

For the last part, for the chemical equation, you can find it right there: http://www.texample.net/tikz/examples/oxidation-and-reduction/

10


10


5

There's no definition for \& as a math character, so it's regarded as a letter. However, simply defining it as a math character would make it unusable in text mode, so a branching should be used: \DeclareRobustCommand{\&}{% \ifmmode\expandafter\mathbin\fi\char& } Full example: \documentclass{article} \DeclareRobustCommand{\&}{% ...

6

The symbol can be set as binary operator \mathbin. The amount of the space is \medmuskip and the space can be set via \>. Manually, \& can be put into \mathbin, then TeX sets the space automatically: \documentclass{article} \begin{document} $a\mathbin{\&}b$ \end{document} Also, \& can be redefined to add \mathbin in math mode ...

2

You can use \intertext or \shortintertext for the left aligned text, depending on the required spacing. \shortintertext gives tighter spacing. For breaking the lines, you can place them in multlined environments from the mathtools package. You can specify the width as an optional argument if that is preferred, and also customize other aspects of the ...

0

Use intertext or \shortintertext (the latter from mathtools; needless to load amsmath in that case): \documentclass[11pt, a4paper]{article} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{amsfonts, amssymb, amsfonts} \usepackage{mathtools} \usepackage{showframe} \begin{document} \begin{align} \intertext{\emph{This should be left-aligned and ...

0

it appears that lyx ignores grouping braces when a file is reloaded. this is fatal when actual [brackets] occur in optional arguments. (it should also be considered a design flaw in lyx.) (la)tex provides the pair \lbrack and \rbrack to substitute for these. the original reason was to accommodate keyboards that don't have square brackets (sometimes the ...

1

You can do it with the stock proof environment, by adding an appropriate definition for \proofname. Since proof does \item[\hskip\labelsep\itshape#1\@addpunct{.}] where #1 is the optional argument to \begin{proof} with default value \proofname, all we need is to nullify the spacing and to set a high enough space factor to make \@addpunct that a ...

5

Put one extra pair of braces around the arrow. \documentclass{article} \usepackage{stmaryrd,xspace} \newcommand{\deref}{\ensuremath{{\rightarrowtriangle}}\xspace} \begin{document} $b\deref\mathbf{r}_S$ \end{document} BTW, what is the intention of using ensuremath and \xspace here? It is better not to use them.

3

One option would be to define a new proofw environment (in this way you still have access to the standard proof) in a similar fashion to amsmthm's proof, but suppressing the name and the punctuation: \documentclass{article} \usepackage{amsthm} \makeatletter \newenvironment{proofw}{\par \pushQED{\qed}% \normalfont \topsep6\p@\@plus6\p@\relax \trivlist ...

8


4

You can lower that subscript by a little by adding an invisible rule via \mystrut: \documentclass{article} \usepackage{mathtools} \newcommand{\mystrut}{\rule{0pt}{1.6ex}} %% <-- adjust this \begin{document} $\lim_{\mathclap{(x,y)\rightarrow (0,0)\mystrut}} f(x,y)$ \end{document}

2

The errors mean that you are trying to define new commands with the same names as existing commands. This is probably because your preamble is a mess and you are loading the same packages twice, packages you don't need and incompatible packages. Never load a package more than once - especially with different options. And never load epsfig at all. It is ...

6

Simple text fraction A simple way for simple fractions is the text form a/b: \documentclass{article} \usepackage[utf8]{vietnam} \usepackage{array} \usepackage{longtable} \begin{document} \begin{longtable}[r]{>{\itshape}p{0.46\linewidth}p{0.46\linewidth}} 1/2 & một \textbf{phần} hai \\ 3/4 & ba \textbf{phần} tư \\ 6/8 & sáu ...

2

You have to introduce a line break in the fourth equation. However, that's not the only adjustment you should perform. I suggest you do the following: use enumerate environments; this will give you typographically sound amounts of indentation of the various items. Also, get rid of the manual line breaks. remove the instances of =$>$, as they are ...

2

The fences are symmetric with respect to the formula axis (the imaginary line where fraction lines sit). In the case of \overrightarrow{\nabla}, the size chosen is the same as for \Bigg, which extends way down the formula axis. There's no need that the fences cover the whole construction, in particular the arrow. Here's a visual sample, where I use the ...

9

The other answers have already pointed out that you weren't using TeX's math mode for symbols such as \le ("less than or equal"). In addition to fixing these issues, and to replacing text-mode symbols such as \textless and \textgreater with their math-mode equivalents (< and >), you should also give consideration to using an array environment ...

4

With helo of package array you can significantly simplify your table code: \documentclass[twocolumn]{article} \usepackage{blindtext} \usepackage{array,amsmath} \begin{document} \begin{table*}[htbp] \centering %\begin{threeparttable} \caption{Summary of a state-based EMS} \begin{tabular}{l|c|>{$}c<{$}|>{$}c<{$}} \hline Battery ...

3

You have consistently placed in the text mode symbols (commands) only to be used in mathmode. Corrected below \documentclass[twocolumn]{article} \usepackage{blindtext} \begin{document} \begin{table*}[htbp] \centering %\begin{threeparttable} \caption{Summary of a state-based EMS} \begin{tabular}{l|c|c|c}\hline Battery SOC & State & Load Power & ...

0

For this math font and combination of letters, I think you need to insert a negative thinspace, \!, i.e., write \alpha_{\!p} instead of just \alpha_!p. This applies to cases where \alpha is on the baseline or in the first subscript position. The following screenshot shows the letter combinations with this adjustment on the left, and without the adjustment ...

2

No guarantee! Might effect parts of your document which you do not want to change. % arara: pdflatex \documentclass{scrartcl} \usepackage{newtxtext} \usepackage{newtxmath} \catcode_=\active \newcommand_[1]{\sb{\mspace{-1.5mu}#1}} \pagestyle{empty} \begin{document} $\lambda_{\alpha_p}$ $l_{\alpha_p}$ \end{document}

4

A variant of Heiko's method; I also use bm, that features a better implementation of \boldsymbol (that can also be called \bm). With \ifcoef you can disable \boldsymbol more easily also in other situations, by simply setting \coeftrue (in a group). \documentclass[12pt,a4paper]{article} \usepackage{amsmath,amssymb,bm} \newif\ifcoef \newcommand{\bvec}[1]{% ...

5


5

There are certainly several different possibilities to achieve this. One is provided by the amsmath package which you might use anyway. Try \documentclass{article} \usepackage{amsmath} \begin{document} $f(x) \xrightarrow[x \rightarrow 0]{} a$ \end{document} Have a look at page 13 of the documentation of the package to find out more.

3

Certainly. For example \documentclass{article} \usepackage{amsmath} \begin{document} $f\xrightarrow[x\to 0]{}a.$ \end{document}

2

Your analysis of the problem is not correct. The cell throwing the error contains ANPP_{Stems} and is in a column with specification columns/Beschreibung/.style={column name=Beschreibung, string replace*={##1}{{\mathrm{##1}}}, string type, column type=l,math}, If you replace the entry with ANPP_1 the table compiles without problem (apart from ...

3

For one-off cells you can always use a \multicolumn command such as \multicolumn{1}{c}{\bfseries \num{11111.11}} This can be packaged in to a macro \tbnum for convenience: \newcommand{\tbnum}[1]{\multicolumn{1}{c}{\bfseries \num{#1}}} \documentclass{article} \usepackage{etoolbox,siunitx} \robustify\bfseries ...

5

David Carlisle suggests tabular, which is good. But there is also the tabbing environment. In the first line of tabbing you set one or more alignment points with \=; in subsequent lines you align with \>: \documentclass{article} \begin{document} \begin{tabbing} Here is some text. \=Alignment point set.\\ \>Under alignment point.\\ ...

2

amsmath provides the flalign environment. It is designed for placing two sets of aligned equations, the first block flush on the left margin, the second flush on the right, e.g. \begin{flalign*} x & = A & y &= B \end{flalign*} produces |x = A y = B| The first and third & here provide aligment ...

7

Here is a simple coloured box around an alignment, made with the help of empheq and xcolor. Needless to load amsmath: empheq loads mathtools, which loads amsmath. I added a quad on each side of the box so it doesn't look too tight. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[x11names]{xcolor} \usepackage{empheq} ...

4

From the empheq package documentation, \documentclass{minimal} \usepackage{empheq} \begin{document} \begin{empheq}[box=\fbox]{align*} a&=b \tag{*}\\ E&=mc^2 + \int_a^a x\, dx \end{empheq} \end{document} EDIT: To get the box in color, you can simply do this: \documentclass{minimal} \usepackage[svgnames]{xcolor} \usepackage{empheq} ...

1

Environment multline could be misused to place the split to the left, because the first line of multline is left aligned with indent \multlinegap, which can be set to zero. Then split needs to be changed to aligned, because multline prefers the latter. Example with a horizontal rule to show the text width: \documentclass{article} \usepackage{amsmath} ...

3

I assume you don't want the display in the list of figures, so I add an empty short caption and also singlelinecheck=false from the caption package. \documentclass{article} \usepackage{amsmath} \usepackage{graphicx} \usepackage{caption} \usepackage{hyperref} \begin{document} \begin{figure}[htp] \captionsetup{singlelinecheck=false} \centering ...

3

You need to either \protect the minipage and the align or to use the optional argument for caption (which is a good idea if you are going to generate a list of figures to give an entry for the LoF without the equation); loading the caption package also gives you line breaks: \documentclass{article} \usepackage{amsmath} \usepackage{caption} ...

2

The .ttf version of the font Mayfair can be downloaded here. You will have to use Lua- or XeLaTeX in order to get it running, though. % arara: lualatex \documentclass{article} \usepackage{fontspec} \usepackage{mathtools} \newcommand*{\myV}{\text{{\fontspec{Mayfair.ttf}V}}} \usepackage{amssymb} \begin{document} Here is your desired inline math: ...

2

A version with \mathcal: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb}% for \mathbb \begin{document} $\mathcal{V} \subset \mathbb{R}^3$ \end{document} The shape of the symbol depends on the font. An example with mathptmx (Times): \documentclass{article} \usepackage{amsmath} \usepackage{amssymb}% for \mathbb ...

1

As a extensive LaTeX user, who handles most of the texts under version control, I have found that it is useful to structure my writing so that editing is mostly shuffling lines around. Text editors have special commands for this, and it makes e.g. differences between versions (as given by the version control system) really show differences, not artifacts due ...

2

You're misusing \left and \right. The definition of \ceil should not have them; they are also redundant around n+1. Note also that \log\limits is meaningless, because \log never takes limits above and below. By the way, the fact of being in a table is completely irrelevant. \documentclass{article} \usepackage{mathtools,booktabs} ...

2

In your case is better to use multline environment instead align: \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{multline*} \phi_{net} = \int_{\theta=0}^{\theta=\theta_{\max}} \int_{\alpha=\alpha_{\min}}^{\alpha=\alpha_{\max}} \bigl(aE_{s}\cos(sin(\alpha_{s}) \\ ...

1

The math doesn't look quite right. For sure, there's one opening parenthesis missing. The following code inserts a \Big\{ directive at the start of the integrand and changes the orphaned ) to \Bigr\}. However, this opening "fence" may be better placed after the aE_{s} term. To save quite a bit of space, consider getting rid of most pairs of parentheses ...

1

You have to redeclare the math code for the uppercase letters after defining a new symbol font. \documentclass{article} \usepackage{amsmath} \DeclareSymbolFont{boldletters}{\encodingdefault}{\familydefault}{bx}{n} \DeclareSymbolFontAlphabet{\mathbf}{boldletters} \DeclareMathSymbol{A}{\mathalpha}{boldletters}{`A} ...

2

I think, only X and Y should b bold, whereas Var and Cov upright as words/operators (short for "variance" and "covariance"). Defining and using \X and \Y for \mathbf{X} and \mathbf{Y} is a good compromise IMHO. \documentclass{article} \usepackage{amsmath} \DeclareMathOperator{\Var}{Var} \DeclareMathOperator{\Cov}{Cov} \newcommand*{\X}{\mathbf{X}} ...

3

Some time ago I got this \usepackage{etoolbox} \letcs\originald{\encodingdefault\string\d} \DeclareRobustCommand*\d {\ifmmode\mathop{}\!\mathrm{d}\else\expandafter\originald\fi} and, without \letcs \expandafter\let\expandafter\originald\csname\encodingdefault\string\d\endcsname \DeclareRobustCommand*\d ...

12

For example: \documentclass{article} \usepackage{amsmath} \begin{document} $L = \begin{cases} (0 + 1)* & \text{if P = \mathit{NP}} \\ \emptyset & \text{otherwise} \end{cases}$ \end{document}

12

You can make use of mathtools and its cases* environment. The environments cases* and dcases* handles the second column as text, so you wont have to manually "escape" mathmode to typeset the text correctly. The dcases* variant use displaystyle math in the first column, which will make no difference in your situation. See section 3.4.3 in the package ...

6

The error ! Undefined control sequence. \pgfplots@label@ ->$c^\text {ref}$ l.26 \end{axis} indicates that the macro \text is not defined. This happens when you don't load amsmath package since the macro \text is defined by the package amsmath. With the following code: \documentclass[a4paper,10pt]{article} ...

0

hehe, ohh, Steve and Mico. What a delight to be in your company. Dear user89, you have to think thin. \thinspace my dear, \thinspace. \documentclass{article} \usepackage{mathtools} % for "\mathclap" macro \usepackage{amsfonts} \usepackage{amssymb} \usepackage{accents} \renewcommand{\vec}[1]{\ensuremath{\mathbf{#1}}} ...

Top 50 recent answers are included