asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

Include a CSV and treat it with “stem” style #60

Closed oliviercailloux closed 4 years ago

oliviercailloux commented 4 years ago

Hi! I’d like to display a matrix-like table, thus, containing data that must be typeset in math style. The header contains x^1, x^2 and the content are (possibly negative) numbers. Example here.

I’d also like the CSV file to be as “pure” as possible, i.e.: not containing stem macros, \(, or the like. So that the CSV file can be used as an easily parseable data file as well. Currently I must either enclose the negative numbers in \( \) pairs to activate “math style” or use the unicode minus sign character (−) instead of the hyphen, to make it appear indeed as a minus sign. This goes against easy processing by mathematical libraries, which expect "-1" (hyphen), not "−1" (unicode minus).

Thus, in my asciidoctor file, I’d like to be able to write something like:

[stem, %header, format=csv]
|===
include::1.1.csv[]
|===

where the 1.1.csv file would not contain any stem-activating string, just the raw data.

But no combination I tried works. I suppose that this is because stem requires a passthrough block and a table is not a passthrough bloc.

Can it possibly be made to work?

oliviercailloux commented 4 years ago

Oops, sorry, this issue seems to be in the wrong repository.