我希望某个电路的电路布局和数学方程式能与相关标题并列。我为此使用了一个表格,因为我将来可能还会添加一些信息。下面是表格:
\documentclass[a4paper]{book}
\usepackage[margin=2cm]{geometry} % I use 2 cm to save space.
\usepackage{mathtools}
\usepackage{array} % For fixed length columns in tabular environments
\usepackage{ragged2e} % To better align fixed length columns to the left. See: https://tex.stackexchange.com/a/7375
\begin{document}
\paragraph{Common Source Stage with Resistive Load}\ \\
\begin{tabular}{cc}
\includegraphics[scale=0.3]{commonSourceWithRLoad} &
$\begin{gathered}
I_D = \begin{cases}
\mu_n C_\text{ox}\frac{W}{L} \left[ \left(V_\text{GS} - V_{\rm th}\right)V_\text{DS} - \frac{{V_\text{DS}}^2}{2} \right] (1 + \lambda V_{DS}) & , \text{triode}\\
\frac{1}{2}\mu_n C_\text{ox}\frac{W}{L}\left(V_\text{GS} - V_\text{th}\right)^2(1 + \lambda V_{DS}) & , \text{saturation}\\
I_\text{0} e^\frac{V_\text{GS}}{nV_\text{T}} & , \text{inversion}
\end{cases}\\
V_{DS}=V_{DD}-R_D I_D\\
V_{GS} = V_{in}
\end{gathered}$ \\
Circuit Diagram & Mathematical Model
\end{tabular}
\end{document}
结果有一些多余的空白,我该如何摆脱它?图片本身几乎没有空白,所以这不是问题。
答案1
同时我想出了一个使用tabularray
包的替代解决方案:
\documentclass[a4paper]{book}
\usepackage[margin=2cm]{geometry} % I use 2 cm to save space.
\usepackage{mathtools}
\usepackage{tabularray} % version 2021P or newer
\usepackage[demo]{graphicx}
\begin{document}
\paragraph{Common Source Stage with Resistive Load}\ \\
\noindent\begin{tblr}{colspec={@{} c X[b, c] @{}},
rowsep=3pt}
\includegraphics[scale=0.3]{commonSourceWithRLoad}
& \SetCell[c=1]{l}
{$I_D = \begin{dcases*}
\mu_n C_\text{ox}\frac{W}{L} \left[ \left(V_\text{GS} - V_{\rm th}\right)V_\text{DS} - \frac{{V_\text{DS}}^2}{2} \right] (1 + \lambda V_{DS})
& , triode \\
\frac{1}{2}\mu_n C_\text{ox}\frac{W}{L}\left(V_\text{GS} - V_\text{th}\right)^2(1 + \lambda V_{DS}) & , \text{saturation}\\
I_\text{0} e^\frac{V_\text{GS}}{nV_\text{T}}
& , inversion
\end{dcases*} $ \\[2ex]
$V_{DS}=V_{DD}-R_D I_D, \qquad V_{GS} = V_{in}$ \\
} \\
Circuit Diagram
& Mathematical Model
\end{tblr}
\end{document}