{xpatch} is for questions addressing issues related to the generalization of the macro {patching} commands.

learn more… | top users | synonyms

0
votes
0answers
41 views

Add and position the command \photo to a mix of moderncv styles

This is a follow-up question to Banking style of moderncv doesnt reconize `\makecvheadnamewidth` for fiting long names and to How to mix/combine moderncv styles?. Now I am looking to add the ...
4
votes
1answer
47 views

xelatex and nag problem

Somet time ago xelatex stopped to compile my document. LaTeX Warning: You have requested package xpatch, but the package provides xparse. Package: xparse 2016/03/28 v6468 L3 Experimental ...
6
votes
2answers
94 views

Trouble with patchcmd and double #

I need to patch the following macro from gloss-greek.ldf (polyglossia): \def\greek@numbers{% \let\latin@alph\@alph% \let\latin@Alph\@Alph% \if@greek@numerals \def\greek@alph##1{\...
5
votes
1answer
42 views

xpatchcmd with placeholders

Is there an alternative to \xpatchcmd from the xpatch package which supports placeholders as in this virtual example: \newcommand{\mycommand}{this is important \foo this is not \bar but this is} \...
3
votes
1answer
30 views

Efficiently applying the same patch to several bibdrivers

In this answer to a question about getting Biblatex to print the ISSN field for books, I suggest a solution which uses the \xpatchbibdriver command of the xpatch package: \xpatchbibdriver{book}{% {\...
4
votes
3answers
99 views

Epigraph and fancyhdr: a patching problem

I would like to add epigraphs on my part pages using epigraph, but since I also use fancyhdr, I cannot get the proper page style on the part page using the solution given in the package documentation. ...
3
votes
2answers
132 views

How to patch with \xpretocmd and \xapptocmd a command by applying to it a macro with argument?

Suppose I'd like to patch a very complicated macro, say \autocite. For this, xpatch package is my friend. If the patch consists in applying a modal command which doesn't take arguments, such as \...
2
votes
2answers
69 views

Hiding headline when page contains \section

I use the {scrlayer-scrpage} package for headlines and footlines and want to hide the headline and headsepline when my page contains \section. I found a similar question here: Suppress headers when ...
1
vote
0answers
52 views

change or patch a command using parameters

Assume I want to use a command \foo from some package takes a number of arguments, let's say #1 to #5. I want to change the behavior of \foo in ways that might involve these arguments. For example ...
3
votes
2answers
250 views

temporarily patch a command (xpatchcmd)

for context: I'm writing a cv with moderncv. I like the looks of it, but the package doesn't appear to allow easy layout cusomitzations. What I want to achieve is one \section that formats a certain ...
6
votes
2answers
90 views

\xpatchcmd fails in a more complicate command

I've tried to patch the \minitoc@ command to add some additional vertical spacing after \mtctitle is used. (This is a question resulting from Adjust vertical spacing between minitoc title and contents)...
2
votes
2answers
138 views

Patching local commands defined within other macros

This is the follow-up - question, respectively the main cause which led to the (yet) unanswered question here: \xpatchcmd defines macros when applied to undefined commands I tried to patch some ...
10
votes
1answer
187 views

\xpatchcmd defines macros when applied to undefined commands

I stumbled over this feature (it's part of a bigger question, but I splitted it into two questions): Say, that we want to use \xpatchcmd (from xpatch) or \patchcmd (from etoolbox) and apply those ...
5
votes
1answer
161 views

How to patch a command from leipzig.sty

As shown in Issues with leipzig and glossaries used together, there is a problem when using the package leipzig with the glossaries package since the leipzig package relies on deprecated commands from ...
6
votes
1answer
88 views

biblatex: how to plagiarize a (book) entry type?

I'd like to provide a biblatex's entry type, bookreview, similar to the book one with the following differences: it supports an additional type=list,datatype=name field, reviewer (for the book's ...
1
vote
0answers
24 views

Biblatex \usepackage{xpatch} [duplicate]

In november i posted this question: @online bibliography biblatex The question was how to modify the bibliography to how i wanted it to look. I wanted the webpage reference to look like this: [#] ...
7
votes
1answer
125 views

Does LaTeX3 have something for patching (or appending code to) commands?

Item #12 of http://tex.stackexchange.com/a/148734/18401 suggests that LaTeX3 maybe has something for patching (or appending code to) commands, à la etoolbox or xpatch. Is it the case?
4
votes
1answer
159 views

How to change the format of the “and” bibstring using xpatch?

When using biblatex's textcite command with a two-authored reference I want the "and" between them to be in italics. I managed to get the same for the "et al." \bibstring using the following code ...
3
votes
1answer
97 views

Patch \part to do something with optional and mandatory argument

I am basically trying to patch \part of scrreprt to do something with the optional argument (if present) or the mandatory argument instead. In the example below the short caption would be added in red ...
3
votes
1answer
181 views

Biblatex ibid in lowercase if prenote is present

I've defined my own biblatex style (see MWE) which uses citations in footnotes. I've patched the prenote command, because otherwise biblatex writes the prenote text in lowercase (note: I don't want to ...
3
votes
1answer
317 views

Answers package modification

I'm using answers package and 2 levels of enumerate environment. Sample: (a) Excercise 1a (b) Excercise 1b (a) Excercise 2a (b) Excercise 2b Inside the answers file I want to get the first level ...
2
votes
1answer
1k views

Problems installing xpatch

I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch....
1
vote
0answers
111 views

Appendices looking like section AND subsections in the bookmarks

I am writing a thesis and i would like the appendices, which are declared as \chapter to be grouped under one chapter "Appendices" in the bookmarks, and then each appendix to appear as a section. The ...
9
votes
3answers
207 views

Writing TeX file name at the top of the processed document for article class

Consider the following MWE. \documentclass{article} \usepackage{textpos} \newcommand{\insertname}{% \begin{textblock}{2}(5,-0.5) \bfseries{\jobname.tex} \end{textblock} } \begin{document} \...
38
votes
2answers
4k views

Please tutor the usage of patchcmd and xpatch

I understand that the patchcmd package provides a command \patchcommand that can be used to add material at the beginning and/or end of the replacement text of an existing macro. It works for macros ...
18
votes
2answers
237 views

Pretending a package has been loaded

I am trying to use imakeidx and the regexpatch package in the same class. Since imakeidx depends on the xpatch package and xpatch provides the same commands (same names, improved implementation) as ...
3
votes
1answer
323 views

Patch beamerouterthemedefault.sty to remove mini slide on Beamer notes pages

In a previous question, I pointed out that the mini slides (thumbnails) inserted into Beamer notes pages cause replication of labels and broken hyperref links as a result (see comment 2 under Percusse'...
0
votes
1answer
150 views

Apparent Instability in REVTeX4 After Adding xpatch Package

This is a follow-up question to How can Acrobat features be controlled from within LaTeX? It seems that xpatch package makes REVTeX unstable and even appears to turn off some of its features. Thus, ...
3
votes
1answer
1k views

How to install the xpatch package in MiKTeX?

This is a follow up question to \nameref only shows reference as a red rectangle, no name in it. In the answers to the question cited @Werner suggested to have the package xpatch installed so that ...