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 notes don't protrude bottom margin #17

Open
majjejjam opened this issue Sep 21, 2021 · 1 comment
Open

Margin notes don't protrude bottom margin #17

majjejjam opened this issue Sep 21, 2021 · 1 comment

Comments

@majjejjam
Copy link

Usually, the baseline of the font goes along the bottom margin. Thus, the descent of letters (for example ’g’) protrudes slightly past the margin. It seems this is not the case with marginfix. Notice the difference between the margin note (at left) and regular body text (at right).

Skärmbild från 2021-09-21 15-41-04

@shicks
Copy link
Owner

shicks commented Sep 21, 2021

I assume this is a result of https://github.com/shicks/marginfix/blob/master/marginfix.dtx#L647-L648:

\def\MFX@attachmargin{%
  \MFX@htdp\Mfx@marginbox}%
  \setbox\Mfx@marginbox\vtop{%
    \vskip\z@\unvbox\Mfx@marginbox}%
  % ...
}

The \vtop moves the reference point of the margin box to the top, which I assume was important for proper alignment (though it's been a decade and I don't remember exactly why that was). Unfortunately, that means that the depth no longer corresponds to the depth of the bottom box, and so we've lost any information about descenders.

I don't know if the main column's box still has its depth at this point (I would assume not, or else the \vtop presumably wouldn't get the job done?) - if it does, then we could use that to line it up. Otherwise, we might need something more sophisticated.

I don't have the bandwidth to look into this further, but there's a start if anybody wants to give it a go. I'd accept a PR.

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

2 participants