0

I need to insert character "" in lstlisting and compile it with pdflatex. Other unsupported characters like "ě" I am handling via literate option in \lstset{}. Is there any way how to insert it? Thanks.

1 Answer 1

1

One possibility is to approximate it using math mode. That character looks a lot like $^{\mathsf{L}}$, so it's possible to just use that in the literate option:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{listings}

\lstset{
    basicstyle=\large\ttfamily,
    breaklines=true,
    breakatwhitespace=true,
    literate=%
        {á}{{\'a}}1
        {ě}{{\v{e}}}1
        {í}{{\'i}}1
        {└}{{\(^{\mathsf L}\)}}1
}

\begin{document}
\begin{lstlisting}
Jsou nadáni rozumem a svědomím a mají spolu jednat v duchu bratrství.

Here is the character: └.
\end{lstlisting}
\end{document}

Here's what the output looks like:

enter image description here

2
  • 1
    With \usepackage{pmboxdraw} you can say {└}{{\textSFii}}1 in the literal list.
    – egreg
    Nov 15, 2015 at 16:54
  • @egreg: Package pmboxdraw has more useful characters. That's what I am looking for. Thanks! Nov 15, 2015 at 19:23

You must log in to answer this question.

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