# Libertine and TIPA Sans Serif

My goal is to get the tipass (that is, TIPA Sans Serif) font to work with the libertine package. Using the following, I get computer modern (as expected) with TIPA sans serif:

\documentclass{article}
\usepackage{tipa}
\begin{document}
This is a test document\\
\textsf{\textipa{a A B b C c D d E e F f G g N n}}
\end{document}


However, when I add the libertine package, \usepackage{libertine}, then I get the \textsf command no long works how I want it to:

I suspect this has something to do with how the libertine package sets \textsf to Linux Biolinum, which isn't what I want. To get tipass for use with IPA, I tried the following code, to no avail, as it complains that the tipass font isn't found:

\documentclass{article}
\usepackage{libertine}
\usepackage{tipa}
\DeclareFontSubstitution{T3}{tipass}{m}{n}
\begin{document}
This is a test document\\
\textsf{\textipa{a A B b C c D d E e F f G g N n}}
\end{document}


The command \textipa just executes \tipaencoding in a group, which resolves to \fontencoding{T3}\selectfont. Add to it \fontfamily{cmss} and you're done.

I used \DeclareTextFontCommand so \textipa becomes robust, which is not by default.

\documentclass{article}
\usepackage{libertine}
\usepackage{tipa}

\DeclareTextFontCommand{\textipa}{%
\fontfamily{cmss}\tipaencoding
}
\renewenvironment{IPA}{\fontfamily{cmss}\tipaencoding}{}

\begin{document}
This is a test document

\textipa{a A B b C c D d E e F f G g N n}

\begin{IPA}a A B b C c D d E e F f G g N n\end{IPA}
\end{document}


As outlined in the documentation (p.2) you can load libertine with the rm option to activate it for the Roman font without activating the Biolinum font. (Similar options exist for the mono font etc.)

\documentclass{article}
\usepackage[rm]{libertine}
\usepackage{tipa}
\begin{document}
This is a test document\\
\textsf{\textipa{a A B b C c D d E e F f G g N n}}
\end{document}


You don't want the tipass family (tipass is only the name of the font file) but cmss:

\documentclass{article}
\usepackage{libertine}
\usepackage{tipa}
\DeclareFontSubstitution{T3}{cmss}{m}{n}

\begin{document}
This is a test document\\
\textipa{a A B b C c D d E e F f G g N n}
\end{document}


But this will use this family for all tipa code. If you want a more sophisticated setup you should write some fd-files.