topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday May 12, 2024, 10:48 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: groffstudio: An IDE for the GNU troff typesetting system.  (Read 7587 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
This has been out in the wild for a few weeks, and I plan to maintain it for a few more months at least :P, so I won't wait for NANY 2023 to announce it here:

groffstudio_hLsp0Sa2FM.png

groffstudio is the least bad (and only) IDE for GNU troff, a free implementation of the standard POSIX typesetting system (see Wikipedia et al.).



Website (which is very beautiful as well)



While one could debate whether Linux, BSD and UNIX users would even need this (they usually use make or Mk for that), using groff on Windows is not quite as trivial: First you'll need to find and install groff with all required dependencies, then you'll need to learn how to use it on the command line without having access to the manual, because man does not exist on Windows. groffstudio has a button to download groff right from my servers - just unpack it somewhere in your %PATH% and you're good to go. (It will check whether it's there.)

Features:
  • Has a large button to generate .ps or .pdf files (the latter requires Ghostscript on Windows, can use Ghostscript pr pdfroff on other systems).
  • Can help you install groff on Windows.
  • Has built-in update checks (optional, off by default).
  • Written in Free Pascal, using the LCL widget set, to make portability easier.
    Precompiled binaries for Windows and macOS exist, contributions are welcome.

Non-features:
  • Support for other troff implementations, like neatroff and Heirloom troff.
    Maintaining a GUI for one troff which has a relatively reliable set of installed features is hard enough.
  • A preview mode, as known from LaTeX editors like TeXstudio.
    Previewing requires compilation. Just compile.  :D
  • A formatting toolbar.
    As groff has a standard set of formatting commands, but all of its macro packages (and some preprocessors) come with their own set of additional commands, that would be either not helpful or awkward.

Enjoy or whatever.
« Last Edit: April 30, 2024, 07:44 AM by Tuxman »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,613
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #1 on: March 14, 2022, 02:36 PM »
All of your design skills in one place ;D

No kidding, I like it for it's plain vanilla interface. :Thmbsup:

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #2 on: March 14, 2022, 03:10 PM »
Good!  8)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #3 on: January 11, 2024, 06:07 AM »
Changelog for the upcoming 0.13.0 release, to be uploaded some time between "in four hours" and "in twelve hours":

[Feature] Support for hdtbl.
[Changed] Build extras and build preprocessors are now listed in a multi-select box.
[Improved] If no error has occurred, the log file will contain a success message.
[Improved] The default font looked gross on macOS. This should be better now.
[Bugfix] Calling troff over the system default shell now, potentially finding more paths.
[Improved] BuildDocument uses a simpler execution approach now.
[Feature] macOS Cmd+X/C/V are supported now.
[Feature] Added a loading window so you won't think groffstudio would procrastinate.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #4 on: January 29, 2024, 12:26 PM »
0.13.1 is there. Replaced the new loading window by a threaded process.

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #5 on: March 02, 2024, 07:02 PM »
I'm having a few minor problems with using groffstudio on Windows 10.

The link to groff was greyed out, but I downloaded groff-1.22.4-w32-bin from here. I copied the files to C:\programs\groff\ and added C:\programs\groff\bin\ to my path.

I am able to load man page files in groffstudio, but it can only convert them to PostScript, not PDF format. The pdfroff file is in programs\groff\bin so it should be found by the system.

If a PDF file does get created, it is around 2Kb in size (regardless of the input file size) and appears blank in Firefox.
« Last Edit: March 02, 2024, 10:40 PM by wysardry, Reason: missing word added »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #6 on: April 29, 2024, 05:30 PM »
That sounds like a problem indeed. Do you have a ps2pdf.exe somewhere in your path? I might have to change the build process for Windows...
... turns out native pdfroff just isn't.  :(

(n.b.: 0.13.2 is released, but that won't fix the problem at hand.)
« Last Edit: April 29, 2024, 05:42 PM by Tuxman »

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #7 on: April 29, 2024, 11:02 PM »
It doesn't look like I have ps2pdf.exe anywhere on my hard drive. I've been using gsview with Ghostscript to convert from PostScript to PDF.

I did notice that on the groff-1.22.4-w32 section of the ezwinports page it says:-

Note: this distribution was built without Ghostscript being installed, so the HTML back-end (grohtml) and the PDF formatter (pdfroff) were not tested, and might even not work due to some missing file or font.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #8 on: April 30, 2024, 03:06 AM »
That’s unfortunate. I mean, my implementation of running the groff tools is not exactly fail-safe yet.

But as you already have Ghostscript, I see a potential positive outcome for me…  ;D

edit: See below...
« Last Edit: April 30, 2024, 04:33 AM by Tuxman »

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #9 on: April 30, 2024, 03:32 AM »
It's much easier to start gsview, load the .ps file from the menu and then export it as a PDF.  ;)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #10 on: April 30, 2024, 03:55 AM »
Probably. The goal of groffstudio is to have one button right on the editor though.  ;D
Anyway: I found a Windows machine and I'll see what I can do... :) thanks for the report.
« Last Edit: April 30, 2024, 04:07 AM by Tuxman »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #11 on: April 30, 2024, 04:30 AM »
How's this?
edit: Yes, it always tries to make a PDF file. This is only for testing. :)

