如何避免镜像文本 \$M_2\$

如何避免镜像文本 \$M_2\$

以下是我的 tex 代码。

\documentclass[12pt,letterpaper]{article}    
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}

\usepackage{tikz}  % for drawing pictures
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{arrows.meta} 


\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{center}
\begin{circuitikz}[american,]
\ctikzset{tripoles/mos style/arrows}
\def\killdepth#1{{\raisebox{0pt}[\height][0pt]{#1}}}
\path (0,0) -- (2,0); % bounding box

\draw (-3,5)  -- (3,5) node[label=right: $V_{dd} \SI{}{}$] {}
 (-2,1) node[nmos](M1){$M_1$}
 (-2,5) -- (M1.drain)
(-3,1)[short, o-] to (M1.gate) node[anchor=south] {$V_{in}$}
(M1.source) node[anchor=south] {} -- (-2,0) -- (2,0)
(2,1) node[nmos, xscale=-1] (M2){$M_2$};
\end{circuitikz}
\end{center}

\end{document}

这是镜像文本$M_2$。

在此处输入图片描述

答案1

circuitikz 用户指南的“3.2.1 镜像和翻转”部分有一个如何取消翻转文本的示例:

\documentclass[12pt,letterpaper]{article}    
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}

\usepackage{tikz}  % for drawing pictures
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{arrows.meta} 


\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{center}
\begin{circuitikz}[american]
\ctikzset{tripoles/mos style/arrows}
\def\killdepth#1{{\raisebox{0pt}[\height][0pt]{#1}}}
\path (0,0) -- (2,0); % bounding box

\draw (-3,5)  -- (3,5) node[label=right: $V_{dd}$] {}
 (-2,1) node[nmos](M1){$M_1$}
 (-2,5) -- (M1.drain)
(-3,1)[short, o-] to (M1.gate) node[anchor=south] {$V_{in}$}
(M1.source) node[anchor=south] {} -- (-2,0) -- (2,0) -- (2,0.25) node[nmos,xscale=-1,anchor=south east] (M2){\ctikzflipx{$M_2$}};
\end{circuitikz}
\end{center}

\end{document}

在此处输入图片描述

相关内容