New answers tagged

2

If you want different columns to be the same width you need to know what that width is ahead of time. \documentclass{article} \usepackage{blkarray} \newcommand{\tensorblock}[1] { \begin{blockarray}{c@{~}c@{~~}cc} && \BAmulticolumn{2}{c}{T_{4}} \\ && \makebox[\widest]{1} & \makebox[\widest]{2} \...


1

I can fit your matrix on page with help of two tricks: for equation I use smaller font with macro \adjustwidth from package \changepage` I enlarge horizontal space for matrix -- so it protrude to outer text margin (if this doesn't allowed, then my suggestion will not help you :-( ) Code: \documentclass[]{article} \usepackage{mathtools} \newcommand\sumim{...


2

Assuming margins of 2.5cm and a font size of 10pt, it suffices to omit all limits of summation (since they're all identical, stating the limits explicitly in the matrix provides no crucial information...) and to reduce the amount of intercolumn whitespace by 50% or so. \documentclass{article} \usepackage{amsmath} \usepackage[a4paper,margin=2.5cm]{geometry}...


4

While there probably is a pure LaTeX solution, one can try with tikz : \documentclass{standalone} \usepackage{tikz} \begin{document} $\left(\tikz[scale=.9, baseline={(0,-.1)}]{\draw(-1,0)--(1,0) (0,-1)--(0,1) (-.4,0) -- +(0,-1) (0,.4) -- +(1,0);\node at (-.5,.5) {T}; \node at (.5,-.5) {B}; \node at (-.2,-.5) {$a$}; \node at (.5,.2) {$a^t$};}\right)$ \end{...


3

I suggest you acquaint yourself with the pmatrix and align* environments. In the code below, I use \xi rather than # to denote the generic placeholder variable. \documentclass{article} \usepackage{mathtools} % provides '\shortintertext' macro, loads 'amsmath' package \begin{document} \begin{align*} T_6 &= \begin{pmatrix} c_6 \xi_6+s_6\xi_3 & ...


2

The alignment tab, while associated, by default, with &, is really whatever character is associated with the catcode 4 (see https://en.wikibooks.org/wiki/TeX/catcode). Thus, if something else is assigned a \catcode of 4, it (also) becomes an alignment tab. In the MWE below, I not only make @ an alignment tab, but I unmake & an alignment tab and ...


8

Here is one way that you can generalize for your own needs \documentclass{standalone} \usepackage{colortbl,pgfplotstable} \pgfplotstableread[header=false]{ 1 0 1 0 3 0 0 1 1 3 0 0 0 0 3 }\myB \pgfkeys{/mytable/.is family} \pgfkeyssetvalue{/mytable/0}{gray} \pgfkeyssetvalue{/mytable/1}{black} \pgfkeyssetvalue{/...


5

The problem is that the block array is vertically centered with respect to its entire size, including the indices below. The easiest way, in this case, is to put the whole thing in the blkarray. \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{blkarray}% http://ctan.org/pkg/blkarray \begin{document} \[ \begin{blockarray}{r@{}...


5

You can obtain this result either with pmatrixand pstricks, defining certain elements as nodes, and attaching labels to these nodes, or with blockarray, stackengine or makecell, and a \raisebox command: \documentclass[a4paper,12pt]{article} \usepackage{mathtools} \usepackage{blkarray, makecell, stackengine} \usepackage{pst-node, auto-pst-pdf} % \begin{...


0

If I understand you want green and red circles, inside (first-2-3), (first-2-4) and (first-2-5). where 2 represents row number and 3,4,5 columns numbers inside first matrix, here a solution \documentclass[leqno,8pt,fleqn,table]{beamer} \usepackage{tikz} \usetikzlibrary{matrix,shadings} \def\r{0.1} \tikzset{ table/.style={ matrix of nodes, ...


1

I'm not sure it's a good idea, but here it is: \documentclass{article} \usepackage{delarray} \newenvironment{topbmatrix}[1] {\begin{array}[t]\lbrack{@{}#1@{}}\rbrack} {\end{array}} \begin{document} \[ \begin{topbmatrix}{c} a\\b\\c \end{topbmatrix} \begin{topbmatrix}{*{3}{c}} d&e&f \end{topbmatrix} \] \end{document}


2

For example like this: $$ \vtop{\kern-\ht\strutbox\hbox{$\pmatrix{a\cr b\cr c}$}} \pmatrix{d & e & f} $$ \bye


1

\documentclass{amsart} \begin{document} \begin{equation} \renewcommand*{\arraystretch}{2} \begin{bmatrix} \dfrac{1}{i} \\ \dfrac{1}{j} \end{bmatrix} \end{equation} \end{document}


2

\\ has an optional parameter. You can write (precise values according to you taste): \[ \begin{bmatrix} \dfrac{1}{i} \\[18pt] % here - PS \dfrac{1}{j} \end{bmatrix} \] I have changed $...$ to \[...\] because so high matrix in text mode is not a good idea.


5

I give every cell a unique label that looks like this: <number_of_vector>x<number_of_cell_in_vector> e.g. 1x1, 2x3, 4x1 This label can be reused in a new tikzpicture, if I add the remember picture option. Now it is possible to draw arrows. \documentclass[11pt]{memoir} \usepackage{tikz} %%% GRAPHIQUE \newcommand{\largeto}{\mbox{\LARGE${}\...


4

This answer demonstrates how to modify your MWE to use the suggestions provided in comments and other answers. The reason that Qrrbrbirlbel's suggestion seemed not to work is probably that you didn't include the code to which the comment directed you. It is difficult to say for sure because your reported failure concerned a code fragment and not a complete ...


7

You can use the /.list handler. \tikzset{myrowstyle/.style = {row #1/.style={nodes={fill=gray!10}}} and later in the picture you can then use myrowstyle/.list={1,...,10} or any other argument list.


2

Some eyeballing: \documentclass{article} \usepackage{amsmath} \begin{document} \[ G= \begin{bmatrix} \qquad\qquad I_6 \qquad\qquad & \begin{array}{@{}|ccccc|} \multicolumn{1}{c}{1} & 1 & 1 & 1 & \multicolumn{1}{c}{1} \\ \hline &&&&\\ &&&&\\ \multicolumn{5}{|c|}{S_5\vphantom{\Bigg|}}\\ &&&&...


1

A little bit of stacking can do it. \documentclass{article} \usepackage{stackengine} \begin{document} \[ \fboxsep=3ex\relax G=\left[ \makebox[12ex]{$I_6$} \addstackgap[5pt]{$\vcenter{\hbox{\stackon{\fbox{$S_3$}}{$1~1~1~1~1$}}}$}\, \right] \] \end{document}


1

A possible solution with easybmat \documentclass{article} \usepackage{easybmat} \begin{document} \[ G = \left[ \begin{BMAT}(c){cc}{cc} & \begin{BMAT}{ccccc}{c} 1&1&1&1&1 \end{BMAT}\\ I_6 & \begin{BMAT}[4ex]{|c|}{|c|} S_5 \end{BMAT}\\ ...


1

The construction of the squares might be simplified, but that's another matter. You can use baseline for setting the placement with respect to the baseline. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} % the following two are just for the example \usepackage[margin=1cm]{geometry} \usepackage{lipsum} %%%%% \newcommand{\cellsize}{0.5} \...


1

I think there is an easier way to create your matrix, here's a possible solution. You could even make it further automatic, by setting a counter, but I thought you might want to change the command. Output Code \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[dvips]{graphicx} \usepackage{...


2

We can use the fact, that dimensions of cells are known. The arrows are a bit deeper than the central line, but they probably have S_c's over the, hence the effect of neglecting vertical dimension of lines in matrix is compensated. The last matrix is in the new line, because \textwidth is too small. \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \...


1

All I did was modify your \printmatrix macro to wrap the tikzpicture as follows: \raisebox{-2.5\dimexpr\cellsize cm}{...} Here is the MWE. \documentclass[11pt]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[dvips]{graphicx} \usepackage{xcolor} \usepackage[french]{babel} \usepackage{amsmath} \usepackage{...



Top 50 recent answers are included