Render basic tables and detect them in rules#507
Render basic tables and detect them in rules#507masonium wants to merge 11 commits intodaisy:mainfrom
Conversation
Any thoughts? |
|
Using frame, etc., is a good idea and will work for legacy MathML so we should keep it. However, in MathML core (which is the future), mtable are supposed to be styled with CSS so that info won't likely be around unless it is a local CSS style ( One option is to look at the parent of the table and see if has delimiters around it (parens, brackets, vertical bars, double vertical bars, ???). Comments on the code:
xpath-functions.rs:
mtable.rs:
|
find rowspan or colspan attributes only on children and grandchildren of mtable element
rowspan and colspan/columnspan are fully handled as dictated by MathML descriptions. Empty rows and cells are properly accounted for.
|
I'll try to address everything. For code-specific comments, it's probably easier for both of us to use the commenting feature on Github (pressing the + next to the line numbers on the diffs) so that it's a bit easier to track individual threads.
I'll play around with looking for delimiters.
I wanted to debug some of the functions that take a
It shouldn't be. Fixed.
Fixed. For what it's worth, the existing code also contains some mix of tabs and spaces (see
I adjusted the code so it does a more thorough accounting here, now that I've read the MathML spec and have a reasonable handle on this. One caveat is that, though the spec doesn't seem to fully address it, extra rows that are implied by a dangling The column count is more explicitly defined as the maximum across all rows.
I still need to add these. |
Addresses issue #283 .
This PR adds some internal functions to compute table dimensions (rows and columns) taking
rowspans andcolspans into account, and uses them to render tables with the:arrayintent as "table with m rows and n columns".I'm not super happy with the current logic to detect that an unspecified
mtableshould have an:arrayintent. Right now, it assumes that anymtablethat either renders its frame assolidordashedor has anmrowormtdthat specifies arowspanorcolspanshould be an:array. I think we want something more general, though.