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

Fix issues related to listings #225

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

Conversation

pi8027
Copy link
Contributor

@pi8027 pi8027 commented Apr 7, 2022

This PR introduces a new class option listing=(listings|minted) and fixes #236. Now, kao.sty requires either listings.sty or minted.sty depending on the users' choice. The marginlisting environment supports only the chosen package.

listings:

  • Fix the spacing issue in marginlisting. This is done by supplying format=margin to \captionsetup.
  • There is no wide lstlisting environment yet.

minted:

  • Add the wide listing* environment.
  • Count \c@listing within chapter.

Other changes:

  • The separator in captions in marginlisting is redone using labelsep=colon, but the numbers=enddot class option is not properly supported.
  • The \floatsetup declarations are refactored.

@pi8027
Copy link
Contributor Author

pi8027 commented May 17, 2022

I found that this PR does not work with the listings package. I will try to fix it.

@pi8027 pi8027 marked this pull request as draft May 17, 2022 10:28
@pi8027 pi8027 changed the title Add the wide listing* environment for minted Fix issues related to listings May 17, 2022
@pi8027 pi8027 force-pushed the widelisting branch 2 times, most recently from 272c0f0 to 2bc66d8 Compare May 17, 2022 13:09
@fmarotta
Copy link
Owner

Hi, thanks! What's the state of this PR, after closing #235?

@pi8027
Copy link
Contributor Author

pi8027 commented Sep 26, 2022

Sorry. I still need some more time to properly redo this PR.

kao.sty Outdated Show resolved Hide resolved
@pi8027
Copy link
Contributor Author

pi8027 commented Sep 27, 2022

Almost there! I still have to do something with TOC (List of Listings), which is not very clear to me at the moment. The first commit, which properly fixes the sparing issue in marginlisting, might be useful on its own.

@pi8027 pi8027 marked this pull request as ready for review September 27, 2022 18:10
@pi8027
Copy link
Contributor Author

pi8027 commented Sep 27, 2022

Done.

alxvth added a commit to alxvth/kaobook that referenced this pull request May 4, 2024
fmarotta#257 (Add the wide algorithm* environment and make its caption style consistent with kaobook)
fmarotta#225 (Fix issues related to listings)
fmarotta#223 (Fixing figure caption)
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.

Issues related to listings
2 participants