Tag Info

New answers tagged

3

Use empheq (but first think again if you really need separate numbers): \documentclass{article} \usepackage{amsmath} \usepackage{empheq} \begin{document} \setcounter{equation}{9} % just for the example \begin{subequations} \begin{empheq}[left=\empheqlbrace]{align} k \cdot E &= 0 \\ k \cdot B &= 0 \end{empheq} \end{subequations} \end{document}


3

Here's a do-it-yourself version of the cases environment. By specifying only two columns in the array, you'll get a normal interword space between "if" and "$t>0". \documentclass{iopart} \usepackage{array} \newcolumntype{L}{>{$}l<{$}} % text mode "l" in an "array" \begin{document} \begin{equation} \mathrm{sgn}(t) = \left\{ ...


1

A small simplification of the code with the overload option of empheq, and a variant if you want to emulate the numcases environment. Also it's pointless to load amsmath as empheq loads mathtools which loads it: \documentclass{article} \usepackage{amssymb} \usepackage[overload]{empheq} \begin{document} \begin{alignat}{2}[left=\empheqlbrace] & u_t = ...


3

In my opinion it makes little sense having two numbers for a single mathematical object (the system of equations). Anyway, if you really want this, use empheq (and alignat as the inner environment, because align would spread the parts too much): \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{empheq} \begin{document} ...


6

Use a minipage \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation}\label{eqn:assumption} \begin{minipage}{0.9\textwidth} There is a bounded linear operator $B:X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ \end{minipage} \end{equation} ...


1

