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

Code listings #2299

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ascholerChemeketa
Copy link
Contributor

This implements title (not caption!) at the top of listings in HTML. Latex left as an exercise for the reader.

It also implements program/console pairs in listings. The console will only be displayed if the program does not become and activecode - so you can author a sample run that shows in static output but not when the user can just run the code themselves.

Currently, I steal the listing number to put a "subtitle" on the console that looks like:
Sample run of Listing 2.3.1

There is enough markup around it and the rest of the content that a theme should be able to do fancy visual things, including hiding that chunk of text, with the program/subtitle/console.

This was referenced Nov 20, 2024
@rbeezer
Copy link
Collaborator

rbeezer commented Nov 21, 2024

Latex left as an exercise for the reader.

I can attempt that, but it means a delay as it goes into the queue.

It also implements program/console pairs in listings.

This sounds like a different change (though I have not looked closely). Please split this PR into two discrete tasks, I can't manage reviews, changes, repackaging, LaTeX additions when a PR does two things.

Currently, I steal the listing number to put a "subtitle" on the console that looks like:

On pretext-dev, I wrote:

(b) I'm reluctant to stick an author with a defalt title/heading that may not be what they are really after.

There is enough markup around it and the rest of the content that a theme should be able to do fancy visual things, including hiding that chunk of text, with the program/subtitle/console.

We don't always have this flexibility in other formats.

@ascholerChemeketa
Copy link
Contributor Author

Just did a force push that removes the program|console combined. This now solely focuses on listing having a title instead of caption and it appearing above the listing itself.

Added latex and braille handling. Latex output looks good, unsure how to test braille.

@ascholerChemeketa ascholerChemeketa mentioned this pull request Dec 4, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants