1

In the following example, the code \textwidth-1mm is "evaluated" in the first page, but on the second page (where I add a node around it), the text is not evaluated anymore and I can see a bit -1mm in the middle of the page... Why? How could I correct that?

Thank!

enter image description here

MWE

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{xcolor}
\usepackage[most]{tcolorbox}
\tcbuselibrary{raster}
\begin{document}

\noindent
\begin{tcbitemize}[raster width=\textwidth-1mm, raster height=\textheight]
  \tcbitem[blankest,valign=center]
  \tcbox[]{
    \includegraphics[width=5cm,height=5cm, keepaspectratio]{example-image-a}
  }
\end{tcbitemize}
\newpage

\noindent
\begin{tikzpicture}
  \node[inner sep=0pt]{
    \begin{tcbitemize}[raster width=\textwidth-1mm, raster height=\textheight]
      \tcbitem[blankest,valign=center]
      \tcbox[]{
        \includegraphics[width=5cm,height=5cm, keepaspectratio]{example-image-a}
      }
    \end{tcbitemize}
  };
\end{tikzpicture}
\newpage

\end{document}

closed as unclear what you're asking by siracusa, Stefan Pinnow, user156344, Raaja, Dox Apr 15 at 8:07

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • On my TeXLive 2018 installation I fail to reproduce these issues when I compile your code with pdflatex. Which TeX installation are you using, and which compiler? – marmot Mar 20 at 4:05
  • @marmot I'm using TeX Live 2019/dev/Debian, pdfTeX 3.14159265-2.6-1.40.19 – tobiasBora Mar 20 at 4:06
  • Weird. I have 3.14159265-2.6-1.40.19 as well. – marmot Mar 20 at 4:08
  • Hum... I have the full example here: paste.debian.net/1073867 – tobiasBora Mar 20 at 4:12
  • @marmot and it's funny, if I add a minipage around tcbitemize, the problem disapears. – tobiasBora Mar 20 at 4:24

Browse other questions tagged or ask your own question.