Customizing groff/troff Macros and Other Basics

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Oh, and by the way: You can also pipe the groff output directly into zathura `groff ... | zathura -` so you don't have to save that pdf file.

sirjofri
Автор

I use a separate keyboard for my macro keys

__alfie__
Автор

Sweet! I'm getting started with my undergraduate dissertation pretty soon so I look forward to seeing how easy it is to reference with a system like this...

DavidMynors
Автор

If you are into that kind of stuff, read "UNIX Text Processing", O'Reilly. It's available freely online. It took me 15 min to learn enough AWK to make a 50 line program that write groff / -me from plain text or markdown. And I get the same result I got used to with pandoc with it's 1G deps. Old school UNIX ways of doing things is awesome!

Erel
Автор

Talking about groff without talking about the mom macro is like talking about TeX without talking about LaTeX. Mom is a quite useful attempt at modernizing the troff experience making it really a truly viable alternative to LaTeX. I've switched to groff with mom for every typesetting need I have and never looked back.

azechele
Автор

So many uploads. Which one of us tracked him down and is now holding him hostage?

redd_cat
Автор

Quick tip: I use the inotifywait binary found in inotify-tools with a shell while loop to recompile (R markdown, in my case) documents on file change. It makes it much more convenient when editing.

AvrittRohwer
Автор

Wow groff is just getting more impressive! Does it have a great referncing system like LaTeX?

cannedeals
Автор

Hey, Luke. Thanks for your videos. I've been experimenting with groff, and when I input text in other languages (Portuguese and Spanish, for the most part), the compiled pdf doesn't look right. How do I add that support for other languages?

Tks

gabrielborin
Автор

With the .IP macro, you don't actually need to set the spacing for each element individually, it's inherited from one to the other because it's reading a variable rather than a character.
Also, the extension for macro files is (I believe) .tmac, though it doesn't really matter too much

finndriver
Автор

Nice introduction video.
You can use ruby with gem guard-shell to automate rebuild based on changes of choosen files. I use this for latex and themes re-generation.

akemrir
Автор

This is seeming more and more like a better alternative to LaTeX. The lack of bloat is really appealing, but the formatting is still a negative for me.

I'm still looking forward to the next video though, you do a great job of explaining stuff without a lot of bullshit added in.

samanerajacob
Автор

Hey Luke, I'm really enjoying these videos on groff, could you do one on referencing/citing maybe even quotes. I'm about to write my first university assignment and I was going to use Rmarkdown, but this seems so much better. Thanks in advance.

blixuk
Автор

The R Markdown/pandoc stuff seemed more convenient though.

ltxr
Автор

You don't need to recompile you document each time manually, just try entr(1) and it will execute any command when you save your file

AleksyGrabovski
Автор

I put this on the last video, but could you touch on the -mom macro set (rather than -ms). They are far more powerful, but easier to use than ms.

finndriver
Автор

Do you know how to compile a PDF with special characters (like äöü) with groff?

mhomssz
Автор

You might want to make an augroup to auto compile your documents on buffer write. Something (*very* loosely) like this in your vimrc, or your This way you don't have to keep a separate terminal open and have to continuously switch back and forth to it to compile your documents.

augroup Make_Groff_PDF
autocmd!
autocmd BufWritePost *.{ms, <other groff file types here>} exec ":!groff -ms ".expand('%')." -T pdf > ".expand('<%').".pdf"
augroup END

The `.expand('%')` gets the file name in the current buffer with the file extension and the `.expand('<%')` gets the filename without the file extension.

PS I LOVED your pandoc series, and as a college student, I'm loving this series as well!

BubbaLichvar
Автор

Have you figured out images? I can get the outline of pics but no actual image.

romydrah
Автор

Having problems with numbered lists which I was hoping you'd cover. I am experimenting with Groff to format my recipes and the ingredients are unnumbered - they are fine - the method I number so I did it by hand for my experiment but is there a sneaky method for this?

I used ".IP /<number>" which is not terribly efficient.

johncrwarner