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

margin-note exceeds page limit in PDF e.g. Racket guide #470

Open
spdegabrielle opened this issue Dec 26, 2024 · 1 comment
Open

margin-note exceeds page limit in PDF e.g. Racket guide #470

spdegabrielle opened this issue Dec 26, 2024 · 1 comment

Comments

@spdegabrielle
Copy link
Member

What version of Racket are you using?
8.15

What program did you run?
scribble/manual render to pdf

example showing continuation-mark-set->context running beyond edge of page in pdf viewer
Image

page 226
https://download.racket-lang.org/releases/8.15/pdf-doc/guide.pdf

What should have happened?

I'd expect scribble to wrap keep margin notes within gutter by wrapping @racket[continuation-mark-set->context] on hyphens like exn-message in @interaction block on the same page.(see full page capture below).

Not a big issue as manual is intended to be used via browser, but may be frustrating for e-reader users who use PDF. (I was trying to publish print copy via amazon with permission of author)

continuation-mark-set->context

Line 124

@margin-note{The @racket[continuation-mark-set->context] procedure provides best-effort structured backtrace information.}

https://github.com/racket/racket/blob/158361441c0617ee9df91954cf3afbfebc37094a/pkgs/racket-doc/scribblings/guide/control.scrbl#L124

Please include any other relevant details

Interaction block

@interaction[
(with-handlers ([exn:fail?
                 (lambda (v)
                   ((error-display-handler) (exn-message v) v))])
  (car 17))
]

full page
Image

'Gutter' guidance from amazon kindle direct publishing:

Insufficient gutter. Books with 407 pages require at least 0.625" (15.875mm) for the gutter (inside margin) and at least 0.25" (6.35mm) for the outside, top and bottom margins.

@spdegabrielle
Copy link
Member Author

this may be a starting point

% The \refpara command corresponds to `margin-note'. The
% refcolumn and refcontent environments also wrap the note,
% because they simplify the CSS side.
\newcommand{\refpara}[1]{\normalmarginpar\marginpar{\raggedright \footnotesize racket/racket#1}}

\newcommand{\refpara}[1]{\normalmarginpar\marginpar{\raggedright \footnotesize #1}}

@sorawee sorawee transferred this issue from racket/racket Jan 1, 2025
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

1 participant