Hi, I want to create a matrix with a custom border. I'm pretty new to latex. This is what I have in mind: <polynum.png>.
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.
LaTeX forum ⇒ Math & Science ⇒ Custom matrix border Topic is solved
-
- Posts: 3
- Joined: Tue Jul 22, 2014 9:43 pm
Custom matrix border
- Attachments
-
- polynum.png (1.03 KiB) Viewed 5039 times
Here is a suggestion using tikz
Best regards
Elke
\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}
Best regards
Elke
- Stefan Kottwitz
- Site Admin
- Posts: 9679
- Joined: Mon Mar 10, 2008 9:44 pm
Hi JoelSjogren,
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
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
LaTeX.org admin
-
- Posts: 3
- Joined: Tue Jul 22, 2014 9:43 pm
I'll look into that package some more. I heard of it before when I needed to draw intervals and it seems useful 

Who is online
Users browsing this forum: No registered users and 3 guests