Here is my MWE:   \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage[all]{xy} \makeatletter \newcommand{\test}{\xymatrix@M=-.3pt@=10pt} \newcommand{\testt}[2][1]{\ar@[|(1)]@#1{-}[#2]} \makeatother   \begin{document} \begin{align*} &amp;f=\test{ &amp; \bullet \testt{dl} \testt{dr} \\ \bullet &amp; &amp; \circ } &amp;g=\test{  &amp; &amp; \bullet \testt{dl}\testt{d}\testt{dr}\\ &amp; \bullet &amp; \bullet \testt{d} &amp; \bullet \testt{d}\\ &amp; &amp; \circ &amp; \circ } \end{align*} \end{document}   Please help!!!!!  related to this  but solution not working
123746
I have a problem compiling the following document.  First, I have a file macros.sty that consists of :  \newcommand{\test}{ \xymatrix@R=0mm{x} }   Then, I have an auxiliary file out.aux that consists of :  \test   Finally, the main file is :  \documentclass{article} \usepackage[all]{xy} \usepackage{macros} \begin{document} \input{out.aux} \end{document}   The error message is :  ./out.aux:1: Undefined control sequence. \xymatrix@R -&gt;\Addop@@                     \xymatrixrowsep@ \dimen@ii    Note that if you remove the R=0mm, the problem no longer holds.  Is that a bug ?  It is very strange because I remember to have already used a command similar to \test in an input file without any problem.  Does it come from my distribution ?  Thank you :)
87037
My intention is to create equation which looks similar to one of examples below (I prefer the second one).     There should be an arrow from JKL to DEF and GHI and from GHI to DEF.   Neither alignment nor equation environment have to be used. Anything that will do is appreciated. Cheers.
27706
I copied the following command from a post on this web site.  \newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}}   I have used it in other code and it has typeset the symbol for parallel lines nicely.  Why is it not compiled in this code?  (I try to use it in the last sentence.  I put a % in front of it so that the code will compile.)  \documentclass{amsart} \usepackage{amsmath} \usepackage{amsfonts}  \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,decorations.pathreplacing,backgrounds,patterns}   \usepackage{graphicx,tipa}% http://ctan.org/pkg/{graphicx,tipa} %This command typesets an arc symbol over letters. \newcommand{\arc}[1]{%   \setbox9=\hbox{#1}%   \ooalign{\resizebox{\wd9}{\height}{\texttoptiebar{\phantom{A}}}\cr#1}} %This command has LaTeX typeset the symbol for parallel lines. \newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}}   \begin{document}  \noindent {\textbf{Proposition}} \vskip1.25mm {\em $\overline{AB}$ and $\overline{CD}$ are chords in a circle that do not intersect. They are parallel if, and only if, $\arc{AC} = \arc{BD}$.} \vskip0.2in  \noindent {\textbf{Demonstration}} \vskip1.25mm \noindent $\overline{AB}$ and $\overline{CD}$ are chords in a circle centered at $O$. $\arc{AC} = \arc{BD}$ if, and only if, ${\mathrm{m}}\angle{AOC} = {\mathrm{m}}\angle{BOD}$. \begin{equation*} {\mathrm{m}}\angle{ABC} = \frac{1}{2} \, {\mathrm{m}}\angle{AOC} \qquad \text{and} \qquad {\mathrm{m}}\angle{BCD} = \frac{1}{2} \, {\mathrm{m}}\angle{BOD} . \end{equation*} So, ${\mathrm{m}}\angle{AOC} = {\mathrm{m}}\angle{BOD}$ if, and only if, ${\mathrm{m}}\angle{ABC} = {\mathrm{m}}\angle{BCD}$. $\angle{ABC}$ and $\angle{BCD}$ are alternate interior angles. ${\mathrm{m}}\angle{ABC} = {\mathrm{m}}\angle{BCD}$ if, and only if,  %$\overline{AB} \parallelsum \overline{CD}$.  \end{document}
111714
I am so bad aligning... Anyone see why there is a big space in the function?  Thanks for your help!    begin{alignat*}{2}  \tau\colon G\times k[V]&amp;\longrightarrow&amp;k[V] \\  (x,f)&amp;\longmapsto&amp;\tau_{x}(f)=x\cdot f:V&amp;\longrightarrow k \\  &amp;&amp;v&amp;\longmapsto\tau_{x}(f)(v):=f(x^{-1}\cdot v)  \end{alignat*}
645
I have a command that has been floating around in my standard preamble for a while:  \newcommand{\xeq}[1]{\stackrel{\;#1}{\cleaders\hbox{=\!}\hfill}\:}   It is meant to mimic the AMS-LaTeX extendible arrow symbols \xleftarrow and \xrightarrow.   It's not perfect for two reasons:   It does not take the optional lower argument like the AMS \xrightarrow[down]{up} The overlap of the constituent equals signs is slightly visible.   Does anyone have a better command or know of a package with such a command?
25136
I am new to Latex ;) I split my equation like this:  \begin{equation} \begin{split}     \tilde{m}=P\tilde{M} \\     \quad = K(R^1R^2R^3t) \begin{pmatrix} X \\ Y \\ 0 \\ 1 \end{pmatrix} \\     \quad= K(R^1R^2t)\begin{pmatrix} X \\ Y \\ 1 \end{pmatrix} \\     \quad= H \begin{pmatrix} X \\ Y \\ 1 \end{pmatrix}  \end{split} \end{equation}   which gives me this:   but, actually, I want it to be aligned like this:   How do I align them so it looks like the right side is always aligned?  Thanks
62475
I have the following MNWE and don't understand why this fails.   \documentclass{article} \usepackage{amsmath} \begin{document} $\dots \left. \right.$ \end{document}   Understanding the relevant code in amsmath proves to be rather difficult and I can't find a mention anywhere that this is somehow not OK to do. Of course I can use some of the more specialized dot commands to get rid of the guessing \dots does. I would be extra grateful for an explanation of what the trick with \uppercase in all the helper definitions(\striplong@...) and using \meaning in \mdots is.
26672
I found this program and I was wondering how can I add on a left brace as in the systeme package or in the cases environment? Also is it possible to left align the right-hand side of the equal sign ?  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{4}    2x &amp; {}+{} &amp;  y &amp; {}+{} &amp; 3z &amp; {}={} &amp; 10 \\     x &amp; {}+{} &amp;  y &amp; {}+{} &amp;  z &amp; {}={} &amp;  6 \\     x &amp; {}+{} &amp; 3y &amp; {}+{} &amp; 2z &amp; {}={} &amp; 13 \end{alignat*} \end{document}
103306
I'm doing the following thing  \documentclass[leqno]{amsart} \begin{document} Example. \begin{itemize} \item Such and so \item the following holds    \begin{align}        x - 2    \end{align}        always. \item whatever else \end{itemize} \end{document}   Since I number my equations on the left, what I don't like about this is that the equation number is closer to the margin than the itemize bullets, while I would like it to be the other way around. Is there a way to do that? Maybe I should create a box or minipage with tikz (or something similar)?
39390
I'm trying to add this expression to my work:   I understand that the best way to achieve this is using the alignat environment within the amsmath package, so I tried the following:  \begin{alignat*}{3} m &amp;&amp; \text{módulo} &amp;&amp; m&gt;0\\ a &amp;&amp; \text{multiplicador} &amp;&amp; 0&lt;a&lt;m\\ c &amp;&amp; \text{constante aditiva} &amp;&amp; 0\leq c&lt;m\\ x_0 &amp;&amp; \text{valor inicial} &amp;&amp; 0\leq x_0 &lt;m \end{alignat*}   But the spacing I'm getting is really weird, I have read the amsmath documentation but I can't figure out what's the problem.  This was I'm getting:   My version is in spanish and I'm using polyglossia, but I don't think that's relevant. Anyway I'm using xelatex, and the book class.  I also wanted to know if there is a way to write the whole equation in the same environment with the middle text, or do I need to make another math environment for the centered equation at the end.
17506
I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this:  \documentclass{article} \usepackage{amsmath}   \begin{document}      \begin{equation}          \begin{bmatrix}              1 &amp; 2 &amp; 3 &amp; 4 &amp; 5 &amp; 6 &amp; 7 &amp; 8 &amp; 9 &amp; 10 &amp; 11\\          \end{bmatrix}     \end{equation}  \end{document}   However, pdfLaTeX returns an error: "Extra alignment tab has been changed to \cr", and in the output the extra element is moved to the next row. (If I remove one element, then it works perfectly fine). I guess this means that I've hit some hard limit on the number of tab stops in a matrix. Is there a way to change this?  The elements in the matrix are short and could fit perfectly on a single row.
104381
I asked this question at stackoverflow and have been kindly redirected here.  I'd like to align some equations in Latex using the AMS packages. Each equation has two equal signs that need to be aligned. So something in the line of  A = B = C D = E = F   I've tried using the align-environment like this  \begin{align} A &amp;= B &amp;= C \\ D &amp;= E &amp;= F \end{align}   This works in principle (it aligns), however it adds ridiculously large spaces before the second equal sign in each line. But I just want the line to runs as if there was no additional alignment tab. Only when I replace for example "B" by "BBB" I want the equal sign before "F" to shift to right the exact amount of space.  Could anyone help me out on that one? It's kind of driving me crazy since I don't get the idea of that strange behavior and I just can't find any solution. Maybe alignat could help, but I don't really get how that environment works.  Cheers, Oliver
81941
The following has worked for me for quite some time.  \documentclass[11pt]{book} \usepackage[margin=1in]{geometry}             \geometry{letterpaper}                  \usepackage[parfill]{parskip}     \usepackage{tikz, pgf, calc} \usetikzlibrary{matrix, shapes, positioning, calc, decorations.pathreplacing, shapes.geometric, arrows}  \newcounter{Day}  \newcounter{pt}[Day]    % CORRECTNESS POINTS FOR HW RUBRICS \newcommand{\pt}[2]     % NUMBER OF POINTS, ITEM IN STARBURST     {#2\begin{tikzpicture}[remember picture, overlay]         \node (A) [starburst,              draw = red, opacity = .8,              fill = red!20, fill opacity = .2,              xshift = -.5*\widthof{#2},             yshift = .5*\heightof{#2}             ]             {\phantom{#2}};         \node (B) at (current page.west) {};         \path let \p1 = (A), \p2 = (B) in node [draw = red,              color = red] at (\x2+.625in,\y1) {#1 pt(s)};     \end{tikzpicture}     \addtocounter{pt}{#1}     }  \begin{document}  \pt{1}{lorem}  \end{document}   Recently, I updated several packages with MikTeX 2.9.  Below is a screenshot of the packages that were updated.    Since the updates, the \widthof and \heightof commands are causing errors.  If I change the xshift and yshift to something else, everything compiles just fine (but isn't the way I want my command to work).  I have two questions:   Why did this work before and not now? How can I change my code to make it work correctly again?   Thanks in advance for any help!
30263
I just read a book "Linear Algebra and Its Applications 4E" by David C. Lay. The book is (should be) LaTeX typeset. The matrix and equations are so nice, please see the following 3 examples:        It's so beautiful, so I want get the same effect inside my paper. Here is my code:   \usepackage{amsmath} \usepackage{colortbl} \newcommand\y{\cellcolor{clight2}} \definecolor{clight2}{RGB}{212, 237, 244}%  %%% \[A=\left[ \begin{array}{ccccc} \y 0 &amp; -3 &amp; -6 &amp; 4 &amp; 9 \\    -1 &amp; \y -2 &amp; -1 &amp; 3 &amp; 1 \\ -2 &amp; -3 &amp; 0 &amp; \y 3 &amp; -1 \\ 1 &amp; 4 &amp; 5 &amp; -9 &amp; -7      \end{array} \right]\]  \[A=\left[\begin{array}{cccccc} \rowcolor{clight2} 3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15\\ 0 &amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\ 0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \end{array} \right]\]   And the result:     But how to add these arrows??
65182
\[\setlength\arraycolsep{1pt} \begin{array}{rcccl}     &amp;S &amp;= &amp;R_0 + R_1 + R_2 + R_3 + R_4 &amp;+ \\     &amp;  &amp;~ &amp;R_5 + R_6 + R_7 + R_8 + R_9 &amp;~ \\     &amp;  &amp;= &amp;0   +  1  +  2  +  3  +  4  &amp;~ \\     &amp;  &amp;~ &amp;5   +  6  +  7  +  8  +  9  &amp;= 45 &lt; 100 \end{array} \]   generates:    with = signs being correctly aligned. How to make + symbols aligned? Adding extra &amp; signs in front of +:  &amp;S &amp;= &amp;R_0 &amp;+ R_1 + R_2 + R_3 + R_4 &amp;+ \\ &amp;  &amp;~ &amp;R_5 &amp;+ R_6 + R_7 + R_8 + R_9 &amp;~ \\ &amp;  &amp;= &amp;0   &amp;+  1  +  2  +  3  +  4  &amp;~ \\ &amp;  &amp;~ &amp;5   &amp;+  6  +  7  +  8  +  9  &amp;= 45 &lt; 100   gives compile error. Why?
11092
\documentclass[oneside,12pt]{article} \usepackage{geometry} \usepackage{microtype} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}  \usepackage{enumitem} \setlist[enumerate,1]{label=\bfseries\Alph*,align=left,leftmargin=*,   labelsep=1.5em} \setlist[enumerate,2]{label=\arabic*.,labelindent=1em,labelsep=1.5em,   leftmargin=*}  \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem*{sol}{Solution}  \usepackage{forest} \forestset{   ass/.append style={     before computing xy={l=\baselineskip},     no edge   },   prooftree/.style={     for tree={       child anchor=north,       parent anchor=south     }   } }  \begin{document} \subsection*{Exercises 29} \begin{enumerate} \item Use QL trees to evaluate the entailment claims (1) to (10) in Exercises   28A.   \begin{enumerate}   \item $\forall x(Fx\supset Gx)\vDash\forall x(Gx\supset Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(Gx\supset Fx)\checkmark$,ass       [$\exists x\neg(Gx\supset Fx)\checkmark$,ass       [$\neg(Ga\supset Fa)\checkmark$,ass       [$Ga$,ass       [$\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$] [$Ga$]]]]]]]]     \end{forest}      $\neg Fa$ and $Ga$ make the premisses and the negation of conclusion true.     Thus, the entailment is invalid.   \item $\forall x(Fx\supset Gx)\vDash\forall x(\neg Gx\supset\neg Fx)$      \begin{forest}       prooftree       [$\forall x(Fx\supset Gx)$       [$\neg\forall x(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\exists x\neg(\neg Gx\supset\neg Fx)\checkmark$,ass       [$\neg(\neg Ga\supset\neg Fa)\checkmark$,ass       [$\neg Ga$,ass       [$\neg\neg Fa$,ass       [$(Fa\supset Ga)\checkmark$,ass       [$\neg Fa$ [*,ass]] [$Ga$ [*,ass]]]]]]]]]     \end{forest}      Since the tree closes, the entailment is valid.   \item $\forall x\exists yLxy\vDash\forall y\exists xLyx$      \begin{forest}       prooftree       [$\forall x\exists yLxy$       [$\neg\forall y\exists xLyx\checkmark$,ass       [$\exists y\neg\exists xLyx\checkmark$,ass       [$\neg\exists xLax\checkmark$,ass       [$\forall x\neg Lax$,ass       [$\exists yLay\checkmark$,ass       [$Lab$,ass]]]]]]]     \end{forest}      \begin{forest}       prooftree       [$\neg Lab$,ass [*,ass]]     \end{forest}   \item $\forall x((Fx\wedge Gx)\supset Hx)\vDash\forall     x(Fx\supset(Gx\supset Hx))$   \item $(\forall xFx\vee\forall xGx)\vDash\forall(Fx\vee Gx)$   \item $\forall x(Fx\supset Gx),\forall x(\neg Gx\supset Hx)\vDash     \forall x(Fx\supset\neg Hx)$   \item $\exists x(Fx\wedge Gx),\forall x(\neg Hx\supset\neg Gx)\vDash     \exists x(Fx\wedge Hx)$   \item $\forall x\exists y(Fy\supset Gx)\vDash\forall y\exists x(Gx\supset     Fy)$   \item $\forall x\forall y(Lxy\supset Lyx)\vDash\forall xLxx$   \item $\forall x(\exists yLxy\supset\forall zLzx)\vDash\forall x\forall y     (Lxy\supset Lyx)$   \end{enumerate} \end{enumerate} \end{document}   Usually, I have to manually split a forest tree into two to emulate page breaking in a forest tree. However, the second tree doesn't vertically align with the first as in the picture below. How can I vertically align them together? @cfr
117166
I am trying to put these two matrices next to each other in the same empheq environment, separated by a comma and the space allotted by \qquad \quad.  \documentclass[10pt]{amsart}  \usepackage{nccmath} \usepackage{empheq} \usepackage{amssymb}  \begin{document}  \begin{empheq}[left = \empheqlbrack, right =\empheqrbrack]{equation*} \renewcommand{\arraystretch}{1.75} \begin{array}{@{\,}ccc|l@{\,}} 1 &amp; 0 &amp; -1 &amp; a \\ 0 &amp; 1 &amp; -1 &amp; a + b \\ 0 &amp; 0 &amp; \phantom{-}1 &amp; -\mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \end{array} \end{empheq}  \begin{empheq}[left = \empheqlbrack, right =\empheqrbrack]{equation*} \renewcommand{\arraystretch}{1.75} \begin{array}{@{\,}ccc|l@{\,}} 1   &amp;   0   &amp;   0   &amp;   \mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \\ 0   &amp;   1   &amp;   0   &amp;   \mfrac{1}{2} \, a + \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \\ 0   &amp;   0   &amp;   1   &amp;   -\phantom{-}\mfrac{1}{2} \, a - \mfrac{1}{2} \, b + \mfrac{1}{2} \, c \end{array} \end{empheq}  \end{document}