0
votes
0answers
20 views

What is the meaning of \+ in doxygen-generated latex?

When compiling a software reference manual with doxygen and latex output, I get the following error: ! Undefined control sequence. l.2 ... Modular System for Shelves and Coasts (M\\+ ...
5
votes
3answers
125 views

\newcommand for tabular entries using keyval

I am trying to define a command for tabular entries using keyval. \documentclass{article} \usepackage{keyval} \makeatletter \define@key{tabularEntryKeys}{a}[\dots]{#1 & } ...
0
votes
2answers
65 views

! File ended while scanning use of \@xs@testcase

my script produces this error: Runaway argument? \section *{Serumnatrium} \par \ib {Zweck}{ \el { * Wasserverteilung *\ETC. ! File ended while scanning use of \@xs@testcase. <inserted text> ...
9
votes
2answers
107 views

Error when using defs inside a macro to write a row in a table

For the following MWE \documentclass{article} \newcommand{\cmd}[5]{% \def\tA{#1}% \def\tB{#2}% \def\tC{#3}% \def\tD{#4}% \def\tE{#5}% \tA & \tB & \tC & \tD & \tE \\ } ...
3
votes
0answers
70 views

pdflatex: How to automatically quit on compile error?

See also this question on Reddit. I want to automate running pdflatex over and over with make and guard. However, when pdflatex encounters a syntax error, it hangs, preventing guard from being able ...
2
votes
1answer
58 views

Trouble including graphics from csv file into Pgftable, commands are dissapearing (local maybe?)

I've been trying to add eps graphics with the filename in a csv file. Take a look at the CSV to get an idea of what I mean: ...
4
votes
2answers
102 views

How to deal with macro expansion and 'TeX capacity exceeded' when using write18?

This issue is driving me nuts. Ever since the friendly and knowledgeable people here on tex SE have guided me to doing multiple string replacements the proper way, I've been trying to incorporate that ...
1
vote
0answers
34 views

What's the shortest input that makes TeX and/or TeX-based systems go into a loop? [duplicate]

The following 12-character input causes TeX to go into a loop. \def\x{\x}\x It won't crash, it won't produce an error message, it'll just sit there for ever, trying to compile the document (but not ...
4
votes
2answers
128 views

\renewcommand for \forall to add a parameter

Hi I'm trying to redefine the \forall command so that it accepts an argument instead of using the regular juxtaposition. What it looks like at the moment is ...
4
votes
2answers
152 views

TeX capacity exceeded in Table of Contents due to macro

I'm working on a macro that when given Hello will make a chapter named hello, and number it like this: 1 - Hello, with the 1 - inside the margins. I also want it to automatically label the chapter by ...
14
votes
1answer
138 views

How can I wipe TeX's memory of a user-defined control sequence?

I know I can redefine a control sequence to be empty or \relax, as in my example below. However, doing so doesn't prevent one from using that control sequence , because it is still defined. To add ...
6
votes
2answers
53 views

How to make a family of related optional-arg macros reliable

I have some working, but unreliable \def magic I use to reduce boilerplate regarding mathematical indices. (This is in LaTeX, but I couldn't think of a way to do it using newcommand). \makeatletter ...
8
votes
1answer
100 views

Undefined Macro in Package xstring

I have a very basic problem. I am trying to use the xstring package in a Latex document and I keep getting the following error message for an undefined control sequence: (c:/Program Files ...
6
votes
1answer
60 views

My attempt to local redefine a command is failing and not sure why

I want to decorate some text and then reprint it undecorated. This is the code that I was using to do this. \documentclass{article} \usepackage{xcolor} \makeatletter ...
1
vote
1answer
44 views

about newcommand [duplicate]

I have trying to use new command to represent math, and this is what I type in: \\ \newcommand\fpi2[2][\pi][2]{frac{#1}{#2}}\\ \newcommand\mylim[2][x]{lim_{#1\to #2}} I'm trying to create a new ...
-1
votes
1answer
695 views

\newcommand in class - undefined control sequence

I'm trying to write a class based on article.cls and I'm having some trouble with \newcommand. Here go the complete files. Class file \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{NITclsD} ...
0
votes
1answer
834 views

Undefined control sequence argument [closed]

\begin{algorithm} \SetKwData{Candidates}{candidates} \SetKwData{Links}{links} \SetKwData{Visited}{visited} \SetKwData{URL}{URL} \SetKwData{TraversalDepth}{traversalDepth} ...
7
votes
1answer
123 views

How do I use commands within tabular definition?

Using commands within tabular definition result in error ! Missing $ inserted. In this case, it is the \, that causes problems when calling the custom command. Same commands work fine outside tabular ...
9
votes
3answers
144 views

Problem with ^^<HEX>

I have small problem with ^^<HEX>. If I have a <HEX> part of the ^^<HEX> in the macro \def\attemp{<HEX>}, I cannot write ^^<HEX> as ^^\attempt or ...
2
votes
1answer
361 views

'Undefined control sequence \setkomavar'

I ran into the error: 'Undefined control sequence l.12 \setkomavar{subject}{Regarding: Code 123.456}' My document preamble looks like this: \documentclass{letter} \usepackage{hyperref} ...
6
votes
2answers
114 views

Problem with newly defined command and special chars

I have the following problem. In my document, I defined a new command to save a few chars \renewcommand{\r}{r_\mathrm{max}} Additionally, since it is Swedish, it makes use of the special char å, ...
4
votes
1answer
144 views

Errors in passing a previously concatenated string to foreach

Motivation While attempting to answer Pie chart with values as angles not percent, I stucked on passing a string to a foreach. The context To makes things clear, I briefly introduce the context. ...
2
votes
2answers
130 views

Multi-line text retrieved from file via \input, within a newcommand declaration, passing newly declared command as argument of standard letter class

I have put together a minimum working example consisting of a number of files mwe.tex % instance of personal letter address.tex % full address of individual being addressed in mwe.tex ...
4
votes
1answer
196 views

Use of \cals doesn't match its definition \calscommand

The following minimal working example employs a cals table in the document environment and works fine: \documentclass{article} %document encoding \usepackage[utf8]{inputenc} %geometry ...
3
votes
2answers
291 views

Undefined control sequence \pgfmath@

Why does the following code give me this error message? Error ERROR: Undefined control sequence. --- TeX said --- \pgfmath@dimen@ ...men@@ #1=0.0pt\relax \pgfmath@ l.28 \draw ...
4
votes
1answer
163 views

A list of pairs in pgfkeys

Having learnt a lot about the pgfkeys package as a result of my last question, I'm now trying to do some more adventurous things. Let's say I have a command called \blob, whose value is the ...
4
votes
1answer
1k views

Command \* already defined … see p.192 of the manual

My code had: \newtheorem*{theI}{Thesis I} And it gives me the error: Command \* already defined. Or name \end... illegal, see p.192 of the manual. 1.16 \newtheorem*{theI}{ ...
5
votes
2answers
209 views

Double subscript error with \newcommand?

Disclaimer: I know of Defining a newcommand with sub- or superscript and avoiding "double subscript" error but this only gives a work-around, but no explanation to my question. Here's a ...
1
vote
1answer
85 views

import in \newcommand in my package produces an error

I have written and installed my own package gym.sty. In that package I defined \newcommand{\loadgym}{\import{sagegym}} since I need to execute some commands after \begin{document} for the package ...
3
votes
1answer
119 views

LaTeX report wrong error line when enclosing thing within a macro

I like to write my LaTeX C++ style 1 \mydisplay 2 { 3 \BoomUndefinedMacro \\ 4 x + 1 = 2 5 } But then LaTeX, LaTeX say that the error is in line 5, instead of line 3. This is not useful, ...
2
votes
2answers
174 views

Error with \DeclareRobustCommand, \usepackage{hyperref,xcolor} and \usepackage{graphicx}

In order to tie capital letters with a capital hyphen, I created a command \DeclareRobustCommand{\capitalhyphen}{\raisebox{0.24ex}{\resizebox{0.4em}{\height}{-}}\kern-0.07em} which uses graphicx ...
9
votes
1answer
169 views

A question about a macro definition error

Given: \documentclass{minimal} \newcommand{\emrule}[1]{\rule[4pt]{#1em}{0.2pt}} \newcommand{\endash}{\emrule{.5}} \begin{document} 2000\endash2013 \end{document} I get: ! LaTeX Error: Command ...
6
votes
1answer
209 views

“No room for a new \read” with writing a journal

I'm fairly new to TeX and learning as I go. I am trying to keep a journal in LaTeX. I'm using the solution provided at Using LaTeX to keep a diary . It's essentially a setup where each day's entry is ...
3
votes
1answer
1k views

Undefined control sequence on legitimate LyX macro

I'm trying to define a LyX macro, Insert -> Math -> Macro on the menus. It's a very simple macro. Source code under View -> View Source: \global\long\def\Z{\mathbb{Z}} The file compiles nicely if I ...
0
votes
1answer
139 views

\newline causing TeX capacity exceeded error

I'm rigging up some code so that I get the references cited on a slide displayed directly in the footline of my beamer presentation, and I've run into an error that mystifies me. The code I have ...
2
votes
1answer
396 views

xelatex memory problem [closed]

I have problem while running xelatex: TeX capacity exceeded, sorry [main memory size=1500000]. I tried increasing memory limits in texmf.cnf (also ran fmtutil-sys), but I hit maximum allowed and it ...
11
votes
2answers
2k views

Misplaced \omit. \multispan with \newcommand

I'm trying to build my own cookbook-style, which has an ingredient makro. Sometimes the ingredients should be seperated and have a headline, so I tryed with an optional argument. A minumum example ...
10
votes
2answers
281 views

Multicolumn within a newcommand error

I am new to writing packages and am coming across an error that I can't unravel, I would appreciate any help that you can provide. I am writing a few macros which are meant to be used within a tabular ...
4
votes
2answers
206 views

How can I define a macro that adds a row to a table that has not yet been printed?

I want to generate a list of technical abbreviations and acronyms that I use. Currently, I'm defining all acronyms with a macro I have designed. Now, I want the macro to call another macro, called ...
0
votes
1answer
105 views

Possible package missing [closed]

I started using LaTeX yesterday and there's something I can't figure out: I've noticed that I don't have some commands, for example right now I'm trying to use \vphantom and \phantom, but when I type ...
7
votes
3answers
2k views

Passing arguments to nested newcommands

I thought that doubling hashes was sufficient to pass arguments to nested \newcommand. \newcommand{\notice}[1]{ \vspace{10px} \textbf{#1:} \begin{quotation} ##1 \end{quotation}} ...
6
votes
4answers
516 views

Illegal parameter number with \docsvlist

I'm trying to define a macro that take as an input a CSV list and create an item list. etoolbox comes just handy for this and the macro I'm using is \begin{itemize} \renewcommand*{\do}[1]{\item[] ...
2
votes
1answer
437 views

Why is LaTeX refusing to create a new page to place content?

Ihave stumbled upon strange behavior (at least for me). I am generating a document composed of a set of blank framed boxes, each with a text attached above, and it will always be most likely necessary ...
6
votes
1answer
662 views

Using a macro as value of addtotoc in \includepdf

I would like to include pages from an external PDF file into my document, using the pdfpages package. The following works for me: \documentclass{article} \usepackage{pdfpages} \begin{document} ...
4
votes
2answers
2k views

Error with \newcommand and \section

I'm trying to typeset an article. In the preamble, I defined these two things: \newcommand{\leftexp}[2]{{\vphantom{#2}}^{#1}{#2}} \newcommand{\hr}{\leftexp{*}{\mathbb{R}}} However, when I try to ...
0
votes
1answer
176 views

Getting an error when trying to use 'xstring' commands in my macro

When I try to compile the minimal example below, I get an error: ! Argument of \@xs@StrLeft has an extra }. <inserted text> \par l.33 \setInSCCF{abcdef} If I switch the ...
7
votes
2answers
504 views

Appending to Variables

The following code works: \def \robble {robble} \def \robbles {\robble\robble} But the following but doesn't: \def \robbles {robble} \def \robbles {\robbles robble} The overall goal is to get ...
0
votes
2answers
149 views

Mysteriously fails to compile when I comment a line

I set up a github repo with a not-so minimal working environment (sorry for that). As the README at github says, uncommenting the following stupid line solves the problem and makes the ...
4
votes
1answer
159 views

Shortcut macro for tabularx environment

I'm trying to define a shortcut using \newcommand for setting up a table using the tabularx environment. The command seems to work fine when beginning the table: \newcommand{\bt}{\begin{tabularx}} ...
2
votes
1answer
98 views

Diagnosing errors inside newcommands

When I need to use something repeatedly within a document, I make my own command. E.g.: \newcommand{\notification}[2]{ % line 2 Hello #1, your #2 pie is ready. % line 3 } ...