pylatexenc
pylatexenc copied to clipboard
latex2text prints spurious new line in the end
trafficstars
Running
echo foo | latex2text
gives two lines, the second of which is empty.
Yes, latex2text works like the echo command and adds a newline at the end of the output text. It's more convenient that way when you invoke it with LaTeX code that does not end in a newline, e.g., latex2text -c '\alpha+\beta=1'.
I'll consider adding an option, e.g., -n, to suppress the final newline in a future version of pylatexenc.