For example (the value is only exemplary): \documentclass{article} \usepackage{amsmath} \begin{document} We make the further assumption that \begin{equation} \label{eqn:assumption} \text{\begin{tabular}{p{0.85\linewidth}} There is a bounded linear operator $B\colon X\to X^*$ such that $B^*=B$ and the operator $JB$ is an extension of $T'(0)$ ...


3

\therefore is not a text command. It needs to be in maths mode e.g. $\therefore$. In your snipped, it is outside the align environment and therefore in text mode which won't work. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{amssymb,amsmath} \begin{document} \noindent c)\\ coordinates = ...


1

All your $'s inside align should be replaced by &'s. (You snippet is not a MWE, hence version without corrections and the final result).


5

Just some improvements (in my opinion) to the preceding solution: I use the cases* environment (from mathtools), that makes the second column of a cases environment in text mode. The same package defines a \coloneqq command so that the colon is centred on the math axis. And finally I use the booktabs package to give some more vertical spacing to the rows, ...


4

\[...\] introduces vertical space, as it effectively something like \begin{center} ...\end{center}, in math mode, however. so this has to be removed and changed to \centering \( ....\) I kept the second line as demo for both effects. \documentclass{article} \usepackage{amsmath} \usepackage{multirow} \begin{document} \begin{table} \begin{tabular}{l p{7cm} ...


1

(I swear this must be a duplicate question, but I can't find one.) Use \cfrac: (Also, use \text{…} for math elements that are interpreted as text, such as \lim_{t\to\infty}C_{\text{Gasoline}=\infty}) \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \cfrac{1}{T_{\text{ex}}} = ...


1

When you type \newtheorem{thm}{Theorem}[section] it means that it will number by sections, write "Theorem" and you refer to it using the environment name thm. You need to write \begin{thm} Let $X$ be boundedly compact metric space and $\mathcal{B}$ a family of closed balls in $X$ such that \begin{equation} sup\{d(B):B \in \mathcal{B}\} ...


4

As you've discovered, an ordinary equation environment won't let you insert line breaks. I suggest you load the amsmath package (if you're not already doing so) and use its align* environment to typeset the expression; insert & where you want the alignment points to be. In the code below, I also make use of \smash[b]{...} to reduce the space between ...


5

You need to insert \limits after \iiiint: \documentclass{article} \usepackage{amsmath} % for \iiint macro \begin{document} \begin{equation} m = \iiint\limits_E \rho \, \mathrm{d}V \end{equation} \end{document}


0

Well, compare with this \documentclass{article} \usepackage{amsmath} %\usepackage[T1]{fontenc} \usepackage{anyfontsize} \begin{document} \fontsize{4cm}{4cm}\selectfont $\xrightarrow{\quad}$ \end{document} no vissible bug.


2

Seems to be missing a tikz solution: or with smaller text under the brace: Code: \documentclass{article} \usepackage{mathtools} \usepackage{xparse} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathreplacing} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} % Tweak these as necessary ...


1

I think a different alignment and smaller parentheses would look better; \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{lipsum} \begin{document} \begin{equation} \begin{aligned} M = -π ρ \frac{c²}{4} \left[ c\Bigl(\frac{α}{c}-\frac{1}{2}\Bigr)\ddot{h} Uc\Bigl(\frac{3}{4}-\frac{α}{c}\Bigr)\dot{α} + ...


2

Here is the code that compiles: Notes: The left[ on the first line needed a closing \right. before the \\. An opening \left. was added on the second line after the alignment point to match the closing right] at the end. Code: %!TEX encoding = UTF-8 Unicode \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} ...


0

the latex definition of \vdots is identical to the one defined by knuth in plain.tex, except that it is made robust. it is constructed from three periods stacked one above the other in a \vbox. the "extra" space at the top is the consequence of the full height of a "normal" character being used for the topmost period, whereas the actual height is much less. ...


3

It's a problem due to the timing when the relevant parameters are set. However it can be fixed by telling autonum to ignore overfull box messages when it does its tentative math environment in order to establish some internal values. The code \def\autonum@saveEnvironmentSubcommands#1#2#3{% \begin{textblock}{1}[1,1](0,0)% \begin{#2}% (lines 107–109 in ...


3

That's standard vim-latex expansion for all brackets (( will become \left( <++> \right)<++>, as well as {{ will become \left{ <++> \right}<++> See this answer: http://tex.stackexchange.com/a/158733/59716


6

The reference point of an \infer box is at the bottom. You can change its vertical alignment with adjustbox; I show three versions. \documentclass{article} \usepackage{amsmath,proof,adjustbox,calc} \begin{document} \[ \infer[\forall x \mathrm{i}] {\forall x \phi} {% \boxed{ x_0 \quad \begin{adjustbox}{valign=t,raise=-.6ex} ...


1

In addition to egregs answer, one could use the package tikz-cd for this: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} W \arrow{r}{\phi} \arrow[shift right, swap]{d}{a}& X \arrow[shift right, swap]{d}{c}\\ Y \arrow{r}{\phi} \arrow[shift right, swap]{u}{b} & Z \arrow[shift right, swap]{u}{d} ...


1

It would be easier to switch to tikz-cd. If you do so, you can use any answer from this post. The \makemathbox{} commands are optional. They just give every edge a certain width in order to get the arrows to the same length. As asked by the OP, I scaled the whole image, say, arrows, characters, and linethickness. % arara: pdflatex \documentclass{article} ...


1

Here are two suggestions that might make the equation easier to read. Code based on @Bernard s answer. \documentclass[11pt,a4paper]{article} \usepackage{mathtools} \DeclareMathOperator\Cl{Cl} \DeclareFontFamily{U}{mathx}{\hyphenchar\font45} \DeclareFontShape{U}{mathx}{m}{n}{ <-6> mathx5 <6-7> mathx6 <7-8> mathx7 <8-9> mathx8 ...


5

First of all, I would use displaystyle fractions. Next I would replace the non-extensible \bar with \widebar, borrowed from the mathx(it's in the mathabx bundle, without loading the mathabx package since it changes many symbols.As I'm changing symbols, I also replaced \widehat with mathx's version, with I named varwidehat to not interfere with defaults. ...


4

Your code isn't compilable since it contains macros such as \textgreater and \textless that shouldn't occur in math mode. The argument of a \label command has to be enclosed in curly braces, by the way. You didn't give any hints as to your criteria for beauty and legibility, so I'll have to use my own. :-) There's nothing terribly wrong with the look once ...


4

You have too many $ characters! The cases environment is in math mode, as well as equation*, so you should type \begin{equation*} \theta = \begin{cases} \eta & \widehat{P} < \bar{P}\\ \eta & \widehat{P} > \bar{P} \end{cases} \label{eq: test} \end{equation*} If you want to add text to the side conditions, you can use ...


4

I would do like the following: % arara: pdflatex \documentclass{article} \usepackage{amssymb} \let\oldvec\vec \renewcommand*{\vec}[1]{\mathbf{#1}} \begin{document} \[\vec{X}_1^\intercal\vec{X}_1^{\vphantom{\intercal}} \qquad \vec{X}_1^2\vec{X}_2^2\] \end{document} Update: The OP asked for a solution without \vphantom{}. The other way ...


4

It should be \begin{align*} Q(i,j) &= (n-2)d(i,j) - \sum_{k=1}^{n} d(i,k) - \sum_{k=1}^{n} d(j,k) \\ \delta (i,j) & = \frac{1}{2} \end{align*} (of course, amsmath is called). Please observe that now there are no empty lines inside align* environment.


3

This is a substitute for \xrightarrow made with Xy-pic \documentclass{article} \usepackage[all,cmtip]{xy} \newlength{\xywd} \newcommand{\xyrightarrow}[2][]{% \sbox{0}{$\scriptstyle#1$}% \xywd=\wd0 \sbox{0}{$\scriptstyle#2$}% \ifdim\wd0>\xywd0 \xywd=\wd0 \fi \xymatrix@C\dimexpr\xywd+1em\relax{{}\ar[r]^{#2}_{#1}&{}}% } \begin{document} \[ X ...


3

You can define general statements as you like; there is no predefined theorem-like environment, because people tend to have different expectations about this. \documentclass{article} \usepackage{amsthm} % for \theoremstyle and proof \newtheorem{thm}{Theorem}[section] % theorems will be numbered according to section \newtheorem{lem}[thm]{Lemma} % lemmas ...


2

There are a number of choices. One good one is amsthm. Here is an example. \documentclass{minimal} \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem} \newtheorem{lem}{Lemma} \newtheorem{cor}{Corollary} \newtheorem{exm}{Example} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{thm} \lipsum[2] \end{thm} \begin{lem} \lipsum[3] ...


2

TeX adds no space between letters and digits in this context however the font may (and does) specify inter-letter kerns, the spacing around and between letters in text and in math is a choice of the font designer and not generally settable within TeX other than manual spacing, as you show If I modify your example to \documentclass{article} ...



Top 50 recent answers are included