0

I need to insert a text with ⮀character (u+2b80), in a document. Is there any way?

I've tried: \literate {⮀}{{???}}1 but can't find what to write instead of ???.

Any suggestions?

Werner
  • 603,163
yeKcim
  • 1
  • \documentclass[10pt]{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Sauce Code Powerline} \usepackage{listingsutf8}

    \begin{document} I can't write ⮀ - \char"2B80

    \begin{lstlisting} a listing with ⮀ symbol \end{lstlisting}

    \end{document}

    only cross in squares appear nothing like http://graphemica.com/%E2%AE%80 what i need (not leftrightarrows but leftwards triangle-headed arrow over rightwards triangle-headed arrow (U+2B80)

    – yeKcim Oct 30 '15 at 19:05

3 Answers3

1

Yes it's possible, as long as the font you're using has the character.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Symbola}
\begin{document}
\char"2B80
\end{document}

enter image description here

Sverre
  • 20,729
  • I don't need to add leftrightarrows but "leftwards triangle-headed arrow over rightwards triangle-headed arrow (U+2B80)" http://graphemica.com/%E2%AE%80 I use a powerline font in xetex but this char doesnt appear – yeKcim Oct 30 '15 at 18:57
1

Look up a suitable symbol http://mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf and then use it:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{listings,amssymb}
\lstset{literate ={⮀}{$\leftrightarrows$}1}
\begin{document}
\begin{lstlisting}
a listing with ⮀ symbol
\end{lstlisting}

enter image description here

Ulrike Fischer
  • 327,261
0

Add the following package

\usepackage{listingsutf8}   

Or provide an MWE that the community can try to solve your problem.

  • \documentclass[10pt]{article} \usepackage{fontspec} \setmainfont[Ligatures=TeX]{Sauce Code Powerline} \usepackage{listingsutf8}

    \begin{document} I can't write ⮀ - \char"2B80

    \begin{lstlisting} a listing with ⮀ symbol \end{lstlisting}

    \end{document}

    only cross in squares appear

    – yeKcim Oct 30 '15 at 19:04