Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [renewcommand]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
209 views

How to create a custom command (control sequence) with special characters in its name

I want to create a custom command (control sequence) whose name contains special characters (such as numbers, underscores _, or -). In order to better distinguish different commands, my code is as ...
Tommk's user avatar
  • 31
0 votes
3 answers
19 views

Identifying definition and theorem counters halfway through document

I am currently creating a latex article for a large-scale assignment for a class. In it, the numbering system for the definitions and theorems needs to change halfway through the document. In one ...
Stephen Cook's user avatar
0 votes
2 answers
35 views

Default not working for new command

\newcommand{\initialize}[2][tmargin=1in, bmargin=1in, right=0.75in, left=0.75in]{ \geometry{#1} \ifthenelse{\equal{#2}{}}{\setboolean{indent}{false}}{\setboolean{indent}{true}} \...
xyz04's user avatar
  • 137
0 votes
1 answer
53 views

\newcommand syntax with callouts

I suspect I am just missing something minor, but thought perhaps someone could assist. I am using a Markdown file with the Eisvogel template. I am using both awesomebox and fontawesome5 packages to ...
Kerry Cox's user avatar
  • 115
1 vote
1 answer
31 views

How to change column width for particular row of table

How can I set this layout? I have made this but it did not work \begin{table}[H] \caption{Current state-of-the-art approaches in UAV fault detection techniques.\label{tab:2}} \begin{tabularx}{\...
Zineb Adaika's user avatar
0 votes
1 answer
30 views

"\renewcommand{\tilde}{\widetilde}" doesn't take affect in ctexbook class

I want to redeifne \tilde to \widetilde. However, it doesn't take affect. \documentclass{ctexbook} \renewcommand{\tilde}{\widetilde} \begin{document} $\tilde{A}\widetilde{A}$ \end{document}...
gaoqiang's user avatar
  • 155
0 votes
0 answers
18 views

Modified \listoflistings don´t show listings on Table of Listings . Package Minted

I have a problem using a redefined \listoflistings command to generate a table of listings for my thesis on a template based on a previous version of puthesis.cls. I need to generate a list of ...
Oscar Alejandro Arcila Giraldo's user avatar
0 votes
0 answers
33 views

Redefine Figure (or Table) as "Supplementary Materials Figure (or Table)"

I am preparing some Suppementary Materials for a manuscript, and they say that I need my Figures in the Supplement to be called "Supplementary Materials Figure 1" (say). Now, I know how to ...
user3236841's user avatar
1 vote
0 answers
96 views

Re-definition of a command inside an environment [closed]

The redefinition of a command inside an environment works fine if the redefinition makes no use of the arguments, but it fails if the arguments are used in the new definition. the error message is : ...
bencio's user avatar
  • 11
0 votes
2 answers
72 views

How do you create a variadic new command?

The word "variadic" is used for functions, and commands, which can accept any number of input arguments. Below, we see an example of a custom command which has three inputs: \newcommand{\...
IdleCustard's user avatar
  • 1,230
0 votes
0 answers
20 views

Moderncv subentry with indented multiline text

I want to add some kind of subentry related to, e.g., a project within a work position. I came across a similar question whose answer I tried to solve my problem. However, if the bold entry exceeds ...
FredFloete's user avatar
0 votes
1 answer
33 views

How can I redefine the style of the \lstlistoflistings title?

I am using a cls based on memoir and the package listings. I want an appendix chapter with all the lists (list of tables, list of figures, list of listings). The title style of these lists should be ...
Maoristirn's user avatar
4 votes
1 answer
317 views

How to get rid of \def

I was recently required by a journal to getting rid of \def in the definitions of my personal macros. It turns out to be not-so-easy and the naive replacement of \def by \newcommand does not always ...
Bazin's user avatar
  • 235
2 votes
4 answers
313 views

Leaving blank arguments in a new command

If I am using this simple new command... \newcommand{\Lem}[3]{ \begin{lemma} {#1} \begin{itemize} \item{#2} \item{#3} \end{itemize} \end{lemma} } how can I use it if for example I only have one item ...
Paul A's user avatar
  • 1,117
2 votes
1 answer
69 views

Trouble with renewing a command twice

I wish to make a list enumerated with colored numbers. The way I found is to renew the \labelenumi command used by the enumerate environment to label items. However, I want to be able to switch back ...
Uros Dinic's user avatar
0 votes
0 answers
26 views

Treat subsubsections differently when referencing [duplicate]

My document numbers chapters and sections like this: 1. Chapter 1.1 Section 1.1.1 Subsection Subsubsection For the first subsection \subsection{First}\label{subsec:first}, for example, ...
daniel451's user avatar
  • 183
3 votes
1 answer
78 views

How to keep the original phi command with another name?

Since I don't usually use the "original" phi I have the following code in my preamble: \renewcommand{\phi}{\varphi} However, I'm now in a situation where I really need the "original&...
Romain Bricout's user avatar
0 votes
0 answers
71 views

Starting command using “/“ instead of “\”

This seems like a very random question, but I just got the Apple Magic Keyboard for iPad Air 5th generation. The key “\” is half of the size of that of “/“. The “\” key is placed also in the edge and ...
William Sun's user avatar
2 votes
2 answers
118 views

draw a isosceles triangle using angles tkz

I have this \newcommand to draw an isosceles triangle, is there a way to alter this so instead of creating a point D and the circle AB to find C, use AB and an angle to get C and keep AB=AC. \...
Paul A's user avatar
  • 1,117
2 votes
1 answer
209 views

Different definitions of commands in different chapters with subfiles

I have a LaTeX project which I've created using subfiles which contains several nested directories. Each of the directories other than the bottom-most one in the hierarchy contains a main.tex file ...
hexagonNoah's user avatar
2 votes
2 answers
169 views

Command name containing a number

I want to define a command \C4 which produces C4 (both in bold and normal fonts). I wrote something like \begin{document} \DeclareTextFontCommand{\textscn}{\upshape\bfseries} \newcommand{\C4}{\...
Hussein Eid's user avatar
0 votes
0 answers
37 views

Label of a section with the same name of the section automatically [duplicate]

I'm wondering if there is a way to name the label with the same name of a section automatically. In the below example, instead of writing \label{page1}, I'd like to write something like \label{...
Gennaro Arguzzi's user avatar
1 vote
1 answer
24 views

It is possible to skip a chracter from fnsymbols?

I'm changing the marks of the footnotes using the following line of code, but I didn't want to use the asterisk as a mark. \renewcommand{\thefootnote}{\fnsymbol{footnote}} Is possible to remove the ...
Gabriel Marino's user avatar
1 vote
1 answer
27 views

Minutes package: Change the preformatted texts in the maketitle segment

I want the \moderation{} command to display Chairman instead of Moderation. Is that possible? Document class: scrartcl Previously tried: \renewcommand{\moderation}{Chairman} inside and outside of ...
Flexi's user avatar
  • 35
0 votes
1 answer
64 views

Pass renewed commands by pdflatex engine

If I use: \AtBeginDocument{\let\oldtableofcontents\tableofcontents \renewcommand{\tableofcontents}{\oldtableofcontents\label{TOC}} \let\oldmaketitle\maketitle \renewcommand{\maketitle}{\oldmaketitle\...
Gabriele's user avatar
  • 1,935
0 votes
1 answer
164 views

Generating bubble answer sheet

I wish to adding bubble answer sheet in the following MWE: \documentclass[twoside,a4paper,cleardoublepage=empty,14pt]{book} \usepackage{exsheets} \SetupExSheets[question]{type=exam} \SetupExSheets{...
tstt's user avatar
  • 187
2 votes
0 answers
57 views

renewcommand ignored in caption

I have redefined a command to give me a negative sign that is more convenient for me. This works in all contexts except within a caption. \documentclass{article} \usepackage{amsmath} ...
krumpelstiltskin's user avatar
2 votes
2 answers
360 views

How to simplify the code below by using cycles?

\documentclass{article} \newcommand[3]{\mycounter}{a=#1, b=#2, c=#3} \begin{document} \mycounter{1}{2}{3} \mycounter{4}{5}{6} Too much… and the last line is \mycounter{28}{29}{30} \end{document} I ...
Axia's user avatar
  • 514
3 votes
1 answer
77 views

Opacity not respected for tikz drawing if inside pgfplots' axis

I define a myDraw command that should draw two lines. The command has an optional parameter. If I don't pass this parameter, both drawings should be opaque. Otherwise, the drawing specified in the ...
Alberto Santini's user avatar
1 vote
2 answers
115 views

Verbatim environment in \newcommand

I want to make two commands for \begin{verbatim} and \end{verbatim} to make it shorter like this: \newcommand{\bv}{\begin{verbatim}} \newcommand{\ev}{\end{verbatim}} I have already done the similar ...
Vladimir's user avatar
  • 589
0 votes
0 answers
24 views

names of commands that include numbers [duplicate]

I would like to use numbers in \newcommand names. Would this be possible ? \newcommand{\p13} {\geometry{paperwidth=13cm,paperheight=21cm}} \newcommand{\p26} {\geometry{paperwidth=26cm,...
Veak's user avatar
  • 1
0 votes
0 answers
40 views

Making command to add \left and \right to brackets that are within an equation block (within $$)

Just wondering if there is a way to replace the brackets - '(' and ')' within equations with '\left(' and '\right)' but not replace the brackets within general text. For example, in the body of a ...
Joshua Then's user avatar
2 votes
1 answer
47 views

A command that would always place text at the beginning of the document

I am keeping something like a diary, that helps me keep track of things that I am working on. Occasionally there are some actions (To do's) that need to be taken, which I would like to keep on the ...
Steve OB's user avatar
2 votes
3 answers
117 views

Create a macro to append elements to another macro

General overview The goal is to make a list of photo credits at the end of a book. MWE \documentclass{article} \newcommand\credittable{} % This command contain the final rendering. \newcommand{\...
fauve's user avatar
  • 2,521
0 votes
2 answers
120 views

Can't change name of Abstract while using Babel

I am writing a thesis and I want to have two abstracts in different languages, English and Catalan. I started with a thesis template from my university (only in English) and then added the Babel ...
alexb's user avatar
  • 3
0 votes
1 answer
12 views

Redifine \aisize in authorindex package for footnotesize

I'm using the authorindex package to make a, you guessed it, index of authors. I'd like to make the fontsize smaller than the built-in command \aisize allows; it has normal (default) and small, but my ...
Robert Mitchell's user avatar
1 vote
0 answers
27 views

Further question regarding multiaudience

I was able to get an advanced version of the multiaudience package running. Original Post This code here is working pretty well: \documentclass{scrartcl} \usepackage{ifthen} \usepackage{multiaudience}...
Georg's user avatar
  • 51
2 votes
1 answer
58 views

Why can these custom commands from packages not be seen in the main document?

I am using TeX Live (MacTeX) 2023 with all updates (as of this morning). Consider two packages called packageone.sty and packagetwo.sty. packageone.sty contains a redefinition of \vec to include a ...
LaTeXereXeTaL's user avatar
0 votes
0 answers
23 views

How to automatically index the full name of acronyms from glossaries?

I want to automatically index the full qualified names from acronyms specified with glossaries package, when using the acronym in text. I tried with the acronym package and this answer: https://tex....
vielfarbig's user avatar
0 votes
0 answers
55 views

Centering a Modified List of Figures Title

Consider the code: \documentclass[12pt]{book} \usepackage{graphicx,caption} \usepackage[T1]{fontenc} % Allows one to make bold smallcaps. \newcommand\NewCaption[2]{\caption[#1]{\textbf{\scshape{#2 #1}...
DDS's user avatar
  • 8,986
0 votes
0 answers
27 views

How to get autofill using a modified \ref command working in Overleaf?

I have a MacBook and a Windows desktop PC and I regularly use both Machines to edit tex documents on overleaf. In the overleaf doc, in order to normalize my figure, section and citation referencing I ...
D Allum's user avatar
0 votes
0 answers
28 views

Syntax for Parametrized \newcommand

I have a very basic question regarding \newcommand. I would like to have a parametrized command of the form \bla[x] that gives as output a \overset{x}{\rightarrow}. How can I achieve this? Any ...
Kolmin's user avatar
  • 559
1 vote
1 answer
43 views

Aligning `\dot` for a custom command

For convenience, I'll often create custom commands for variables I'm using often in a document, for example \newcommand{\cartPos}{\ensuremath{x}} This works fine, and I can now do all the usual ...
Steve Heim's user avatar
2 votes
1 answer
115 views

Fake Small Caps

I used a script to fake small caps which I found on StackExchange. \documentclass{report} % Source: https://tex.stackexchange.com/a/262596/146754 \usepackage{xstring} % needed for IfEqCase \...
Stücke's user avatar
  • 305
1 vote
1 answer
54 views

Function of "Elements" without Backslash in Command-Definitions

I have a general question which I couldn't solve so far. It came up a few days ago, while I was trying to redefine the different parts of the footer of the scrlayer-scrpage package (this still isn't ...
lukeflo's user avatar
  • 1,597
7 votes
2 answers
610 views

Redefined `epsilon` to `varepsilon`

MWE: % !TeX program = xelatex \documentclass{article} \usepackage{libertinus} \renewcommand{\epsilon}{\varepsilon} \begin{document} This is \texttt{varepsilon}: $\varepsilon$. This ...
Evan Tseng's user avatar
1 vote
2 answers
75 views

How to find macros to adjust footer (lefoot, cefoot etc.) with scrlayer-scrpage

I'm still working on a Latex-template for my institution. So far everything runs fine and the former questions i asked here helped me a lot. Now, i want to adjust the different parts of the journals ...
lukeflo's user avatar
  • 1,597
0 votes
0 answers
12 views

Position a graphic within template cadernos de astronomia

I want to insert an image in the upper right corner of the first page of the document. I am using a template from overleaf. I want the image next to the title, author and abstract. I visualised it in ...
niels527's user avatar
1 vote
1 answer
61 views

Is it a scoping problem?

I try to display a fancy rating scale in pdf forms with the hyperref package. After half a day of investigation, trying and errors, I finaly got something. I use some redefinition of documented and ...
ChrisAga's user avatar
  • 185
0 votes
0 answers
40 views

Error when using a custom caption with longtable in LaTeX

I'm having trouble defining a custom caption for a longtable environment in LaTeX. The custom caption works fine for normal tables, but when I try to use it with longtable, I encounter an error. ...
Benedikt's user avatar

1
2 3 4 5