
El resultado que obtengo
El resultado que quiero es el mismo excepto que los corchetes de la Z_bus
matriz deben estirarse para contener el contenido fantasma del array
entorno de la siguiente manera
Claramente, puedo usar \phantom
y definir la matriz que necesito dentro de él, pero después de intentar escribir el contenido visible \bar{\mathnormalbold{Z}}_{bus}
, el contenido comienza a extenderse más.
Mi MWE
\documentclass{book}
% ========== Table packages ==========
\usepackage{tabularx}
% BEGIN_FOLD
\newcommand{\arraystretchdefaultl}{1.3}
\newcommand{\arraystretchdefault}{ \renewcommand{\arraystretch}{\arraystretchdefaultl} }
\arraystretchdefault
% END_FOLD
\usepackage{booktabs}
\usepackage{makecell}
% ========== Equations and math packages ==========
\usepackage{amsmath}
\usepackage{amssymb, amsfonts}
\usepackage{mathtools}
\usepackage[defaultmathsizes, italic, eulergreek, symbolre, symbolmisc]{mathastext}
\begin{document}
\begin{align}
\left[
\begin{array}{c}
\mathnormalbold{V}_{G}
\\
%
\Xhline{0.25mm}
V_{R, \thinspace i}
%
\\
V_{R, \thinspace j}
\end{array}
\right] &=
%
\left[
\begin{array}{c !{\vrule width 0.25mm}c c}
\bar{\mathnormalbold{Z}}_{GG} & \bar{\mathnormalbold{Z}}_{GR_{i}} & \bar{\mathnormalbold{Z}}_{GR_{j}}
\\
\Xhline{0.25mm}
%
\bar{\mathnormalbold{Z}}_{R_{i}G} & \bar{Z}_{RR, \thinspace ii} & \bar{Z}_{RR, \thinspace ij}
%
\\
\bar{\mathnormalbold{Z}}_{R_{j}G} & \bar{Z}_{RR, \thinspace ij} & \bar{Z}_{R, \thinspace jj}
\end{array}
\right]
%
\left[
\begin{array}{c}
\bar{\mathnormalbold{I}}_{G}
\\
\Xhline{0.25mm}
%
\bar{I}_{R, \thinspace i}
\\
%
\bar{I}_{R, \thinspace j}
\end{array}
\right]
\label{eq:op_imp_load_RER_int_op}
\\
\intertext{where}
\bar{\mathnormalbold{Z}}_{bus} &=
\left[
\begin{array}{c !{\vrule width 0.25mm}c c}
\bar{\mathnormalbold{Z}}_{GG} & \bar{\mathnormalbold{Z}}_{GR_{i}} & \bar{\mathnormalbold{Z}}_{GR_{j}}
\\
\Xhline{0.25mm}
%
\bar{\mathnormalbold{Z}}_{R_{i}G} & \bar{Z}_{RR, \thinspace ii} & \bar{Z}_{RR, \thinspace ij}
\\
%
\bar{\mathnormalbold{Z}}_{R_{j}G} & \bar{Z}_{RR, \thinspace ij} & \bar{Z}_{R, \thinspace jj}
\end{array}
\right]
\label{eq:Z_bus_hat_def}
\end{align}
\end{document}
Respuesta1
Siéntete libre de utilizar reglas más amplias (no creo que debas hacerlo). Lo eliminé mathastext
y produce un resultado doloroso.
\documentclass{book}
\usepackage{amsmath,bm}
\newcommand{\bigarraystretch}{\renewcommand{\arraystretch}{1.3}}
\begin{document}
\begingroup\bigarraystretch
\newcommand{\Zbus}{%
\begin{array}{@{} c | c c @{}}
\bar{\bm{Z}}_{GG} & \bar{\bm{Z}}_{GR_{i}} & \bar{\bm{Z}}_{GR_{j}} \\
\hline
\bar{\bm{Z}}_{R_{i}G} & \bar{Z}_{RR,ii} & \bar{Z}_{RR,ij} \\
\bar{\bm{Z}}_{R_{j}G} & \bar{Z}_{RR,ij} & \bar{Z}_{R,jj}
\end{array}%
}
\begin{align}
\left[\begin{array}{@{}c@{}}
\bm{V}_{G} \\
\hline
V_{R,i} \\
V_{R,j}
\end{array}\right]
&=
\begin{bmatrix}
\vphantom{\Zbus}
\ooalign{\hphantom{$\Zbus$}\cr\hfil$\bar{\bm{Z}}_{\mathrm{bus}}$\hfil\cr}
\end{bmatrix}
\left[\begin{array}{@{} c @{}}
\bar{\bm{I}}_{G} \\
\hline
\bar{I}_{R,i} \\
\bar{I}_{R,j}
\end{array}\right]
\label{eq:op_imp_load_RER_int_op}
\\
\intertext{where}
\bar{\bm{Z}}_{\mathrm{bus}} &= \left[\Zbus\right]
\label{eq:Z_bus_hat_def}
\end{align}
\endgroup
\end{document}
La idea es guardar el contenido de la matriz Zbus y utilizarlo \ooalign
para superponer el símbolo sobre el espacio horizontal que ocupa la matriz, con el espacio vertical delante para establecer el tamaño de los corchetes.
Respuesta2
Aquí hay una solución con saveboxe
s:
\documentclass{book}
% ========== Table packages ==========
\usepackage{tabularx}
% BEGIN_FOLD
\newcommand{\arraystretchdefaultl}{1.3}
\newcommand{\arraystretchdefault}{ \renewcommand{\arraystretch}{\arraystretchdefaultl} }
\arraystretchdefault
% END_FOLD
\usepackage{booktabs}
\usepackage{makecell}
% ========== Equations and math packages ==========
\usepackage{amsmath}
\usepackage{amssymb, amsfonts}
\usepackage{mathtools}
\usepackage[defaultmathsizes, italic, eulergreek, symbolre, symbolmisc]{mathastext}
\newsavebox{\mybox}
\newsavebox{\mysbox}
\begin{document}
\begin{align}
\left[
\begin{array}{c}
\mathnormalbold{V}_{G}
\\
%
\Xhline{0.25mm}
V_{R, \thinspace i}
%
\\
V_{R, \thinspace j}
\end{array}
\right] &=
%
\left[
\savebox{\mybox}{\hbox{\(\begin{array}{c !{\vrule width 0.25mm}c c}
\bar{\mathnormalbold{Z}}_{GG} & \bar{\mathnormalbold{Z}}_{GR_{i}} & \bar{\mathnormalbold{Z}}_{GR_{j}}
\\
\Xhline{0.25mm}
%
\bar{\mathnormalbold{Z}}_{R_{i}G} & \bar{Z}_{RR, \thinspace ii} & \bar{Z}_{RR, \thinspace ij}
%
\\
\bar{\mathnormalbold{Z}}_{R_{j}G} & \bar{Z}_{RR, \thinspace ij} & \bar{Z}_{R, \thinspace jj}
\end{array}\)}}\savebox{\mysbox}{\hbox{\(\bar{Z}_{bus}\)}}
\vphantom{\usebox{\mybox}}\hspace{\dimexpr(\dimexpr\wd\mybox/2)-\dimexpr(\wd\mysbox/2)}\usebox{\mysbox}\hspace{\dimexpr(\dimexpr\wd\mybox/2)-\dimexpr(\wd\mysbox/2)}
\right]
%
\left[
\begin{array}{c}
\bar{\mathnormalbold{I}}_{G}
\\
\Xhline{0.25mm}
%
\bar{I}_{R, \thinspace i}
\\
%
\bar{I}_{R, \thinspace j}
\end{array}
\right]
\label{eq:op_imp_load_RER_int_op}
\\
\intertext{where}
\bar{\mathnormalbold{Z}}_{bus} &=
\left[
\begin{array}{c !{\vrule width 0.25mm}c c}
\bar{\mathnormalbold{Z}}_{GG} & \bar{\mathnormalbold{Z}}_{GR_{i}} & \bar{\mathnormalbold{Z}}_{GR_{j}}
\\
\Xhline{0.25mm}
%
\bar{\mathnormalbold{Z}}_{R_{i}G} & \bar{Z}_{RR, \thinspace ii} & \bar{Z}_{RR, \thinspace ij}
\\
%
\bar{\mathnormalbold{Z}}_{R_{j}G} & \bar{Z}_{RR, \thinspace ij} & \bar{Z}_{R, \thinspace jj}
\end{array}
\right]
\label{eq:Z_bus_hat_def}
\end{align}
\end{document}
Podría ser mejor poner esta funcionalidad dentro de, \newcommand
por supuesto. No dudes en pedirme esto si así te parece bien.