back to index

A short introduction to LaTeX and Overleaf


Chapters

0:0 Introduction
0:30 Getting started
3:0 Source view
5:0 Citations
8:0 Site P vs Site T
9:0 Citation styles
10:0 Import citations into Bibtex
11:0 Recompile

Whisper Transcript | Transcript Only Page

00:00:00.000 | Hi, here I'm going to explain how to and why to use Overleaf and LaTeX for your scientific
00:00:07.800 | paper either to contribute to somebody else's paper or to create your own paper.
00:00:15.560 | So to get started we would go to Overleaf.com and create an account or log in and you'll
00:00:21.680 | find yourself with a screen that looks something like this or else if somebody sent you an
00:00:26.440 | email with a link to access their paper just click on it.
00:00:34.040 | Once you click on a paper you'll see a screen which looks something like this.
00:00:41.360 | To create your own paper from scratch generally I would suggest going to Google and typing
00:00:46.420 | in Overleaf and template and the kind of thing you're creating such as a pre-print and generally
00:00:53.320 | that will give you access to their gallery where you can click on the kind of paper you
00:00:58.940 | want to create and say Open as template.
00:01:04.860 | So in either case you're going to end up in a screen that looks like this.
00:01:09.040 | So this is a different way to creating papers to using something like Microsoft Word which
00:01:14.760 | we might be more familiar with and at first it honestly looks a bit terrifying.
00:01:19.800 | There's all this code that you see in front of you.
00:01:25.920 | And the trick is basically to ignore all that code, this LaTeX code.
00:01:31.360 | Instead just find the bit where it says begin document and start typing.
00:01:37.260 | So here's a section where it says begin abstract and I can start typing in my abstract.
00:01:44.200 | And then you can create sections so these are just chapters and you can start typing
00:01:49.160 | in your sections.
00:01:53.080 | And then at any point you can see what that's going to look like by clicking on this little
00:01:56.980 | arrow and saying recompile and what that does is it creates a PDF.
00:02:05.880 | And so as you can see it's created a nicely formatted paper for us.
00:02:12.360 | Now basically you don't have to do any formatting really yourself in terms of document formatting.
00:02:22.120 | You just type in this is the abstract, these are the sections and so forth and it will
00:02:26.680 | automatically format it for you, create your references for you and so forth.
00:02:32.860 | So this is one of the big benefits of using LaTeX and Overleaf for doing this is that
00:02:37.720 | there's just a lot less time and hassle for you to think about.
00:02:42.440 | You can just focus on typing your paper.
00:02:46.600 | There's two ways you can type your paper.
00:02:48.240 | One is by typing into this source view which is a bit more scary looking or you can type
00:02:54.320 | into the rich text view which is a bit less scary looking.
00:02:59.800 | Generally speaking pretty much everybody I know spends 99% of their time in the source
00:03:07.340 | view.
00:03:08.340 | In the end they're both places you just type what you want to type.
00:03:15.560 | And yeah I would suggest like not looking really at what it looks like too often.
00:03:21.480 | Just focus on putting your information, your text to your paper in here and then yeah just
00:03:29.360 | from time to time you can always scooch over and look at the compiled PDF.
00:03:34.840 | The only place I tend to sometimes use rich text is if I want to insert one of these things
00:03:41.800 | bold, italics, a numbered list or a bullet point list.
00:03:46.760 | For example as I've done here let's create our own one.
00:03:51.440 | So here is a bullet list and then you just hit this first, second, okay.
00:04:04.440 | And so that's what it looks like in our rich text view.
00:04:08.720 | If you go to the source view you can see it's used some LaTeX code.
00:04:16.040 | So another way of creating things like bullet lists is just to copy and paste something
00:04:19.980 | that's already there.
00:04:21.640 | So if we go and have a look at the compiled LaTeX here you can see a bulleted list has
00:04:33.200 | been there.
00:04:35.320 | So the main thing you need to know is yeah just type stuff and it will appear.
00:04:43.740 | The second thing then to know is how to do citations.
00:04:50.640 | So one of the really nice things about doing citations with LaTeX and Overleaf is that
00:04:58.920 | you don't have to worry about citation styles or anything like that or keeping your numbers
00:05:04.680 | up to date or all of that kind of stuff.
00:05:06.560 | That is all done automatically for you.
00:05:09.580 | So there are two ways to create a citation.
00:05:14.200 | Basically everything in LaTeX which is a command starts with a backslash and to create a backslash
00:05:20.240 | you type backslash site and then there's two ways you can cite.
00:05:24.120 | You can either cite inside the text of a paragraph that will be site T or in parentheses at the
00:05:30.840 | end of a sentence that will be site P and in either case you then type open curly brace
00:05:38.960 | and you'll have a big long list of your citations here.
00:05:44.520 | So for example if I click on this one and then if I have a look at my document, here
00:05:58.480 | the citation has appeared and you'll see it's appeared here and then if I scroll to the
00:06:02.360 | end you'll also see it has appeared here.
00:06:08.960 | So where did all those list of possible things to cite come from?
00:06:14.640 | They come from a separate file.
00:06:17.520 | There's basically two files you care about.
00:06:19.360 | The .tech file here is the thing you type into and then the .bib file here is the thing
00:06:25.240 | that contains all your citations.
00:06:29.000 | And here they all are.
00:06:30.000 | So you can see there's one per line so here's one citation, here's one citation.
00:06:36.720 | These are in a format called bibtech.
00:06:39.680 | If somebody's already created your bibliography for you, you won't have to worry about creating
00:06:43.640 | this or you need to know is that in general each citation has a name like this, L1-2020-doctors.
00:06:54.480 | Generally speaking if you use the approach I'll describe in a moment, the names of your
00:06:58.600 | citations will be the first author's surname, then the year of the reference, and then the
00:07:07.120 | first word of its title.
00:07:09.480 | So this is quite handy, right?
00:07:10.640 | So for example we wanted to cite this thing here, post-acute COVID-19 syndrome from now
00:07:17.880 | Bandian 2021, then we would just start typing "site" and then we'd start typing now "Bandian"
00:07:31.200 | and here it is 2021 post.
00:07:35.000 | And so if we have a look at what that's put into our document, there it is, it's added
00:07:46.640 | to our reference list and you can see here it is in the document itself, now Bandian
00:07:52.600 | and it creates hyperlinks and all that kind of stuff for you in the PDF so if you click
00:07:56.760 | here it jumps straight to the reference and so forth so that's all pretty handy.
00:08:05.480 | So why would you use site P versus site T?
00:08:09.440 | Well the reason why is that, here's an example of site T, site T is something that you would
00:08:14.740 | use in the body of your text.
00:08:17.880 | So for example, half of our et al. 2021 estimated the full impact etc. so that's site T because
00:08:26.280 | it's in the text and so it's the format it creates is to show the name and then the year
00:08:31.320 | and then so you can put this straight in the text like this as opposed to site P which
00:08:36.200 | puts it in parentheses, that would go at the end of a sentence like this, continue the
00:08:40.700 | vaccination rollout to 90% throughout the year, brackets and there's a citation and
00:08:46.160 | notice you can put more than one reference with a comma between, you can put as many
00:08:51.440 | as you like so that's why you see each one here and again I could click on it and it
00:08:56.240 | would jump straight to that reference.
00:09:01.000 | Okay, so here's, actually if you look here I've got the two citation styles in a list
00:09:10.720 | so we can take a look at what they look like.
00:09:12.520 | So here are the two citation styles, that's the site T style and that's the site P style
00:09:19.480 | and things like exactly what kind of parentheses or brackets are used and stuff like that will
00:09:23.680 | depend on what template you've selected and that's very easy to change later so you can
00:09:29.360 | just up replace the template at any time and your whole document will be updated for that
00:09:35.000 | template.
00:09:36.000 | So if you change which journal you're submitting to, you just stick it into a new template
00:09:40.000 | and away you go.
00:09:41.920 | Okay, so finally how do you add stuff to the bibliography that's not already there, just
00:09:50.640 | add stuff to the bibliography that's not already there, my strong suggestion is to use Google
00:09:55.320 | Scholar. So Google Scholar is at scholar.google.com, the first thing you should do is click on
00:10:02.680 | these little lines and click settings and turn on the thing that says show links to
00:10:10.440 | import citations into bibtech.
00:10:13.360 | Okay, and so now that we've done that we can search for a paper so let's say I want a paper
00:10:20.800 | about clams. So I would go like so, let's say yes giant clams that's the paper I want.
00:10:27.040 | So if I want to add this to my bibliography, I just click import into bibtech, I'm not
00:10:34.440 | a robot, and then select that copy and we go back to bibliography and paste it at the
00:10:45.560 | end, like so. And as you can see, it's used that approach I described, surname, year,
00:10:54.200 | first word of the title. So if I now want to insert that into my text, I could say for
00:11:02.120 | example site in the text, what's his name, Yong, wrote about giant clams. There we go.
00:11:15.960 | And so if you want to see what that's going to look like, recompile. And here it is, Yong
00:11:28.440 | wrote about giant clams and I can click it and I can see, yep, here it is in my reference
00:11:37.920 | section. Okay, so that's basically it. Then finally if you want to download the compiled
00:11:46.640 | version of your paper, you can go menu, download PDF, or to submit it as LaTeX, you can download
00:11:55.120 | source and then you could submit it from there. Oh, and then I guess the other useful thing
00:12:00.800 | to show you is how to work collaboratively. So you can click the share button to share
00:12:07.520 | the paper with your collaborators and you can all edit it at the same time. You'll see
00:12:12.880 | each other's edits. And then to add comments or to track changes, just click review. And
00:12:20.440 | I'll say track changes is on for everybody. And so now if I start typing, it focuses on
00:12:31.440 | the Great Barrier Reef. And you'll see here, it shows that I added, it focuses on the Great
00:12:39.820 | Barrier Reef. And so other people will see Jeremy Howard added this. And so then anybody
00:12:45.040 | can click accept or reject. And then the other thing I could do is I could double click on
00:12:50.920 | a word, for example, and say add comment. What about oysters? And then other people could
00:13:02.240 | reply to that and so forth. Okay. So then I can go resolve, I could go reject, turn off
00:13:14.440 | change tracking. And so this review button just shows the review appears and disappears.
00:13:22.880 | And if you click overview, it will show you all of the changes and you can go through
00:13:28.320 | and check all of them out. Great, I think that's about everything I wanted to show. So hopefully
00:13:34.200 | this helps you get started with using LaTeX and Overleaf. And you find this a good way
00:13:40.620 | to write papers. Personally, I found it really saved me a lot of time. So hopefully it helps