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

Block consistency #2286

Merged
merged 18 commits into from
Dec 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b457b21
Schema changes: More consistent naming and use of "block" elements,
brucemiller Dec 19, 2023
ab7aace
Add XSLT for the new (or renamed) block elements
brucemiller Dec 19, 2023
d16c52f
Add support for an internal ltx:_CaptureBlock_ element useful for tem…
brucemiller Dec 19, 2023
bb63cbd
Enhance document->renameNode with option to 're-insert' the contents …
brucemiller Dec 19, 2023
293c661
Replace ltx:inline-para with ltx:inline-logical-block
brucemiller Dec 19, 2023
3f7ca71
Replacement insertBlock based on _CaptureBlock
brucemiller Dec 19, 2023
5a6c792
\hbox creates inline-block if placed where #PCDATA is allowed
brucemiller Dec 19, 2023
3286cfa
Have p{} column type pass the desired width to \hbox, so that can cre…
brucemiller Dec 19, 2023
53f9662
Simplify but generalize \normal@par, \lx@newline to recognize block m…
brucemiller Dec 19, 2023
168e1b6
Fixup CSS styling for various blocks, inline, etc
brucemiller Dec 20, 2023
09dbc03
Enhance tabular test-case for interation between @ and p column speci…
brucemiller Dec 20, 2023
6281316
Enhance framed test-case to show framing of more awkward combinations
brucemiller Dec 20, 2023
5f7f064
Updated test-cases for changes to block processing
brucemiller Dec 20, 2023
fe7d141
always allow (internal) attributes that start with _; allow svg:g, sv…
brucemiller Dec 21, 2023
7765da9
Change svg:foreignObject content from Flow.model to Inline.model (usi…
brucemiller Dec 21, 2023
2b0f239
In renameNode, only copy allowed attributes
brucemiller Dec 21, 2023
2890273
Fix copy mistake
brucemiller Dec 21, 2023
545fdca
Careful about insertBlock into svg which may or may not need an svg:f…
brucemiller Dec 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
always allow (internal) attributes that start with _; allow svg:g, sv…
…g:foreignObject in ltx:_CaptureBlock_
  • Loading branch information
brucemiller committed Dec 21, 2023
commit fe7d141019211bc3f7bc48cb0259e9f7b710e5b2
8 changes: 6 additions & 2 deletions lib/LaTeXML/Common/Model.pm
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ sub loadInternalExtensions {
if (!exists $$self{tagprop}{'ltx:_CaptureBlock_'}) {
# Synthesize ltx:_CaptureBlock_ to act like the union of ltx:block, ltx:para,
$self->synthesizeElement('ltx:_CaptureBlock_',
qw(ltx:block ltx:logical-block ltx:sectional-block Caption)); }
qw(ltx:block ltx:logical-block ltx:sectional-block Caption));
$$self{tagprop}{'ltx:_CaptureBlock_'}{model}{'svg:g'} = 1;
$$self{tagprop}{'ltx:_CaptureBlock_'}{model}{'svg:foreignObject'} = 1;
}
return; }

# Clone the tagprop's (allowed content & attributes) of @other to $tag
Expand Down Expand Up @@ -443,7 +446,8 @@ sub canHaveAttribute {
return 0 if $tag eq '#Document';
return 0 if $tag eq '#ProcessingInstruction';
return 0 if $tag eq '#DTD';
return 1 if $tag =~ /(.*?:)?_Capture_$/;
return 1 if $tag =~ /(.*?:)?_Capture_$/;
return 1 if $attrib =~ /^_/;
return 1 if $$self{permissive};
my ($tagns, $tagname) = ($tag =~ /^(\w+):(\w*)$/ ? ($1, $2) : ('', $tag));
my ($attrns, $attrname) = ($attrib =~ /^(\w+):(\w*)$/ ? ($1, $2) : ('', $attrib));
Expand Down