1

A user of menukeys reported (GutHub issue #48) that there is an extra space before hyphens in a directory sequence, when the input separator is a back slash:

\documentclass{article}

\usepackage{menukeys}

\begin{document}
this: \directory[bslash]{c:\temp\dir-dir} (extra space before \verb|-|)

should be the same as this: \directory[/]{c:/temp/dir-dir}
\end{document}

Unfortunately I have no idea how to solve it. Any ideas here in the community?

Tobi
  • 56,353
  • 1
    Well the source of the problem is that TeX inserts a space after command names, and that the parser later on doesn't remove it in \dir -dir. But I can't tell you if it is a catoptions bug or if you are using it in a wrong way. Neither the menukeys code nor the catoptions code is really comprehensible, and catoptions has no docu. As a work-around you can give the hyphen (and the other chars affected by the same problem) locally letter catcode. – Ulrike Fischer Sep 14 '17 at 18:09
  • Thanks for taking a look at it. Seems to be not as easy to fix as I hoped … – Tobi Sep 28 '17 at 15:25
  • Related: https://tex.stackexchange.com/questions/369361/using-menukeys-to-typeset-paths-containing-hyphens – Marijn Jan 02 '21 at 11:35

0 Answers0