Skip to content

Resolve some 'Overfull \hbox' warnings. #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1044,23 +1044,23 @@
\tcode{InputIterator},
\tcode{InputIterator1},
or
\tcode{InputIterator2},
\tcode{Input\-Iterator2},
the template argument shall satisfy the
requirements of an input iterator~(\ref{input.iterators}).
\item
If an algorithm's template parameter is named
\tcode{OutputIterator},
\tcode{OutputIterator1},
or
\tcode{OutputIterator2},
\tcode{Output\-Iterator2},
the template argument shall satisfy the requirements
of an output iterator~(\ref{output.iterators}).
\item
If an algorithm's template parameter is named
\tcode{ForwardIterator},
\tcode{ForwardIterator1},
or
\tcode{ForwardIterator2},
\tcode{Forward\-Iterator2},
the template argument shall satisfy the requirements
of a forward iterator~(\ref{forward.iterators}).
\item
Expand Down Expand Up @@ -3881,7 +3881,10 @@

\begin{itemdescr}
\pnum
\returns \tcode{is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last, comp) == last}
\returns
\begin{codeblock}
is_sorted_until(std::forward<ExecutionPolicy>(exec), first, last, comp) == last
\end{codeblock}
\end{itemdescr}


Expand Down Expand Up @@ -5206,7 +5209,7 @@
\requires
The value of \tcode{lo} shall be no greater than \tcode{hi}.
For the first form, type \tcode{T}
shall be \tcode{LessThanComparable} (Table~\ref{tab:lessthancomparable}).
shall be \tcode{LessThan\-Comparable} (Table~\ref{tab:lessthancomparable}).

\pnum
\returns
Expand Down
24 changes: 16 additions & 8 deletions source/atomics.tex
Original file line number Diff line number Diff line change
Expand Up @@ -465,14 +465,22 @@
operator @\placeholdernc{integral}@() const noexcept;
@\placeholdernc{integral}@ exchange(@\placeholdernc{integral}@, memory_order = memory_order_seq_cst) volatile noexcept;
@\placeholdernc{integral}@ exchange(@\placeholdernc{integral}@, memory_order = memory_order_seq_cst) noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order, memory_order) volatile noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order, memory_order) noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order, memory_order) volatile noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order, memory_order) noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order = memory_order_seq_cst) volatile noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order = memory_order_seq_cst) noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order = memory_order_seq_cst) volatile noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@, memory_order = memory_order_seq_cst) noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order, memory_order) volatile noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order, memory_order) noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order, memory_order) volatile noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order, memory_order) noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order = memory_order_seq_cst) volatile noexcept;
bool compare_exchange_weak(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order = memory_order_seq_cst) noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order = memory_order_seq_cst) volatile noexcept;
bool compare_exchange_strong(@\placeholder{integral}@&,@\itcorr[-1]@ @\placeholdernc{integral}@,
memory_order = memory_order_seq_cst) noexcept;
@\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@, memory_order = memory_order_seq_cst) volatile noexcept;
@\placeholdernc{integral}@ fetch_add(@\placeholdernc{integral}@, memory_order = memory_order_seq_cst) noexcept;
@\placeholdernc{integral}@ fetch_sub(@\placeholdernc{integral}@, memory_order = memory_order_seq_cst) volatile noexcept;
Expand Down
12 changes: 6 additions & 6 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3209,8 +3209,8 @@

\begin{itemdescr}
\pnum \returns
A pointer such that \range{data()}{data() + size()} is a valid range, and
\tcode{data() == addressof(front())}.
A pointer such that \tcode{data() == addressof(front())},
and \range{data()}{data() + size()} is a valid range.
\end{itemdescr}

\rSec3[array.fill]{\tcode{array::fill}}
Expand Down Expand Up @@ -6338,7 +6338,7 @@
\pnum
\requires
\tcode{is_assignable_v<mapped_type\&, M\&\&>} shall be \tcode{true}.
\tcode{value_type} shall be \tcode{EmplaceConstructible} into \tcode{map}
\tcode{value_type} shall be \tcode{Emplace\-Constructible} into \tcode{map}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try adding EmplaceConstructible to the global hyphenation hints (in std.tex) and see if that works? If the issue is just that it's an unknown word, then that's a more sustainable approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just tried using this and get no changes (according to diffpdf):

