-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
Extraneous text in PDF document outline items #484
Comments
(I'm velcrovan on Discord) From section 6.11.5 in the Scribble docs:
As @sogaiu has shown, the generated latex supplies the same content for both arguments to \Ssection{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...}{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...} It seems that the result of \Ssection{Modules: module, module*, ...}{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...} But it might also be desirable to keep that formatting in the TOC shown in the PDF itself. This StackOverflow answer seems like a better approach. Scribble appears to use the \Ssection{\texorpdfstring{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...}}{Modules: module, module*, ...}{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...} I suggest manually applying this fix on one of the affected section headings in a generated .tex file (I don't have time to do it myself). If that works then someone who knows Scribble guts would have a head start on fixing the issue. |
Thanks for the further investigation and hints. I tried applying the suggestion by wrapping \Ssection{\texorpdfstring{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...}{Modules: module, module*, ...}}{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...}\label{t:x28part_x22module22x29} where the original was:
Due to things being on a single line, I think that's a bit hard to see here. Basically it's replacing the first argument to \texorpdfstring{Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...}{Modules: module, module*, ...} which is calling {Modules: \RktSym{\badlink{\RktValLink{module}}}, \RktSym{\badlink{\RktValLink{module*}}}, ...} and: {Modules: module, module*, ...} Running the modified In the image below, the highlighted item on the left side of the window is the one that has been modified and it appears to be lacking the The steps I followed were roughly:
|
Thanks it looks like you figured out what I meant despite my sloppy code example. In the modified PDF, does the monospace formatting still appear correctly in the on-page TOC and in the heading itself? |
Sorry, I didn't figure out how to build a As to the monospace formatting being preserved for the heading on the page text, that looks like it worked: It's the part with the text:
at the bottom of the right-hand side of the window in the image above, right? [1] By "on-page TOC", I presume you mean the bit that starts on page 2 of the whole reference and starts with the word "Contents" at the top of the page. |
Not sure if this was appropriate, but I tried the following steps to create a
Below is a screenshot of the resulting The result looks good to me 👍 [1] |
Please have a look at the following screenshot of a PDF viewer window displaying a portion of "The Racket Reference" (Version 8.15) [1]:
The left side shows the "Outline" (IIUC, sometimes referred to as Bookmarks or Table of Contents) for the PDF.
The right side shows a bit of the document proper.
With that basic description in mind, please note that the highlighted line on the left side shows the text:
It looks to me like there are instances of extra text (i.e. "IdentifierColorblack"). I think this should probably be more like:
(see the website version of the same section for comparison).
This doesn't appear to be an isolated incident as a similar situation exists in at least version 8.15 of the PDF for "The Racket Guide" [2], e.g. for the outline item for section 2.2.5 which has the text:
Some investigation revealed that one of the related
.scrbl
files has code like [3]:...and the corresponding locally generated
.tex
files contained lines like:and:
It looks like things wrapped in
@racket[...]
are leading to the "extra text" results.(On a side note, some of the above investigation was carried out on the scribble Discord channel with spdegabrielle, soegaard, and velcrovan. velcrovan mentioned something about filing an issue.)
[1] PDF of The Racket Reference (Version 8.15)
[2] PDF of The Racket Guide (Version 8.15)
[3] Please see this bit for the corresponding "The Racket Guide" section 2.2.5 example.
The text was updated successfully, but these errors were encountered: