pkubowicz / opendetex

Improved version of Detex - tool for extracting plain text from TeX and LaTeX sources
Other
236 stars 34 forks source link

Add option to print source information #64

Closed VictorCMiraldo closed 4 years ago

VictorCMiraldo commented 4 years ago

I wanted to use detex to feed text to diction. The problem is that diction will output a number of style and grammar suggestions with on the detex-fied file. If I could see the line number of the original file in the diction suggestions it would be much easier to combine these tools.

For that purpose, I added the -1 option to do exactly that. I have no idea what to call it and I'm happy to change if necessary.

I have tried to make it play well with \input and \include as much as possible but welcome any feedback.

pkubowicz commented 4 years ago

Thanks for the PR.

Could you add a test for your changes? Something like in 66575a73e5246 - an input file and an expected output.

VictorCMiraldo commented 4 years ago

I added a test file and a clause to test.pl too.