groff/troff: MUH MINIMALIST Documents

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
friendship ended with law Tech now G Roth is my best friend okay so if you watch this channel you know that I have a lot of videos on law tech I have a lot of videos on our markdown I have a lot of videos on markdown and compiling it with pan dock and stuff like that if you never watched any of those it's no big deal but whatever I'm a big proponent of writing documents I guess in the the command line in the terminal or in you know whatever your preferred text editor is and compiling them with some kind of compilation software it is much more extensible it is much more versatile than writing writing something into what you see is what you get editor like word or libre office so I'm very glad that I've gotten a lot of people involved with that kind of stuff but however we have to go deeper because you know law tech Panda call these these things I guess pan doc is using law tech when it's compiling or something like that but you know the thing about law tech is that it is very big it's very bloated I mean to have a full law tech InStyle it install it's like two gigabytes and you may not know this but there is a there is a document formatting service that comes with UNIX platforms by default now on gnu/linux it is called Grof or well someone is gonna in your interject for a moment because it's actually pronounced G off G is a new of course but I just say Groff because I mean I'm a minimalist I don't like using all these syllables you know one is enough so there's Groff on gnu/linux and on non-new systems there is trough that of course came beforehand but in this video I'm gonna talk about you can you can go ahead and look at you know a man page for it you probably have it already installed this is not there's like no resources on this one of the reasons I haven't done a video on this is because I can't like I can't just watch someone else's video and like get the basics I basically had to figure a lot of the stuff out myself because the documentation it's out there but it's it's not very accessible so hopefully this will help you if you're interested in this now anyway so first off it's similar to you you write whatever in a text document there are macros there are shortcuts for formatting stuff and then you compile it like you would law tech except for it's way quicker it is way more efficient it's way more UNIX compliant you can use tech streams and all this stuff now the thing about and one thing you have to keep in mind is if you go to the bottom of the graph manual it mentions there are actually a whole bunch of different macro packages and this means they're gonna be different packages with different commands that do slightly different formatting and stuff like this now one you might be familiar with maybe if you don't even know the word graph is I think either man or man doc that's what people write manuals and you know like this document here you may be familiar with that they're a bunch of other macro formats the one I'm gonna talk about today is graph underscore MSI like this one it just happens to be the one that I was playing around with so I'll show you how it works but all of these sort of work the same without further ado you know we're talking too much let's just get into the action and we'll talk once you understand it we can talk more about the details so I'm gonna make a document I'm gonna call it graph in SI units so some basic macros title is TL so my first row document okay if you want to add an author it's a u so I'm gonna put my author name in here actually I notice that vim is not detecting the file type so I'm gonna okay great it's had to run that and you can put in your institution author institution so let's say University of Arizona etc so this is just like in law tech when you have your title your author your institution command where we can have paragraph text so this is a paragraph I always forget how to type when people are watching so this is really how graph document looks now I'm gonna go ahead and say all the commands this is one this is gonna be really weird when I tell you this but all the commands in in a graph have to be at the beginning of a line now there are good UNIX like reasons for that it's much easier to manipulate these kind of text files if all the commands are at the beginning this is gonna cause some things that look really weird but it happens for a reason and it's very nice so it's gonna just say I'm just saying this because it looks weird right now now I'm gonna pull up now to compile this or I mean since it's so instantaneous it doesn't really feel like it's even compiling but in order to put this into a real document you just run Groff and since we're using the MS macros I'm gonna give it the MS option and I'm gonna select our file and if you just run it it's gonna output all of this stuff this is just postscript by default it outputs in PostScript but let's say who uses PostScript you know whatever I mean we could we could output this to Groth PS or something like that but I'm a PDF fan I think everyone else is that's sort of the standard nowadays so I'm gonna use the T option and output this to PDF format and again by default it's just gonna output to the terminal so you have to say no growth PDF okay so now that is in a file so I'm gonna open this up with my PDF reader PDF and there we go so my first Groff document the title is formatted the user is formatted or the author whatever and the institution and we have our paragraph text so that looks very very nice okay so we can keep going so PPE is paragraph let's say we want a section heading to make one of those we just say in H I guess that's for new heading or something like that I don't know so introduction okay so let's recompile that we'll see we have a section heading and like law tech or something it's the section heading at least in this macro set is automatically numbered so we can have another section heading here so let's say second section and you'll see that it automatically has number two on it now we can also let's see what else can we do here now some things on basic formatting let's say I want to continue this paragraph now I could add some text here that's gonna show up in the paragraph as well or I could go down to the next line a one habit that I found is very useful with writing in law tech or any kind of thing or any kind of like you know the I guess document for matter is it's very nice to like add a sentence add like other sentences to you know the following line and this is just so you can differents a little easier so this way you know we can have another sentence and another and you know something like that so we can very easily like diff them or do other kind of operations on it or detect what's in what document but all of these are gonna be show up in the same paragraph and that's gonna be true unless you make a double space so if I double space this or put two new lines you're gonna see that this is now formatted as a sort of new paragraph it's not going to be indented though if we want indentation you should use the PP command because that is going to indent everything it doesn't really look indented because we don't have that actually I guess we could throw some more text here so you can see that yes both of these are in fact indented okay so anyway that's basic formatting here additionally if you want subsections and they said we want some subsections so I can do in h2 and what that means is a section at the second level so this is a subsection let me capitalize that because of autism or something and go back up here format it and you'll see that this is now 2.1 now keep in mind this 2 here has nothing to do with the 2 that appears here this just means at the second level so if we redo this I mean if we have another section heading here another section heading the 2 just means you know at the the second level from the top now these other NH commands implicitly they have a 1 argument if you put a 1 here it's not gonna change anything because one just means the top level and that's inferred if you don't have anything so that's headings that's paragraphs now if you want to format text if you want to do bolding italics it's just as easy although it's gonna again it's gonna come off this is a little weird let me show you what I mean so let's start a new paragraph here so here some more text I want the word bold to be bold okay now what I'm gonna do here now this is a little strange actually only for simplicity sake I'm gonna get rid of this quotation marks now as I said before all commands all macros have to be initial like line initial so in order to bold this word here what you actually have to do to go down here and you put it on its own line and I'm well I'm gonna put this in quotation marks know what this in effect is doing is this is running the B command on the first argument and I've put this argument in quotation marks these quotation marks are not going to show up I mean I could put in an escaped quotation marks if I wanted them but this is effectively saying run the B macro on this argument or well anyway I'll just show you what it looks like looks like what you would expect this is now bold I could add in of course multiple you know however much stuff I want if I wanted to the this so again this is gonna be a little bit weird because we have to if we want bolding or italics inside of our line we actually have to in the document we have to start a new line put it there and then you know started another new line to continue now again as I said you know this it's it's something you can actually avoid I'll talk about that maybe later maybe in another video but this is just something that makes it easier to do basic stream manipulation if you're sending the output somewhere if you want to perform operations on it if you want to detect what arguments or what what macros are being run it's easier to do do it with this kind of constraint on where they can appear so you know just keep that in mind all right but anyway so we have bolds we can have italic text with by so run that and notice also that even though I typed in dot I since it's not a big at the beginning of a line it's not going to appear as an argument it's just gonna appear as a dot I so you can have at aliquat italic text or let's say this is bold italic text and well I'll put the period in here so we compile that you'll see that now you can check out the manual for more of these kind of macros but this is just the kind of basic formatting there are some other things let's say I want one other thing that they the loft don't have is macros for starting or ending the particular types of formatting let's say we once let's say I'm actually gonna duplicate I'm going to go to this paragraph here and I'm gonna duplicate it I'm just gonna copy it a couple times so just so we have an example all right and we compile that so we have some paragraphs now let's say I wanted this middle paragraph to be indented a little more so one thing we can do for that we can use the try a little confused which one or on we can use RS that means I guess start and and then I don't actually know what the RF it never occurred to me I don't know what the are s stands for but you have RS and you end it with our E and that just means start and in your indent so I'm going to put these commands here I'm gonna run her off again and you'll see that now this paragraph is indented a little bit further in this second paragraph so that's one thing you can do also the beginning of your document you can have an abstract so abstracts are with AE for abstract or TVAAS for abstract start so this is an abstract and AE for in the abstract okay and so I'm gonna really compile that like o8b sorry I guess I messed that up it's really a B for begin instead of a s apologies for that but anyway so we have an abstract here it appears here nice and formatted and we can write however much we want let's see what else but well I think I think this is about it for this video I'm gonna probably do actually I am gonna do more on this so this should give you all you need for basic formatting you can compile it very easily now there are other very useful things so let's say you want to have pictures let's say you want to have citations let's say you want to have tables other things like that to do that kind of stuff that's what the next videos are gonna be on but to do that you have to use what's called a preprocessor now there are other commands besides graph where well we'll just talk about it in the next video the next video I'll talk about citations and probably some other stuff and I'll see you guys next time so stay stay tuned
Info
Channel: Luke Smith
Views: 126,098
Rating: 4.9403644 out of 5
Keywords: pdf, author, latex, underline, markup, bold, rss, groff, minimalism, macos, plaintext, markdown, roff, type, minimalist, minimal, not related, gnu, podcast, macros, title, diff, format, setting, linux, document, italics, emacs, postscript, print, configure, settings, vim, luke smith, macro, tex, bsd, ps, compile, paragraph, openbsd, freebsd, text, troff, formatting, unix
Id: w8EKH_fjmXA
Channel Id: undefined
Length: 13min 21sec (801 seconds)
Published: Sat Oct 27 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.