1

I have a simple Latex code

\documentclass{article}

\usepackage{fancyvrb}
\usepackage{lipsum}

\begin{document}


\lipsum[2]

\begin{Verbatim}
CPD of G:
╒═════╤═════╤══════╕
│ F   │ F\_0 │ F\_1  │
├─────┼─────┼──────┤
│ G\_0 │ 0.2 │ 0.01 │
├─────┼─────┼──────┤
│ G\_1 │ 0.8 │ 0.99 │
╘═════╧═════╧══════╛

\end{Verbatim}

\lipsum[4]

\end{document} 

After compiling, I get this PDF file enter image description here

But I would like to see in my PDF file vertical and horizontal lines, just like in my tex file. Does anyone know the solution and help me. Thanks in advance.

2
  • Could using |, , and + be a solution?
    – ebosi
    Commented Feb 19, 2018 at 15:25
  • Which tex engine are you using? With pdflatex you need \usepackage[utf8]{inputenc}. With any engine you need a font with these characters. Commented Feb 19, 2018 at 15:25

1 Answer 1

3

You can use pmboxdraw (Heiko has a solution for almost everything).

I guess you don't really want the backslashes.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fancyvrb}
\usepackage{pmboxdraw}

\begin{document}

\begin{Verbatim}
CPD of G:
╒═════╤═════╤══════╕
│ F   │ F_0 │ F_1  │
├─────┼─────┼──────┤
│ G_0 │ 0.2 │ 0.01 │
├─────┼─────┼──────┤
│ G_1 │ 0.8 │ 0.99 │
╘═════╧═════╧══════╛
\end{Verbatim}

\end{document}

enter image description here

Sorry for the wrong display here; on my editor it is

enter image description here

0

You must log in to answer this question.

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