Skip to main content

Questions tagged [patching]

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

4 votes
2 answers
109 views

How to patch command to work differently in math mode?

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
  • 909
2 votes
0 answers
55 views

Frankenstein’s Conscience conflicting with tabular environment? How to patch?

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
82 views

Patching \cref and \Cref to write additional information to the .aux file

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,003
6 votes
2 answers
183 views

Command to renew other commands

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
39 views

How to patch the \totalpoints command correctly without error on first compilation

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
3 votes
2 answers
162 views

How to use `patchcmd` with a code containing `{`?

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,414
0 votes
1 answer
32 views

Adjust font size with \patchcmd{\normalsize} not working with TL 2022

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
2 votes
1 answer
58 views

Overfull hbox in patched use of algorithm2e environment

I am using the algorithms environment from algorithm2e in a modified way with reduced width (following the solution here), see the MWE below. This generates an overfull box that I'd like to get rid of....
user279611's user avatar
0 votes
1 answer
19 views

Different linebreaks for chapter title on the chapter title page and in the Notes subheading (memoir)

I would like to specify my own line breaks for a chapter title in three places: on the chapter title page (ie first page of the chapter), in the corresponding subheading in the Notes chapter (ie for \...
tsj's user avatar
  • 580
0 votes
2 answers
72 views

Which way to alter commands is more robust/sustainable

I have a general question. If I'm writing a .cls file (or a package file, as well), what's the best way to edit standard commands like \section which are defined by the used standard class or latex....
lukeflo's user avatar
  • 1,597
0 votes
1 answer
40 views

How to transport code, not material, with a float?

My MWE: \documentclass[twoside]{book}% \usepackage{graphicx}% \usepackage{tikzducks}% \usepackage{lipsum}% \usepackage{color}% \begin{document} \color{red} \begin{figure} \...
ThorstenL's user avatar
  • 161
1 vote
0 answers
262 views

Collect information to render later

I am not sure I am using the right terms for describing what I want to do, so the title may be off. I want to be able to use a custom command like for example \PersonalData{Name}{Some Name} but not ...
Zelphir Kaltstahl's user avatar
0 votes
1 answer
47 views

How to patch samepage for svmono?

Continuing Why doesn't \samepage set \predisplaypenalty (to \@M or any other value)? , let's say we wish to patch LaTeX's \DeclareRobustCommand\samepage{\interlinepenalty\@M \postdisplaypenalty\...
user avatar
0 votes
1 answer
83 views

How make, that every page with section start have an empty style

There is some problem, that I can't understand. I want, that each page with start section has empty style \appto\section{\thispagestyle{empty}} I get an error ! Argument of \thispagestyle has an ...
Igor Yukhimenko's user avatar
0 votes
2 answers
60 views

Contents of sidewaysfigure env is out of page with TRT pagedir

With this example (lualatex with TRT pagedir) the image does not appear. how to solve the issue? \documentclass{article} \usepackage{graphicx} \usepackage[demo]{rotating} \pagedir TRT \bodydir TRT \...
Salim Bou's user avatar
  • 17.1k

15 30 50 per page
1
2 3 4 5
9