Skip to content

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

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 }.

Activity

  1. modified the milestones: v1.0.0, v0.4.0 on May 3, 2014
  2. hamogu commented on Jun 23, 2014

    @hamogu
    MemberAuthor

    Reading only allows lines with % (comment lilnes) in the first row or full lines with a & b \\ %comment (handeled around lines 128 or so), but crashes with % comment because it then tries to process an empty line.

  3. removed this from the v1.0.0 milestone on Jan 13, 2015
  4. nstarman commented on Jun 4, 2023

    @nstarman
    Member

    @hamogu if you're still thinking about this 😆 I opened #14853 to track a problem with round-tripping units

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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