Improve Your Groff and Troff Pipeline - Using a Shell Script and Makefiles

Ғылым және технология

This is the 14 in a series of videos taking you from a beginner to a pro at using Troff/Groff.
This tutorial is focused on helping understand the pipeline used in troff programs.
Compiler Script:
github.com/Gavinok/scripts/bl...
Luke Smith's Compiler:
github.com/LukeSmithxyz/voidr...
Makefile Shown In This Video:
gist.github.com/Gavinok/c5df6...
Makefile Templates:
github.com/Gavinok/dotvim/tre...
Let me know what you think and if there is anything specific you would like to learn about.
Github: www.github.com/gavinok
vimrc: github.com/Gavinok/dotvim
lbry: open.lbry.com/@GavinFreeborn:...
/ creator-home
Discord: / discord
⏱️TIMESTAMPS⏱️
00:00:00 Intro
00:01:15 Script Explanation
00:02:52 Using The Script
00:03:11 Tip For Using With Vim
00:03:44 Alternate Between Compiler And Make
00:04:26 Setting Up A Makefile
00:05:07 Using Suffix Rules
00:06:00 .SUFFIXES:
00:07:22 Abstracting From Groff
00:08:23 Setting Up Your Preprocessors
00:11:51 Porting This To Neatroff
00:14:17 Adding A Clean Command
00:17:53 Creating Makefiles Faster
00:20:45 Outro

Пікірлер: 30

  • @Antonio-mn5pq
    @Antonio-mn5pq Жыл бұрын

    Best video i've seen about *roff. Your explanations are very clear, rich and to the point. Thank you, man. Keep up with the good work ;)

  • @MIInDsEthiopia
    @MIInDsEthiopia9 ай бұрын

    bro became like crack for me mate, been just watching all his videos

  • @finndriver1063
    @finndriver10633 жыл бұрын

    Hey, I love your videos! As a long-time groff/*TeX user, it's nice to see some newbie-friendly content, I think it's what *roff lacks most as a community. I'd be interested to hear your thoughts on some alternative build systems; personally make doesn't butter my egg roll, though I'm intrigued by your async Make. Specifically, I use tup for large projects, which uses graph theory for fast multi-dir compilation and cool tricks like needing no 'clean:' target. A djb redo clone handles most of my personal stuff, it's simple and unix-y in it's approach; Kai Hendry has a great introductory video that you may have seen. It's especially nice for many-pass LaTeX, since it can recurse until the aux stabilise. Justfiles & just are great for existing build systems, e.g. rebar3 for Erlang projects, dub for D projects. It's a bit like make without .PHONY targets, and some nice modern quality-of-life features. Slowly, I'm also coming around to Prog21's Micro-Build System philosophy, though it's not exactly robust.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    This sounds really interesting! I'll probably show off my async make set up soon. I'm gonna have to look into some of these tools since some of make's choices can really slow down my workflow. Thanks for the through response!

  • @lionwolf
    @lionwolf3 жыл бұрын

    Whating video about formating pandoc + groff template (font size, numerating, toc, images and tables names position etc...) Thank you for good tutorials)!

  • @0x7eb5
    @0x7eb53 жыл бұрын

    Waiting for that font configuration tutorial for eqn symbols. The square root symbol is seriously killing me. I am jealous of latex math formatting

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    I think if math is a high priority I would take a look at neatroff. I myself have been moving towards it. It is small fast and can produce math close/identical to that of TeX.

  • @0x007A
    @0x007A3 жыл бұрын

    You're pacing is like the Mexican cartoon mouse named Speedy Gonzales. Otherwise, the content is really helpful and certainly appreciated.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Haha sorry if I go a bit fast I try to keep the videos as short as I can to avoid wasting people's time but sometimes going too fast can do that anyways 😅. Happy you liked it!

  • @PestisNonSapien_GMO_exHuman
    @PestisNonSapien_GMO_exHuman3 жыл бұрын

    Sorry, but for some reason I'm failing to see why I would use groff. Could you explain the benefits or reasons why you use it?

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    What are you comparing it to exactly?

  • @humm535

    @humm535

    3 жыл бұрын

    Perhaps you would like an easy way of creating beautiful documents.

  • @PestisNonSapien_GMO_exHuman

    @PestisNonSapien_GMO_exHuman

    3 жыл бұрын

    Isn't that what libreoffice is for? :) I wouldn't call writing scripts to make a document easy. Fun maybe, but not easy. I could see it as a cool geeky way to write a resume. But not seeing anything other than that.

  • @humm535

    @humm535

    3 жыл бұрын

    @@PestisNonSapien_GMO_exHuman That is _probably_ not what LO is for and it _is not_ what LO does. With LO, you can quickly write short documents. They don’t look very good, you have little control over the exact look, and it is a pain to use, especially when the document is not very small. Troff is not too hard to use (though parts of the syntax are quite annoying), especially not with a good macro package; and you can create _beautiful_ documents quite easily. What people are doing with LO would be better off being just text files.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    @@PestisNonSapien_GMO_exHuman Oh ya I can definitely show the pros and cons in that respect.

  • @humm535
    @humm5353 жыл бұрын

    Compared to your voice, the intro is way, way too loud.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    Ya heard that one. I should have double checked the levels before posting.

  • @Investmentmessiah

    @Investmentmessiah

    3 жыл бұрын

    @@GavinFreeborn nice intro tho

  • @howhuiliew164
    @howhuiliew1643 жыл бұрын

    This is not really a good promotion video on Groff. Is it possible to have verbatim input in Groff? How to format a code nicely in Groff? In LaTeX, there is the listings package. Unless Groff has more powerful support for Unicode (with multicons), code listings, graphics so that some LaTeX users can move to Groff when they don't need mathematical equations, otherwise, Groff is not very convincing. One of the power of Groff is the support of generating nice manpages both in terminal and as PDF. But these days programmers prefer Asciidoc or Markdown for this purpose.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    This video is ment to be informative rather than promotional. On another note yes you can do all of that. Sadly Groff can do all of that the only issue is it's Unicode support is not the best. You would want to take a look at neatroff if that is a high priority since it was built from the ground up with that in mind. On top of that math equations are perfectly possible in Groff and can be written much faster. Neateqn (the tool that does math in eqn) even supports using Tex math symbols and most of TeX's math features.

  • @howhuiliew164

    @howhuiliew164

    3 жыл бұрын

    @@GavinFreeborn Sadly I can't get neatroff nor Groff to support Chinese yet. The only tool that I manage to get Chinese type is Heirloom doctools. So far, I only use troff to generate a document with tables only. Troff is lightweight and powerful but most of us just don't know how to use its power. I really hope that you will continue to introduce the power of troff. Keep up the good work.

  • @GavinFreeborn

    @GavinFreeborn

    3 жыл бұрын

    @@howhuiliew164 haha thanks I really need to look into writing Chinese in neatroff since it should help other languages that use a similar fonts.

  • @humm535

    @humm535

    3 жыл бұрын

    Groff sucks. Use 9front troff. It has all you need.

  • @humm535

    @humm535

    3 жыл бұрын

    @@GavinFreeborn Stop promoting groff that much. Too many people only think of groff.

Келесі