Questions tagged [renewcommand]
201 questions
9
votes
2 answers
How to replace \not by \centernot?
I noticed that LaTeX places the slash created by \not weirdly, e.g. in \not\ni.
Using \centernot from package centernot looks nice, but for reasons outside of this scope I have no control over the source, but still want to change the…
peter
- 2,895
4
votes
1 answer
How to change \tablename after \begin{document}?
I am writing an article in LaTeX for a Frontiers journal with MiKTeX. Their documentclass (frontiersin.org/design/zip/Frontiers_LaTeX_Templates.zip) defines \tablename as Table. I would like to change it in a section* for supplementary tables. I've…
Hermitian
- 51
3
votes
1 answer
Is there a "do nothing" command in LaTeX?
I'm defining it like this for myself:
\newcommand\nothing[1]{#1}
Maybe the same already exists in LaTeX and I can just use it?
PS. The purpose of this is to highlight certain parts of the .tex document for another post-processor (spell checker). In…
yegor256
- 12,021
3
votes
2 answers
Redefine mathbbm to print a colored output
I need \mathbbm to print a colored output.
I…
Gabriele
- 1,815
2
votes
1 answer
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…
Stücke
- 305
2
votes
2 answers
New Command with carriage return
Good morning everyone!
Still for my theater script template, I created the \move command for captions, but I can't set the carriage return (see figure). However, the text must keep in line with the rest. Is this possible? Thank you very…
Andy Toff
- 105
2
votes
1 answer
Why \renewcommand with optional arguments doesn't compile?
What's wrong with this code:
\documentclass{article}
\begin{document}
\let\first\section
\renewcommand\section[1]{\first{#1}}
\let\second\section
\renewcommand\section[2][]{\second{#1}} % works till this…
yegor256
- 12,021
1
vote
0 answers
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…
Georg
- 51
- 4
1
vote
1 answer
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 things like $\dot{\cartPos}$. But if I have something…
Steve Heim
- 129
1
vote
0 answers
How to display a list of all user made newcommands and what they do?
I am writing my bachelor thesis and I am introducing more and more newcommands, but I tend to forget them. Is there a way to display all user created new commands, like a make a list or a table?
I could make a table myself, but I would have to…
Francesco
- 11
1
vote
1 answer
A query regarding re-defining the ```\lim``` command in ```amsart```
I was trying to redefine the command \lim, but I was getting an error messege. The code was analogous to the…
Ralph Clausen
- 175
0
votes
0 answers
Treat subsubsections differently when referencing
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, cleveref would correctly reference:
As described in…
daniel451
- 183
0
votes
1 answer
Pass renewed commands by pdflatex engine
If I use:
\AtBeginDocument{\let\oldtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{\oldtableofcontents\label{TOC}}
\let\oldmaketitle\maketitle
\renewcommand{\maketitle}{\oldmaketitle\label{BODY}}}
in the LaTeX document (.tex file)…
Gabriele
- 1,815
0
votes
0 answers
names of commands that include numbers
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,paperheight=21cm}}
Veak
- 1
0
votes
1 answer
Redefine a command together with particular arguments
For example, I would like to replace all \hat{N} by \widehat{N}, but leaves \hat{#1} unchanged for #1=anything else.
I wish to implement it at macro level, and not replacing the text in the document, because these replacements are bind to a…
Joe Li
- 165