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

Diglots include footnotes even when footnotes are disabled #928

Open
klassenjm opened this issue Nov 10, 2023 · 2 comments
Open

Diglots include footnotes even when footnotes are disabled #928

klassenjm opened this issue Nov 10, 2023 · 2 comments
Assignees
Labels
Fixed? We think the bug has been fixed in the repository version, but awaiting confirmation from reporter

Comments

@klassenjm
Copy link

Working with PTXprint 2.4.2

A diglot layout includes footnotes even when footnotes are disabled in the configurations for both primary and secondary projects.

An archive of a test project has been submitted (GNTPTXP-DiglotTestPTXprintArchive.zip)

@davidg-sil
Copy link
Collaborator

There are 2 immediate fixes available:
Option A: Go to the style editor and mark the style for \f as Hide/exclude contents of marker on both projects.

Option B: add this to ptxprint-mods.tex (and enable it):

\makeatletter
\should@xist{fR}
\should@xist{fL}
\makeatother

Explanation:
Clicking on the UI button to deselect footnotes does not currently alter anything set for stylesheet, instead it does 90% of what flagging the style as unpublishable does - it puts 'unpublishable' into the variable where that data is stored.
The extra 10% (option B) is telling the code that someone has specified specific any styling for \f on the L and R side, which is a piece of optimization code.

By making the change in the style editor, you are ensuring that the modification to the stylesheet gets written, and thus the change is 100% registered.
Equally, had you made some other change for the footnote, e.g. to the font, size, colour, etc, then the code would know that there was some styling for the relevant footnote, and the control would function as expected.

@davidg-sil
Copy link
Collaborator

davidg-sil commented Nov 11, 2023

@markpenny, @mhosken. Currently, there are 2 ways to turn off footntes/xrefs (neither overriding the other, but it acting as a logical AND - notes needing to be turned on both in they stylesheet and the 'include footnotes'.
I predict confusion, and some kind of link would be very good. Is there a way that the 2 controls could 'simply' reflect the same underlying variable and thus there be no need for the extra code in the template?

Edit: I've hacked snippet.py to work around this. I am a bit confused why there are 2 different snippets with the same(?) net result. Are they applied in different circumstances, or is it just an editing glitch?

@davidg-sil davidg-sil self-assigned this Nov 11, 2023
@davidg-sil davidg-sil added the Fixed? We think the bug has been fixed in the repository version, but awaiting confirmation from reporter label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed? We think the bug has been fixed in the repository version, but awaiting confirmation from reporter
Projects
None yet
Development

No branches or pull requests

2 participants