Skip to content

Commit

Permalink
improve chapter detection
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Jun 9, 2024
1 parent 21c3dca commit b355963
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ All notable changes to the `tagpdf` package since the
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
this project uses date-based 'snapshot' version identifiers.

## [Unreleased]
### Fixed
- improved detection if a class supports \chapter for ltugboat.

## [2024-04-12]
Version 0.99b
### Added
- \tag_spacechar_on:, \tag_spacechar_off: to locally switch off
the real space chars.
Expand Down
28 changes: 20 additions & 8 deletions tagpdf-roles.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -750,19 +750,31 @@
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
\cs_if_exist:NT \chapter
{
\prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
{
\@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
}
}
\bool_lazy_and:nnT
{
\cs_if_exist_p:N \chapter
}
{
\cs_if_exist_p:N \c@chapter
}
{
\prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
{
\@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
}
}
}
}
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
\cs_if_exist:NT \chapter
\bool_lazy_and:nnT
{
\cs_if_exist_p:N \chapter
}
{
\cs_if_exist_p:N \c@chapter
}
{
\prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
{
Expand Down

0 comments on commit b355963

Please sign in to comment.