Skip to content
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

1st ed, p77 -- strange hyphenation in code in call-out box #129

Open
dagolden opened this issue Nov 18, 2010 · 5 comments
Open

1st ed, p77 -- strange hyphenation in code in call-out box #129

dagolden opened this issue Nov 18, 2010 · 5 comments

Comments

@dagolden
Copy link

A line ends "$first_-". The hyphen looks like a minus sign. Identifiers in code samples should not be hyphenated across line breaks.

@bubaflub
Copy link

The same happens on p14 of the 1st edition in the paragraph "Package-Qualified Names" on the PDF (letter) version. The last sentence of the first paragraph starts "That is, My::Fine::-Package refers to..."

Package names should not be hyphenated across line breaks either.

@legrady
Copy link

legrady commented Feb 23, 2011

pg 53 (pdf) in the Hash references section refers to:

... prepended scalar sigil: $$colors_-

ref{$color}, ...

And I won't even complain about Yanks mis-spelling 'colour' :-)

@chromatic
Copy link
Owner

Linebreaking is tricky. Hyphenation seems like the least bad of all alternatives (where the worst alternative is manual linebreaking for multiple output sizes). I'll leave this open, pending a better approach--perhaps I'll decide that eschewing the hyphen is correct.

@dagolden
Copy link
Author

It's ironic, since the source is POD which wouldn't have this problem anyway (nor would HTML, which only breaks white-space, generally).

Depending on the conversion tool, maybe there is a way to mark code spans of text as non-breaking?

-- David

@chromatic
Copy link
Owner

I'm not sure it's possible to solve this in general without line-by-line manual layout for all printed materials, and that probably requires rewriting the text. I don't want to give up full justification, and I have to respect margins and gutters on physical pages. Even so, A::Very::Long::Module::Name rendered in a monospace font (or as I encountered the other day, a very long URL) could be wider than the maximum printable width of a page.

I can make the callout frames a little wider to make this less likely, but I'm not sure it's possible to eliminate linebreaking altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants