• One-Page Dungeon format in groff?

    From Laurens Kils-Huetten@21:1/5 to All on Sat Aug 13 08:40:11 2022
    Hello Dungeon Delving UNIX Afficionados,

    yesterday I once more discoverered, how ridiculously fast groff
    is compared to other typesetting toolchains like LaTeX, Python +
    weasyprint or whatever.

    Since I enjoy using fast UNIX tools to build some dungeons in my
    spare time, I wonder how much work it'll take to reproduce the
    classic One Page Dungeon layout in groff. Just in case you don't
    know, the layout would simply look like this:

    -------------------------------
    | --------------- Table with |
    || | random |
    || Map of the | encounters, |
    || | various |
    || Dungeon | general |
    || | descriptions|
    || Level | of the level|
    || | And finally |
    | --------------- a key with |
    | descriptions of each |
    | individual room of the |
    | dungeon. Basically it's a |
    | page, with one top-left |
    | aligned image and text |
    | floating around the image. |
    | That shouldn't be too hard. |
    | Nothing fancy really ... |
    --------------------------------

    The text might extend to the facing uneven page, thus creating a
    two page spread for the level.

    Of course I tried what groff seems to deliver out of the box, but
    I find that displays typically use up a page width, or column
    width, with text continuing below the image, but not floating
    around the image like i've shown.

    So, any ideas how to do this in groff? Maybe one of the common
    macro packages already supports this kind of layout, only I
    haven't discoverered it, yet?

    Thanks in advance,
    cheers,

    ~lkh

    --
    https://sdf-eu.org/~lkh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Laurens Kils-Huetten@21:1/5 to Laurens Kils-Huetten on Sat Aug 13 22:26:47 2022
    Laurens Kils-Huetten <lkh@sdf-eu.org> wrote:
    Since I enjoy using fast UNIX tools to build some dungeons in my
    spare time, I wonder how much work it'll take to reproduce the
    classic One Page Dungeon layout in groff. Just in case you don't
    know, the layout would simply look like this:

    -------------------------------
    | --------------- Table with |
    || | random |
    || Map of the | encounters, |
    || | various |
    || Dungeon | general |
    || | descriptions|
    || Level | of the level|
    || | And finally |
    | --------------- a key with |
    | descriptions of each |
    | individual room of the |
    | dungeon. Basically it's a |
    | page, with one top-left |
    | aligned image and text |
    | floating around the image. |
    | That shouldn't be too hard. |
    | Nothing fancy really ... |
    --------------------------------

    So after some digging around in the archives, and cracking open
    *UNIX Text Processing* by Dougherty and O'Reilly, here's my basic
    proof of concept: https://ttm.sh/qhr.png

    Macros follow, cheers! ~lkh

    .\" Macros to typeset One Page Dungeons
    .\" in groff
    .\"
    .de opdMap \" start with the map
    .br
    .mk a \" Mark current position
    .PSPIC -L \\$1 4i \" insert map image 4 inches wide
    .br
    .mk b \" Mark lower edge of map
    ..
    .de opdSB \" start the side bar
    .sp |\\nau \" move back to mark a
    .in +4.2i \" increase indent by 4.2 inches
    . \" left margin is now just right
    . \" of the map
    .ft R
    ..
    .de opdH \" section header for opd stuff
    .sp 1v
    .ft B
    ..
    .de opdLB \" opd begin entries
    .ft R
    .in +1.3
    .br
    ..
    .de opdLI \" opd list entries
    .br
    .ti -1.3
    ..
    .de opdLE \" opd end list
    .in -1.3
    .br
    ..
    .de opdEN \" end of special opd stuff
    .br \" break line, just to make sure
    .sp |\\nbu \" move to mark b
    . \" that's the lower edge of the map
    . \" we marked above
    .sp 1v
    ..

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frotz@21:1/5 to Laurens Kils-Huetten on Tue Aug 16 16:06:36 2022
    On 8/13/2022 6:26 PM, Laurens Kils-Huetten wrote:
    Laurens Kils-Huetten <lkh@sdf-eu.org> wrote:
    Since I enjoy using fast UNIX tools to build some dungeons in my
    spare time, I wonder how much work it'll take to reproduce the
    classic One Page Dungeon layout in groff. Just in case you don't
    know, the layout would simply look like this:

    -------------------------------
    | --------------- Table with |
    || | random |
    || Map of the | encounters, |
    || | various |
    || Dungeon | general |
    || | descriptions|
    || Level | of the level|
    || | And finally |
    | --------------- a key with |
    | descriptions of each |
    | individual room of the |
    | dungeon. Basically it's a |
    | page, with one top-left |
    | aligned image and text |
    | floating around the image. |
    | That shouldn't be too hard. |
    | Nothing fancy really ... |
    --------------------------------

    So after some digging around in the archives, and cracking open
    *UNIX Text Processing* by Dougherty and O'Reilly, here's my basic
    proof of concept: https://ttm.sh/qhr.png

    Macros follow, cheers! ~lkh

    .\" Macros to typeset One Page Dungeons
    .\" in groff
    .\"
    .de opdMap \" start with the map
    .br
    .mk a \" Mark current position
    .PSPIC -L \\$1 4i \" insert map image 4 inches wide
    .br
    .mk b \" Mark lower edge of map
    ..
    .de opdSB \" start the side bar
    .sp |\\nau \" move back to mark a
    .in +4.2i \" increase indent by 4.2 inches
    . \" left margin is now just right
    . \" of the map
    .ft R
    ..
    .de opdH \" section header for opd stuff
    .sp 1v
    .ft B
    ..
    .de opdLB \" opd begin entries
    .ft R
    .in +1.3
    .br
    ..
    .de opdLI \" opd list entries
    .br
    .ti -1.3
    ..
    .de opdLE \" opd end list
    .in -1.3
    .br
    ..
    .de opdEN \" end of special opd stuff
    .br \" break line, just to make sure
    .sp |\\nbu \" move to mark b
    . \" that's the lower edge of the map
    . \" we marked above
    .sp 1v
    ..

    I always forget about troff/groff, but it's such an obvious choice. Your
    proof of concept looks great - the next time I feel compelled to create
    a "Planet Eris"-style OD&D campaign book I will give it a shot.

    Thank you for sharing the macros - these are great!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frotz@21:1/5 to Laurens Kils-Huetten on Tue Aug 16 16:07:19 2022
    On 8/13/2022 6:26 PM, Laurens Kils-Huetten wrote:
    Laurens Kils-Huetten <lkh@sdf-eu.org> wrote:
    Since I enjoy using fast UNIX tools to build some dungeons in my
    spare time, I wonder how much work it'll take to reproduce the
    classic One Page Dungeon layout in groff. Just in case you don't
    know, the layout would simply look like this:

    -------------------------------
    | --------------- Table with |
    || | random |
    || Map of the | encounters, |
    || | various |
    || Dungeon | general |
    || | descriptions|
    || Level | of the level|
    || | And finally |
    | --------------- a key with |
    | descriptions of each |
    | individual room of the |
    | dungeon. Basically it's a |
    | page, with one top-left |
    | aligned image and text |
    | floating around the image. |
    | That shouldn't be too hard. |
    | Nothing fancy really ... |
    --------------------------------

    So after some digging around in the archives, and cracking open
    *UNIX Text Processing* by Dougherty and O'Reilly, here's my basic
    proof of concept: https://ttm.sh/qhr.png

    Macros follow, cheers! ~lkh

    .\" Macros to typeset One Page Dungeons
    .\" in groff
    .\"
    .de opdMap \" start with the map
    .br
    .mk a \" Mark current position
    .PSPIC -L \\$1 4i \" insert map image 4 inches wide
    .br
    .mk b \" Mark lower edge of map
    ..
    .de opdSB \" start the side bar
    .sp |\\nau \" move back to mark a
    .in +4.2i \" increase indent by 4.2 inches
    . \" left margin is now just right
    . \" of the map
    .ft R
    ..
    .de opdH \" section header for opd stuff
    .sp 1v
    .ft B
    ..
    .de opdLB \" opd begin entries
    .ft R
    .in +1.3
    .br
    ..
    .de opdLI \" opd list entries
    .br
    .ti -1.3
    ..
    .de opdLE \" opd end list
    .in -1.3
    .br
    ..
    .de opdEN \" end of special opd stuff
    .br \" break line, just to make sure
    .sp |\\nbu \" move to mark b
    . \" that's the lower edge of the map
    . \" we marked above
    .sp 1v
    ..

    I always forget about troff/groff, but it's such an obvious choice. Your
    proof of concept looks great - the next time I feel compelled to create
    a "Planet Eris"-style OD&D campaign book I will give it a shot.

    Thank you for sharing the macros - these are great!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Laurens =?ISO-8859-1?Q?Kils=2DH=FCt@21:1/5 to Frotz on Thu Aug 18 07:52:49 2022
    Frotz <frotz.self@gmail.com> wrote:
    I always forget about troff/groff, but it's such an obvious choice. Your proof of concept looks great - the next time I feel compelled to create
    a "Planet Eris"-style OD&D campaign book I will give it a shot.

    I'm looking forward to that one :D

    Thank you for sharing the macros - these are great!

    It was fun getting this to work. The macro made it to one of the "official" groff example pages:

    https://www.froude.eu/groff/examples/one-page-dungeon.html

    Cheers,

    lkh


    --
    https://octodon.social/web/@lkh
    IRC: lkh on Libera.chat and others
    Discord: lkh#2319

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kyonshi@21:1/5 to All on Wed Nov 30 20:22:13 2022
    On 18/08/2022 09:52, Laurens Kils-Hütten wrote:
    Frotz <frotz.self@gmail.com> wrote:
    I always forget about troff/groff, but it's such an obvious choice. Your
    proof of concept looks great - the next time I feel compelled to create
    a "Planet Eris"-style OD&D campaign book I will give it a shot.

    I'm looking forward to that one :D

    Thank you for sharing the macros - these are great!

    It was fun getting this to work. The macro made it to one of the "official" groff example pages:

    https://www.froude.eu/groff/examples/one-page-dungeon.html

    Cheers,

    lkh



    How does that actually look like in the end? Do you have a sample for that?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Laurens =?ISO-8859-1?Q?Kils=2DH=FCt@21:1/5 to kyonshi on Tue Dec 6 17:43:52 2022
    kyonshi <gmkeros@gmail.com> wrote:

    How does that actually look like in the end? Do you have a sample for that?

    yes, it's here: https://ttm.sh/qhr.png

    --
    Laurens Kils-Hütten
    https://sdf-eu.org/~lkh

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From kyonshi@21:1/5 to All on Tue Dec 6 19:54:51 2022
    On 06/12/2022 18:43, Laurens Kils-Hütten wrote:
    kyonshi <gmkeros@gmail.com> wrote:

    How does that actually look like in the end? Do you have a sample for that?

    yes, it's here: https://ttm.sh/qhr.png

    that looks very neat, if a bit basic. But that doesn't have to be bad. I
    think this could be useful.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)