Math & Science ⇒ Custom matrix border
-
- Posts: 3
- Joined: Tue Jul 22, 2014 9:43 pm
Custom matrix border
I found a reference http://www.tex.ac.uk/ctan/info/math/vos ... thmode.pdf, in which section 5 discusses how to use \bordermatrix to get [ ] or { } instead of the regular ( ) border. Maybe the implementation given there could be used as a starting point; however it looks very complicated to me. Before I start trying to understand that wall of commands, I want to hear someone's comment on this whole matter.
Also I found these symbols: \urcorner, \llcorner.
- Attachments
-
- polynum.png (1.03 KiB) Viewed 8479 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Custom matrix border
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\newcommand\mborder[2][]{%
\tikz[anchor=base,baseline]{
\node[inner sep=1pt,#1](h){$\displaystyle#2\mathstrut$};
\draw([xshift=.25em]h.south west)--(h.south west)--(h.north west)
--(h.north east)--([yshift=-.25em]h.north east);
}%
}
\begin{document}
\begin{align*}
A & = \mborder{\begin{matrix}x_1 &x_2\\ y_1&y_2\end{matrix}}
\end{align*}
\end{document}
Elke
- Stefan Kottwitz
- Site Admin
- Posts: 10359
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Custom matrix border
welcome to the forum!
Yes, Elke is a TikZ wizard, I often see her TikZ magic where basic LaTeX is not enough.

TikZ is a package with really a lot of capabilities, but don't hesitate to use it also for such small things.
Stefan
-
- Posts: 3
- Joined: Tue Jul 22, 2014 9:43 pm
Re: Custom matrix border
