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

Rewriting of the manual's chapter 10 (designing packages and classes) #1778

Conversation

Omikhleia
Copy link
Member

@Omikhleia Omikhleia commented Apr 13, 2023

Back from a few days off away from the internet, here is a proposal to address (a part) of #1465

The very first commit adds self:registerRawHandler() to the package API, similar to what was done for commands in 4875972, for the rationale explained in its commit log.

The subsequent commits is a rewrite of the manual's "c10" chapter:

  • Change from "Designing Basic Class Files" to "Designing Packages & Classes"
  • Change introductory text:
    • Explain the difference between a class and a package (a well-known concept for (La)TeX users, but let's target a general audience)
    • Introduce the Penlight OOP framework briefly. We didn't mention it earlier, in the subsequent sections. Here, users will see pl.class() constructs, so it's more than time...
  • Add a first section covering packages first = it's much simpler, yet it allows to cover a lot of things.
    • Introduce the bare minimum "boilerplate" -- mostly expanded from @alerque 's comment on Suggestion: a "demo" class and associated document #1465
    • Move "Defining commands" from the class section here:
      • Move the "link" command from the class section here too, but remove the XML flavor at this point. It's too soon and makes things more complex that they ought to be. (Trying to keep focused on one thing at a time!)
      • Add a "blockquote" example to use the other things seen in the preceding chapters (dimensions, glue, leaveHmode, temporary settings, etc.)
    • Add "Defining settings", extending the blockquote example
    • Add "Defining raw handlers" -- These were never mentioned it seems.
    • Add "Loading other packages" -- Quite obvious.
    • Tease class hooks, so the picture is quite complete
  • Change the section covering classes
    • Introduce the bare minimum "boilerplate" -- mostly expanded from @alerque 's comment on Suggestion: a "demo" class and associated document #1465
    • Brief subsection on things (now) identical with packages
    • Add "Defining class options" -- Quite obvious
    • Refactor the initial content as "Changing the default page layout"
    • Refactor "Output routines" as "Modifying class output routines"
    • Split "Interacting with class hooks" apart from the previous
      • This is somewhat distinct, as tackling with class-packages interaction
      • All the end is rewritten -- It was still mentioning the 0.12.x way of doing things in a return...

One thing I have voluntarily removed is all the discussion on "Exports".
I might be wrong, but it should eventually disappear (We can discuss that in a dedicated issue, though.)

…ckages

As with 4875972 for commands, but this time for raw handlers.
It just delegates to the class, but we may want to track these later too,
for the same reason as for commands. It also makes things easier for
developpers and nicer to document with some symmetry.
@alerque alerque self-assigned this Apr 14, 2023
@alerque alerque added this to the v0.14.10 milestone Apr 14, 2023
@alerque alerque added the documentation Documentation bug or improvement issue label Apr 14, 2023
Copy link
Member

@alerque alerque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a few things that could be tweaked but I'm too sick to actually do them now and this is a huge and necessary step in the right direction. Merging sooner rather than later ... almost wish we had a HEAD version of the manual being posted on our website so newcomers would be less likely to land on unhelpful docs.

@alerque alerque merged commit dff4557 into sile-typesetter:master Apr 18, 2023
@Omikhleia
Copy link
Member Author

Omikhleia commented Apr 18, 2023

I see a few things that could be tweaked but I'm too sick to actually do them now and this is a huge and necessary step in the right direction. Merging sooner rather than later

Thanks! I'll go on working on other documentation-related issues progressively---I'd like to reduce the backlog for some of them which seem doable... And at some point maybe we could consider a full re-reading of the manual. There's no urge, though, take care of yourself!

@Omikhleia Omikhleia deleted the docs-c10-designing-class-packages-overhaul branch April 20, 2023 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation bug or improvement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants