 Alright, what's up everyone? So I was just about to record a video on how to do references automatically with Groff. And before I do that though, I want to show you exactly how efficient, how nice this system is. And so in this video, I'm going to compare formatting a document with Groff and refer to do bibliographies with compiling a document with LaTeX using Biber or BibLaTeX, whatever it is, to do references. Now if you watch my channel, you know I have a lot of videos on LaTeX, I highly recommend LaTeX. LaTeX is what basically every serious person who has to do formatting, type setting, uses in academia, in the sort of real world, it's the next step after you finish using Google Docs or Word or whatever silly thing people use nowadays. It's highly extensible, you can do a lot of stuff with it. But Groff is not only built into Unix systems by default, but it's still, there is a whole lot of efficiency in this system. So in this video I'm going to show you, give you a slice of what that is. Now those of you who use LaTeX know, well here you'll see in front of you, I have a Groff document on the left and a LaTeX document on the right. And the important thing is I have a reference in both of these, it's actually the same reference. And I just want to format these documents. So I want to compare these head to head. Now if you're a LaTeX user, you know in order to actually format a reference in LaTeX, it's actually a little, confusing or not confusing, it's sort of inefficient. That is in order to compile a document with references. You have to first compile the document with PDF LaTeX and create a PDF with it. In the process of that it creates a bunch of build files. And those build files will document what kind of references it needs. Then you run Biber or whatever your bibliography manager is. And it will find those references in your given bibliography file. Then after that you run PDF LaTeX again and it will correctly compile the PDF with all of the references. Then after that sometimes if you have a bunch of Croff references you have to run PDF LaTeX a third time. So that's what you do in LaTeX and if you use LaTeX you just sort of get used to the fact that you have to do that to create a bibliography properly. Now on the other hand, Croff has a good Unix utility, everything is stream-based and there are a bunch of little programs that do very little text manipulation, stream manipulation and that's it. So in order to do references with Croff, really all you have to do is run the command refer on this document here and it will find the correct references and you can directly pipe that into a Croff command. Now here I have the two commands that are important here. On the top here there is the PDF LaTeX command, again you run PDF LaTeX then you run Biber then you run PDF LaTeX again, arguably you have to run it a third time. And below here you'll see, oops that's not the button I'm meant to press, below here you'll see that we have the refer command to compile the references in Croff and then just the Croff command. So I'm going to be running time on both of these to see how fast they are and you can probably guess what the results are going to be. First we'll go ahead and run the PDF LaTeX command because that's what people are most familiar with. So it's compiling the first time, it's running Biber and then it's going to run PDF LaTeX again and you'll see that it's about four seconds, that took about four seconds for it to compile. I'm going to bring up the PDF of this so here's our nice PDF, you'll see that we have our reference right here. So I mean at least it worked, it took four seconds but you know maybe in the grand scheme I mean it's way shorter than doing your references in Word or something like that but let's compare it to refer in Croff and it's already done. Refer in Croff again it's just string manipulation, it's or stream manipulation, it takes you know about a tenth maybe a twentieth of a second so that or not a twentieth or twenty percent, ten percent or twenty percent of a second that's what I meant to say. So much faster, much more efficient and you might say okay well this is, I can wait the four seconds, I really like LaTeX and you can and it's not like I'm not going to use LaTeX again in my life, probably going to write my dissertation in it still but the thing to remember is for most document compilation especially if you're using something like a live preview, if you have a live preview of LaTeX you know I used to use a live preview of LaTeX, I don't really like live previews anymore but when you have that whenever you're making changes you're running this four second command or at least some subsection of it so that is really processor intensive I could always see you know how intensive my you know I could look at my CPUs and see all the work they're doing whenever I'm compiling LaTeX but if I use refer in Croff it happens basically instantaneously you don't even have to worry about oh let's actually look at the Croff document here it is we have our reference properly formatted you know everything basically the same thing actually we might as well compare it to the PDF LaTeX or yeah the LaTeX document here's our LaTeX document here is our Croff document different formatting by default you can of course change that but you know doesn't matter so anyway that that so this is sort of the point of the video like Croff is built to be very minimalist I mean it again it's supposed to be very in sync with the Unix philosophy and commands like refer what they in effect do they're not some extra compilation command that runs on top of it but whatever what refer does is it actually goes and look for specifically marked sections of the text that it's supposed to look at it performs what operations it needs to on that and then it can pipe the rest to Croff and that's why one of the reasons it works so efficiently so anyway I'll do a video on refer and Croff pretty soon I'll probably record it later today but this is just to give you an idea of how big the difference can be between it and LaTeX so I hope you and learn something and I'll see you guys next time