2
% 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} 

enter image description here


  • I want to use the arev package (sans serif font).
  • How do I get a sans serif \textmu (provided by the textcomp package)?
  • Alternatively -- I just need an upright \mu when the main font is from the arev package.

Solution

% 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} 

enter image description here

3

1 Answer 1

3

There is an upright mu in the font, but it seems not to have been encoded. You can access it like this:

\documentclass[border=2mm,varwidth]{standalone}
\usepackage{arev}
\DeclareFontFamily{U}{arev}{}

\DeclareFontShape{U}{arev}{m}{n}{
   <-> favr8r
}{}



\begin{document}
textmu: {\fontencoding{U}\fontfamily{arev}\selectfont\symbol{181}}

\end{document}

enter image description here

6
  • Thanks. Can this considered to be a bug which should be reported (by me)? Commented May 18, 2017 at 23:15
  • Could you propose a robust way to put this into a simple command? I will use it very often, in micro meter. Commented May 19, 2017 at 7:16
  • 1
    I wouldn't call it a bug more a missing feature that there is no TS1-encoded arev font (I don't know if it isn't there because the font hasn't enough glyph coverage for textcomp, or if the author forgot it.) You could try to contact the author. You can easily define a \arevtextmu to call this symbol. Commented May 19, 2017 at 7:44
  • Thanks. I also tested T1 encoding (fontenc package), but no luck. Commented May 19, 2017 at 8:09
  • 1
    No T1 won't work, \textmu is in TS1 and why should LaTeX put it in both? Commented May 19, 2017 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .