Skip to content

Commit

Permalink
Make \hrule close ltx:p, if it's a full-width rule
Browse files Browse the repository at this point in the history
  • Loading branch information
brucemiller committed Nov 24, 2024
1 parent 54a3aef commit 8465e56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/LaTeXML/Engine/TeX_Box.pool.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ DefConstructor('\hrule RuleSpecification',
. "(<ltx:rule height='#rheight' depth='#rdepth' width='#rwidth' color='#color'/>))",
afterConstruct => sub { # NOTE: Only For xy development!
Warn('unexpected', 'hrule', $_[0], "Encountered \\hrule in SVG") if inSVG(); },
beforeConstruct => sub {
my ($document, $whatsit) = @_;
my $w = $whatsit->getProperty('rwidthr');
$_[0]->maybeCloseElement('ltx:p') if $w && ($w eq '100%'); },
afterDigest => sub {
my ($stomach, $whatsit) = @_;
my $dims = $whatsit->getArg(1);
Expand Down

0 comments on commit 8465e56

Please sign in to comment.