edit: replaced
« Last Edit: April 30, 2024, 07:25 AM by Tuxman »

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #12 on: April 30, 2024, 05:02 AM »
I get an error at startup saying "On Windows, for creating PDF files, you need GhostScript installed. Sadly, groffstudio could not find ps2pdf.exe in your %PATH%, so writing PDF files will not be supported."

As mentioned before, I do have GhostScript (10.02.1) installed, but it does not have a ps2pdf.exe file.

There is a ps2pdf.bat file in its lib subdirectory, but only "C:\Program Files\gs\gs10.02.1\bin" is in the PATH. The bin directory contains gswin64.exe, gswin64c.exe, gsdll64.dll and gsdll64.lib only.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #13 on: April 30, 2024, 05:09 AM »
The message is wrong, indeed. Of course, it’s .bat, not .exe.

What I just tested was:
  • Install Ghostscript from scoop (which tries to add ps2pdf to the PATH, it seems),
  • then run ps2pdf (no extension…  ;D) from inside groffstudio.

Worked for me…

So the message should probably rather be: “ps2pdf could not be found, please install Ghostscript and make sure that the folder that contains the ps2pdf command is in your PATH” AFAICS?

(I’m actually at work, sorry for being somewhat distracted here.)

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #14 on: April 30, 2024, 05:36 AM »
Okay, I added "C:\Program Files\gs\gs10.02.1\lib" to the PATH environment variable and had no error message when starting groffstudio.

I loaded a man file, set the output format to PDF and then clicked "build".

This produced a PostScript file and a PDF file. I was able to view the .ps file in gsview and the .pdf file in Firefox without problems.

Setting the output format to PostScript also built both files.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #15 on: April 30, 2024, 05:39 AM »
Makes sense. (As I said, this is a debug build. The final version will get rid of the intermediate .ps file and/or won’t try to build a .pdf file, probably to be released tomorrow.)

Thank you and sorry for being slow today - you helped me a lot!

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #16 on: April 30, 2024, 05:51 AM »
No problem. Having both files built could be useful.

Maybe you could add a "both" option to the output format selection. :)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #17 on: April 30, 2024, 06:01 AM »
Good idea, actually. I will add that option. :)
edit: In order to not clutter the GUI any further, I'll add it to the settings screen.
« Last Edit: April 30, 2024, 06:37 AM by Tuxman »

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #18 on: April 30, 2024, 07:03 AM »
Like this?
edit: replaced
« Last Edit: April 30, 2024, 07:24 AM by Tuxman »

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #19 on: April 30, 2024, 07:15 AM »
For some reason, it only builds one file each time now, no matter how I set "keep the postscript file after creating the pdf file".

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #20 on: April 30, 2024, 07:24 AM »
Ugh.  ;D
No, it actually created both files, but ...

Code: Text [Select]
  1. if buildSuccess and not chkKeepPostscriptFile.Checked then;     // <<< the ";" ends the command...
  2.     DeleteFile(outputFileName); // get rid of the .ps file

But yay, we're getting there!
« Last Edit: April 30, 2024, 07:41 AM by Tuxman »

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #21 on: April 30, 2024, 04:36 PM »
We're nearly there. Changing the setting does allow the PostScript file to be kept when exporting as a PDF now.

Unfortunately, saying you don't want to keep the PostScript file will cause a previously built one to be deleted.

In other words, if it isn't set to keep PostScript files and you build a PostScript file then a PDF one (from the same man file), you lose the PostScript file.

If you build the PDF file first, you don't have this issue, of course.

Bill Gates would call this a feature, not a bug. ;)

Warning about this in the settings would be the easiest workaround.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #22 on: May 01, 2024, 01:40 AM »
Well, it won’t keep track of which files were built previously, so that’s (technically) working as expected.  ;D A note would be the only thing I can do about it without adding a whole version control system, I guess. But I won’t be on Windows before tomorrow, so one day more until the next release…

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,478
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #23 on: May 02, 2024, 12:37 PM »
0.14.0 released.

wysardry

  • Participant
  • Joined in 2024
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: groffstudio: An IDE for the GNU troff typesetting system.
« Reply #24 on: May 02, 2024, 10:41 PM »
I just tried version 0.14.0 and everything works as expected, given the warning message about deleting PostScript files. :)