commit: cebd6e621cd2f98c9c1adedb6b509e76db8534e3
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat May 13 09:31:36 2017 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon May 15 21:01:42 2017 +0000
URL: https://gitweb.gentoo.org/proj/pms.git/commit/?id=cebd6e62
Require underscore.sty package.
This permits hyphenation of words with underscores, so the custom code
in pms.cls can be removed. Also simple _ acts like \_ in text mode.
eapi-cheatsheet.tex | 1 +
pms.cls | 7 ++-----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex
index 250df41..6ac72b9 100644
--- a/eapi-cheatsheet.tex
+++ b/eapi-cheatsheet.tex
@@ -12,6 +12,7 @@
}
\usepackage[orig,english]{isodate}
\usepackage[scaled=.90]{helvet}
+\usepackage[nohyphen]{underscore}
\newcommand{\code}[1]{\texttt{#1}}
% This should reflect the latest approved EAPI version
\newcommand{\version}{6.0}
diff --git a/pms.cls b/pms.cls
index 44d566c..2bd86d8 100644
--- a/pms.cls
+++ b/pms.cls
@@ -17,6 +17,7 @@
% Enable UTF-8 input encoding
\PassOptionsToPackage{utf8}{inputenc}
\PassOptionsToPackage{quiet}{marginnote}
+\PassOptionsToPackage{nohyphen}{underscore}
\PassOptionsToPackage{nottoc,notlot,notlof}{tocbibind}
\PassOptionsToPackage{chapter}{algorithm}
% algorithmic and algorithm to be loaded last to avoid failures
@@ -33,6 +34,7 @@
marginnote, % Typeset a paragraph in the page margin
paralist, % Additional list environments
parskip, % Space between paragraphs instead of indentation
+ underscore, % Allow simple _ instead of \_
verbatim, % Extend the print-as-is functionality
chngcntr, % Redefinition of counters
tocbibind % Add bibliography to table of contents
@@ -109,11 +111,6 @@
\newcommand{\e}[1]{\emph{#1}}
\newcommand{\note}[1]{\paragraph{Note:} #1}
-% Allow line breaks after underscores (but with a large penalty)
-\newcommand{\origunderscore}{}
-\let\origunderscore\_
-\renewcommand{\_}{\origunderscore\penalty500\hskip0pt}
-
% Because we are lazy, we define a table environment to fulfil our needs
\newenvironment{centertable}[1]%
{