Text Formatting ⇒ Why won't this run, (new command -> tcolorbox+theorem)
Why won't this run, (new command -> tcolorbox+theorem)
\usepackage{amsthm,amsmath,amssymb,mathtools}
\newtheorem{theorem}{Theorem}
.
.
.
\newcommand{\nwtherm}[#1]{
\begin{tcolorbox}[colback=yellow!05!white,colframe=yellow!10!black,width=\linewidth,before skip=1mm]
\begin{theorem}
#1
\end{theorem}
\end{tcolorbox}
}
.
.
.
Illegal parameter number in definition of \reserved@a.
./preamble.tex, 43
<to be read again>
1
l.43 \newcommand{\nwtherm}[#1]
{
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Illegal parameter number in definition of \reserved@b.
./preamble.tex, 43
<to be read again>
1
l.43 \newcommand{\nwtherm}[#1]
{
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.
Missing number, treated as zero.
./preamble.tex, 49
<to be read again>
##
l.49 }
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
Parameters must be numbered consecutively.
./preamble.tex, 49
<to be read again>
1
l.49 }
I've inserted the digit you should have used after the #.
Type `1' to delete what you did use.
Parameters must be numbered consecutively.
./preamble.tex, 49
<to be read again>
2
l.49 }
I've inserted the digit you should have used after the #.
Type `1' to delete what you did use.
Runaway argument?
./main.tex, 1
##2##3##4##5##6##7##8##9##0##1{ \begin {tcolorbox}[colback=yellow!05!\ETC.
! File ended while scanning use of \reserved@a.
<inserted text>
\par
l.1 \input{preamble}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.
Undefined control sequence.
./name.tex, 13
The compiler is having trouble understanding a command you have used. Check that the command is spelled correctly. If the command is part of a package, make sure you have included the package in your preamble using \usepackage{...}.
Learn more
l.13 \nwtherm
{theorem number 1}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Why won't this run, (new command -> tcolorbox+theorem)

Read in
\newcommand
and \renewcommand
or an introduction to LaTeX (e.g. learnlatex.org) how to specify the number of arguments when defining a command.By the way,

