This is a follow-up to this question. I'd like to achieve the same output as described in the question, namely a 1cm wide square that is 1cm below and 1cm to the right of the red dot in the following illustration (the dot should not appear in the output):
Taking a lead from this answer, I've attempted to use the tikzmark package, but unlike the answer, I tried to use the \tikzmark command rather than \tikzmarknode. I based my attempt on the first example listed in the tikzmark package documentation on p. 10, namely on the following code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\title{}
\author{}
\date{}
\begin{document}
[
\tikzmark{a} e^{i \pi/2} = i
]
This\tikz[remember picture,overlay,baseline=0pt] \draw[->] (0,1em)
to[bend left] ([shift={(-1ex,1ex)}]pic cs:a); is an important
equation.
\end{document}
which produces the following output (after compiling twice):

This output conforms to my expectations and to the drawing shown in the tikzmark documentation.
Based on this example, I tried solving the original problem using the following code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\usepackage{lipsum}
\title{}
\author{}
\date{}
\begin{document}
\lipsum[1][1]\tikzmark{x}\lipsum[1][2]
\begin{tikzpicture}[remember picture,overlay]%
\draw (pic cs:x) ++ (1cm,-1cm) rectangle (1cm,-1cm);%
\end{tikzpicture}
\end{document}
This produced the following output (after compiling twice):
which is not what I expected for two reasons. Firstly, the shape is a rectangle rather than a square. Secondly, it is positioned to the left of the mark rather than to its right.
Why doesn't my code work as expected? How can it be fixed?



--++instead of just++. And did you compile twice? – SebGlav Dec 14 '21 at 09:51++with--++only adds a line from the mark to the rectangle's top right corner. – Evan Aad Dec 14 '21 at 10:05++on that coordinate too. – Rmano Dec 14 '21 at 10:22