llmk icon indicating copy to clipboard operation
llmk copied to clipboard

Add support for makeglossaries command

Open pineapplemachine opened this issue 1 year ago • 4 comments

This functions similarly to makeindex. If a *.glo file is outputted by latex, then llmk will now run makeglossaries to generate a *.gls file.

pineapplemachine avatar Aug 18 '22 22:08 pineapplemachine

Thank you for the pull request. The feature looks good to me. Could you please update the spec so that the test will be successful?

wtsnjp avatar Aug 20 '22 07:08 wtsnjp

@wtsnjp I haven't used ruby for this purpose before, and I didn't spot testing instructions in the readme or other documentation. Can you please let me know how I should run these tests locally?

pineapplemachine avatar Aug 22 '22 14:08 pineapplemachine

You don't need to prepare a local testing environment. A CI (GitHub Actions) is already set up. I approved your pull request so that you can see the testing result online when you make further commits to the branch in your folk. JFYI, the current error can be found here: https://github.com/wtsnjp/llmk/runs/7929996958?check_suite_focus=true#step:13:20

  1) With --dry-run, processing example llmk.toml should report the commands to produce simple.pdf and default.pdf
     Failure/Error:
       expect(stdout).to eq <<~EXPECTED
         Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
         Dry running: bibtex "simple"
         Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
         Dry running: makeindex "simple.idx"
         Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
         Dry running: dvipdfmx "simple.dvi"
         Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"
         Dry running: bibtex "default"
         Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"

       expected: "Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 \"simple.tex\"\nDry runnin...on=nonstopmode -file-line-error -synctex=1 \"default.tex\"\nDry running: dvipdfmx \"default.dvi\"\n"
            got: "Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 \"simple.tex\"\nDry runnin...on=nonstopmode -file-line-error -synctex=1 \"default.tex\"\nDry running: dvipdfmx \"default.dvi\"\n"

       (compared using ==)

       Diff:

       @@ -3,11 +3,15 @@
        Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
        Dry running: makeindex "simple.idx"
        Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
       +Dry running: makeglossaries "simple.glo"
       +Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "simple.tex"
        Dry running: dvipdfmx "simple.dvi"
        Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"
        Dry running: bibtex "default"
        Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"
        Dry running: makeindex "default.idx"
       +Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"
       +Dry running: makeglossaries "default.glo"
        Dry running: xelatex -interaction=nonstopmode -file-line-error -synctex=1 "default.tex"
        Dry running: dvipdfmx "default.dvi"

I think you only need to add a few corresponding lines to the following:

https://github.com/wtsnjp/llmk/blob/3cde82d2417b45568ea9db99fd28dc60a1525d79/spec/dry_run_spec.rb#L21-L62

In case you really want to do local testing, just simply execute the following at the top level of our project.

bundle install
bundle exec rake test

I will include this sort of developer's information in the README in time. Thanks for pointing out that the information is lacking.

wtsnjp avatar Aug 24 '22 14:08 wtsnjp

Ok, thank you for the response. I'll take care of this when I have some time.

pineapplemachine avatar Aug 24 '22 15:08 pineapplemachine

Do you have any plans for updates?

BTW, I've updated the README.md to include the information about testing (a4a9907).

wtsnjp avatar Feb 19 '23 09:02 wtsnjp

Hi, I'm sorry for being slow. Yes, this and #15 are both still on my mind and I've been planning to update at some point. If you would want to make the spec update to get the addition finished, that's ok with me, but I have not forgotten and will get to it eventually.

pineapplemachine avatar Feb 19 '23 11:02 pineapplemachine

Ok, thanks for the response. Then I just leave these open.

wtsnjp avatar Feb 19 '23 11:02 wtsnjp

Thank you for pushing me to actually get to this - I finally made some time to learn how to use rbenv and update the tests.

pineapplemachine avatar Feb 24 '23 11:02 pineapplemachine

LGTM. Thanks for your contribution!

wtsnjp avatar Feb 24 '23 12:02 wtsnjp