3

I want to put source code into verbatim and Verbatim (fancyvrb) environments that uses box-drawing characters from codepage 850 (0xDB, 0xDC, 0xDF) (see http://en.wikipedia.org/wiki/Code_page_850). By using a text editor I converted the source code file to Unicode and created the following minimal example in LaTeX (source code is taken from tube by 3SC (http://www.pouet.net/prod.php?which=3397) FWIW):

\documentclass[a4paper]{scrbook}
\usepackage{fancyvrb}
\usepackage[utf8]{inputenc}
\usepackage{pmboxdraw}
\author{Wolfgang Keller}
\title{Minimal example}

\begin{document}

\begin{verbatim}
;  (▄) ( ) ▄ ) ( )   256b intro by baze/3SC for Syndeecate 2001   use NASM to
;  ▀█▀ █▄█ ███ ██▄   loveC: thanks, Serzh: eat my socks dude ;]   compile the
;  ( ) ( ) ( ) ( )   e-mail: baze@stonline.sk, web: www.3SC.sk    source code
\end{verbatim}

\begin{Verbatim}[commandchars=\\\{\}]
;  (▄) ( ) ▄ ) ( )   256b intro by baze/3SC for Syndeecate 2001   use NASM to
;  ▀█▀ █▄█ ███ ██▄   loveC: thanks, Serzh: eat my socks dude ;]   compile the
;  ( ) ( ) ( ) ( )   e-mail: baze@stonline.sk, web: www.3SC.sk    source code
\end{Verbatim}
\end{document}

The problem is: the block elements are drawn far too wide - destroying the ASCII art. And the documentation of pmboxdraw (ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/oberdiek/pmboxdraw.pdf) doesn't really tell me how to solve this problem.

3

Option Block/box helps, it expects a box template for the Block elements. In this case the block characters should probably occupy the place of a character in typewriter font:

\pmboxdrawsetup{
  Block/box={\texttt{0}},
}

Result

For ASCII art, the block characters should probably occupy the line better, a \strut helps then:

\pmboxdrawsetup{
  Block/box={\texttt{0}\strut},
}

Result with \strut

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.