เศษภายในเศษส่วน
ในขณะที่ใช้ \ frac ทำให้ฉันมีอักขระที่เล็กลง \ cfrac เกือบจะได้สิ่งที่ฉันต้องการยกเว้นมีช่องว่างที่ค่อนข้างใหญ่เหนือตัวหาร
ฉันทำตามสิ่งนี้แต่ตอนนี้ไม่มีไฟล์$\displaystyle$ เพราะฉันไม่ได้ใช้ที่ใด
\begin{equation}
\frac{v_{out}}{i_{in}} = \cfrac{R_{D}} {\left(\cfrac{s}{\cfrac{1}{C_{o}R_{D}}} + 1 \right)
\left( \cfrac{s}{\cfrac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})}} + 1 \right) }
\end{equation}
คำตอบ
ทางออกที่เป็นไปได้:
\documentclass[varwidth, margin=3.141592]{standalone}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\frac{v_{out}}{i_{in}}
= \dfrac{R_{D}}{
\begin{pmatrix}
\cfrac{s}{\cfrac{1}{C_{o}R_{D}} + 1}\\
\end{pmatrix}
\begin{pmatrix}
\cfrac{s}{\cfrac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})} + 1}\\
\end{pmatrix}
}
\end{equation}
\end{document}
การใช้\dfracแทน\cfracจะดูเหมือนเพียงพออย่างสมบูรณ์
การรวมแนวคิดนี้เข้ากับคำแนะนำของ @ Zarko ในการรวมเงื่อนไขเศษส่วนขนาดใหญ่ในpmatrixสภาพแวดล้อมแทนที่จะเป็นใน\left(และการ\rightห่อหุ้มจะสร้างผลลัพธ์ต่อไปนี้:
\cfracแทรกแมโคร\strutซึ่งมีความสูงรวมของ\baselineskipทั้งในแง่เศษและตัวหาร ในทางตรงกันข้าม\dfracไม่แทรกเสา (ตัวพิมพ์) ตามค่าเริ่มต้น ในกรณีปัจจุบันอิทธิพลของการปรากฏตัวของเสาใน\cfracนั้นจะสังเกตเห็นได้ชัดเจนโดยเฉพาะอย่างยิ่งกับจำนวนช่องว่างที่อยู่เหนือsเงื่อนไขตัวเศษ
\documentclass{article}
\usepackage{amsmath} % for '\dfrac', '\cfrac', and '\text' macros
\begin{document}
\[
\cfrac{\text{with \texttt{\string\cfrac}}}{%
\begin{pmatrix}
\cfrac{s}{\cfrac{1}{C_{o}R_{D}} + 1}
\end{pmatrix}
\begin{pmatrix}
\cfrac{s}{\cfrac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})} + 1}
\end{pmatrix}
}
\quad\text{vs.}\quad
\dfrac{\text{with \texttt{\string\dfrac}}}{%
\begin{pmatrix}
\dfrac{s}{\dfrac{1}{C_{o}R_{D}} + 1}
\end{pmatrix}
\begin{pmatrix}
\dfrac{s}{\dfrac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})} + 1}
\end{pmatrix}
}
\]
\end{document}
คำถามประเภทนี้เป็นคำถามที่ฉันเห็นบ่อยในไซต์: ฉันจะเขียนนิพจน์ที่ "น่าเกลียด" / ซับซ้อนนี้ใน LaTeX ได้อย่างไร โดยปกติคุณสามารถทำตามคำตอบอื่น ๆ หรือคุณสามารถลองแยกนิพจน์โดยใช้คำ
ฉันมักจะชอบแยกนิพจน์ที่ซับซ้อนออกไปตามที่แสดงด้านล่าง
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent
The ratio is given as
%
\begin{equation}
\frac{v_{\text{out}}}{i_{\text{in}}}
= \frac{R_D}{f(\alpha) \cdot f(\beta)}
\end{equation}
%
where
%
\begin{equation*}
f(x) = \frac{s}{x + 1}, \quad
\alpha = \frac{1}{C_o R_D} \quad \text{and} \quad
\beta = \cfrac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})}.
\end{equation*}
%
Let $f(x)=s/(x+1)$, then the ratio
$v_{\text{out}}/i_{\text{in}}$ is defined as
%
\begin{equation*}
\frac{v_{\text{out}}}{i_{\text{in}}}
= R_D\biggl/\biggl[ f\biggl(\frac{1}{C_o R_D}\biggr)f\biggl(\frac{g_{m}r_{o} + 1}{C_{PD}(R_{D} + r_{0})}\biggr)\biggr].
\end{equation*}
\end{document}