Tag Info

New answers tagged

2

If you want the horizontal and vertical lines to intersect, you can't use the rule-drawing macros of the booktabs package. Here's a solution that uses just a basic array environment. This solution is similar to the one given by @Alenanno in the posting you provided a link to; the main difference is that the @{} directives have been replaced with @{\,}. ...


6

The following example redefines \vdots and \ddots to get a resizable version according to the current math style. The vertical space between the dots is taken from the horizontal dots. Also the dots in \ddots match the vertical spacing of \vdots and the horizontal spacing of the horizontal dots in \cdots. \cdots adds a thin space at the right side. For a ...


2

You are missing one additional$...$ pair: \documentclass{article} \usepackage{mathtools} \newcommand{\svdots}{\raisebox{3pt}{$\scalebox{.75}{\vdots}$}} % <- Works \newcommand{\sddots}{\raisebox{3pt}{$\scalebox{.75}{$\ddots$}$}} % <- Do not work \begin{document} \begin{equation*} \begin{bsmallmatrix} a_{11} & a_{12} & \cdots & ...


4

MWE: \documentclass[11pt]{article} \usepackage{amsmath} \begin{document} \begin{equation*} Q = \begin{pmatrix} -(\lambda_1 + \mu_1) & \lambda_1 & 0 & \ldots & 0 & 0 \\ 0 & -(\lambda_2 + \mu_2) & \lambda_2 & \ldots & 0 & 0 \\ \vdots & \vdots & \vdots & \ldots & 0 & 0 \\ 0 & 0 ...


2

Done here with stacks, in lieu of arrays. \documentclass{arlticle} \usepackage{amsmath,stackengine} \setstackEOL{\cr} \stackMath \def\Xrightarrow#1{\xrightarrow{\makebox[3ex]{$\scriptstyle#1$}}} \begin{document} \[ \overbrace{\Longstack{% P \Xrightarrow{0.1} P\cr T_1 \Xrightarrow{0} P\cr T_2 \Xrightarrow{0.2} P\cr C \Xrightarrow{0.4} P}}^P ...


0

You need a combination of \overbrace and \overset to get the desired output. \overset allows you to place something on top of something else (in your case the numbers on top of the arrow). The best way of formatting seems to me to put the array in the \overbrace command. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...


6

How to do this using normal TeX tools: \def\vec#1{{\bf#1}} \def\lrule{\leaders\hrule height3pt depth-2.6pt\hskip2em \relax} \def\Hess{\mathop{\rm Hess}\nolimits} $$ H_{f,g} {\vec a \choose \lambda} = \left[ \vcenter{\offinterlineskip \halign{\hfil$#$\ \hfil\vrule height10pt depth5pt&\hfil\ $#$\hfil\cr & | \cr \Hess(f)(\vec ...


7

Something like that? \documentclass{article} \usepackage{amssymb} \usepackage{mathtools, array} \DeclareMathOperator{\hess}{Hess} \def\longline{\relbar\mkern-6mu\relbar} \begin{document} \[\setlength\extrarowheight{1pt} \begin{bmatrix} \begin{array}{c@{\,}c@{\,}c|c} & & & \vrule \\ \multicolumn{3}{c|}{\hess_{f, g}(f)(\mathbf a)} ...


14

Here is how I would do it: \documentclass{article} \usepackage{mathtools} \usepackage{bm} \DeclareMathOperator{\Hess}{Hess} \newcommand*\vect[1]{\mathbf{#1}} % http://tex.stackexchange.com/a/59955/15874 % The following piece of code measures the length of math expressions % in order to get the length of the two horizontal rules (based on % the chosen ...


12

Here is an approach with an array and some \rule commands for the extra lines inside of cells. Note that the array actually consists of four rows. Code \documentclass[varwidth]{standalone} \usepackage{amsmath,bm} \DeclareMathOperator\Hess{Hess} \begin{document} \begin{equation*} \renewcommand*\a{\mathbf{a}} \newcommand*\vl{\rule[-.3em]{.4pt}{1em}} ...


4

Something like this? No need to mix-up arrays and matrices, and for matrix multiplication you don't need the \times operator. Use amsmath's bmatrix for both vectors and the matrix. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{bmatrix} v_1^{m} \\ v_2^m \\ v_3^m \\ \vdots \\ ...


1

By default bmatrix takes 10 columns. So you have to use \setcounter{MaxMatrixCols}{20} in the preamble to increase it to 20 (say) \documentclass{article} \usepackage{amsmath,amsfonts,amsthm,amssymb,mathrsfs,latexsym,paralist} \setcounter{MaxMatrixCols}{20} \begin{document} \[ \begin{bmatrix} 1 & 0 & 0 & -1 & 0 & 0 & 1 & -1 ...


2

I can offer you a manual fix: \documentclass{article} \usepackage{amsmath} \usepackage{gauss} % patch gauss macros for doing their work in `align' % and other amsmath environments; see % http://tex.stackexchange.com/questions/146532/ \usepackage{etoolbox} \makeatletter \patchcmd\g@matrix {\vbox\bgroup} {\vbox\bgroup\normalbaselines}% restore the standard ...


1

Just use a regular array: \documentclass{article} \begin{document} \[ \left(\begin{array}{@{} r r r | r @{}} 1 & 2 & 3 & 40 \\ 2 & 3 & 4 & 500 \\ 3 & 4 & 5 & 6000 \end{array}\right) \qquad \renewcommand{\arraystretch}{1.2}% http://tex.stackexchange.com/a/31704/5764 \left(\begin{array}{@{} r r r | r ...


3

You can try to experiment with the following code: $$ \def\indu{{\rm Industry\ }} \hbox{INPUTS } P=\left\{ \matrix{\indu S_1\cr \indu S_2 \cr \dotfill \cr \indu S_n} \left[\vcenter{\vbox{\kern-28pt\halign{\hfil#\hfil\cr OUTPUTS\cr $\overbrace{\matrix{ s_1 & s_2 & s_3 & \cdots & s_n \cr a & b ...



Top 50 recent answers are included