-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
How to add chapter to Table of Contents? #1764
Comments
Greetings, |
That is exactly my situation! Is there a way to fix it in the meantime? |
Thanks for confirming, and let's all be glad it's not something else popping up:) I'm closing this issue as duplicate of #1707 then.
Copying the impacted files from your installation into your project folder under the same folder hierarchy and applying the sames changes as in #1751 should work (...and you'll just have to remember removing these files when the release upgrade is available). |
For the most part, functions can just be redefined. You can copy the new source for the \begin{lua}
SILE.registerCommand("book:sectioning", function (options, content)
local level = SU.required(options, "level", "book:sectioning")
local number
if SU.boolean(options.numbering, true) then
SILE.call("increment-multilevel-counter", { id = "sectioning", level = level })
number = self.packages.counters:formatMultilevelCounter(self:getMultilevelCounter("sectioning"))
end
if SU.boolean(options.toc, true) then
SILE.call("tocentry", { level = level, number = number }, SU.subContent(content))
end
if SU.boolean(options.numbering, true) then
if options.msg then
SILE.call("fluent", { number = number }, { options.msg })
else
SILE.call("show-multilevel-counter", { id = "sectioning" })
end
else
-- https://github.com/sile-typesetter/sile/issues/1707
-- https://github.com/sile-typesetter/sile/issues/1751
SILE.call("hbox")
end
end)
\end{lua} But possibly better than that why not just run HEAD? Almost every platform we have packages for has an easy way to run a development package (e.g. Nix, Arch Linux, Homebrew, Docker). A few that don't (like Ubuntu) you could build from source. What platform are you on? |
What's HEAD? I'm running Mac OS (homebrew). For perspective, I'm coming from LaTeX. I can work with some programming stuff if I need to, but I don't know Lua at all. |
# For the latest stable version
$ brew install sile
# For the latest bleeding edge
$ brew install --HEAD sile The |
So, I tried that. However, it seems to have messed with my dropcaps, pushing them into the text itself). |
Hm, is there any way you can post an MWE to a new issue for that? It's possible we have a regression since the last release, in which case it would be nice to get it fixed before a new release goes out (which should be soonish) and a test case ind hand so it doesn't happen again. |
@CatholicPenguin You can run your |
I noticed the Table of Contents only specifies sections and subsections. I've tried adjusting the depth, but that didn't work. How do I add the chapters to the Table of Contents?
The text was updated successfully, but these errors were encountered: