mhelvens / latex-pkgloader

a LaTeX package for managing the options and loading order of other packages
LaTeX Project Public License v1.3c
33 stars 3 forks source link

Koppor PRs #20

Closed mhelvens closed 6 years ago

mhelvens commented 6 years ago

This is a combination of #13, #14, #15, #17, #18 and #19. All those separate PRs were getting difficult to manage. I'll also clean up a bit and make everything somewhat consistent.

mhelvens commented 6 years ago

@koppor: Please have a look at this and let me know if you're OK with the changes. Note that I had to remove the fontspec rule, because that package requires XeLaTeX or LuaTeX, excluding most users. :-)

koppor commented 6 years ago

Looks good!

Only question regarding fontspec: doesn't say if loaded that if package X is loaded, load it after package Y?

So:

\Load {fontspec} after  {amsmath,amsfonts,amssymb}
                 if loaded

means

In case there is a \usepackage{fontspec} existing, move it to a place after \usepackage{amsmath,masfonts,amssymb}. In case there is no \usepackage{fontspec}, do not do anything.

mhelvens commented 6 years ago

But you had a rule that said always: https://github.com/mhelvens/latex-pkgloader/pull/13/files#diff-47339fb628fbda61d3fd418e86e4bcf9R192

koppor commented 6 years ago

Ah, yes, I see. Oh, difficult thing. selnolig only works with fontspec.

Current solution:

\Load {fontspec} before {selnolig}
                 always
                 because {selnolig depends on fontspec}

With the current setup, the always should be exchanged by if loaded so that the user has to know if he loads selnolig, he has to add fontspec?

Can I express "If selnoloig is loaded, also load fontspec"?

mhelvens commented 6 years ago

Yes, with if {selnolig}. But if it's a dependency, why doesn't selnolig load it itself?