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

Let --remove-macros accept a space-delimited list and/or update documentation #255

Open
orrp opened this issue Feb 12, 2024 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@orrp
Copy link

orrp commented Feb 12, 2024

Thank you so much for this wonderful tool. I have a small suggestion as a new user.

Suppose there are three macros I would like TeXtidote to ignore: mymacro0, mymacro1 and mymacro2.

Because the --remove-macros option refers to macros in the plural, I would expect it to be used as follows:

textidote --remove-macros mymacro1 mymacro2 mymacro3 main.tex

However, this does not work and instead I must invoke textidote with:

textidote --remove-macros mymacro1 --remove-macros mymacro2 --remove-macros mymacro3 main.tex

I suggest modifying command line parsing so that --remove-macros accepts a list of macros as in the first snippet above. Note that if the list is of length one we recover the current behavior, so this is not a breaking change. An easier fix would be to rename the option to --remove-macro, although I think this is less desirable from a usability standpoint.

@orrp
Copy link
Author

orrp commented Feb 12, 2024

Update: I just noticed #250, which is related to the above issue (I missed it because the title refers to environments rather than macros). I seems that specifying multiple commas via a comma-separated list is supported. However, this is not mentioned in the --help documentation.

Accepting a space-delimited list of macros is more consistent with UNIX command line tools, so I would still suggest changing the behavior to be as in the first code snippet in my original post, and updating the documentation in --help to say something of the sort:

--remove-macros mac-1 ... mac-n   Remove LaTeX macros specified by a space-delimited list.

@orrp orrp changed the title Have --remove-macros accept multiple macros, or change it to --remove-macro Let --remove-macros accept a space-delimited list and/or update documentation Feb 12, 2024
@sylvainhalle
Copy link
Owner

I agree. This will require an update to the underlying command line parser; an issue is already open for this: sylvainhalle/Bullwinkle#17

@sylvainhalle sylvainhalle added the enhancement New feature or request label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants