Skip to content

Commit af31580

Browse files
authored
[ranges] Do not indent \begin/end{codeblock}. (#3572)
Also augment the check script accordingly. Indented codeblock markers cause undesirable empty vertical space.
1 parent 8166369 commit af31580

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

source/ranges.tex

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@
348348
valid expression and its type \tcode{I} models
349349
\libconcept{input_or_output_iterator} with overload
350350
resolution performed in a context that includes the declarations:
351-
\begin{codeblock}
351+
\begin{codeblock}
352352
template<class T> void begin(T&&) = delete;
353353
template<class T> void begin(initializer_list<T>&&) = delete;
354-
\end{codeblock}
354+
\end{codeblock}
355355
and does not include a declaration of \tcode{ranges::begin}.
356356

357357
\item
@@ -389,22 +389,22 @@
389389
Otherwise,
390390
\tcode{\placeholdernc{decay-copy}(t.end())}
391391
if it is a valid expression and its type \tcode{S} models
392-
\begin{codeblock}
392+
\begin{codeblock}
393393
sentinel_for<decltype(ranges::begin(E))>
394-
\end{codeblock}
394+
\end{codeblock}
395395

396396
\item
397397
Otherwise, \tcode{\placeholdernc{decay-copy}(end(t))} if it is a valid
398398
expression and its type \tcode{S} models
399-
\begin{codeblock}
399+
\begin{codeblock}
400400
sentinel_for<decltype(ranges::begin(E))>
401-
\end{codeblock}
401+
\end{codeblock}
402402
with overload
403403
resolution performed in a context that includes the declarations:
404-
\begin{codeblock}
404+
\begin{codeblock}
405405
template<class T> void end(T&&) = delete;
406406
template<class T> void end(initializer_list<T>&&) = delete;
407-
\end{codeblock}
407+
\end{codeblock}
408408
and does not include a declaration of \tcode{ranges::end}.
409409

410410
\item
@@ -482,9 +482,9 @@
482482
expression and its type \tcode{I} models
483483
\libconcept{input_or_output_iterator} with overload
484484
resolution performed in a context that includes the declaration:
485-
\begin{codeblock}
485+
\begin{codeblock}
486486
template<class T> void rbegin(T&&) = delete;
487-
\end{codeblock}
487+
\end{codeblock}
488488
and does not include a declaration of \tcode{ranges::rbegin}.
489489

490490
\item
@@ -523,21 +523,21 @@
523523
\item
524524
\tcode{\placeholdernc{decay-copy}(t.rend())}
525525
if it is a valid expression and its type \tcode{S} models
526-
\begin{codeblock}
526+
\begin{codeblock}
527527
sentinel_for<decltype(ranges::rbegin(E))>
528-
\end{codeblock}
528+
\end{codeblock}
529529

530530
\item
531531
Otherwise, \tcode{\placeholdernc{decay-copy}(rend(t))} if it is a valid
532532
expression and its type \tcode{S} models
533-
\begin{codeblock}
533+
\begin{codeblock}
534534
sentinel_for<decltype(ranges::rbegin(E))>
535-
\end{codeblock}
535+
\end{codeblock}
536536
with overload
537537
resolution performed in a context that includes the declaration:
538-
\begin{codeblock}
538+
\begin{codeblock}
539539
template<class T> void rend(T&&) = delete;
540-
\end{codeblock}
540+
\end{codeblock}
541541
and does not include a declaration of \tcode{ranges::rend}.
542542

543543
\item
@@ -627,9 +627,9 @@
627627
is integer-like
628628
with overload resolution performed in a context that includes
629629
the declaration:
630-
\begin{codeblock}
630+
\begin{codeblock}
631631
template<class T> void size(T&&) = delete;
632-
\end{codeblock}
632+
\end{codeblock}
633633
and does not include a declaration of \tcode{ranges::size}.
634634
\end{itemize}
635635

tools/check.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ grep -ne '\s$' *.tex | sed 's/$/<--- trailing whitespace/' | grep . && exit 1
1616
# Trailing empty lines
1717
for f in *.tex; do [ $(tail -c 2 $f | wc -l) -eq 1 ] || (echo "$f has trailing empty lines"; exit 1 ) done
1818

19+
# indented \begin{codeblock} / \end{codeblock} (causes unwanted empty space)
20+
grep -ne '^.\+\\\(begin\|end\){codeblock}' $texfiles && exit 1
21+
1922
# \pnum not alone on a line.
2023
grep -ne '^.\+\\pnum' $texfiles && exit 1
2124
grep -ne '\\pnum.\+$' $texfiles && exit 1

0 commit comments

Comments
 (0)