Gentoo Archives: gentoo-pms

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: [gentoo-pms] [PATCH 2/3] Require underscore.sty package.
Date: Sat, 13 May 2017 12:16:17
Message-Id: 22806.63756.126437.625204@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-pms] [PATCH 0/3] Use simple underscores by "Ulrich Müller"
1 This permits hyphenation of words with underscores, so the custom code
2 in pms.cls can be removed. Also simple _ acts like \_ in text mode.
3 ---
4 eapi-cheatsheet.tex | 1 +
5 pms.cls | 7 ++-----
6 2 files changed, 3 insertions(+), 5 deletions(-)
7
8 diff --git a/eapi-cheatsheet.tex b/eapi-cheatsheet.tex
9 index 250df41..6ac72b9 100644
10 --- a/eapi-cheatsheet.tex
11 +++ b/eapi-cheatsheet.tex
12 @@ -12,6 +12,7 @@
13 }
14 \usepackage[orig,english]{isodate}
15 \usepackage[scaled=.90]{helvet}
16 +\usepackage[nohyphen]{underscore}
17 \newcommand{\code}[1]{\texttt{#1}}
18 % This should reflect the latest approved EAPI version
19 \newcommand{\version}{6.0}
20 diff --git a/pms.cls b/pms.cls
21 index 624d7c1..5eecad9 100644
22 --- a/pms.cls
23 +++ b/pms.cls
24 @@ -19,6 +19,7 @@
25 \PassOptionsToPackage{quiet}{marginnote}
26 \PassOptionsToPackage{nottoc,notlot,notlof}{tocbibind}
27 \PassOptionsToPackage{chapter}{algorithm}
28 +\PassOptionsToPackage{nohyphen}{underscore}
29 % algorithmic and algorithm to be loaded last to avoid failures
30 \RequirePackage{%
31 fontenc, % Load extended font sets
32 @@ -33,6 +34,7 @@
33 marginnote, % Typeset a paragraph in the page margin
34 paralist, % Additional list environments
35 parskip, % Space between paragraphs instead of indentation
36 + underscore, % Allow simple _ instead of \_
37 verbatim, % Extend the print-as-is functionality
38 chngcntr, % Redefinition of counters
39 tocbibind % Add bibliography to table of contents
40 @@ -109,11 +111,6 @@
41 \newcommand{\e}[1]{\emph{#1}}
42 \newcommand{\note}[1]{\paragraph{Note:} #1}
43
44 -% Allow line breaks after underscores (but with a large penalty)
45 -\newcommand{\origunderscore}{}
46 -\let\origunderscore\_
47 -\renewcommand{\_}{\origunderscore\penalty500\hskip0pt}
48 -
49 % Because we are lazy, we define a table environment to fulfil our needs
50 \newenvironment{centertable}[1]%
51 {
52 --
53 2.13.0