
Inconsolata
패키지 에서 제공하는 글꼴을 사용하고 있습니다 zi4
. 그러나 단일 매크로의 경우 기본 타자기 글꼴을 사용하고 싶습니다(그래서 는 아님 Inconsolata
). \texttt
문서에서 가 나올 때마다 를 사용해야 합니다 Inconsolata
.
\documentclass{article}
\usepackage[varqu]{zi4}
\newcommand{\csharp}{C\texttt{\#}} % How can I use the default typewriter font here?
\begin{document}
This should be \texttt{Inconsolata}.
\end{document}
답변1
명령 을 사용할 수 있습니다 \fontfamily
.
\documentclass{article}
\usepackage[varqu]{zi4}
\newcommand{\csharp}{C{\fontfamily{cmtt}\selectfont\#}}
\begin{document}
\csharp\par
This should be \texttt{Inconsolata}.
\end{document}