debugging: Define and use '\lopt' macro in description heading
PATCH 1/1 debugging: Define and use '\lopt' macro in description heading
From 0b95993bbe36699a9e5fcc19cf28bcbba2decc06 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <[email protected]>
Date: Sun, 6 Jan 2019 08:40:33 +0900
Subject: [PATCH] debugging: Define and use '\lopt' macro in description heading
Reduce "ugliness" of workaround in commit 66b12d0a4b87 ("debugging:
Leave double dashes in description headings") using a macro.
---
Hi,
I'm wondering why I didn't notice the conversion to endash when I submitted commit 7842c988b1d5 ("debugging: Convert to 'description'").
While \tco{} is already a workaround, it should be a better approach to define a macro when you do the same thing repeatedly.
I'll update the style guide to mention this workaround.
Thanks, Akira
--
debugging/debugging.tex | 6 +++--- perfbook.tex | 1 + 2 files changed, 4 insertions(+), 3 deletions(-)
debugging/debugging.tex +3 -3
@@ -2287,15 +2287,15 @@ and output consists of one line for each input line, with fields as follows: This script takes three optional arguments as follows: \begin{description} -\item [\tco{-}\tco{-divisor}\nf{:}] Number of segments to divide the list +\item [\lopt{divisor}\nf{:}] Number of segments to divide the list into, for example, a divisor of four means that the first quarter of the data elements will be assumed to be good. This defaults to three. -\item [\tco{-}\tco{-relerr}\nf{:}] Relative measurement error. The script +\item [\lopt{relerr}\nf{:}] Relative measurement error. The script assumes that values that differ by less than this error are for all intents and purposes equal. This defaults to 0.01, which is equivalent to 1\,\%. -\item [\tco{-}\tco{-trendbreak}\nf{:}] Ratio of inter-element spacing +\item [\lopt{trendbreak}\nf{:}] Ratio of inter-element spacing constituting a break in the trend of the data. For example, if the average spacing in the data accepted so far is 1.5, then if the trend-break ratio is 2.0, then if the next
perfbook.tex +1 -0
@@ -159,6 +159,7 @@ \newcommand{\qco}[1]{``\nbco{#1}''} % \nbco with quotation marks \newcommand{\tco}[1]{\texttt{\detokenize{#1}}} % for code in tabular environment % \tco{} will break at spaces but not at underscores +\newcommand{\lopt}[1]{\tco{-}\tco{-}\tco{#1}} % to avoid "--" to endash conversion \newcommand{\nf}[1]{\textnormal{#1}} % to return to normal font \newcommand{\qop}[1]{{\sffamily #1}} % QC operator such as H, T, S, etc.
Signature · 1 line
2.7.4