strike-through in tables

1,523 views
Skip to first unread message

Jennifer Nordstrom

unread,
Apr 16, 2017, 6:23:47 PM4/16/17
to MathBook XML Support
Is there a way to do a strike-through line in a table? I need to strike out both rows and columns, so I would like to be able to overlay both horizontal and vertical lines in rows and columns. If this is too hard, I might be able to get across the same idea by using a different font color for the row or column. I'm sure there is an easy way to change the font (or background) color of a cell (but I haven't found it yet).

Alex Jordan

unread,
Apr 16, 2017, 6:38:56 PM4/16/17
to MathBook XML Support
There are tags:
stale
delete

that you can examine here:
http://mathbook.pugetsound.edu/examples/sample-article/html/interesting-corollary.html#subsection-paragraph-markup

But they do not strike through a table row or column. Just text within a cell. Not
sure about anything for a vertical strike-through.

Colors in tables is planned, but not implemented:
http://mathbook.pugetsound.edu/examples/sample-article/html/section-13.html

Is it easy to describe the purpose of the table? It might help with a suggestion
for the current best option. Or motivate implementing the actual best option.

Jennifer Nordstrom

unread,
Apr 16, 2017, 8:21:38 PM4/16/17
to MathBook XML Support
Thanks, Alex, I'll try those tags. It might be sufficient for now. The context is that I have a game matrix where one row (or column) is dominated by another. So a player will never play that row (or column). By crossing it out with a line we "eliminate" that strategy as an option. Since it is the whole row (or column) we are eliminating, it isn't visually as clear if we eliminate just the cell (or several cells). In my LaTeX, I've just drawn a line over the table using TikZ. I suppose I might be able to make an image of what I want and insert it as a figure.


On Sunday, April 16, 2017 at 3:23:47 PM UTC-7, Jennifer Nordstrom wrote:

Rob Beezer

unread,
Apr 17, 2017, 11:51:30 AM4/17/17
to mathbook-x...@googlegroups.com
Dear Jen,

Rationale makes very good sense. My first reaction was "I have no idea how to
do this HTML or LaTeX." But then I quite quickly found:

HTML:
http://stackoverflow.com/questions/30376886/is-it-possible-to-cross-out-cells-in-an-html-table

LaTeX:
https://tex.stackexchange.com/questions/47730/draw-a-line-through-one-column-of-a-matrix

Maybe the LaTeX version is what you are doing now? The HTML feels like a hack,
but would acually be quite simple in CSS, I think.

Can you do your entire table/matrix as a tikz image presently? That might be
the easiest way to get something decent at the moment. Or using "<delete>"
would be easier, though less satisfactory as output.

I made an issue at:

https://github.com/rbeezer/mathbook/issues/556

Thanks,
Rob
> --
> You received this message because you are subscribed to the Google Groups
> "MathBook XML Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to mathbook-xml-sup...@googlegroups.com
> <mailto:mathbook-xml-sup...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

David Farmer

unread,
Apr 17, 2017, 12:20:07 PM4/17/17
to mathbook-x...@googlegroups.com

What I think you want is a way to indicate that certain
rows or columns of a matrix are irrelevant, or should be
ignored, or are not needed, or something else with that
same general idea.

"Crossing out" some cells is just one way to indicate that.
If you were writing on the blackboard, then you would probably
use just one long stroke of the chalk to cross out an entire
row. (Or you could erase it, but probably not, since
that is usually bad practice and it annoys students.)

But there are other options. How about faded text, so you
can barely read those entries? I'd bet there are yet other
possibilities. More exploration should be done before
settling on a final solution.

I can make up some samples for comment, once there is
HTML with appropriate markup and classes. But before
that, there would need to be an MBX way to indicate
those rows and columns.

The markup should not use the word "crossout" :).

I can also imagine other situations in which you want
to highlight a row or column.
> email to mathbook-xml-sup...@googlegroups.com.

Rob Beezer

unread,
Apr 17, 2017, 1:10:26 PM4/17/17
to mathbook-x...@googlegroups.com
Agreed. Faded text would be interesting, and the opposite of highlight.

A challenge with the markup is that certain ranges of cells (eg, a column, but
not its header cell) cross boundaries of the other XML markup. So one approach
is to use a "start" attribute and a "stop" attribute. But then you lose the
begin/end tag consistentcy that XML imposes. We have something similar for
index entries that refer to content that spans multiple pages in print, and so
needs a locator like "275-283".

Not an insurmountable problem, but it'd be nice to avoid, if possible.

Rob

Alex Jordan

unread,
Apr 17, 2017, 1:41:52 PM4/17/17
to MathBook XML Support, bee...@ups.edu
In ORCCA we have a LaTeX macro "\lowlight" which is named as the
opposite of "\highlight". You can see it used in a table here:
http://spot.pcc.edu/math/orcca/section-absolute-value-and-square-root.html

and in a definition here:
http://spot.pcc.edu/math/orcca/section-notation-for-intervals.html

I am not suggesting that you (Jennifer) do something like this. It's not a good
solution for your use case, for one thing because it is a math-mode only tool.
But it's a styling example like David mentioned of using faded text.

Regarding making an image for this table, just know that you will be sacrificing
accessibility if you do that. It will be hard to create description text for such an
image that does as good of a job as having a web-navigable table.

Then there is the whole issue of the accessibility of stale/deleted/struck-out/faded
text, which seems to be tricky:
http://webaim.org/discussion/mail_thread?thread=5809

Jennifer Nordstrom

unread,
Apr 17, 2017, 4:18:59 PM4/17/17
to MathBook XML Support
I am trying to be conscious of accessibility issues with the table, as well as general pedagogical issues. One of my concerns with crossing out individual cells, is that it can give students the idea that the decision to "eliminate" strategies can be done cell-by-cell rather than by row or column. This is an important technicality that students need to understand. Also, once I've crossed out one row, I then might be able to eliminate a column. The order of such eliminations matters, and might get lost if it appears that I am eliminating cells. I'll look at everyone's suggestions and see what works best.

On Sunday, April 16, 2017 at 3:23:47 PM UTC-7, Jennifer Nordstrom wrote:
Reply all
Reply to author
Forward
0 new messages