0

I am trying to typeset a document using Xelatex. The document contains assertion unicode character 0x22a6 but unable to render it.

I have tried several methods such as using newunicodechar package, fontspec, etc. but could'nt render the character successfully.

2
  • What font are you using?
    – egreg
    Commented Feb 21, 2016 at 14:52
  • I have tried several fonts but couldn't get it work.
    – Shahzad
    Commented Feb 21, 2016 at 14:58

2 Answers 2

1

This should be available in any math font (and some text fonts) for example it is in latin modern math:

enter image description here

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{latinmodern-math.otf}
\begin{document}

You can (perhaps) use the math font as text font for example

enter image description here

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\setmainfont{xits-math.otf}
\begin{document}

[text ^^^^22a6]


$ a \assert b $

\end{document}

The same markup would work for any font tha has the character.

$ a \assert b $

\end{document}

If you don't need it to be in Unicode position the actual character is available in any tex math font set (as \vdash)

3
  • I actually would like to render it as a text character instead of math symbol.
    – Shahzad
    Commented Feb 21, 2016 at 14:57
  • @Shahzad if the character is in your text font then ^^^^22a6 will work, if not then anything else is going to be equivalent to $\assert$ or $\vdash$ to obtain the character from a font that does have it. Commented Feb 21, 2016 at 15:00
  • @Shahzad updated answer Commented Feb 21, 2016 at 15:04
3

If your font has no U+22A6 glyph, you can add a font face having it:

\documentclass{article}
\usepackage{fontspec}
\usepackage{newunicodechar}

\setmainfont{Old Standard} % it has no U+22A6
\newfontface{\assertionfont}{FreeSerif} % it has U+22A6

\newunicodechar{⊦}{\mbox{\assertionfont ⊦}}

\begin{document}

This is \texttt{U+22A6}: ⊦

\end{document}

enter image description here

Among the fonts in TeX Live having the glyph you find Asana Math, Latin Modern Math, Libertinus Serif and Sans, Linux Libertine, Linux Biolinum, STIX and STIX Math, TeX Gyre {Bonum|Pagella|Schola|Termes} Math, XITS and XITS Math.

Note that you can use, say, Asana Math in a \newfontface declaration.

You must log in to answer this question.

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