Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Option to exclude LaTeX commands, e.g. \cite{text} #97

Open
ReaderGuy42 opened this issue Aug 17, 2023 · 0 comments
Open

Comments

@ReaderGuy42
Copy link

ReaderGuy42 commented Aug 17, 2023

I use LaTeX commands in my Obsidian notes because that's how I convert to PDF, including stuff like \cite{abc}, \footcite{abc}`, etc.

Could you perhaps add an option to exlude these from the word count? This could be fairly simple to just exclude everything between a backslash \ and a close curly bracket }.

I don't know if regular expressions are at all useful for this, but for the Dynamic Highlights plugin, I use this capture group to highlight all my regex commands:

\\[^{}]+?\{\\[^{}]+?\{([^{}])+?\}|[^{}])+?\})

This also checks if there are nested curly brackets, e.g. \footnote{\cite{abc}, \cite{def}}

Much appreciated!
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant