I'm using qcircuit to draw quantum circuits. They're built using LaTeX's table environment, but my circuits are not tables. How can I make sure they're not listed in the list of tables built by \listoftables?

It also happens that the table's caption says Table instead of Circuit. (I don't need a command such as \listofcircuits. I don't list to list them all out.)

\caption{A circuit for calculating the parity of $\ket{x}$.}
\[ \Qcircuit @C=1em @R=1.6em {
  \lstick{} & \ctrl{2} & \qw & \qw \\
  \lstick{} & \qw      & \ctrl{1} & \qw \inputgroupv{1}{2}{.8em}{.8em}{\qr{x}}\\
  \lstick{\qr0} & \targ & \targ & \qw \\
} \]
  • 2
    I find no code inside of qcircuit.sty that adds anything to a \listof... at all... Do you place your diagrams inside table environments and use \caption by chance? – user31729 Jan 10 at 14:44
  • I do. I'm sorry I didn't show the code to make that clear. It's added now. You're right. If I remove \caption, the problem is gone. However, I'd like to use a caption. So maybe my question becomes something totally different: how to use \caption and not add an item to \listoftables. – Joep Awinita Jan 10 at 14:56
  • 2
    Since you prefer numbered captions, using \caption*{A circuit...} is no option for you. The simplest way I see right now, is \renewcommand{\addcontentsline}[3]{} within the table environment. – user31729 Jan 10 at 15:18
  • 2
    Why are you using the table environment at all? Actually they are diagrams, so figure would be the best option. Otherwise use \renewcommand{\tablename}{Circuit} etc. But using \autoref or cleveref macros they will still report Table as counter – user31729 Jan 10 at 15:27
  • 1
    Please consider that in case of having real tables being listed in the \listoftables, omitting the 'non' - tables leads to inconsistencies in the LoT. Readers will wonder why table 3.2 is followed by 3.6, when 3 circuits in table environments are omitted, for example – user31729 Jan 10 at 15:33

Your Answer

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

Browse other questions tagged or ask your own question.