TeX - LaTeX Asked by Ofelia y Orquesta on May 22, 2021
I would like to fix this next block matrix in a way that the dotted line appears inside the matrix:
Here is the code:
documentclass{article}
usepackage{nicematrix,tikz}
NewDocumentCommand{MyMatrixA}{m}
{
begin{pNiceMatrix}
1 & 0 & Block{2-2}<Large>{A_{#1}} &
1 & 0 & &
1 & 0 & 1 & 0
CodeAfter
tikz draw [dotted] (1-|3) -- (4-|3)
(1-|5) -- (4-|5)
(1-|3) -- (1-|5)
(3-|3) -- (3 -|5);
end{pNiceMatrix}
}
begin{document}
$MyMatrixA{i}$
end{document}
I tried changing (3-|3) -- (3 -|5)
to (3-|3) -- (3 -|4.5)
, but apparently it only accepts integer numbers.
THANKS
This is one way.
documentclass{article}
usepackage{nicematrix,tikz}
NewDocumentCommand{MyMatrixA}{m}
{%
begin{pNiceMatrix}
1 & 0 & Block{2-2}<Large>{A_{#1}} & &
1 & 0 & & &
1 & 0 & 1 & 0 &
CodeAfter
tikz draw [dotted] (row-1-|col-3) -- (row-1-|col-5) -- (row-3-|col-5) -- (row-3-|col-3) ;
tikz draw [dotted] (row-1-|col-3) -- (row-4-|col-3);
end{pNiceMatrix}
}
begin{document}
$MyMatrixA{i}$
end{document}
Correct answer by Simon Dispa on May 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP