# Angle brackets in non-math-mode text

Is there a way to directly input angle brackets into text without resorting to math-mode symbols?

I'd like to correctly indicate orthography in a linguistics paper, and have been resorting to single guillemots ‹ › as they are simple to type and display correctly. But I'd prefer to use angle brackets like ⟨ ⟩ . If I input these directly (U+27E8 and U+27E9), they don't display correctly—I prefer the Linux Libertine font family—but $\langle$ $\rangle$ display just fine. As the rest of my document(s) use UTF-8 and fontspec, I'd prefer not to clutter up the body text with math commands.

Is there a way around this?

-
If you type them very often, you can use one of the methods in tex.stackexchange.com/questions/1979/… to map ⟨⟩ directly to some keys. For example Neo has them on Mod5 + 8,9. –  Caramdir Mar 18 '12 at 16:14
I tried that, and then I get crossed out boxes in the output, though not in Vim when I type them. –  zoqaeski Mar 21 '12 at 1:20
Sorry, I misunderstood the problem, I should have read more carefully. –  Caramdir Mar 21 '12 at 17:10

fontspec doesn't have an interface for substituting some characters with characters from a different font, but thankfully egreg provided a package to do just that:

\documentclass{article}
\usepackage{fontspec}
\usepackage{newunicodechar}
\setmainfont{Linux Libertine O}

\newfontfamily\anglefont{Free Serif}    % Change to whatever font you prefer that has ⟨⟩.
\newunicodechar{⟨}{{\anglefont ⟩}}
\newunicodechar{⟩}{{\anglefont ⟨}}

\begin{document}
This is Linux Libertine with ⟨ and ⟩ from {\anglefont Free Serif}.
\end{document}


-
You can even say \newunicodechar{⟨}{{\anglefont ⟨}} No need to hunt through the Unicode character table. ;-) –  egreg Mar 21 '12 at 17:30
@egreg: In the documentation you do \newunicodechar{€}{{\eurofont\texteuro}}, so I thought that using the symbol directly is not possible. –  Caramdir Mar 21 '12 at 17:53
I have to update it; that example is really for utf8 and (pdf)LaTeX rather than XeLaTeX or LuaLaTeX. –  egreg Mar 21 '12 at 20:26
Thanks! This did the trick, and XeLaTeX isn't spitting any errors, so I'll assume it works. –  zoqaeski Apr 3 '12 at 4:40

You could employ the commands \textlangle and \textrangle provided by the textcomp package. If that's too many letters to type each time, you could define shortcuts for them, say \la and \ra. The following MWE illustrates this idea, also

% !TEX TS-program = xelatex
\documentclass{article}
\usepackage{fontspec}
% \setmainfont{Linux Libertine O} % select your main text font here
\usepackage{textcomp,    % for \textlangle and \textrangle macros
xspace}
\newcommand\la{\textlangle\xspace}  % set up short-form macros
\newcommand\ra{\textrangle\xspace}
\begin{document}
\noindent
\textlangle\ and \textrangle; \newline
\la and \ra.   % abbreviated macros; note: no need to insert explicit whitespace after "\la"
\end{document}


-