cross-posted from: https://lemmy.sdf.org/post/61503899

I needed to forcibly place some origami fold marks in absolute locations on the page. This seemed like a useful pkg for at least some of the objects:

\usepackage[absolute]{textpos}

The problem is that it clobbers/ignores the ocg environment. E.g.

\textblockorigin{-18pt}{0mm}
\setlength{\TPHorizModule}{1mm}\setlength{\TPVertModule}{1mm}
\begin{ocg}{region boundaries}{rb}{on}
\begin{textblock*}{0pt}(0mm,0.5\paperheight) {\color{green}\rule[0.5ex]{\hmgn}{1pt}} \end{textblock*}
\begin{textblock*}{0pt}(\paperwidth-\hmgn,0.5\paperheight) {\color{green}\rule[0.5ex]{0.5\paperwidth-0.25\paperheight}{1pt}} \end{textblock*}
\begin{textblock*}{0pt}(\paperwidth-\hmgn,0.5\paperheight) {\color{green}\rule{1pt}{0.5\paperheight-\hmgn}} \end{textblock*}
\begin{textblock*}{0pt}(\hmgn,\hmgn) {\color{green}\rule{1pt}{0.5\paperheight-\hmgn}} \end{textblock*}
\end{ocg}

It would probably work if a \begin{ocg}… were nested inside of every single \begin{textblock*}, but fuck that.

The textpos docs mention that care is taken to put the objects into the background and that the overlay option can be used to put the stuff on top. I thought that might be a hack to get it to respect the ocg environment, but no. It does not work.

  • evenwichtOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 天前

    That page starts with:

    “Places content relatively to its parent container.”

    That sounds the same as what LaTeX does, which is the problem.

    • Victor@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 天前

      I mean, if you want to place text somewhere on the page and not let the flow of text decide where it’s placed, you use that function to place the text “relative” to the entire page (the parent), and voila. 😊

      A top level place call will place content directly in the text area of the current page. This can be used for absolute positioning on the page […]