Draft vertical text in margins
Hello list, I'd like to place the text "DRAFT" in the left and right side margins of every page, rotated 90 degrees so that the text runs vertically. It would be nice if the text was 180 degrees rotated on the right side in comparison to the left margin. I've tried with overlays and I can't seem to get them to work correctly. This should be simple, but as with so many things with ConTeXt it's a bit enigmatic. -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
Am 03.06.24 um 02:45 schrieb Kip Warner:
Hello list,
I'd like to place the text "DRAFT" in the left and right side margins of every page, rotated 90 degrees so that the text runs vertically. It would be nice if the text was 180 degrees rotated on the right side in comparison to the left margin. I've tried with overlays and I can't seem to get them to work correctly.
This should be simple, but as with so many things with ConTeXt it's a bit enigmatic.
* repeated layers * \rotate Please make a M(n)WE that we can enhance. Hraban
you can try 'setuptext' and '\setuptexttexts' to put "draft" in margin.and use 'orientation' to change direction. %%%% \defineframed [marginframe] [width=max, height=max, style=\ss, corner=08, location=lohi, frame=off] \setuptext [style={\ss}] \setuptexttexts [margin] [] [\marginframe{\hbox orientation 1 {DRAFT}}] [\marginframe{\hbox orientation 1 {DRAFT}}] [] \starttext \chapter{C:Some Word} \dorecurse{5}{ \section{S:Some Word} \input knuth} \stoptext %%%
ai2472206007@yeah.net schrieb am 03.06.2024 um 11:35:
you can try 'setuptext' and '\setuptexttexts' to put "draft" in margin.and use 'orientation' to change direction.
%%%% \defineframed [marginframe] [width=max, height=max, style=\ss, corner=08, location=lohi, frame=off] \setuptext [style={\ss}] \setuptexttexts [margin] [] [\marginframe{\hbox orientation 1 {DRAFT}}] [\marginframe{\hbox orientation 1 {DRAFT}}]
There is no need for low level option when you use \rotate, e.g. [\marginframe{\rotate[rotation=270]{DRAFT}}] \framed has a orientation key but it's not so easy to use in this case because you have to set length for width and height, e.g. \defineframed [marginframe] [width=\textheight, height=\rightmarginwidth, orientation=270] Wolfgang
On Mon, 2024-06-03 at 17:04 +0200, Wolfgang Schuster wrote:
ai2472206007@yeah.net schrieb am 03.06.2024 um 11:35:
you can try 'setuptext' and '\setuptexttexts' to put "draft" in margin.and use 'orientation' to change direction.
%%%% \defineframed [marginframe] [width=max, height=max, style=\ss, corner=08, location=lohi, frame=off] \setuptext [style={\ss}] \setuptexttexts [margin] [] [\marginframe{\hbox orientation 1 {DRAFT}}] [\marginframe{\hbox orientation 1 {DRAFT}}]
There is no need for low level option when you use \rotate, e.g.
[\marginframe{\rotate[rotation=270]{DRAFT}}]
\framed has a orientation key but it's not so easy to use in this case because you have to set length for width and height, e.g.
\defineframed [marginframe] [width=\textheight, height=\rightmarginwidth, orientation=270]
Wolfgang
Thank you kindly, Wolfgang et al. Very helpful. -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
Hello Wolfgang,
I've been using your letter module for many years, but I noticed since
upgrading to ConTeXt 2024.06.21 23:32 it seems to have stopped working.
I tried your sample here:
https://wiki.contextgarden.net/Letter#Hraban.E2.80.99s_complicated_logo_and_...
When I try to typeset it, I see the following:
$ context minimal.tex
resolvers | formats | executing runner 'run luametatex format': /home/kip/.local/non-fhs/context/tex/texmf-linux-64/bin/luametatex --jobname="./minimal.tex" --socket --shell-escape --fmt=/home/kip/.local/non-fhs/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/kip/.local/non-fhs/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./minimal.tex" --c:input="./minimal.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/kip/.local/non-fhs/context/tex/texmf-linux-64/bin"
system >
system > ConTeXt ver: 2024.06.21 23:32 LMTX fmt: 2024.6.21 int: english/english
system >
system > 'cont-new.mkxl' loaded
open source > level 1, order 1, name '/home/kip/.local/non-fhs/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > beware: some patches loaded from cont-new.mkiv
close source > level 1, order 1, name '/home/kip/.local/non-fhs/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system > files > jobname './minimal', input './minimal.tex', result './minimal'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > level 1, order 2, name './minimal.tex'
modules > 'letter' is not found
fonts > preloading latin modern fonts (third stage)
fonts > 'fallback modern rm 10pt' is loaded
tex error > tex error on line 10 in file ./minimal.tex: Undefined control sequence
Am 26.06.24 um 02:12 schrieb Kip Warner:
Hello Wolfgang,
I've been using your letter module for many years, but I noticed since upgrading to ConTeXt 2024.06.21 23:32 it seems to have stopped working.
I tried your sample here:
https://wiki.contextgarden.net/Letter#Hraban.E2.80.99s_complicated_logo_and_...
Hi Kip, as the title says it’s my sample. I’ve no problems with the module in LMTX 2024.06.18 or 2024.06.21, neither with my usual letters nor with the example. Usually, there should be some log lines that tell you about the loading of the module: modules > 'letter' is loaded open source > level 2, order 3, name '/Users/hraban/context/tex/texmf-modules/tex/context/third/letter/base/s-cor-01.mkvi' Please check if the module is there and re-generate the file database. Hraban
On Wed, 2024-06-26 at 08:31 +0200, Henning Hraban Ramm wrote: Hey Henning,
I’ve no problems with the module in LMTX 2024.06.18 or 2024.06.21, neither with my usual letters nor with the example.
Usually, there should be some log lines that tell you about the loading of the module:
modules > 'letter' is loaded open source > level 2, order 3, name '/Users/hraban/context/tex/texmf- modules/tex/context/third/letter/base/s-cor-01.mkvi'
Please check if the module is there and re-generate the file database.
It looks like it is not. I followed these instructions for installation of ConTeXt on a 64-bit GNU/Linux system: https://wiki.contextgarden.net/Installation#GNU.2FLinux_2 I notice that the context/tex/texmf-modules directory exists, but there is nothing in it, after the installation completes. Is there an argument that needs to be passed to ./install.sh perhaps? -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
Kip Warner schrieb am 26.06.2024 um 21:08:
On Wed, 2024-06-26 at 08:31 +0200, Henning Hraban Ramm wrote:
Hey Henning,
I’ve no problems with the module in LMTX 2024.06.18 or 2024.06.21, neither with my usual letters nor with the example.
Usually, there should be some log lines that tell you about the loading of the module:
modules > 'letter' is loaded open source > level 2, order 3, name '/Users/hraban/context/tex/texmf- modules/tex/context/third/letter/base/s-cor-01.mkvi'
Please check if the module is there and re-generate the file database. It looks like it is not. I followed these instructions for installation of ConTeXt on a 64-bit GNU/Linux system:
https://wiki.contextgarden.net/Installation#GNU.2FLinux_2
I notice that the context/tex/texmf-modules directory exists, but there is nothing in it, after the installation completes. Is there an argument that needs to be passed to ./install.sh perhaps?
https://wiki.contextgarden.net/Modules#Installation_by_script_.28LMTX.29 Wolfgang
On Wed, 2024-06-26 at 21:17 +0200, Wolfgang Schuster wrote:
https://wiki.contextgarden.net/Modules#Installation_by_script_.28LMTX.29
Thank you greatly, Wolfgang. That worked! Will the modules automatically update when I run ./install.sh, or do I need to periodically run the following? $ mtxrun --script install-modules --install --all -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
On 6/26/24 21:33, Kip Warner wrote:
[...] Will the modules automatically update when I run ./install.sh, or do I need to periodically run the following?
$ mtxrun --script install-modules --install --all
Hi Kip, you need the second option. Cheers, Pablo
On Wed, 2024-06-26 at 21:46 +0200, Pablo Rodriguez wrote:
Hi Kip,
you need the second option.
Cheers,
Thanks Pablo. I wonder if it might be helpful if the modules were installed by default since they're not that numerous or large in size? -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com
participants (5)
-
ai2472206007@yeah.net
-
Henning Hraban Ramm
-
Kip Warner
-
Pablo Rodriguez
-
Wolfgang Schuster