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

Add --glossaries option #15

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

atticus-sullivan
Copy link
Contributor

Reason why I added this option is that the glossaries package offers the ability to add many different glossaries (not just the usual glo but also e.g. something for symbols or abbreviations). While makeglossaries is able to process these other glossaries, cluttex has no chance of detecting changes in files different than .glo as it doesn't know which files to watch.

Thus, --glossaries offers the ability to register a tool (makeindex/xindy, these are the tools used by makeglossaries internally anyhow) with the respective files (needs to specify the whole filename+ext as I wanted to give full flexibility, most of the time the filename will be main or master I think) to watch.

See #14 for some ideas and discussion (with myself).

I changed a bit the order of the arguments in the options string so now it is type:out:inp:log:path:args and inp and log are inferred from out (seems like a more logical ordering). I chose out before inp as the file-ending of out is typically better known than the one of inp and I wanted the parameter which can be used to infer the other ones as early as possible.


This option offers the --makeindex as well as the --makeglossaries (I don't know of makeglossaries flags/options that can not be set directly for makeindex/xindy) features. The only thing we can't do properly is to check for No file ... and issue a warning that the user shall set a respective option (the only thing I could think of is to watch for common extensions like ind (index), sls (symbols), nls (numbers), gls (glossaries) and acr (acronyms/abbreviations)).

So I personally would deprecate these functions or redirect them to the proper --glossaries call, but that's not my decision as collaborator. That's a decision of @minoki as maintainer, I think.

using glossaries with a configuration watching files which are also
watched by makeindex/makeglossaries might lead to problems. Thus, issue
an error if they are used together (with a note how to replace
makeindex/makeglossaries with the right glossaries option)
@atticus-sullivan atticus-sullivan marked this pull request as draft May 13, 2023 00:54
@atticus-sullivan
Copy link
Contributor Author

Making a draft since I discovered a .ist file is (sometimes) automatically created. So I want to figure out first under which circumstances this happens and how we can honor this appropriately.

@atticus-sullivan atticus-sullivan marked this pull request as ready for review May 13, 2023 01:46
@atticus-sullivan
Copy link
Contributor Author

Added .ist support for makeindex (didn't find an equivalent for xindy). Also I needed to fix some things when checking for a rerun (like adding the makeindex/xiindy output files to the auxiliary section of the tex-input files).

Still I would be interested in the reason why you decided to touch the output files even if they didn't change (e.g.

local succ, err = filesys.touch(output_ind)
or
local succ, err = filesys.touch(output_gls)
)

@minoki
Copy link
Owner

minoki commented Oct 15, 2023

Still I would be interested in the reason why you decided to touch the output files even if they didn't change (e.g.

local succ, err = filesys.touch(output_ind)

I don't remember the exact reason, but I guess that ClutTeX assumes .ind file (or .glo file) should be newer than .idx file (or .gls file) if it is up-to-date.

@atticus-sullivan
Copy link
Contributor Author

Oh, that actually makes sense 👍

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

Successfully merging this pull request may close these issues.

2 participants