Closed Bebotron closed 3 years ago
I cannot reproduce this (though I use version 0.4, this should be the very same thing in all previous versions, as yquant
really does not influence the positioning on the page, this is a pure TeX/TikZ thing). Using \centering
, I can perfectly center the picture, though I would usually go for the center
environment if you want to switch back and forth:
\documentclass{article}
\usepackage{yquant, braket, lipsum}
\begin{document}
\section{example column}
Example of what this is supposed to look like
\lipsum[1]
\begin{center}
\begin{tikzpicture}
\begin{yquant}
qubit {$\ket{q_{\idx}}$} q[3];
swap (q[0], q[1]);
swap (q[1], q[2]);
\end{yquant}
\end{tikzpicture}
\end{center}
Image is centered in the column
\lipsum[1]
\end{document}
Sorry about the noise, turns out I was doing it wrong and \begin{tikxpicture}
had to be under \centering
, the way it's properly done in your example. Again, thanks for a great package! Closing now.
First, let me say thank you for such a wonderful package, it has made my writing way more streamlined!
Describe the bug On the arxiv paper https://arxiv.org/abs/2007.12931, the example circuits are centered appropriately in their respective columns. The circuits in my document are aligned to the left of their respective column, leaving a significant empty space to the right of the image.
To Reproduce
Expected output I would like to get image centered on the column, but even adding![image](https://user-images.githubusercontent.com/24438203/120252621-8413ac80-c231-11eb-8f71-04aa90a3e908.png)
\centering
under\begin{tikzpicture}
doesn't change anything. The below screenshot is from https://arxiv.org/abs/2007.12931Screenshots The following is the output from the example above![image](https://user-images.githubusercontent.com/24438203/120252663-a5749880-c231-11eb-8a05-51d1c341d737.png)
Environment some output from the
.log
file from the working example above.This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2020.8.26) 31 MAY 2021
Package: yquant 2020/07/11 v0.3.1 Yet another quantum circuit library for LaTeX