# Tag Info

3

I should probably not be surprised to get negative points for this answer. Here's something you could do, but I think it results in a very ugly output. Granted, this is a brute-force approach and could probably be a bit more prettified. But even then, I think, it would still be ugly. \documentclass{article} \usepackage{booktabs} ...

1

I agree that the concern for nested \mathchoices is real (I've seen cases that don't involve \text where it is significant, see, for example, Serious problem with \widebar, and the "important note" suffixed to the answer). But rather than asking the question, "when do I 'need' \text?", I am looking at it as "how can I make \text work for me? In my MWE, the ...

5

If it's a “one shot”, then $\langle w,\tilde{w}\rangle$ will be sufficient. If you have several inner products to typeset it is surely better to define a personal command for them; there are several possibilities. The simplest one is \newcommand{\innp}[1]{\langle #1\rangle} to be called as $\innp{w,\tilde{w}}$ $\innp{x,y}$ Defining a command is ...

1

You can try the physics package. It provides quite a lot of macros that are useful. The following code does what you want and in my opinion, it is quite simple :-) \documentclass{article} \usepackage{mathtools} \usepackage{physics} \begin{document} $\ev{w,\tilde{w}}.$ \end{document} Here \ev stands for expectation value.

4

To have a correct horizontal spacing and delimiters that adapt to the size of what's inside, you can use the mathtools package (it loads and extends amsmath). You have commands to define "paired delimiters" such as a scalar (inner) product: \DeclarePairedDelimiterX\innerp[2]{\langle}{\rangle}{#1\,,\,#2} Then you'll have two versions for inner products: ...

0

\documentclass{article} \begin{document} $y = \{ {a ,b ,c}\}\newline y\subseteq x\newline x = \{ {\{{a, b, c}\}, d, e, f}\}$ \end{document} Works fine.

2

While this is similar to @Bernard's, it seems to me the list of cases belong with the second line alone. The following numbers only the second line: \documentclass[a4paper, 11pt]{book} \usepackage{amsmath} \begin{document} \begin{align} W \in \mathbf{M}_N & \rightarrow W' \in \mathbf{M}_{N+1} \notag\-8pt] (w_{ij})_{1\leq i,j\leq N} & \mapsto ... 2 I realize that you specified you want to place the entire expression on two lines. However, I think the following form, which extends over five lines and uses a split environment inside an equation environment, may have some merit: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{split} W \in \mathbf{M}_N ... 3 \StrLeft is not robust and it should not expand its argument the hard way. The unbreakable stuff should be put into curly braces. Example based on the accepted answer of the cited question. Additionally it is modified to avoid the extra dots if they are not needed. \documentclass[12pt]{article} \usepackage{xstring} \usepackage{titleps} ... 1 Another solution, using alignat, aligned and cases: \documentclass[a4paper, 11pt]{book} \usepackage{amsmath} \begin{document} \begin{alignat}{2} & \begin{aligned} W \in \mathbf{M}_N & \longrightarrow W' \in \mathbf{M}_{N+1}\\[4pt] (w_{ij})_{1\leq i,j\leq N} & \longmapsto (w_{ij})_{1\leq i,j\leq N+1} \end{aligned} & \enspace ... 4 You could use the cases environment. See section 3.7 of the amsmath package documentation. Here I have split your equation in two so that it does not spill over the right margin. \documentclass[10pt]{article} \usepackage{amsmath} \begin{document} W \in \mathbf{M}_N \rightarrow W' \in \mathbf{M}_{N+1} (w_{ij})_{1\leq i,j\leq N} \mapsto ... 8 A displayed equation should never be at the top of anything. The problem is that a paragraph is started and then the equation is typeset. \documentclass{beamer} \usetheme{Antibes} \usepackage{amsmath} \begin{document} \begin{frame} \begin{block}{Separation of variables} \vspace*{-\baselineskip}\setlength\belowdisplayshortskip{0pt} 1 + 2 ... 5 The problem you're encountering is caused by the fact that \midrule can take an optional argument which indicates the thickness of the line to be drawn. Thus, LaTeX scans the string [89^\circ_2/12.7^\circ_1/89^\circ_2] for a unit of measurement, and an error message is generated because no legal unit of measurement (such as pt, cm, etc) is found. ... 3 I am not sure if this the correct formatting of that lines enclosed by [...], but I give it a try ;-) \documentclass{scrbook} \usepackage{booktabs} \begin{document} \begin{table}[h] \centering\small \caption{Thickness measurements on the two tubes.} \label{tab:Thickness_measurement} \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lll} ... 3 The following example defines \boxwedge and \owedge using TikZ: The symbols adapt in size and line width according to the current math style. They are defined as binary operators like \boxplus and \oplus. The height, width/side bearings are derived from \boxplus and \oplus. \documentclass{article} \usepackage{amsmath,amssymb} \usepackage{tikz} ... 3 Instead of using nested equation* and aligned environments, you could use a single align* environment. Two additional suggesions: (i) for the separation between the equation and condition parts, you could employ \qquad ("double \quad"); (ii) for a bit more vertical separation between the two rows, you could [1ex] immediately after the first \\ line break ... 2 If you don't want the equations numbered (since you are using aligned), just adding a && after the = 0 on each row will insert a \quad = 1em horizontal gap between the equation and what follows AND left-align the following content (a single & would also add the 1em gap, but right-align what follows). The aligned type environments are aligned ... 0 The alignat environment can do what you want. Here are two suggestions — the second one requires using the mathtools package, which loads amsmath anyway: \documentclass{article} \usepackage{mathtools} \begin{document} \noindent A first solution: \begin{alignat}{2} \frac{\partial \Psi}{\partial x} &= 0 & \hspace{4em} & \mbox{ for } 0 \leq y ... 0 Just to 'close' this question... \documentclass{scrbook} \begin{document} There are principally two methods to write an equation surrounded by text: \begin{enumerate} \item Displaystyle -- in a separate line It makes quadratic equation which is \[ ax^2 \pm bx \pm c, then by eliminating the constants and lower order terms... \item Inline It makes ...

5

If you are willing to live under the constraint that all matrix elements occupy the same width (though your question implies that such a constraint may actually be a desirable requirement), then this \sqmatrix[alignment]{content} macro will do the "squaring" automatically. Inter-element spacing (default 0pt) may be specified with \setstacktabbedgap{length}. ...

11


9


Top 50 recent answers are included