4

I currently have this working example for flashcards:

mycards.cfg

Use A7 flashcards that get printed on A4 paper.

\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesFile{avery5388.cfg}
\newcommand{\cardpaper}{a4paper}
\newcommand{\cardpapermode}{portrait}
\newcommand{\cardrows}{4}
\newcommand{\cardcolumns}{2}
\setlength{\cardheight}{70mm}
\setlength{\cardwidth}{100mm}
\setlength{\topoffset}{0mm}
\setlength{\oddoffset}{0mm}
\setlength{\evenoffset}{0mm}
\endinput

definitionen.tex

\documentclass[mycards,frame]{flashcards}
\usepackage{amsmath,amssymb}% math symbols / fonts
\usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc}    % this is needed for correct output of umlauts in pdf
\usepackage{ntheorem}
\newcommand{\thmfoot}{}
\theoremstyle{break}
\setlength\theoremindent{0.7cm}
\theoremheaderfont{\kern-0.7cm\normalfont\bfseries} 
\theorembodyfont{\normalfont} % nicht mehr kursiv
\theoremseparator{\thmfoot}
\newtheorem{definition}{Definition}

\begin{document}

\begin{flashcard}{Jordankurve}
\begin{definition}
    Sei $X$ ein topologischer Raum. Eine (geschlossene)
    \textbf{Jordankurve} in $X$ ist ein Homöomorphismus 
    $\gamma: [0, 1] \rightarrow C \subseteq X$
    ($\gamma: S^1 \rightarrow C \subseteq X$)
\end{definition}
\end{flashcard}

\begin{flashcard}{Knoten}
\begin{definition}
    Eine geschlossene Jordankurve in $r^3$ heißt \textbf{Knoten}.
\end{definition}
\end{flashcard}

\begin{flashcard}{äquivalente Knoten}
\begin{definition}
    Zwei Knoten $\gamma_1, \gamma_2: S^1 \rightarrow r^3$ heißen
    \textbf{äquivalent}, wenn es eine stetige Abbildung
    \[H: S^1 \times [0,1] \Rightarrow r^3\]
    gibt mit 
    \[
        H(z,0) = \gamma_1(z)
        H(z,1) = \gamma_2(z)
    \]
    und für jedes
    feste $t \in [0,1]$ ist 
    \[H_z: S^1 \rightarrow r^2, z \mapsto H(z,t)\]
    ein Knoten. Die Abbildung $H$ heißt \textbf{Isotopie} zwischen
    $\gamma_1$ und $\gamma_2$.
\end{definition}
\end{flashcard}
\end{document}

which renders to:

enter image description here

Question

When I change

    \[
        H(z,0) = \gamma_1(z)
        H(z,1) = \gamma_2(z)
    \]

to

    \begin{align*}
        H(z,0) &= \gamma_1(z)\\
        H(z,1) &= \gamma_2(z)
    \end{align*}

I get

! Argument of \align* has an extra }.
<inserted text> 
                \par 
l.39         H(z,0) &
                     = \gamma_1(z)\\
? 
! Emergency stop.
<inserted text> 
                \par 
l.39         H(z,0) &
                     = \gamma_1(z)\\
!  ==> Fatal error occurred, no output PDF file produced!

What's the problem here? How can I fix it?

1
  • Are there more source files to this? I cannot reproduce at all the example using the two source files (.cfg and .tex) given above. Jun 6 '19 at 9:56
4

flashcards internally uses an alignment, the & inside align* are mistaken for end of cell commands in the outer alignment. Just add braces around align*:

\begin{flashcard}{äquivalente Knoten}
\begin{definition}
    Zwei Knoten $\gamma_1, \gamma_2: S^1 \rightarrow r^3$ heißen
    \textbf{äquivalent}, wenn es eine stetige Abbildung
    \[H: S^1 \times [0,1] \Rightarrow r^3\]
    gibt mit 
    {\begin{align*}
        H(z,0) &= \gamma_1(z)\\
        H(z,1) &= \gamma_2(z)
    \end{align*}}
    und für jedes
    feste $t \in [0,1]$ ist 
    \[H_z: S^1 \rightarrow r^2, z \mapsto H(z,t)\]
    ein Knoten. Die Abbildung $H$ heißt \textbf{Isotopie} zwischen
    $\gamma_1$ und $\gamma_2$.
\end{definition}
\end{flashcard}

Or you could add braces around the whole entry.

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.