From c35fab4a4f43178940310504a946475cabc017ee Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Thu, 19 Dec 2019 23:50:39 +0100 Subject: [PATCH] [ranges] Do not indent \begin/end{codeblock}. Also augment the check script accordingly. Indented codeblock markers cause undesirable empty vertical space. --- source/ranges.tex | 36 ++++++++++++++++++------------------ tools/check.sh | 3 +++ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/source/ranges.tex b/source/ranges.tex index f1dd433062..e5d48521a8 100644 --- a/source/ranges.tex +++ b/source/ranges.tex @@ -348,10 +348,10 @@ valid expression and its type \tcode{I} models \libconcept{input_or_output_iterator} with overload resolution performed in a context that includes the declarations: - \begin{codeblock} +\begin{codeblock} template void begin(T&&) = delete; template void begin(initializer_list&&) = delete; - \end{codeblock} +\end{codeblock} and does not include a declaration of \tcode{ranges::begin}. \item @@ -389,22 +389,22 @@ Otherwise, \tcode{\placeholdernc{decay-copy}(t.end())} if it is a valid expression and its type \tcode{S} models - \begin{codeblock} +\begin{codeblock} sentinel_for - \end{codeblock} +\end{codeblock} \item Otherwise, \tcode{\placeholdernc{decay-copy}(end(t))} if it is a valid expression and its type \tcode{S} models - \begin{codeblock} +\begin{codeblock} sentinel_for - \end{codeblock} +\end{codeblock} with overload resolution performed in a context that includes the declarations: - \begin{codeblock} +\begin{codeblock} template void end(T&&) = delete; template void end(initializer_list&&) = delete; - \end{codeblock} +\end{codeblock} and does not include a declaration of \tcode{ranges::end}. \item @@ -482,9 +482,9 @@ expression and its type \tcode{I} models \libconcept{input_or_output_iterator} with overload resolution performed in a context that includes the declaration: - \begin{codeblock} +\begin{codeblock} template void rbegin(T&&) = delete; - \end{codeblock} +\end{codeblock} and does not include a declaration of \tcode{ranges::rbegin}. \item @@ -523,21 +523,21 @@ \item \tcode{\placeholdernc{decay-copy}(t.rend())} if it is a valid expression and its type \tcode{S} models - \begin{codeblock} +\begin{codeblock} sentinel_for - \end{codeblock} +\end{codeblock} \item Otherwise, \tcode{\placeholdernc{decay-copy}(rend(t))} if it is a valid expression and its type \tcode{S} models - \begin{codeblock} +\begin{codeblock} sentinel_for - \end{codeblock} +\end{codeblock} with overload resolution performed in a context that includes the declaration: - \begin{codeblock} +\begin{codeblock} template void rend(T&&) = delete; - \end{codeblock} +\end{codeblock} and does not include a declaration of \tcode{ranges::rend}. \item @@ -627,9 +627,9 @@ is integer-like with overload resolution performed in a context that includes the declaration: - \begin{codeblock} +\begin{codeblock} template void size(T&&) = delete; - \end{codeblock} +\end{codeblock} and does not include a declaration of \tcode{ranges::size}. \end{itemize} diff --git a/tools/check.sh b/tools/check.sh index 25de6c1f51..9e914669f2 100755 --- a/tools/check.sh +++ b/tools/check.sh @@ -16,6 +16,9 @@ grep -ne '\s$' *.tex | sed 's/$/<--- trailing whitespace/' | grep . && exit 1 # Trailing empty lines for f in *.tex; do [ $(tail -c 2 $f | wc -l) -eq 1 ] || (echo "$f has trailing empty lines"; exit 1 ) done +# indented \begin{codeblock} / \end{codeblock} (causes unwanted empty space) +grep -ne '^.\+\\\(begin\|end\){codeblock}' $texfiles && exit 1 + # \pnum not alone on a line. grep -ne '^.\+\\pnum' $texfiles && exit 1 grep -ne '\\pnum.\+$' $texfiles && exit 1