jameskermode / aps-length

Calculate length (number of equivalent words) for APS manuscripts written with LaTeX
GNU General Public License v2.0
39 stars 16 forks source link

Fix first line detection in count_main_text_words_detex if manuscript starts with a section #9

Closed domischi closed 4 years ago

domischi commented 4 years ago

First of all, thank you very much for this script. It helped me a lot. I just stumbled over a small bug when using it. If the manuscript starts with a \section (as can be common in certain fields) the first line detection in count_main_text_words_detex breaks giving an output of 0 words for the main text. The proposed change compares the line by checking if the text as generated by detex can be found in the tex file. There could still be cases where this method breaks, but at least in my cases, it worked.

jameskermode commented 4 years ago

sorry for the slow response, and thanks, looks good!