Using enumitem on a cheetsheet seems to cause -{}- to render as en-dash
Created by: fullerth
I've asked this over on the Tex stack-overflow, but figured I should also create an issue here.
I'm using this cheatsheet class to create a git cheatsheet.
I have a couple commands the are too long for a single line, so I added the enumitem
package to use the [style=unboxed]
to force lines to wrap. They now wrap, but -{}-
now reduces to an en-dash instead of --
Reproducable by adding cheatsheet.cls to a ShareLatex project with the following document:
\documentclass[columns=3]{cheatsheet}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\title{Test En-dash}
\author{ }
\date{March 2018}
\begin{document}
\maketitle
\newcommand{\gitcmd}[2]{\item[\small\texttt{\$ #1}] \hfill \\ #2}
\section{Configuration}
\begin{description}[style=unboxed]
\gitcmd{git config -{}-global user.name "<name>"}{Sets the name to be attached to your commits }
\gitcmd{git config -{}-global user.email "<email address>"}{Set to your email}
\end{description}
\section{Commit History}
\begin{description}%[style=unboxed]
\gitcmd{git log}{Display the version history of the current branch}
\gitcmd{git log -{}-oneline}{Display version history oneline summaries}
\end{description}
\end{document}
\documentclass[columns=3]{cheatsheet}
\usepackage[utf8]{inputenc}
\usepackage{enumitem}
\title{Test En-dash}
\author{ }
\date{March 2018}
\begin{document}
\maketitle
\newcommand{\gitcmd}[2]{\item[\small\texttt{\$ #1}] \hfill \\ #2}
\section{Configuration}
\begin{description}[style=unboxed]
\gitcmd{git config -{}-global user.name "<name>"}{Sets the name to be attached to your commits }
\gitcmd{git config -{}-global user.email "<email address>"}{Set to your email}
\end{description}
\section{Commit History}
\begin{description}%[style=unboxed]
\gitcmd{git log}{Display the version history of the current branch}
\gitcmd{git log -{}-oneline}{Display version history oneline summaries}
\end{description}
\end{document}
Toggling the [style=unboxed]
comment on the two descriptions
changes how -{}-
is rendered. Adding a space between the dash and word (-{}- global
) also works, but isn't a valid git command.
This appears to be a problem with cheetsheet.cls
, as it does not occur if using the parent article
class.