pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
611 stars 166 forks source link

Add filter latex-hyphen #95

Closed frederik-elwert closed 4 years ago

frederik-elwert commented 4 years ago

Adds a filter that replaces intra-word hyphens with the raw LaTeX expression "= for improved hyphenation.

Rationale

The regular hyphen - prevents LaTeX from breaking a word at any other position than the explicit hyphen. With long, hyphenated words as they occur in languages like German, this can lead to undesirable visual results. The expression "= outputs a normal hyphen while still allowing LaTeX to break the word at any other position according to its regular hyphenation rules.

tarleb commented 4 years ago

Beautiful! My only request is to brake lines in the README to limit line length to 80 chars or less. If you are using a supported editor, you could try editorconfig. It should automatically apply the repo's preferred style.

tarleb commented 4 years ago

I forgot: could you also add a small header to the Lua file? A short description, copyright notice, and license would be great.

We should probably add a note about this to the main README.

frederik-elwert commented 4 years ago

Implemented the requested changes. Thanks a lot for the valuable feedback!

tarleb commented 4 years ago

Awesome, thank you!