Skip to content

check if table width exceeds nominal page width more than treshold#610

Closed
fsteimke wants to merge 2 commits intodocbook:mainfrom
fsteimke:609-tablewidth-exceeded
Closed

check if table width exceeds nominal page width more than treshold#610
fsteimke wants to merge 2 commits intodocbook:mainfrom
fsteimke:609-tablewidth-exceeded

Conversation

@fsteimke
Copy link
Copy Markdown
Contributor

@fsteimke fsteimke commented Jul 5, 2025

See #609. Switch to relative width occurs only if sum of column widths exceeds $nominal-page-width by more than a $treshold, which is 1px. This helps to avoid false positive test because of rounding errors.

Analysis shows a potential issue with f:absolute-length in module units.xsl: although the value is rounded without fraction digits, the function signature gives it the type xs:double. I think function signature should be changed to

<xsl:function name="f:absolute-length" as="xs:nonNegativeInteger">

If table width really exceeds nominal-page-width, the error message is optimized and informs about the amount of exceeding as well as the path of the table in question.

fsteimke added 2 commits July 5, 2025 15:39
See docbook#609. Switch to relative width occurs only if sum of column widths
exceeds `$nominal-page-width` by more than a `$treshold`, which is
`1px`. This helps to avoid false positive test because of rounding
errors.

Analysis shows a potential issue with `f:absolute-length` in module
`units.xsl`: although the value is rounded without fraction digits,
the function signature gives it the type `xs:double`. I think function
signature should be changed to

```
<xsl:function name="f:absolute-length" as="xs:nonNegativeInteger">
```

If table width really exceeds `nominal-page-width`, the error message
is optimized and informs about the amount of exceeding as well as the
path of the table in question.
@ndw ndw closed this in 0added2 Sep 13, 2025
@fsteimke fsteimke deleted the 609-tablewidth-exceeded branch September 14, 2025 03:43
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.

1 participant