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

Page numbers not aligned in table of contents in manual v0.10.2 #859

Closed
OlivierNicole opened this issue Apr 29, 2020 · 7 comments · Fixed by #874
Closed

Page numbers not aligned in table of contents in manual v0.10.2 #859

OlivierNicole opened this issue Apr 29, 2020 · 7 comments · Fixed by #874
Labels
bug Software bug issue documentation Documentation bug or improvement issue
Milestone

Comments

@OlivierNicole
Copy link
Member

The title says it all, I think. They used to be aligned in previous versions.

@alerque
Copy link
Member

alerque commented Apr 29, 2020

Confirmed in v0.10.4 and git HEAD.

@alerque alerque added bug Software bug issue documentation Documentation bug or improvement issue labels Apr 29, 2020
@alerque alerque added this to the v0.10.5 milestone Apr 29, 2020
@simoncozens
Copy link
Member

This line in tableofcontents:item appears to be messing things up:

SILE.settings.set("typesetter.parfillskip", SILE.nodefactory.glue())

@simoncozens
Copy link
Member

Actually even without that it isn't particularly lovely.

@simoncozens
Copy link
Member

Here's an example that doesn't use tableofcontents:

\begin[pagesize=a5]{document}
\script[src=packages/frametricks]
\showframe
\script[src=packages/leaders]
\noindent\font[size=20pt]{ABC\dotfill{}1}\medskip
\noindent\font[size=10pt]{DEF\dotfill{}10}\medskip
\noindent\font[size=10pt]{GHI\dotfill{}100}\medskip
\end{document}

@simoncozens
Copy link
Member

Oh dear, I'm being an idiot. Of course that one doesn't work because of the parfillskip. Here's another example. Something seems to be going wrong in the glue calculation when repetitions > 1. It's fine for <1 and ==1.

\begin[pagesize=a5]{document}
\script[src=packages/frametricks]
\showframe
\script[src=packages/leaders]
\set[parameter=typesetter.parfillskip,value=0pt]
\noindent\font[size=20pt]{A\dotfill{}A}\medskip
\noindent\font[size=10pt]{DEF\dotfill{}10}\medskip
\noindent\font[size=10pt]{GHI\dotfill{}100}\medskip

\noindent\font[size=10pt]{GHI\hfill{}100}\medskip

\end{document}

@alerque
Copy link
Member

alerque commented May 26, 2020

Currently \dotfill is defined as:

SILE.call("leaders", { width = "0pt plus 100000pt" }, { " . " })

Removing the spaces from the fill makes this alignment issue go away:

SILE.call("leaders", { width = "0pt plus 100000pt" }, { "." })

This probably has to do with spaces being stretchy and the stretchy glue we are using to get the alignment right getting also applied to spaces. Maybe?

@alerque
Copy link
Member

alerque commented May 26, 2020

Found it. Patch coming soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue documentation Documentation bug or improvement issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants