# Tag Info

1

It's never a good idea to use two consecutive display math environments with nothing in between (because the spacing will be wrong). Using align, the alignment characters can go before the beginning of the bmatrix environments. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &\begin{bmatrix} -1 & 0 & -1 ...

2

I use TexStudio version 2.8.0 (download here). It has specialized tools to format code of tables and matrices as shown in Figure (you can use other functions like add or delete rows (or columns)) The button arranges the columns by placing the cursor within the respective matrix or tabular environment and clicking. If for some reason as to edit the code ...

1

Left aligned the k vectors. Note the use of \arraystretch and \arraycolsep. \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{mathtools} \begin{document} \noindent\rule{\textwidth}{1pt}% show text area \setlength{\arraycolsep}{2pt}% default is 6pt \begin{align*} \left[\begin{array}{l} k_{A,t} \\ k_{BC,t} \\ k_{M,t} \\ k_{NB,t} ...

2

You can "pretend" that the * is not here (i.e: it takes no space) by putting \smash{\rlap{*}} instead of simply *. This way not only all cells will have the same size, but also the 2.2 will be vertically aligned with 1.4:

0

The first link was exactly what I was looking for: Which package version am I using? There is a LaTeX kernel function \@ifpackagelater which serves my purpose by testing the date of a package release: \makeatletter \@ifpackagelater{tikz}{2013/10/01} { % Code which runs if the package date is 2013/10/01 or later } { % Code which runs if the package date ...

0

You could try setting the node's anchors element/.style={ anchor=north east, or element/.style={ anchor=center,.

0

Consider reading this, simply specify text height=1em in element/.style and you'll get:

4

When you do \usepackage{tikz} you have the macro \pgfversion available. We actually want to compare the main version number only, so we can do \documentclass{article} \usepackage{tikz} \newif\iftikziii \begingroup \def\getmainversion#1.#2\getmainversion{#1} \ifnum\expandafter\getmainversion\pgfversion\getmainversion=3 \global\tikziiitrue \fi \endgroup ...

6

You could define your own conditional, say \ifTikZVthree and use \ifTikZVthree % <TikZ version 3 stuff> \else % <TikZ version pre-3 stuff> \fi in your document to define separate version 3/pre-3 stuff. The following minimal example defines \checkTikZversion that checks the version of tikz via the macro \ver@tikz.sty - defined whenever a ...

4

From the amsldoc manual: The maximum number of columns in a matrix is determined by the counter MaxMatrixCols (normal value = 10), which you can change if necessary using LATEX’s \setcounter or \addtocounter commands. So you need: \setcounter{MaxMatrixCols}{20} \begin{align} \mathbf{x}= \begin{pmatrix} 1 & 1 & 1 & 1 & 0 & 1 ...

1

This does what I want, but it's admittedly not pretty. It's motivated by Dependent node size in TikZ . I'm puzzled why using column 1/.style={Minimum Width=c1} etcetera doesn't work the same way as the row style commands. Thanks all. \documentclass[12pt]{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} ...

7

Using text depth and text height, you can control the total height for the nodes; text width gives you control over the width (there's also a minimum size key which could be used): \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every node/.style={anchor=base,text depth=.5ex,text ...

7

This requires some manual adjustment, but if you don't have too many of these butterflies, it might be sufficient: \documentclass{article} \usepackage{amsmath,xparse} \ExplSyntaxOn \RenewDocumentCommand{\vdots}{O{3}} { \vbox:n { \skip_set:Nn \baselineskip {4pt} \dim_set:Nn \lineskiplimit {0pt} \kern 6pt % no equivalent with expl3 at the ...

4

\documentclass[preview,border=12pt,12pt]{standalone} \usepackage{amsmath} \begin{document} \begin{align*} \begin{bmatrix} a\\b\\c\\d\\e\\f\\g\\h \end{bmatrix} &=\!\begin{aligned} &\begin{bmatrix}a\\b\\c\\d\end{bmatrix}\\ &\begin{bmatrix}a\\b\\c\\d\end{bmatrix} \end{aligned}\\ &=\ldots \end{align*} \end{document} ...

4

I'd suggest you not to place the math expression into the ToC I would even suggest you not to use the expression in the title of the subsubsection; it looks really ugly and I think there's really no need for this. In any case, if you really need the matrix in the title, you could use the optional argument for \subsubsection to provide a more convenient ...

1

As usual, in my ignorant opinion, the dots are ugly and making the matrix unreadable even when you have the most basic companion structure in the state matrix. Here is something that is more appealing to my taste which emphasizes the shift operation; \documentclass{article} \begin{document} \[ \underbrace{\left( \begin{array}{c|ccc} \\0 ...

4

Curious. It turns out \ddots is slightly higher than other characters. I suggest \smash ing them in the first matrix: \documentclass[11pt]{article} \usepackage{mathtools} \begin{document} \begin{equation*} C \coloneqq \begin{pmatrix} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots ...

2

The easiest way would be to replace the \ddots in row 4 by \cdots. I think, this makes more sense but maybe you need it this way. The problem is that the \ddots are higher than the expressions in row 4 of the second and third term. If you increase the height of these expressions as shown in my MWE below, the alignment will be fixed again. If you want to ...

7

How about this \documentclass[a4paper]{memoir} \usepackage{amsmath} \begin{document} \[ M = \begin{pmatrix} 0 & a_{1,2} & a_{1,3} & \dots & a_{1,n} \\ & 0 & a_{2,3} & \dots & a_{2,n} \\ & & 0 & \ddots & \vdots \\ & & ...

Top 50 recent answers are included