Thank you, sommerfee.
The following
\documentclass{article}
\begin{document}
\newcommand{\NN}[1]{\sqrt{\sin^2 {#1}-CC}}
$$ A = \frac{\sin\alpha\cos a}{\NN{x}} $$
\let\NN\undefined
$$ A = \frac{\sin\alpha\cos a}{\NN{x}} $$
\end{document}
fails, as desired, with the message
! Undefined control ...
Search found 9 matches
- Fri Nov 15, 2013 7:41 pm
- Forum: General
- Topic: undefining (not redefining) a "\newcommand"
- Replies: 3
- Views: 11839
- Thu Nov 07, 2013 10:28 pm
- Forum: General
- Topic: undefining (not redefining) a "\newcommand"
- Replies: 3
- Views: 11839
undefining (not redefining) a "\newcommand"
When writing messy equations, I frequently use \newcommand to reduce typing, reduce errors, and improve consistency. Here is an example from a current paper:
\newcommand{\NN}[1]{\sqrt{\sin^2 {#1}-CC}}
I would like to "undefine" the macro at the end of the section where it is used. Then, if it is ...
\newcommand{\NN}[1]{\sqrt{\sin^2 {#1}-CC}}
I would like to "undefine" the macro at the end of the section where it is used. Then, if it is ...
- Fri Apr 19, 2013 1:52 am
- Forum: Graphics, Figures & Tables
- Topic: Option Clash for Package
- Replies: 2
- Views: 10115
Option Clash for Package
Trying to use the x11names option for xcolor in a beamer presentation, getting an "option clash" error. Example below. What is going on?
Danke/gracias/merci/thanks for your help.
This is the code.
\documentclass{beamer}
\usepackage[x11names]{xcolor}
\begin{document}
begin{frame}
This is a test ...
Danke/gracias/merci/thanks for your help.
This is the code.
\documentclass{beamer}
\usepackage[x11names]{xcolor}
\begin{document}
begin{frame}
This is a test ...
- Fri Feb 22, 2013 5:29 am
- Forum: Page Layout
- Topic: keeping two paragraphs on same page
- Replies: 1
- Views: 13770
keeping two paragraphs on same page
Recently I used LaTex to create an abstract booklet for a mini-conference. For each entry I tried to use a format like:
\begin{samepage}
\section*{Presenters's name}
Presenter's Affiliation\\
Presentation Title\\[2ex]
Abstract
\end{samepage}
but there were often page breaks between the Title and ...
\begin{samepage}
\section*{Presenters's name}
Presenter's Affiliation\\
Presentation Title\\[2ex]
Abstract
\end{samepage}
but there were often page breaks between the Title and ...
- Wed Nov 14, 2012 3:41 am
- Forum: Graphics, Figures & Tables
- Topic: \the \textwidth and \the\textheight with no units
- Replies: 4
- Views: 5895
Re: \the \textwidth and \the\textheight with no units
Thanks, that works too.
- Tue Nov 13, 2012 6:43 am
- Forum: Graphics, Figures & Tables
- Topic: \the \textwidth and \the\textheight with no units
- Replies: 4
- Views: 5895
\the \textwidth and \the\textheight with no units
It works - thanks, Stefan!
Here is a minimal example in the context I was looking for:
\documentclass{beamer}
\makeatletter
\newcommand{\Tw}{\strip@pt\textwidth}
\newcommand{\Th}{\strip@pt\textheight}
\newcommand{\Thw}{\strip@pt\dimexpr 0.5\textwidth\relax}
\newcommand{\Thh}{\strip@pt\dimexpr 0.5 ...
Here is a minimal example in the context I was looking for:
\documentclass{beamer}
\makeatletter
\newcommand{\Tw}{\strip@pt\textwidth}
\newcommand{\Th}{\strip@pt\textheight}
\newcommand{\Thw}{\strip@pt\dimexpr 0.5\textwidth\relax}
\newcommand{\Thh}{\strip@pt\dimexpr 0.5 ...
- Mon Nov 12, 2012 10:32 pm
- Forum: Graphics, Figures & Tables
- Topic: \the \textwidth and \the\textheight with no units
- Replies: 4
- Views: 5895
\the \textwidth and \the\textheight with no units
Here is the context: In beamer presentations, I often include slides which display a number of color pictures from various sources, in various formats (jpg, png, pdf). I use the LaTeX picture() environment because it gives fine-grained control over exactly where and in what order the graphics should ...
- Thu Apr 05, 2012 4:42 pm
- Forum: Graphics, Figures & Tables
- Topic: beamer | Color Definition
- Replies: 3
- Views: 5386
Re: beamer | Color Definition
Thanks, Stefan and localghost for the welcome, and for the pointers to documentation. "texdoc xcolor" gave me the answers I needed. If anyone
else finds this thread, the answer to my specific question is yes, \definecolor supports several color systems besides rgb, including hsb and cmyk.
else finds this thread, the answer to my specific question is yes, \definecolor supports several color systems besides rgb, including hsb and cmyk.
- Wed Apr 04, 2012 6:56 pm
- Forum: Graphics, Figures & Tables
- Topic: beamer | Color Definition
- Replies: 3
- Views: 5386
beamer | Color Definition
Specific question: In the LaTeX beamer \definecolor command, what color spaces can be specified? I have looked through dozens of examples and have found two types: either "\definecolor{rgb}<rgb-triplet>", or "\definecolor{gray}<graylevel>". Is it possible to use, for example "\definecolor{hsv ...