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

Footnotes stop working part way through manual #1453

Closed
alerque opened this issue Jun 22, 2022 · 3 comments · Fixed by #1455
Closed

Footnotes stop working part way through manual #1453

alerque opened this issue Jun 22, 2022 · 3 comments · Fixed by #1455
Assignees
Labels
bug Software bug issue documentation Documentation bug or improvement issue
Milestone

Comments

@alerque
Copy link
Member

alerque commented Jun 22, 2022

The last footnote in the manual is in §5.7 on p33, but there should be more. I noticed while mucking about with the new Esperanto support (#1444) and why in the world the Ruby package docs are killing the manual build (#1451) that the footnote I added was showing a marker but no footnote. Another example in the current manual sources in master might be in §11.1 on p98 where I see another marker but no footnote.

@alerque alerque added bug Software bug issue documentation Documentation bug or improvement issue labels Jun 22, 2022
@alerque alerque added this to the v0.13.x milestone Jun 22, 2022
@Omikhleia
Copy link
Member

Omikhleia commented Jun 23, 2022

At least one reproducible MWE of a very likely related issue:

\begin[papersize=a6, class=book]{document}
\script[src=packages/autodoc]
\define[command=code]{\process}

\package-documentation[src=packages/insertions]

HERE A FOOTNOTE\footnote{I shall be here}

\end{document}

SILE 0.12.5 has the footnote.

SILE 0.13.0 (from docker image) only shows the footnote call.

Looking here, it seems that this is introduced by the SILE.require vs require changes introduced in 0.13.

If actually change that line from

local pkg = require(package)

to

local pkg = SILE.require(package)

Then the footnote is back....

However the code, a few lines below that one, now manually registerCommands. It seems wrong to me anyway (commands could expect settings and initialization so as to work properly...).

EDIT: Now why loading the insertions with a "require" breaks them, I'have no idea !

@Omikhleia
Copy link
Member

Using SILE.require however causes other issues later, e.g.

Error detected:
	./packages/twoside/init.lua:43: attempt to index a nil value (local 'args')

(Package tries to initialize without args... We have a serious API issue here now...)

EDIT: Now why loading the insertions with a "require" breaks them, I'have no idea !

Found. Because of the local vars

local insertionsThisPage = {}

(If replaced by a global scratch variable, and autodoc reverted to require, then the footnote is there).

@alerque
Copy link
Member Author

alerque commented Jun 23, 2022

However the code, a few lines below that one, now manually registerCommands. It seems wrong to me anyway (commands could expect settings and initialization so as to work properly...).

Commands may require their respective packages to be initialized when they are called, but they should not require anything to register. By the time they are used the package will be initialized.

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.

2 participants