wtsnjp / llmk

Light LaTeX Make
https://ctan.org/pkg/llmk
MIT License
110 stars 5 forks source link

Add support for makeglossaries command #14

Closed pineapplemachine closed 1 year ago

pineapplemachine commented 2 years ago

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

wtsnjp commented 2 years ago

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?

pineapplemachine commented 2 years ago

@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?

wtsnjp commented 2 years ago

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.

pineapplemachine commented 2 years ago

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

wtsnjp commented 1 year ago

Do you have any plans for updates?

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

pineapplemachine commented 1 year ago

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.

wtsnjp commented 1 year ago

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

pineapplemachine commented 1 year ago

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.

wtsnjp commented 1 year ago

LGTM. Thanks for your contribution!