Tag Info

New answers tagged

1

You could use the ntheorem package to get the desired formatting of the hyp environment. (Be sure to compile the example code below twice, so that LaTeX can resolve the embedded cross-reference.) \documentclass{article} \usepackage{ntheorem} \theoremseparator{:} \newtheorem{hyp}{Hypothesis} \begin{document} \begin{hyp}[H\ref{hyp:first}] ...


4

Don't use math mode for the whole thing: \documentclass{article} \usepackage{amsmath} \begin{document} This is the set we all love $L_4 =\lbrace w \mid{}$every $1$~in~$w$ is either preceded or followed (not necessarily immediately) by two (need not be consecutive)~$0$'s$\rbrace$ and some other text follows. \end{document} (I removed a w just after \mid ...


3

Inside a displayed equation, a tabular can be used and the brackets and line increased: \documentclass{article} \usepackage{amsmath} \begin{document} \[ L_4 =\left\lbrace w \;\middle|\; \begin{tabular}{@{}l@{}} every 1 in $w$ is either preceded or followed (not necessarily\\ immediately) by two (need not be consecutive) 0's \end{tabular} ...


0

I propose two different alignments instead of multlined. I also redefined the \braket command thanks to \mathtools and xparse to have a simple syntax, close to what one writes by hand, namely:: \braket{a|b|c}. Also note that, if you use the geometry package (without changing whatever), a number of equations don't have to be split across lines. ...


1

Since \qquad inserts 36mu of horizontal whitespace, 11 consecutive \qquad directives can be written more succinctly as \mkern396mu. Here's a solution that uses a single align* environment, along with a couple of \intertext directives and three \mkern396mu instructions. I use \allowdisplaybreaks as well, just in case a page break needs to occur. I also ...


4

You can use align* and multlined (which requires mathtools); for the explanations and keeping the alignment, use \intertext. I provided a better definition of \braket that doesn't place the asterisk at random places; use \braket[*]{x|y} for having a superscript asterisk. Also a better notation for the differential has been added and an abbreviation for the ...


8

There are in fact very few standards for such things. There is ISO 80000-2 which is an ISO standard "Quantities and units — Part 2: Mathematical signs and symbols to be used in the natural sciences and technology" this is the standard referenced by the rather unfortunately named isomath package and mathstyle=iso option to unicode-math. (I say unfortunate as ...


0

Simply move all the left/right bracketing and exponentiation, into the underbrace argument: \documentclass{article} \usepackage{physics} \usepackage{mathtools} \usepackage{amsmath} \begin{document} \begin{equation*} \norm{f - L}_{\infty} = \overbrace{\abs{\frac{K_2}{2}}}^{\mathclap{\text{worst $f''(x)$ over ...


2

The package you need is amsthm (besides the recommended amsmath). Add \usepackage{amsthm} and all will go flawlessly.


1

The split is redundant to the align. Simply use \notag to avoid putting an equation number on any particular line. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} %start alignment between state and observation equation %State Equation %\begin{split} %split the observation equation in two so it fits on the ...


1

You can try with \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} \begin{split} \begin{bmatrix} a\\ b\\ c \end{bmatrix}&=\begin{bmatrix} a & b & c \\ e & f & g \\ h & i & j \end{bmatrix}\begin{bmatrix} ab \\ cd \\ ef ...


1

Note the fl in flalign is for full length, not flush left. the fleqn option is intended to flush left math layouts: \documentclass[fleqn]{article} \usepackage{amsmath} \setlength\mathindent{0pt} \begin{document} left aligned equation: \begin{align*} {\begin{array}{c} \text{Something long}\\ {[\text{Something}_{\text{else}}]} \end{array}} &= ...


0

Just use a tabular: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \begin{tabular}{@{}r@{}} This is the first part\\ of a longer text \end{tabular} = \dfrac{\text{One rather long Thing}}{\text{Other Thing}} \end{equation*} \end{document}


2

This is the stackengine (by our fellow user Steven B. Segletes) version of linebreaking There are some macros, but for this purpose, \Centerstack seems to be quite useful. The optional argument contains the alignment character, r is used for right justified stacking. There is a \Vectorstack command for math content too. The vertical spacing between the ...


3

You can enclose it in a \parbox. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign*} \text{\parbox{3cm}{This is the first part of a longer text}} = \dfrac{\text{One rather long Thing}}{\text{Other Thing}} \\ \end{flalign*} \end{document}


6

This is a typical error: Loading packages which uses counters and special reference formats after cleveref is wrong, since this package uses sophisticated macros in in the background, well, to do the clever reference ;-) cleveref should be the last package to be loaded, even after hyperref \documentclass{article} \usepackage{amsmath} ...


1

I adapted my recent answer at Create itemize-like command, and actually prefer its look to what the OP asks here. Nonetheless, I have adapted it to look more in a manner the OP has specified. The default \leftmargin is .4\textwidth, but that can be overridden with an optional length argument to the explanation environment. Other changes from the ...


2

Another solution: \documentclass{article} \usepackage{mathtools} \usepackage{array} \begin{document} \begin{align} \text{Spatial,}\quad d_p(s^i,n^{jk}) & = √{(s_x^{\vphantom{j}i} - n_x^{jk})^2} \\ % \text{and color distance component,}\quad d_c(s^i,n^{jk}) & = √{(s_L^i - n_L^{\smash jk})^2 } \\[-1ex] % with smashed j ...


1

Maybe like this? % arara: pdflatex \documentclass{article} \usepackage{mathtools} \usepackage{blindtext} \begin{document} \blindtext Something spatial, \begin{align} d_p(s^i,n^{jk}) &= \sqrt{(s_x^{\vphantom{j}i} - n_x^{jk})^2} \\ % with phantom j \intertext{and color distance component,} d_c(s^i,n^{jk}) &= \sqrt{(s_L^i - ...


2

For line numbering to be done correctly the math environments has to be wrapped using the \begin{linenomath*} and \end{linenomath*} code: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{lineno} \linenumbers \begin{document} For line numbering to be done correctly the math environments has to be wrapped using the ''linenomath`` code as ...


4

Simple solution using \newcommand{\foo}{\phantom{+\Delta V \%}} \newcommand{\equalarrow}{% $\vphantom{\xrightarrow{=}}% \smash{\xrightarrow[\foo]{=‌​}}% $} Note that \equalarrow already contains $ $ in its definition. Also, I added the @Heiko's suggestion to adjust the vertical space created by the invisible content.


0

This is babel isue. Tray; \documentclass[12pt,oneside,openright]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} \usepackage{graphicx,xcolor} \usepackage{amssymb} \usepackage{amsmath} \usepackage[french]{babel} \usepackage[active,textmath,tightpage]{preview}% just to show only math ...


3

Here are a solution and some fakes codes with similar outputs. \documentclass[11pt,a4paper]{report} \usepackage{amsmath} \DeclareMathOperator{\Prob}{Prob} \begin{document} % best way $( \Prob_{\text{SVM}} - \Prob_{\text{MLP}} )$ % fake $( \text{Prob}_{\text{SVM}} - \text{Prob}_{\text{MLP}} )$ % ugly: product of constants P r o b $( Prob_{\text{SVM}} - ...


1

It's not related to the problem in the referenced question, there large entries were tight to the surrounding rows and the answer made sure that the spacing strut in those rows was larger than the entry thus preserving row separation but making the row separation more variable. It would not do anything here as the later rows are not large. Here (I think) ...


5

Infix operators like + and - lose their infix status (and the extra space that implies) if used on their own in this way. Also as noted by egreg, in a superscript the operators would get no space even used as an infix operator. What you have is the standard markup.


0

Using \operatorname{lcm} results in proper spacing in things like this: a\operatorname{lcm}b The same is true of this: \operatorname{ord}


1

Just use a nested array, so you don't really have to fiddle with the horizontal space adjustment (except for the "null delimiter" \left.): \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} % http://tex.stackexchange.com/a/31704/5764 \renewcommand{\arraystretch}{1.2} \begin{array}{r@{\quad}l} \text{max:} & A, \\ ...


2

\left. inserts \nulldelimiterspace and you need two \!s \documentclass[a4paper, 11pt]{book} \usepackage{amsmath} \begin{document} \begin{equation} \begin{split} \text{max:} \quad & A,\\ \text{s.t.:} \quad & B,\\ & \left.\kern-\nulldelimiterspace \!\!\begin{aligned} & C,\\ ...


1

Two solutions, both using the rcases environment, from mathtools. The second solution replaces the split environment with alignedat; it allows to typeset the \quadonly once. \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage{fourier, heuristica} \usepackage{mathtools} \begin{document} \begin{equation} ...



Top 50 recent answers are included