I'm writing a LaTeX document where I want two or three QR codes vertically aligned with caption on each. Unfortunately the first QR code is always one line lower than the other QR codes and I can't figure out why.
I have a workaround with negative \vspace
, but I'm hoping to find the error or something neater.
MWE
\documentclass[12pt,a5paper]{book}
\usepackage[]{qrcode}
\usepackage{subcaption}
\begin{document}
\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.2\textwidth}
\centering
\qrcode[]{Text1}
\caption*{Text1}
\end{subfigure}
\qquad
\begin{subfigure}[ht]{0.2\textwidth}
\centering
\qrcode[]{Text2}
\caption*{Text2}
\end{subfigure}
\end{figure}
\end{document}
caption
when you usesubcaption
. Latter one does\RequirePackage{caption}
.caption
package bundle I was pointing to... I posted an answer that solves the issue.[solved]
part of the title, as the way we mark questions solved on this site is to accept answers. See this question for how to do it.