I'm struggling with kind of error when compiling file with equations.



\newcommand{\floor}[1]{\lfloor #1 \rfloor}


{\huge\bfseries Lineární algebra \par}


\begin{tikzpicture}[scale=1.75, transform shape]
      point meta={x+y+z},
        colored,scale arrows=.1}]

{\Large\itshape \Author \\}


Lineární algebra je matematická disciplína, která se vyskytuje nebo doplňuje spoustu jiných odvětví matematiky. Je to odvětví obecné algebry, které se zabývá vektorovými prostory, speciálně vektorů jako n-tic čísel, matic nebo zobrazení (transformací). Nachází využití v diskrétní matematice, matematické analýze, ve fyzice (všemožné transformace souřadnic) nebo dokonce v chemii (vyrovnávání redoxních rovnic). 

Jedním z takových využití je například řešení diferenciálních rovnic. Můžeme uvést příklad:

y''-y = 0

Hned od pohledu lze říct, že funkce $y = e^x$ a $y=e^{-x}$ řeší takovou rovnici, druhé derivace těchto funkcí jsou identické s původními funkcemi. Mohlo by nás však také napadnout, jestli třeba $y = 3e^x - 2 e^{-x}$ by nebylo také řešení takové rovnice.
Ano skutečně je. Vraťme se nyní na střední školu a vzpomeňme si, jak se derivovaly součty dvou funkcí a součiny funkce a konstanty, konstantu lze z derivace vytknout. Pokud máme dvě derivace za sebou, můžeme toto udělat hned dvakrát.

(3e^x - 2 e^{-x})''-3e^x + 2e^{-x} &= 0 &\\
((3e^x - 2 e^{-x})')' -3e^x + 2e^{-x} &= 0 &\\ 
((3e^x)' - (2 e^{-x})')' -3e^x + 2e^{-x} &= 0 &\\ 
(3e^x)'' - (2 e^{-x})'' - 3e^x + 2e^{-x} &= 0 &\\
3(e^x)'' - 2(e^{-x})'' - 3e^x + 2e^{-x} &= 0 &\\
3e^x - 2 e^{-x}- 3e^x + 2e^{-x} &= 0 &

I get error like this:

Missing \endcsname inserted.
<to be read again> 
l.88 \end{align*}
TeX capacity exceeded, sorry [input stack size=5000].
\@spaces ->\space 
                   \space \space \space 
l.88 \end{align*}

Thank you for any help.

  • 1
    Do you need kotex for writing in Czech? – egreg Mar 24 '18 at 11:55
  • 1
    As a note for the future: It is very helpful to provide an MWE (with stress on the minimal) when asking a question on this site. This helps us answer your question and often makes the problem clearer to you before you post your question (for example you would probably have identified the \newtheorem as problematic yourself). You can find pointers on how to write a good MWE here and also have a look at our starter guide. – schtandard Mar 24 '18 at 14:52

Do not use special characters as an environment name. Use



The error in your case seems to be caused by the use of kotex (do you write Korean?) together with this \newtheorem (I assume that the accenting commands are redifined by this package, though that is just a hunch). However you may get similar problems with any number of packages.

  • Ok, when I removed this package I copied form another my file, it went back and worked. However I still wonder what does it mean and why it didn't come up until I started with the align*... – Dan We Mar 24 '18 at 12:42
  • 1
    I want to clarify that you should not only remove the kotex package if you do not need it but more importantly, avoid using special characters when naming environments (and thus macros). The kotex package obscures the problem, but ultimately the special characters are the culprit. – schtandard Mar 24 '18 at 14:45
  • That said, I am unclear on some things leading to the final warning and error you get. I asked this question about it that you can have a look at if you are interested. – schtandard Mar 24 '18 at 14:46
  • Thank you, I have currently repaired everything what seemed to wrong, removed unused packages and now I'm done, had problems with the part \newtheorem{Cviceni}{Cvičení} because I left an "í" in the name braces. – Dan We Mar 24 '18 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.