You probably compiled the following minimal example:
\documentclass{article}
\begin{document}
Hello World!
\end{document}
which provided the following (partial) .log
:
...
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
...
The above output stems from counter definitions within the default article
document class. More specifically, the following set of commands (just search for \newcounter
in article.cls
):
...
\newcounter {part}
\newcounter {section}
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
...
\newcounter{figure}
...
\newcounter{table}
...
Each \newcounter{<newcntr>}[<oldcntr>]
defines a new counter as a macro \c@<newcntr>
- note the prefix c@
. Here's the definition of \newcounter
from the LaTeX kernel:
\def\newcounter#1{%
\expandafter\@ifdefinable \csname c@#1\endcsname
{\@definecounter{#1}}%
\@ifnextchar[{\@newctr{#1}}{}}
At first it checks whether a macro \c@<newcntr>
already exists, and then defines it via \@definecounter{<newcntr>}
.
\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
...}
\@definecounter
issues the TeX primitive \newcount
to create the actual count register that \c@<newcntr>
points to.
The use of the c@
prefix is purely a conventional choice. In a similar manner, counter prefixes have a p@
macro prefix, while references (or \label
s) in the LaTeX kernel have an r@
prefix. It attempts to avoid end-users from messing around with the counters, yet still allow them to create their own similarly-named macros. That is, making the following work without problem:
\newcounter{something}% <------- Creates \c@something
\newcommand{\something}{..}% <-- Creates \something
If the c@
prefix wasn't inserted by \newcounter
, then \newcounter{something}
may very well have created a counter macro \something
, which is problematic when you want to create a real macro \something
.
Anki uses some temporary directory for compilation, so you have to give the path to your images explicitly. Suppose the directory is /home/gernot/anki
and contains an image duck.jpg
. Set the preamble in Anki via Tools | Manage Note Types | your cloze note type | Options
to
\documentclass[12pt,border=1mm,varwidth]{standalone}
\usepackage{graphicx}
\graphicspath{{/home/gernot/anki/}}
\begin{document}
Add a card of your cloze note type
with the following contents in the Text
field:
[latex]\begin{center}\includegraphics{duck}\\\relax {{c1::duck}}\end{center}[/latex]
Then Anki will generate the two cards
Some things to observe:
The path in \graphicspath
has to end with a slash /
.
Bare in mind that strings like {{c1::XXX}}
will be replaced by [...]
on one card and by XXX
on the other one. You have to make sure that your code is correct in both cases. In the example above, writing \\{{c1::duck}}
gives an error since \\[...]
is interpreted as \\
with an optional argument. Writing \\\relax{{c1::duck}}
still gives an error, since the string becomes \\\relaxduck
on the second card and \relaxduck
is an undefined command. Therefore one has to put a space, a line end or {}
inbetween.
If the LaTeX code happens to contain double braces {{
, it may be mistaken as Anki notation. Replace it by {%
+new line+{
or, if acceptable from the LaTeX point of view, by { {
.
If the path or the file name of the image contains special characters (spaces, tildes, dots) one may have to take extra precautions. See How to use \graphicspath? \includegraphics: Dots in filename; but remember the last point about avoiding double braces.
(duck image from Wikipedia)
Best Answer
This is defined in
IEEEtran.cls
(see http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/) and set to true of a PDF flow is used: the class file checks whether\pdfoutput
is (which seems to be the case inpdflatex
as the comments suggest there):