Fonts & Character SetsGetting TIPA Times without times.sty

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
eching
Posts: 3
Joined: Sat Nov 14, 2009 10:53 am

Getting TIPA Times without times.sty

Post by eching »

Hi all,

I'm typing phonetic characters in a document that's largely Palatino (mathpazo). The TIPA package can manage this but the phonetic characters all come out Computer Modern, which is a poor match for Palatino. Is there a way to make TIPA use Times instead?

The TIPA manual says to just put the Times package before TIPA:

Code: Select all

\usepackage{times}
\usepackage{tipa}
But this won't work when the Palatino package comes immediately after:

Code: Select all

\usepackage{mathpazo}
Here's some test code for TIPA:

Code: Select all

\textipa{[""Ekspl@"neIS@n]}
Would be most grateful for any suggestions ... am tearing out my hair!

E-Ching

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Getting TIPA Times without times.sty

Post by localghost »

I think the tipa manual is very clear in this point (Section 3.1.1 - Encoding options, p. 11). This package comes with its own fonts and needs a certain font encoding. Try the code below.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T3,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=3cm]{geometry}
\usepackage{pxfonts}
\usepackage[noenc]{tipa}

\begin{document}
  The quick brown fox jumps over the lazy dog.

  \textipa{[""Ekspl@"neIS@n]}
\end{document}
You will get a document that is typeset in Palatino style. The times package is obsolete and in the manual only serves as an example. Look at the embedded fonts by checking the document properties in your PDF viewer.

I think there is a misunderstanding with the manual. The symbols are not typeset in the font of the main text.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
eching
Posts: 3
Joined: Sat Nov 14, 2009 10:53 am

Re: Getting TIPA Times without times.sty

Post by eching »

Dear Thorsten,

Thank you for your swift response, but perhaps I was not clear enough. When I run that code I get "The quick brown fox jumps over the lazy dog" in Palatino, but the phonetic characters within \textipa{} appear in Computer Modern, which is what I don't want. I am trying to get them to appear in the TIPA font which was made to match Times, because that is a better match for Palatino.

I'm sure it is possible since TIPA does have multiple fonts made to match Times and Helvetica in addition to Computer Modern. It just doesn't seem to realise that Computer Modern isn't an appropriate fallback option with all other typefaces!

E-Ching

PS Actually I am using Garamond on XeTeX in TexLive 2008, but the problem is hopefully identical.
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Getting TIPA Times without times.sty

Post by localghost »

eching wrote:[...] When I run that code I get "The quick brown fox jumps over the lazy dog" in Palatino, but the phonetic characters within \textipa{} appear in Computer Modern, which is what I don't want. I'm sure it is possible since TIPA does have multiple fonts made to match Times and Helvetica in addition to Computer Modern. It just doesn't seem to realise that Computer Modern isn't an appropriate fallback option with all other typefaces! [...]
The phonetic characters are not typeset in Computer Modern, but TeX-tipa. If you want Times style for the running text, try txfonts instead of pxfonts. But this doesn't change the fonts of the phonetic symbols. The embedded fonts are shown below.

Code: Select all

thorsten@localghost:/tmp> pdffonts tipa-xmpl.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
KLBAMT+NimbusRomNo9L-Regu            Type 1            yes yes no       4  0
ZQDKPM+TeX-tipa10                    Type 1            yes yes no       5  0
The first one comes from the txfonts package. Nimbus Roman No9 L (Regular) is the free version of Times New Roman.
eching wrote:[...] PS Actually I am using Garamond on XeTeX in TexLive 2008, but the problem is hopefully identical.
No, the problem is completely different. As far as I know the tipa package would need an adaption to XeTeX. But perhaps the fontspec package can help.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
eching
Posts: 3
Joined: Sat Nov 14, 2009 10:53 am

Re: Getting TIPA Times without times.sty

Post by eching »

Dear localghost,

Well no, I'm not trying to get running text in Times, I'm trying to get everything in Palatino/Garamond, filling in the missing bits with the Times-emulating XIPA font from the TIPA package. So txfonts doesn't really help.

I have figured out a solution based on code from my professor (Steve Anderson). It's clunky but it does work for both pdflatex and XeTeX, with the following caveats: I cannot get engma in XeTeX at all; I cannot get ash in the XeTeX-specified font; XeTeX seems incompatible with the T1 mode of TIPA and fontenc in this file, though I've seen it work in other files.

Take care,
E-Ching

\documentclass[letterpaper,12pt]{article}

\usepackage{mathpazo} % Set font without XeTeX
% \setmainfont{Adobe Garamond Pro} % Set font using XeTeX
% \usepackage{fontspec} % Needed in XeTeX

\usepackage[safe,T1]{tipa} % T1 option incompatible with XeTeX
\usepackage{tipx}

\newcommand{\A} {{\fontfamily{ptm}\textscripta}}
\newcommand{\E} {{\fontfamily{ptm}\textschwa}}
\newcommand{\EH}{{\fontfamily{ptm}\textepsilon}}
\newcommand{\I} {{\fontfamily{ptm}\textsci}}
\newcommand{\SH}{{\fontfamily{ptm}\textesh}}
\newcommand{\pristr}{{\fontfamily{ptm}\textprimstress}}
\newcommand{\secstr}{{\fontfamily{ptm}\textsecstress}}

% Engma requires special treatment, don't know why
\newcommand{\ngec}{{\fontfamily{lmr}\selectfont\ng}}

\begin{document}

\section*{Heading with matching IPA: [\secstr{\EH}kspl{\E}{\pristr}ne{\I}{\SH}{\ae}{\ngec}]}

Running text with matching IPA: [\secstr{\EH}kspl{\E}{\pristr}ne{\I}{\SH}{\ae}{\ngec}]

\section*{Heading with non-matching IPA: \textipa{[""Ekspl@"neIS{\ae}N]}}

Running text with non-matching IPA: \textipa{[""Ekspl@"neIS{\ae}N]}

\end{document}
wisnij
Posts: 1
Joined: Sun Jan 24, 2010 9:08 am

Getting TIPA Times without times.sty

Post by wisnij »

eching wrote:I'm typing phonetic characters in a document that's largely Palatino (mathpazo). The TIPA package can manage this but the phonetic characters all come out Computer Modern, which is a poor match for Palatino. Is there a way to make TIPA use Times instead?
I'm using TeX Live rather than XeTeX, so I'm not entirely sure if this will work the same. But what I did was copy the t3ptm.fd and ts3ptm.fd files in $TEXMF/tex/latex/tipa into new files t3ppl.fd and ts3ppl.fd, and changed "ptm" to "ppl" within them -- ppl being the \rmdefault that palatino.sty sets up, so if you're using different fonts, you may have to change that as appropriate. After rerunning mktexlsr, it used the xipa font alongside Palatino without needing any specific commands in the document.
Post Reply