4

I would like to use Palatino for running text and some matching fonts for math, so I use the package mathpazo. Is there a way to get the \textleftarrow?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{mathpazo}

\begin{document}
abc\textleftarrow
\end{document}
doncherry
  • 54,637
topskip
  • 37,020

2 Answers2

3

Just redeclare the default command:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{mathpazo}

\makeatletter
\DeclareTextCommandDefault{\textleftarrow}{\mbox{$\m@th\leftarrow$}}
\makeatother

You can refine the definition as you prefer.

egreg
  • 1,121,712
1

\ensuremath{\leftarrow} will do the job, surely?

wasteofspace
  • 5,352
  • Yes it does, but somehow I would like to try to use the code above and not make textcomp fail if a command is unknown. – topskip Jun 08 '12 at 08:28