Conversation
LatexSplitter inherits from core.BaseSplitter LatexSplitter.__call__ overrides the default function to handle the last line with a special case that allows for a lat line without \\.
This requires adding the same to any class that inherits from LatexSplitter. In this case this also required adding last_line to AASTexHeaderSplitter.process_line. even though it doesn't do anything in the case of reading a header.
|
@taldcroft Could you take a look at this pull request to allow the reading of LaTeX table files with no |
|
@hamogu - you may also be able to review this? |
|
This should have an entry in CHANGES.rst. |
|
@wmwv - just back from vacation and trying to catch up. |
| def find_latex_line(lines, latex): | ||
| ''' | ||
| Find the first line which matches a patters | ||
| Find the first line which matches a pattern |
There was a problem hiding this comment.
This is missing a . at the end of the sentence.
|
I included some comments but this seems really complex for such a small change. For example you override |
|
As alternative: Why not just check the "last line" if it "ends" with a |
|
Thanks @MSeifert04 for a very through review. Some of the changes recommended as easy and should definitely be done (adding . at the end of sentence etc.) while we are looking at this in detail right now. |
|
I agree with @MSeifert04 that this change appears at the outset to be more complicated than necessary. Following on his suggestion, would this work? |
|
|
||
| class LatexSplitter(core.BaseSplitter): | ||
| '''Split LaTeX table date. Default delimiter is `&`. | ||
| '''Split LaTeX table data. Default delimiter is `&`. |
There was a problem hiding this comment.
& should be using double ticks, not single.
Allow for last line to not have an ended
\\by restructuring the LatexHeader line-by-line generator and write a special-case last_line option for processing the lines of a table.The tests for this are part of the round-tripping testing of #5235.