2

The new version of newpxtext seems to load xpatch, which would conflict with packages that use regexpatch. Is there some way to fix this? For example, is it possible to prevent xpatch from being loaded when regexpatch has already been loaded?

\documentclass{article}

\RequirePackage { regexpatch }
\RequirePackage { newpxtext }

\begin{document}
Text in case of empty.
\end{document}
1
  • 1
    You should always keep in mind that regexpatch is experimental.
    – egreg
    Commented Nov 11, 2023 at 14:05

1 Answer 1

1

Hmm I'm not sure newpx ought to be patching really but anyway you can do this

\documentclass{article}


\RequirePackage { regexpatch }
\expandafter\let\csname [email protected]\endcsname\empty
\RequirePackage { newpxtext }

\begin{document}
Text in case of empty.
\end{document}

Perhaps regexpatch should always suppress xpatch in this way (and emulate its commands) I'm not sure..

5
  • 1
    where's @egreg .... Commented Nov 11, 2023 at 13:45
  • Thank you for this! May I ask if there is much difference with \@namedef{[email protected]}{}?
    – Jinwen
    Commented Nov 11, 2023 at 13:48
  • 1
    @Jinwen no difference at all except you would need \makeatletter to use \@namedef in the preamble Commented Nov 11, 2023 at 13:49
  • The newpx patch looks wrong, it simply activates old style numbers and that can affect following font shapes. Commented Nov 11, 2023 at 14:10
  • @UlrikeFischer yes, but egreg could make \usepackage{regexpatch,xpatch} not error even if newpx didn't patch at all. Commented Nov 11, 2023 at 14:19

You must log in to answer this question.

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