\hyphenation{tem-plate ex-am-ple name-space name-spaces emplace-constructible copy-constructible less-than-comparable in-put-it-er-a-tor out-put-it-er-a-tor for-ward-iter-a-tor rand-om-acc-ess-iter-a-tor}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unable to get LaTeX to hyphenate EmplaceConstructible using \hyphenation. Maybe because the word has a capital letter in the middle.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it may be because the text is inside a \tcode. We could probably also change that somehow. The hyphenat package does something similar.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, what's the next step here? Adding the manual hyphenation fixes the non-hyphenation of the term in the four places where it's an "overfull \hbox" problem.

Copy link
Contributor

@tkoeppe tkoeppe Nov 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, keep it manual for now. It's what we've been doing and it's an OK solution. We can research better solutions offline. (The only problem with manual fixes is that they are very brittle when the text changes and may need to become stale or need refixing. But that's what we're here for.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I just tried, and we probably really don't want to monkey with global tcode, because then we'd end up hyphenating things like 1.2e-34. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regarding "very brittle": We have lots of paragraphs, and only if this particular paragraph changes again in the future do we need to reconsider the manual hyphenation.

from \tcode{k}, \tcode{forward<M>(obj)}.

\pnum
Expand Down Expand Up @@ -6373,7 +6373,7 @@
\pnum
\requires
\tcode{is_assignable_v<mapped_type\&, M\&\&>} shall be \tcode{true}.
\tcode{value_type} shall be \tcode{EmplaceConstructible} into \tcode{map}
\tcode{value_type} shall be \tcode{Emplace\-Constructible} into \tcode{map}
from \tcode{move(k)}, \tcode{forward<M>(obj)}.

\pnum
Expand Down Expand Up @@ -7830,7 +7830,7 @@
\pnum
\requires
\tcode{is_assignable_v<mapped_type\&, M\&\&>} shall be \tcode{true}.
\tcode{value_type} shall be \tcode{EmplaceConstructible} into \tcode{unordered_map}
\tcode{value_type} shall be \tcode{Emplace\-Constructible} into \tcode{unordered_map}
from \tcode{k}, \tcode{forward<M>(obj)}.

\pnum
Expand Down Expand Up @@ -7865,7 +7865,7 @@
\pnum
\requires
\tcode{is_assignable_v<mapped_type\&, M\&\&>} shall be \tcode{true}.
\tcode{value_type} shall be \tcode{EmplaceConstructible} into \tcode{unordered_map}
\tcode{value_type} shall be \tcode{Emplace\-Constructible} into \tcode{unordered_map}
from \tcode{move(k)}, \tcode{forward<M>(obj)}.

\pnum
Expand Down
4 changes: 2 additions & 2 deletions source/declarations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@

\pnum
A \grammarterm{nodeclspec-function-declaration} shall declare a
constructor, destructor, or conversion function. \footnote{The
constructor, destructor, or conversion function.\footnote{The
``implicit int'' rule of C is no longer supported.}
\begin{note}
A \grammarterm{nodeclspec-function-declaration} can only be used in a
\grammarterm{template-declaration}~(Clause~\ref{temp}),
\grammarterm{explicit-instantiation}~(\ref{temp.explicit}), or
\grammarterm{explicit-instantiation} (\ref{temp.explicit}), or
\grammarterm{explicit-specialization}~(\ref{temp.expl.spec}).
\end{note}

Expand Down
4 changes: 2 additions & 2 deletions source/tables.tex
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
{
\begin{LongTable}
{#1}{#2}
{x{.30\hsize}x{.68\hsize}}
{x{.30\hsize}x{.64\hsize}}
}
{
\end{LongTable}
Expand Down Expand Up @@ -457,7 +457,7 @@
{
\begin{LongTable}
{#1}{#2}
{x{.35\hsize}x{.28\hsize}x{.30\hsize}}
{x{.35\hsize}x{.28\hsize}x{.29\hsize}}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I wonder were those original values came from. I suppose they were too big because they didn't account for cell padding?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my guess, or disregard of inter-cell spacing.

{
\end{LongTable}
Expand Down
Loading