Questions tagged [xpatch]
{xpatch} is for questions addressing issues related to the generalization of the macro {patching} commands.
105 questions
3 votes
1 answer
53 views
newtx incompatible with regexpatch
I have a tex file \documentclass{amsart} \usepackage{newtx} \usepackage{amsthm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Modifiy align environment % https://tex.stackexchange.com/a/750702/161639 \usepackage{...
0 votes
1 answer
41 views
Convert macros using xpatch to regexpatch
I have a tex file \documentclass[11pt]{amsart} \usepackage{amsthm,mathtools,amssymb} % Fix wrong jump to proof environment % https://tex.stackexchange.com/a/740289/161639 \usepackage{xpatch} \...
3 votes
1 answer
90 views
How to customize format of a single entry in amsrefs?
Background: In a document that uses amsrefs, I cite a source by means of the report bibliography type. Boiled down to a minimal working example, the LaTeX source is: \documentclass{article} \...
2 votes
2 answers
159 views
Error in xpatch's documentation of patch the optional arguments?
In texdoc xpatch, section 3, it shows: however, in the following mwe: \documentclass{article} \usepackage{etoolbox} % \usepackage{xpatch} \newcommand{\xyz}[1][x]{-#1!} \begin{document} \xyz \xyz[ok]...
4 votes
1 answer
116 views
\xpatchcmd fails to patch within \ExplSyntaxOn/\ExplSyntaxOff
Edit: More context added to the question. In the following MCE, the patch succeeds (\aaa) (Update: patch after \begin{document}): \documentclass{article} \usepackage[french]{fmtcount} \usepackage{...
3 votes
2 answers
135 views
replacing shortandoff{-} by xpatch parameter
I'm writing in czech with babel so there are some problems with - delimiter. The template I'm using is changing - delimiter to an active character (as the template says) for the \cline and \cmidrule ...
3 votes
1 answer
118 views
regexpatch and newtx collisions
I learned today that \usepackage{mathptmx} is obsolete and should be replaced by \usepackage{newtxtext,newtxmath} The problem is, that my template is using \usepackage{regexpatch} to change the - ...
3 votes
1 answer
94 views
How to create an "Artist (Songtitle)" Formatted Index in Songs package
CONTEXT: This brilliant answer already described how one can create a title index that looks like this: Lady in Black (Uriah Heep) ........ 4 Lemon Tree (Fool's Garden) ........ 6 QUESTION: How can I ...
0 votes
1 answer
82 views
Does IfPackageLoadedTF neutralize xpatch?
This is an admittedly strange question. The background is the suggestion from StackExchange to use package xpatch to keep latexmk running a TEX file although included graphic files or in this case ...
2 votes
1 answer
116 views
How to prefix and wrap title line text in a ToC (for chapters) in the book class? [duplicate]
I am searching for a way to include the text "Chapter" as a prefix to the chapter numbering in a ToC for a book class AND have the chapter title wrap to the left-most edge in the ToC listing....
2 votes
1 answer
100 views
Package conflict between regexpatch and newpxtext
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 ...
0 votes
1 answer
93 views
Cannot make index referring to line numbers list more than one instance
I cannot wrap my head around the existing examples like this. I am using the ekdosis package, which depends on the verse, and ultimately lineno to generate line numbers for a long verse based document....
0 votes
0 answers
56 views
questions about \xpatchcmd, \ProcessKeysOptions in l3keys2e package, \ProcessKeysOptions in kvoptions package and \widowpenalties
i use nowidow package and \setnowidow, but some case it work not fine: for example, i hope paragraph can do page break at red place, but it doesn't. Then I test, if I change nowidow.sty, make \...
0 votes
1 answer
35 views
How to use xpatch to replace some lines of the codes in "blx-caspervector-base.def"?
How to use xpatch to replace some lines of the codes in blx-caspervector-base.def from here, i.e., replace lines 55, 56, 70, 72 by the following codes respectively: andmore = {\bbx@cetext{\bbx@cnetal}{...
0 votes
1 answer
82 views
Add patch that define own font to a command
Can a new patch be added to the \mathit command to use fonts that are not controlled by math mode. I want math mode to use TeX Gyre Termes Math and v controlled by \mathit to use Computer Modern Code: ...