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
textposdocs mention that care is taken to put the objects into the background and that theoverlayoption 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.


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.
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.
I do believe you’re looking for the place function for this. 🙂
That page starts with:
That sounds the same as what LaTeX does, which is the problem.
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. 😊