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.

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 days ago (4 children)

I used typst to put together my girl's report from a Google docs document. Boy was it nice to work with. I wish I had that to work with during my time at University instead of LaTeX.

  • source
  • hideshow 4 child comments
  • [–] [S] 2 points 2 days ago* (last edited 2 days ago) (3 children)

    thanks for the tip. I did not know LaTeX had a viable competitor. Does it support arbitrarily placing text in an absolute position on the page independant of other content? I probably wouldn’t be enthusiastic about taking on a new learning curve, but nonetheless it would be interesting to know situations where it’s more powerful than LaTeX.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 2 points 2 days ago (2 children)

    I honestly don't know enough about LaTeX to say whether or not Typst is more or less powerful.

    But I will say this: Typst can do those things that I need it to do in a much, much simpler and more understandable way than LaTeX would require, as far as I remember.

    Does it support arbitrarily placing text in an absolute position on the page independant of other content?

    I do believe you're looking for the place function for this. 🙂

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 1 day ago (1 child)

    That page starts with:

    “Places content relatively to its parent container.”

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

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 1 day ago*

    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 […]

  • source
  • parent