Skip to content

io.ascii.Latex and AASTex: Make reading more flexible #1525

@hamogu

Description

@hamogu

Used as Readers io.ascii.Latex and AASTex are not as flexible as they could be. They were originally designed as writers that allow data to round-trip.

While there is no need to implement all features LaTeX offers (e.g. '\multiline' and '\mulitcolumn' don't make sense - in that case it's ambiguous what to put in a cell anyway), it would be easy to make them a little more flexible on read-in to make it more likely to read LaTeX tables found in articles e.g. on astro-ph.

I'll implement that eventually (This issue is here so I don't forget), but feel free to make a PR for this if you are faster.

Here are some ideas:

  • leading space before e.g. a \begin{table} should not prohibit the Reader to find the table start line (hint: edit regex in find_latex)
  • Line breaks are common between '\tablehead' and '\colhead' in AASTex tables. (slightly harder to implement, because this needs a real paser to count { and }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions