# Tag Info

5

\documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \newcommand{\mydiag}[1]{\left[% \begin{array}{@{}c@{}c@{}c@{}} \diagdown & & \\ & #1 & \\ & & \diagdown \end{array}\right] } $$\mydiag{ce}$$ $$\mydiag{c^2}$$ \end{document} ...

4

Here's one option using the tikzmark library to define a command (using the optional argument one can control the vertical size): The code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{tikzmark} \newcounter{mydiagm} \newcommand\DiagMat[2][1]{ \stepcounter{mydiagm} \begin{bmatrix} ...

3


2

Very nice problem! The key is in knowing that the minus sign has, by Knuth's decree, the same vertical dimensions as the plus sign. In particular, the minus sign has a depth that gets in the way in the second small matrix. You have two possibilities: either you “mormalize” the small matrix without signs, or you smash the minus sign. ...

1

3

This is the effect of \smash. It sets the height and depth of the argument to zero. Then TeX does not see, that there is material and overprints the previous equation. The example without \smash and with some minor fixes: \documentclass[11pt]{book} \usepackage[thicklines]{cancel} \usepackage{amsmath} \begin{document} ...

3

You can use @{} specifications. Or see alternate approach that limits vertical line size. \documentclass{article} \usepackage{amsmath,blkarray} \begin{document} $\mathbf{P} = \begin{blockarray}{c@{\hspace{1pt}}rrr@{\hspace{3pt}}} & 0 & 1 & 2 \\ \begin{block}{r@{\hspace{1pt}}|@{\hspace{1pt}} ... 3 the package has a [thicklines] option to use thicker lines, and I think you just want to move the outer \left.\right\} outside the \cancel (although the spacing may need tweaking a bit more) \documentclass{article} \usepackage{amsmath} \usepackage[thicklines]{cancel} \begin{document} \begin{equation*} \mathbf{I}_n = \left.\cancelto{0}{\left( ... 1 A .sty file is a "package". Since the sgame package (which means sgame.sty and accompanying documentation) resides at CTAN.org, there is a good chance that your LaTeX installation will automatically know how to download and access it merely by placing \usepackage{sgame} in your document preamble. \documentclass{article} \usepackage{sgame} \begin{document} ... 5 TeX is a macro language. The lengthy expression \textcolor{red}{a_{12}} can be abbreviated with as simple macro definition, e.g.: \documentclass{article} \usepackage{amsmath} \usepackage{color} \begin{document} \[ A = \def\ba#1#2{a_{#1#2}} \def\ra{\color{red}\ba} \begin{bmatrix} \ra11 & \ra12 & \ra13 & \ba14 \\ ... 5 Update You can declare a new column type including the color: \documentclass[table]{article} \usepackage{xcolor} \usepackage{array} \newcolumntype{E}{>{\color{red}}c} \begin{document} \[ \left[ \begin{array}{*{3}{E}c} 1 & 2 & 3 & 0 \\ 4 & 5 & 6 & 0 \\ 7 & 8 & 9 & 0 \end{array} \right]$ \end{document} This ...

3

My suggestion is to simply type \begin{bmatrix} x^* & y^* \end{bmatrix} perhaps with a proper definition like \newcommand{\rvect}[1]{\begin{bmatrix} #1 \end{bmatrix}} and inputting \rvect{x^* & y^*} If you consider the & a nuisance, you can use a comma separated list: \documentclass{scrartcl} \usepackage{xparse} \ExplSyntaxOn ...

6

I recommend a general solution so that you can change the behaviour later, apart from using a more clean input code. Here's one with expl3. \documentclass{scrartcl} \usepackage{xparse,mathtools} \ExplSyntaxOn \NewDocumentCommand \vect { s o m } { \IfBooleanTF {#1} { \vectaux*{#3} } { \IfValueTF {#2} { \vectaux[#2]{#3} } { \vectaux{#3} } } ^* ...

0

I have a solution with booktabs (so as to be sure one addsthe same vertical space throughout the document) or with cellspace: \documentclass{amsart} \usepackage{amsmath}% \usepackage{amsfonts}% \usepackage{amssymb}% \usepackage{booktabs} \setlength\defaultaddspace{0.5ex} \usepackage[math]{cellspace} \setlength\cellspacetoplimit{3pt} ...

1

You can increase specify extra an space to go between the rows after \\. You can also make the fractions bigger with \displaystyle if necessary. \documentclass{amsart} \usepackage{amsmath}% \usepackage{amsfonts}% \usepackage{amssymb}% \begin{document} \begin{align*} \tau_A \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} ...

5

With TikZ is easy to: \documentclass[border=3mm, tikz, prewiev]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix[matrix of math nodes, left delimiter=(, right delimiter=), nodes in empty cells] (m) { 0 & 0 & 0 & 0 & \dots & 0 \\ 0 & ...

7

For fun: that is easy with pstricks: \documentclass[11pt,x11names]{standalone} \usepackage{pst-node} \usepackage{auto-pst-pdf} \usepackage{amsmath} \usepackage{sansmath} \begin{document} \mathversion{sans}\setlength\fboxsep{0pt} \begin{postscript} \begin{pmatrix} 0 & 0 & 0 & 0 & \dots & 0 \\ 0 & \pnode[0,1.5ex]{A} ... 1 REVISED SOLUTION (for global automation): Here one employs TABstacks in lieu of the bmatrix environment. Here one controls global settings of \setstackgap{L}{} for vertical spacing of baselines, \setstacktabbedgap{} for horizontal spacing inside the matrices, and \lrgap for the spacing at the left and right extremities of the vectors/matrices. ... 7 Some improvements to @onewhaleid's tikz-free solution. I slighly modified some parameters and managed to get the brackets fully enclose the contents of the matrix: \documentclass{article} \usepackage{amsmath} \begin{document} \setlength{\fboxsep}{1.25em} \check B \equiv \begin{bmatrix}\noalign{\vskip0.5ex} \, \boxed{B^L} & ... 5 This is a non-tikz alternative, although I can't work out how to get the brackets the correct size. \documentclass{article} \usepackage{amsmath} \begin{document} % increase padding around fboxes \setlength{\fboxsep}{1em} \begin{align} \check B \equiv \begin{bmatrix} \, \boxed{B^L} & \hspace{-2em} 0 \\[-0.9em] 0 & \hspace{-2em} \boxed{B^R} \, ... 9 The boxes drawn with TikZ: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} \[ \check B \equiv \left[ \begin{array}{cc} \begin{tikzpicture}[baseline=(tmp.base)] \node (tmp) {B^L\$}; \path (tmp.north) ++(0,.3em); \draw[overlay] (tmp.south east) ++(.75em, -.5em) rectangle ...

2

Well I'm not sure exactly what you're asking for but I read it as you wanting a more sensible way to control the width of your matrix braces. The approach I chose uses makeboxes. The downside is you need to re-enter math mode as it seems makeboxes take you out of it. Here's the code: \documentclass{article} \usepackage{amsmath} \begin{document} ...

1

I suggest you group the terms e{-t}, e^{-2t}, and e^{-3t} into a column vector named, say, \tilde{e}. This will let you write the matrix as follows (the horizontal lines in the screenshot are there just to illustrated with width of the columns): Of course, if you can assume that your readers are familiar with matrix algebra notation, this new expression ...

2

I suggest you use the cuted package, and its strip environment, so as the equation spreads over two columns. I also reduced the size of the fraction coefficients using the \mfrac command (medium sized fractions), from the nccmath package: \documentclass{ieeeconf} \usepackage[utf8]{inputenc} \usepackage{lipsum} \usepackage{mathtools, nccmath} ...

1

\documentclass[conference,twocolumn]{IEEEtran} \usepackage{amsmath,lipsum} \begin{document} \begin{figure*}[!t] \normalsize e^{At}=\left[ \begin{array}{ccc} 3e^{-t}-3e^{-2t}+e^{-3t} & \dfrac{5}{2}e^{-t}-4e^{-2t}+\dfrac{3}{2}e^{-3t} & \dfrac{1}{2}e^{-t}-e^{-2t}+\dfrac{1}{2}e^{-3t} \\[1em] -3e^{-t}+6e^{-2t}-3e^{-3t} & ...

Top 50 recent answers are included