Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In a nutshell. Is there a relatively easy way of building characters out of parts of existing ones?

Rationale. (La)TeX linguists’ need for a wide palette of characters—for example, ⟨ɳ⟩ (U+0273), ⟨ɲ⟩ (U+0272), ⟨ʁ⟩ (U+0281), ⟨ɱ⟩ (U+0271), ⟨ə⟩ (U+0259)—is generally met by Rei Fukui’s tipa package. However, tipa provides no italic shapes and is limited to Computer Modern. Which causes problems. Publishers very often ask for a font other than Computer Modern, and there is a near universal convention that italics be used for in-text citation. The result is unsatisfying and visually unappealing (and frequently leads to publications in which there is a mishmash of fonts and/or font shapes). (Some publishers do have full sets of italic IPA fonts, but these are frequently specially commissioned and not freely available; e.g., OUP’s Minion set.)

Example. Here is the mixture of fonts and shapes you get by calling for a schwa via \textipa{@}, while using Times Roman:

enter image description here

To get around this, I’ve taken to getting rotating.sty to rotate an e:

\newlength{\schwawidth}
\newlength{\schwaheight}
\newcommand{\x}{%
    \settowidth{\schwawidth}{\it e}%
    \settoheight{\schwaheight}{\it e}%
    \makebox[\schwawidth][r]{%
    \raisebox{\schwaheight}{%
    \turnbox{180}{e}}}%
    }

Notice that this also gets reasonable kerning (which is the reason for defining \schwawidth and \schwaheight rather than using, what’s it called, a rotate box?):

enter image description here

The Question. This approach fails when parts of characters have to be assembled. Consider ⟨ɺ⟩ (U+027A). You can rotate a ⟨r⟩, as for schwa, and superimpose on an ⟨l⟩, but the tail of the ⟨l⟩ sticks out uncomfortably:

enter image description here

What you really need is to lop the top off an ⟨l⟩ and to stick it on the rotated ⟨r⟩ and then to have the result treated as a single character. Is there are simple way of doing this?


Update. The author of expex.sty reminds me of a trick I used to use in Word: covering parts of letters up with white boxes, replicable in TeX with pstricks.sty. Here is how you might get ⟨ɺ⟩ (U+027A) above:

\documentclass[12pt]{article}
\usepackage{rotating,mathptmx,pstricks}

\begin{document}

\newlength{\rwidth}
\newlength{\rheight}
\newcommand{\turnedr}{%
    \settowidth{\rwidth}{\it r}%
    \settoheight{\rheight}{\it r}%
    \makebox[\rwidth][r]{%
    \raisebox{\rheight}{%
    \turnbox{180}{r}}}%
    }
\def\cutr{\leavevmode\hbox{\turnedr}%
    \psframe*[linecolor=white](0,0)(-.15em,1.1ex)%
    \psframe*[linecolor=white](0,-.1ex)(-.24em,.2ex)%
    \psframe*[linecolor=white](0,-.1ex)(-.26em,.1ex)%
    }
\def\turnedlongr{\cutr\kern-.27eml}

\noindent \it 
\verb|\cutr| --- \cutr \\
\verb|\turnedlongr| --- \turnedlongr \\
\verb|\l\turnedlongr d| --- l\turnedlongr d

\end{document}

enter image description here

I doubt this will work for all letters, and I’m sure that purists will need to rinse their eyes after reading this...


Undertaking. If I make progress on this, I’ll start posting whatever characters I create/cobble/frankenstein on (something linked to) my webpage (which you can find by googling my name).

Notes. This question is quite general as:

  1. Many IPA characters are combinations of common characters (⟨j⟩+⟨n⟩=⟨ɲ⟩, ⟨m⟩+⟨j⟩=⟨ɱ⟩, etc.).
  2. The problem of mismatches doesn't just apply to Times italics: it affects italics in Computer Modern and roman in all other fonts.

This question started life as part of this question. Although a work around was found, the broad issue of lopping bits of existing characters (in that case, the crossbar from ⟨f⟩) remains.


\documentclass[12pt]{article}
\usepackage{rotating,mathptmx, tipa}

\begin{document}

\newlength{\schwawidth}
\newlength{\schwaheight}
\newcommand{\x}{%
    \settowidth{\schwawidth}{\it e}%
    \settoheight{\schwaheight}{\it e}%
    \makebox[\schwawidth][r]{%
    \raisebox{\schwaheight}{%
    \turnbox{180}{e}}}%
    }

\noindent \it 
e\x e --- all Times italic\\
e\textipa{@}e --- Times italic with slanted Computer Modern schwa\\
\textipa{e@e} --- all Computer Modern slanted\\
\underline{e \footnotesize\x\ \normalsize\x\ \Large\x}\ \normalsize --- various sizes

\newlength{\rwidth}
\newlength{\rheight}
\newcommand{\turnedr}{%
    \settowidth{\rwidth}{\it r}%
    \settoheight{\rheight}{\it r}%
    \makebox[\rwidth][r]{%
    \raisebox{\rheight}{%
    \turnbox{180}{r}}}%
    }
\ \\
$\turnedr + l \stackrel{_?}{=} \turnedr\kern-.265eml$

\end{document}
share|improve this question

1 Answer 1

up vote 11 down vote accepted

it's always better to use "precomposed" characters rather than trying to cobble something together. this may involve some work with font tools, and others on this list are better able to address that than i.

however, many fonts created for use within linguistics environments are available from sil international, and i suggest looking there before trying to "roll your own".

update: a further question, "Accessing IPA characters when using Charis SIL" was answered by egreg to say that ipa characters can be used directly, provided the file is encoded as utf-8 and \usepackage{fontspec} is specified. that question, answer and comments provide other useful information, and with this, the op reports that everything is now working fine.

share|improve this answer
    
Pre-rolled would be preferred, so long as it doesn’t lock me in too restrictive a set of fonts. I’ll check out SIL and report back. –  Daniel Harbour Jan 4 '13 at 17:50
    
Also worth looking at Brill, though you may need to a fair amount of work to make it available to TeX. –  Brent.Longborough Jan 4 '13 at 18:25
    
@barbarabeeton Apologies for such a basic question, but: how do I actually access IPA characters once I've set Charis SIL as the main font? (The tipa macros don't work...) –  Daniel Harbour Jan 5 '13 at 16:10
    
@DanielHarbour -- i've never done this myself, so i'll have to relay what other folks have said (on the ling-tex@ifi.uio.no discussion list). it seems to be advised to use xetex (with charis installed as a system font) and utf-8 encoding. there are two threads on the cited list that might be of particular interest: "direct ipa input" (2010) and "selecting font variants" (2012). there is a searchable archive reachable from [heim.ifi.uio.no/~dag/ling-tex.html]. (sorry i can't be more helpful.) –  barbara beeton Jan 5 '13 at 17:13
1  
@Brent.Longborough The Brill font is great, but I’d rather stick with something where there is a community of users—at least until I’m more experienced. –  Daniel Harbour Jan 6 '13 at 16:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.