To create a new card, just insert following command in your document (i.e. between \begin{document} and \end{document}) and replace <question> and <answer> accordingly: \kaart{<question>}{<answer>}
You need to call this command for each card you want to create.
Here is an example with a second card (see below for detailed explanations):
\documentclass[a7paper,print,10pt,grid=rear]{kartei}
%Voor info googelen op 'LaTeX kartei'
%a7paper: bepaalt hoe groot de fiches worden. a6-a7-a8-a9 zijn de opties
%grid: geeft aan of er snijlijnen moeten geprint worden.
\usepackage[latin1]{inputenc}
\usepackage[dutch]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{icomma}
%Om te zorgen dat het antwoord in het midden van de kaart komt te staan.
\newcommand{\antwoord}[1]{
\vspace*{\fill}
\begin{center}
#1
\end{center}
\vspace*{\fill}
}
\newcommand{\vraag}[1]{
#1
}
\newcommand{\kaart}[2]{
\begin{karte}[Vraag]
\vraag{#1}
\answer{Antwoord}
\antwoord{#2}
\end{karte}
}
\author{T. Dierckx}
\begin{document}
\kaart{Bereken: $2^{5}\cdot 2^{2}=$}{$2^{7}=128$}
\kaart{Bereken: $e^{i\pi}+1=\text{?}$}{$0$}
\end{document}
How does your code work?
First, you define what kind of document/layout you want creating, with some options. LaTeX will thus know which already-implemented rules have to be followed.
\documentclass[a7paper,print,10pt,grid=rear]{kartei}
Then, you load some so-called packages: they are literally packages that gives you the ability to use new rules (i.e. macro-commands) and that can set up some LaTeX-settings for you.
\usepackage[<eventually some options>]{<package-name>}
Then, you define your own commands
\newcommand{\<name-of-the-new-command}[<number-of-arguments]{<definition of what the command does>}
And eventually, given all these settings and informations, you begin to describe what is the content of your document.
\begin{document}
<content-of-your-document>
\end{document}
How does the \kaart command work?
You have define in your preamble (all the code from \documentclass to \begin{document}) a command called \kaart. Let see how it works.
\newcommand{\kaart}: you create a new command named \kaart! It will return an error if a command already has this name.
[2]: this command has two arguments. Thus, when you want to use this command, you have to write \kaart{<first-argument>}{<second-argument>}.
{ <command-definition> }: what the command does is defined within these curly-brackets.
\begin{karte}[Vraag]: it begins a (previously define in kartei.cls file) environment named kaarte with the argument Vraag. This environment will be closed with \end{karte}.
-\vraag{#1}: You then call the command \vraag with one argument { <argument>}. #1 means that this argument is actually the <first-argument> you gave as argument of \kaart.
\answer{Antwoord}: You call the command \answer with the argument Antwoorkd.
\antwoord{#2}: You should have guessed it: you call the command (or function, or macro) \antwoord with one argument, which is <second-argument>, the second argument you gave when you called the \kaart command.
So writing \kaart{<first-argument>}{<second-argument>} is the same than writing
\begin{karte}[Vraag]
\vraag{<first-argument>}
\answer{Antwoord}
\antwoord{<second-argument>}
\end{karte}
But it's shorter... and you can easily re-use it!
Thus, within your document (i.e. between \begin{document} and \end{document}) you can call several times the command \kaart{<question>}{<answer>} as in the example.
\kaartcommand takes two arguments, and you may have only given it one argument on line 39. – Mike Renfro May 24 '16 at 12:26\kaart{<question>}{<answer>}and replace<question>and<answer>accordingly. – ebosi May 24 '16 at 12:41\kaartcommand, changing the items in the two outermost pairs of braces to your desired questions and answers. On your current card, the first pair of outermost braces starts withBereken:and ends with=$and the second pair starts with$2^and ends with128$. – Mike Renfro May 24 '16 at 12:43x+15 = -x+5}{ x+15 = -x+5
2x=-10
x=-5}}
Right before the 'end document' line and it works!! Thanks so much for your answers Mike, Ebo and Crypto!
– Michelle_B May 24 '16 at 12:58