Skip to main content

Questions tagged [patching]

{patching} is for questions about patching the definition of macros.

3 votes
2 answers
174 views

I hope to modify the definition of an internal command in the "Standard Document Class book.cls". This "internal command" is a command named \@maketitle defined by \def. I hope ...
Panda Morty's user avatar
6 votes
3 answers
272 views

Using optidef package, one can write \documentclass{article} \usepackage{optidef} \begin{document} \begin{mini} {w}{f(w)+ R(w+6x)} {}{} \addConstraint{g(w)}{=0} \addConstraint{n(w)}{= 6} \...
CroCo's user avatar
  • 6,088
0 votes
1 answer
53 views

I’m trying to define a version of amsmath’s/mathtools’ \intertext that prevents page breaks. My approach is to patch a copy of \intertext to remove the \penaltys: \tracingpatches {\makeatletter \...
Socob's user avatar
  • 1,865
4 votes
1 answer
115 views

So, as I (edit: incorrectly) understand it, changes to line spacing are best effected by redefining \baselinestretch. However, in amsart, this cannot change the line spacing within a multi-line title, ...
Branimir Ćaćić's user avatar
2 votes
2 answers
164 views

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]...
Explorer's user avatar
  • 9,423
2 votes
1 answer
79 views

This post is an extension of How to Make Bold the Footnotemarks Appearing After the Footnote Line Consider the following code which is derived from @Werner's excellent answer: \documentclass[12pt]{...
DDS's user avatar
  • 11.3k
5 votes
3 answers
205 views

I'd like to patch (redefine) the standalone's \subpreamble command but my attempts seem to fail. Here's an MCE that I expect to fail to compile because of the \aaa command, but it doesn't: \begin{...
Denis Bitouzé's user avatar
5 votes
3 answers
429 views

This question is based on @StevenB.Segletes' patch for titlecaps found here: Reformatting a Paragraph Consisting Entirely of Capital Letters Consider the code: \documentclass[12pt]{article} \...
DDS's user avatar
  • 11.3k
4 votes
2 answers
141 views

I am using starfont to get astronomical symbols in my document. Unfortunately, the package defines the symbols for text mode only. From this answer, I was able to declare math versions of the symbols ...
Shai Avr's user avatar
  • 1,033
2 votes
1 answer
144 views

I'm using compsci and friends for a LaTeX course. But the following MWE \documentclass{article} \usepackage{compsci} \begin{document} Well, the following works: ``\cs\_'' % but there's an extra ...
gildux's user avatar
  • 538
0 votes
0 answers
115 views

I need to patch the macros \cref and \Cref so that when used like this: \cref{label1,label2,label3} besides generating the normal layout in the document, they write something like this to the .aux (...
Gabriele's user avatar
  • 2,072
6 votes
2 answers
247 views

Is it possible to create a command which takes the name of a command c as an argument and redefines c (e.g. via renewcommand) in terms of itself but adds some new functionality? In short, can we ...
PaulProgrammerNoob's user avatar
0 votes
1 answer
80 views

My goal is to have half points that are printed with a comma as a decimal symbol (e.g. 2,5 points). Thus, I use a workaround and multiply all points with 10 and use the patchmd command from etoolbox ...
imkrs_lbrun's user avatar
4 votes
2 answers
253 views

I have a macro with a long hbox, and I'd like to integrate a simple tikz box by adding a line of code in front of its {. However, I'm facing challenges due to the inclusion of curly braces in that ...
javadr's user avatar
  • 2,484
0 votes
1 answer
68 views

I used to slightly adjust my font size with \patchcmd{\normalsize}. Consider this code: \documentclass[11pt]{memoir} \usepackage{etoolbox,lipsum} \makeatletter \patchcmd{\normalsize}{\@xipt}{{30pt}}{}...
Iacobus1983's user avatar

15 30 50 per page
1
2 3 4 5
10