0

I am writing a style and I used a package with one option set, as in:

\RequirePackage[fit]{truncate}

However, I am curious if this option is now enforced everywhere in the document and if there is a way to avoid that, i.e., make it only valid when using the functions I am defining.

Since I intend to continue to develop other solutions for local problems, I am more interested in the general question than in the specific one, i.e., relating to the truncate package only.

2
  • 2
    According to source2e, \RequirePackage checks both if the package was loaded and if the option was used. More options are allowed, but not missing options. See \PassOptionstoPackage. Commented Mar 6, 2020 at 22:15
  • 1
    Your question is very unclear, there is no general meaning for "enforce an option" the option can do anything (or nothing) depending on how the package is coded. Typically it just causes different parts of the package to be loaded so the definitions in force are different and it is that that affects the document not specifically that an option was used. Commented Mar 7, 2020 at 0:38

1 Answer 1

2

AFAIK invoking a package from within another package has the identical effect to the user invoking it themselves, so yes, that option will be turned on.

If you want to borrow that option on a more limited set of circumstances (your own functions) then you will need to study the code of truncate.sty and program what you need into your own package in a way that only has an effect within your own functions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .