# Tag Info

0

A variant with one less column, and 7 blocks, with \Right{.}{text} at the end of the preamble of each block. I also use the eqparbox package to ensure equal width columns, without having to find by trials and errors what will be the right size: \documentclass{article} \usepackage{mathtools} \usepackage{blkarray} \usepackage{eqparbox} ...

9

Warning: I am no blkarray expert ;-) However, it's possible to define a new column type (say B) for blockarray which uses the same width for all columns with this specifier. Since there 7 columns with this feature, one could shorten the ccccccc and replace with *{7}B as in usual tabular environments. I've to find out, whether \BAnewcolumntype supports on ...

7

You can play with the value of \arraycolsep, or use the medmath command, from nccmath, which sets the fontsize to ~ 80% of \displaystyle. You also can combine both solutions: \documentclass[a4paper, 11pt]{book} \usepackage[utf8]{inputenc} \usepackage[showframe, nomarginpar]{geometry} \usepackage{mathtools, nccmath} \begin{document} \[ ...

2

You have a large 6x6 matrix. I know of no fully automated method to make it fit into the available width of the text block, unless it entails reducing the font size to the point where it becomes necessary to supply a magnifying glass. I can suggest two "manual" adjustment methods, though: Assuming the textblock is fairly wide and the font size is not too ...

1

For such a cases is intended multlined environment from mathools package: \documentclass[12pt,border=1mm,preview]{standalone} \usepackage{mathtools} \begin{document} \begin{gather} Eq1 \\ Eq2 \\ % and long equation Eq3 a=\begin{multlined}[t] \text{first part of very long equation}\\ \text{second part of long equation}\\ \text{and ...

0

I may be able to offer a set of ugly abominations of dirty solutions here, for which I will probably get bashed from more advanced users ^_^. So take them only as last resort. If too long means too wide and too wide means slightly too wide, then you may do something like \documentclass{article}% \usepackage{graphicx} \begin{document}% % ...

1

The tabstackengine package has a \fixTABwidth{T} macro to force all columns to be equal width (based on the widest column). In addition to that, I just set the intercolumn gap with \setstacktabbedgap{} and the vertical baselineskip with \setstackgap{L}{}, to achieve whatever spacing is preferred, using a \parenMatrixstack macro. \documentclass{article} ...

4

In addition to the vertical space between the final two rows of your matrix being smaller than that between other rows, the horizontal space between the first two columns (and between the final two columns) is smaller than that between the other columns. The first issue arises because the height of the \ddots glyph is -- assuming you're using the Computer ...

8

An alternative "pure" TikZ solution: \documentclass[border=1mm,tikz]{standalone} \usetikzlibrary{calc,matrix} \begin{document} \begin{tikzpicture}[ strip/.style args = {#1/#2}{ draw=#1, very thin, fill=#1, opacity=0.2, text width=#2,% will be calculated in path rounded corners,% only if you like them ... minimum height=1em,% adjust to ...

7

After playing around with tikz, I could get it, I believe, decently. I'm just a tikz beginner, so I am 100% sure this can be done better, without needing so much fine-tuning of positions. You can adjust all positions and colors though: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \usepackage{xcolor} \definecolor{myblue}{rgb}{0,0,0.8} ...

2

Some arrays and the tikzmark library: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark,shapes.geometric,fit} \newcommand\AddSpa[2][6pt]{\hspace{#1}#2\hspace{#1}} \begin{document} \[ \begin{array}{@{}c@{}} \begin{array}[t]{c|l} 2 & 12 \\ \hline 2 & 6 \\ \hline 3 & 3 \\ \hline & 1 \end{array}\qquad ...

1

finally, and using a 'matlab-translated' version of the python script of Conditionally transparent surface in PGFPLOTS i managed it :) Source code: \documentclass{standalone} \usepackage{xcolor} \definecolor{cr3}{RGB}{177,11,69} \definecolor{cr2}{RGB}{210,210,210} \definecolor{cr1}{RGB}{121,154,153} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...

3

As \left ... \right doesn't work across line breaks, you can use \biggl\{ and \biggr\} instead. Judging by the image I would also suggest multline* instead of align*. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{multline*} R = \biggl\{ a_1 = \begin{pmatrix} 0 & 0 \\ 0 & 0 ...

3

Quite hard coded, but you may start with this: % arara: pdflatex \documentclass{article} \usepackage{blkarray} \usepackage{multirow} \usepackage{graphicx} \usepackage{mathtools} \begin{document} \[ \renewcommand{\arraystretch}{1.6} \begin{blockarray}{c@{}ccc} &&\BAmulticolumn{2}{c}{\text{observed}}\\[-2\jot] && 0 & 1 \\ ...

5

For consistency purposes, I do not recommend using a regular TikZ matrix, but rather, I will stick to the amsmath/amsmathtools. This will make the matrix at-hand have the same look and feel of other matrices in the document. Shading and marking tasks, however, are exactly where TikZ comes in. I define two \newcommands; the first is for calculating the ...

3

I couldn't find anything in the documentation of amsmath (for bmatrix) that could help do some highlighting. I'm afraid it might not be possible. But you can use a regular matrix, with Tikz, and it's easier to refer to the nodes this way, because Tikz matrices have an automatic naming. If the matrix is named m, then m-1-1 is the first cell, m-1-6 is the ...

2

\documentclass[10pt,a4paper]{article} \usepackage{amsmath} % for equation* and bmatrix environment \usepackage{anyfontsize} \setcounter{MaxMatrixCols}{20} % for the large matrices \begin{document} I'm trying to figure out the pattern here. You might consider a submatrix representation of the form \begin{equation*} \left( \begin{array}{c|c|c|c} A(1,1) ...

7

You have two different spacing issues here. The first one is that 0 is not as wide as \frac{2}{3}. This can be corrected by setting the first number 0 in a \makebox with that very width. The second issue is that you are having two different bracket sizes. The moment you correct your spacing by \\[.1cm], you get ugly alignment for the one-fraction-terms and ...

1

align can have as many alignment points as you want, not only one: \documentclass[preview, border = 2pt]{standalone} \usepackage{amsmath} \begin{document} \begin{align*} b_1 &= \begin{bmatrix} 0 \\ 0 \end{bmatrix}, & b_2 &= \begin{bmatrix} \frac{1}{3} \\ 0 \end{bmatrix}, & b_3 &= \begin{bmatrix} 0 \\ \frac{1}{3} \end{bmatrix}, & ...

3

You could use an array instead; in this way, the standard | for the vertical rule and \hline (for the horizontal rule) will give you the desired result. The brackets can be obtained using \mleft, \mright from the mleftright package: \documentclass{article} \usepackage{amsmath} \usepackage{mleftright} \begin{document} \[ \renewcommand\arraystretch{1.3} ...

Top 50 recent answers are included