% varwidth --> https://tex.stackexchange.com/questions/178539
\documentclass[border=2mm,varwidth]{standalone}
% avec --> https://tex.stackexchange.com/questions/359530
\usepackage{arev}
\usepackage[latin1]{inputenc}
\usepackage{textcomp} % \textmu
\usepackage{upgreek} % \upmu
\begin{document}
\begin{itemize}
\item \texttt{\textbackslash textmu:} \textmu
\item \texttt{\$\textbackslash mu\$:} $\mu$
\item \texttt{\$\textbackslash upmu\$:} $\upmu$
\end{itemize}
\end{document}
- 我想使用该
arev
包(无衬线字体)。 - 如何获取无衬线字体
\textmu
(由包提供textcomp
)? - 或者——
\mu
当主字体来自arev
包时,我只需要一个直立的字体。
解决方案
% varwidth --> https://tex.stackexchange.com/questions/178539
\documentclass[border=2mm,varwidth]{standalone}
% avec --> https://tex.stackexchange.com/questions/359530
\usepackage{arev}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareFontFamily{U}{myFontFamily}{}
\DeclareFontShape{U}{myFontFamily}{m}{n}{
<-> favr8r
}{}
\newcommand{\myupmu}{{\fontencoding{U}\fontfamily{myFontFamily}\selectfont\symbol{181}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[latin1]{inputenc}
\usepackage{textcomp} % \textmu
\usepackage{upgreek} % \upmu
\begin{document}
\begin{itemize}
\item \texttt{\textbackslash textmu:} \textmu m
\item Ulrike Fischer: {\fontencoding{U}\fontfamily{myFontFamily}\selectfont\symbol{181}}m
\item Ulrike Fischer Command: \myupmu m
\item \texttt{\$\textbackslash mu\$:} $\mu m$
\item \texttt{\$\textbackslash upmu\$:} $\upmu$
\end{itemize}
\end{document}