1

Is it possible to set a font for a glyph without adding markup around each occurrence of the glyph? e.g. my current font does not support angle bracket (〈 〉).

3
  • Do you want to use the angle bracket within math mode? \langle \rangle?
    – Sigur
    Mar 23, 2014 at 13:35
  • @Sigur No, in text mode. In math mode it works correctly using unicode-math Mar 23, 2014 at 13:36
  • Related question: tex.stackexchange.com/questions/335/…
    – alexis
    Mar 23, 2014 at 13:43

1 Answer 1

4

You can use the newunicodechar package. (Also works with xelatex)

\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage[utf8]{inputenx}
\usepackage{newunicodechar}
\newunicodechar{〈}{\ensuremath{\langle}}
\newunicodechar{〉}{\ensuremath{\rangle}}
\begin{document}
Here are angle〈 〉brackets.

$Here are angle〈 〉brackets.$
\end{document}

enter image description here

2
  • This is one of the cases where \ensuremath can be useful.
    – egreg
    Mar 23, 2014 at 13:44
  • @egreg Indeed. This is the first time, that \ensuremath comes in handy to me. Mar 23, 2014 at 13:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .