Skip to main content

All Questions

Tagged with
3 votes
2 answers
552 views

What's wrong with my new environment?

I'm trying to write this new environment, but produces this error when I use it: This is my code: \documentclass{article} \newcounter{questao} \newenvironment{questao}[1][]{ \ifx\relax#1\relax ...
Lenin de Castilhos's user avatar
6 votes
6 answers
539 views

Recursive macros revisited

Consider the following code \documentclass{article} \usepackage{xifthen} \def\question#1 #2 #3?{\ifx#1 #2 #3?\relax\else#1 #2 #3 or\expandafter\question\fi} \newcommand{\test}[1]{\question#1} \begin{...
VaduzStevin's user avatar
3 votes
1 answer
111 views

"unexpected $ after $$" and "unclosed $$ found at $" errors with inline math inside display mode

I am trying to define a new command for different types of homomorphisms. The command is: \newcommand{\Hom}[2][]{% \operatorname{Hom}_{\textnormal{#1}}\left({#2}\right)% } The outputs of this ...
Lorenzo Carozzo's user avatar
3 votes
4 answers
147 views

How to pass a \def coordinate to macros

I am trying to pass a \def coordinate to a macro and got an error. Below is the code. The macro with direct passing works, but the two commented out lines don't. \documentclass[border=1cm]{standalone} ...
Leon Chang's user avatar
0 votes
1 answer
49 views

Custom command in \NewDocumentCommand documentation

I'm seeing a rather unexpected result with \NewDocumentCommand. Suppose I have a custom-defined command \mybold{}, like this: \NewDocumentCommand{\mybold}{m}{\mathbf{#1}} Or \oybold[]: \...
Abhimanyu Pallavi Sudhir's user avatar
3 votes
1 answer
51 views

Prior working macro to bold author names, now causes complex errors

I have long used to below macro, originally adapted from another Answer. This macro is used with BibLaTeX, to automatically bold the provided author. %------------------------------------------------ %...
Coby Viner's user avatar
  • 1,949
4 votes
3 answers
409 views

Is there a way to add optional and/or named argument to command

I'm writing a handbook for my students and I want to create a command which should draw a task definition, its type and possible features, like source and link to the solution on YouTube. In my plan ...
Nikita Vasiliev's user avatar
1 vote
1 answer
256 views

LaTeX Error: Command \numdef already defined

This error is linked to “/usr/local/texlive/2022/texmf-dist/tex/latex/etoolbox/etoobox.sty, 1003” by the system. I do not know what this really means though I do find such definitions in a file of ...
JC Y's user avatar
  • 25
1 vote
1 answer
98 views

Command \leftbar already defined after using \usepackage{framed}

\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{polski} \usepackage{framed} \usepackage{mathtools} \usepackage{amsthm} \usepackage{letltxmacro} \LetLtxMacro\amsproof\proof \...
anon's user avatar
  • 111
1 vote
1 answer
1k views

error| TeX capacity exceeded, sorry [parameter stack size=10000]

When trying to use a specific package (ling-macros) I get this error. Never had it before. It wont compile most of the time. Rarely it compiles,but then my macro (\lam{P}{s,t} in the example) wont ...
hal3m's user avatar
  • 33
1 vote
2 answers
43 views

How to properly shorten if condition?

\documentclass{article} \title{} \author{} \date{} \begin{document} \newcommand{\mybold}[2]{\ifnum #1=1 \textbf{#2} \else{#2} \fi} \mybold{1}{This should be bold} \mybold{0}{This should NOT be bold} ...
nch7822's user avatar
  • 11
2 votes
2 answers
101 views

Macro that prints definitions of other macros

I tried making a macro that checks if some macro is defined or not, and if it is it will print the definition of the macro. If the macro is undefined, it will showcase this. I am somewhat content with ...
Vebjorn's user avatar
  • 1,884
1 vote
4 answers
201 views

How to properly create a command that takes a variable amount of arguments?

I tried to create a command that concatenates multiple strings together. The first source defines a new command \merge that takes two parameters and prints them without any spaces between them. The \...
ally3223's user avatar
0 votes
2 answers
59 views

How to define \newcommand for mappings efficiently

I'm having trouble defining a new command for latex. What I want to do? Define a \newcommand to define mappings like in this: \documentclass[english]{scrreprt} \usepackage{amsmath} \usepackage{amssymb}...
Jueicon's user avatar
0 votes
0 answers
55 views

New environment gives "File ended while scanning use of \thmt@collect@body."

In the code below, I use starred theorems through some macros and commands. \documentclass[]{article} \usepackage[english]{babel} \usepackage{amssymb,amsthm,amsmath,xparse} \usepackage{hyperref} \...
J. Schmidt's user avatar

15 30 50 per page
1
2 3 4 5
14