CQuIC / qcircuit

A quantum circuit drawing application
GNU General Public License v2.0
168 stars 43 forks source link

qcircuit does not play nicely with standalone #41

Open 1ucian0 opened 3 years ago

1ucian0 commented 3 years ago

The issue seems related with https://sourceforge.net/p/standalone/tickets/1/

The following latex produced a cropped PDF:

\documentclass{standalone}

\usepackage[braket, qm]{qcircuit}

\begin{document}
    \Qcircuit @C=1.0em @R=0.2em @!R {
                \lstick{ {q}_{0} :  } & \gate{\mathrm{H}} & \ctrl{1} & \qw & \qw\\
                \lstick{ {q}_{1} :  } & \qw & \targ & \qw & \qw\\
         }
\end{document}
Screenshot 2021-05-20 at 13 38 43

Notice that the $q_0$ and $q_1$ are fully cropped out. It seems a like a problem with bounding box setting. The data is there (see with \documentclass[border=20px]{standalone})

Screenshot 2021-05-20 at 13 58 28