Hi, I'm Dr. Sally! I love...making graphics when I should be writing, complaining about writing, and the Oxford comma. Check out my website for free written guides on writing, editing and presentations for STEM students! If you like my content, please feel free to share it with your friends!
Want to be able to print those guides in a handy e-book style PDF? Just want to support my channel? Head on over to my Ko-fi page, where every donation = 2 bags of coffee at ko-fi.com/dr_sally
If you spot any errors in my content, have any opinions or want me to cover something specific you're struggling with, I'd love to hear from you!
It's much more complicated than what you said. MSWord can also do referencing and everything else LaTeX does. I did my thesis using Word and it was also quite a lot of learning. The LaTeX look can be initiated in Word using the same font that doesn't come in Windows by default. You'd have to learn LaTeX and Word very well to see which one is actually better.
Basically Word can do everything LaTeX can but seems not as professional, precise and formal as LaTeX does. One reason might be Word always make decisions on it's own, especially on spacing, indentations and styles. One thing word does not do well is numbering of formulas, it has to make a table and insert a auto-number in the last blank. Better learn both and choose the suitable one in suitable scenario😊.
Its a shame my university (at Masters level) doesnt accept PDFs and still requires DOCx, and Pandoc *still* cant output a decent Word file for the tutors to use or for assessment submission, otherwise I *would* have been using LaTeX even in my under grad
Absolutely! I'll add it to the list :D It's actually quite straightforward so if you want to change the page colour, you just need to add `xcolor` to the preamble with: \usepackage[dvipsnames]{xcolor} Then use the \pagecolor{[color name]} command. It's a switch, so it'll apply from whatever page you call it from until you change it to something else, so you can have different colour pages if you like! This page from the overleaf help guide has a nice example: www.overleaf.com/learn/latex/Using_colours_in_LaTeX
Yeah it's a big problem! The best thing to do is to sit them down and show them how Overleaf works, so they can at least collaborate on the same documents as you (without them providing their comments in word and making you convert them all the time!)
Thanks for the advocacy. It looks like with the right templates, those of us in the social sciences can take advantage of Latex, I did see a Chicago, APA and MLA styles. The challenges of being in an interdisciplinary programme is that we have to juggle different style guides depending on professor's discipline. Since I'm doing the coursework stream, there's no thesis, but a lot of coursesand long papers. I also see opportunities in my day job where we disseminate research products. Combined with R or Python, a lot of documentation based on reporting quantitative data could be automated.
Absolutely - I had scripts to automate compiling/building my thesis. My tables were all done automatically in Python and fed directly into my pipeline. All my data production was automated as well - multiple styles, to account for the variety of documents I was writing. I guess if I could be bothered, I could have also produced a UI to go with it and present it all on a dashboard, but astronomers are lazy! The nice thing about LaTeX is that it's very easily customisable. Bibliographies are probably the trickiest part, but it does make it very easy to switch citation styles. Any good journal should provide their own template with all of that already set up, otherwise you have to spend weeks going back and forth with their editors - if there isn't a template on their website (usually under submission guidelines), you can always contact them to ask. If it's all internal stuff for your University, they should also have templates available...somewhere! It's worth it (imo) to find one. Best of luck with your research! :)
I don't think it is possible (or convenient). LaTeX needs to compile the code to generate the output pdf. If you were to autocompile after every word you'd take lots of time and computation
Yes, I also use the Overleaf autocompiler. The amount of time it takes to compile depends on how big the file is you're trying to build. I tend to keep all my chapters in separate folders and import them as I'm working on them - in that case, the autocompiler works pretty well, I find! It's not *quite* instantaneous, but it's definitely quick.
If you only want to write math formulas, then Obsidian and plugin "Quick Latex for obsidian" work really well. I use it all the time when doing homework at university when I do not need to have any enumeration, sections, etc. When you type formulas, they are instantaneously rendered so you see both code and output. Obsidian comes with a lot of other useful features.
It might be worth adding that one can set up a file path for figures in the preamble. Thus there is no need to type the path every time you add a figure. I for instance keep all my figure in a folder. Then I set up the file path in the preamble (absolute path) using \graphicspath or for example \graphicspath{{/Users/you/Desktop/LaTeX-materials/Current-Project/My-Figs/}}. There are two curly brackets. Then all I have to is use \includegraphics[width=0.5\textwidth]{Some Figure}. Note you don't necessarily have to have the extension jpg or png on there especially if there is just one figure with that name. Even so LaTeX will figure out which one to use (it goes in some order jpg > pdf > png or something like that).
That's an excellent point and a really good tip, thanks! In overleaf it's not really a problem because it takes the path from the root directory, but on desktop, absolutely. Re: the file extensions, you're quite right that you don't need to specify them. LaTeX picks which is the right one to use according to the compiler and the type of output you're using. So for example, if you're creating a pdf it will pick a vector graphic format over a jpg to make sure the image still looks good even if the page is resized.
Regarding Schrodinger's equation, the physics usepackage has to useful macros including \pdv{ } which generates partial derivatives and \laplacian which generates the upside-down "triangle" squared. Moreover, often the math equations that you find in Wikipedia have been formatted in LaTeX can therefore simply be copied and drop into the text! It saves a lot of time and you can also modify them afterwards but most of the heavy lifting has been done.
Most LaTeX experts these days suggest using \( formula \) for inline math code and \[ formula \] for display style math mode (unless of course you use \begin{equation} etc or \begin{align} etc.). For some reason they recommend not using $ $ or $$ $$.
I use a stand-alone package (TeXShop) to run LaTeX on my Mac since I am not a big fan of online apps (what do you do if the internet does not work or is slow?). All the code works for me but not hyperref. The links do not show up and moreover it somehow overrides the \tableofcontents command. There are no error messages so I am not sure what is going on. I am an advanced LaTeX user but still somewhat puzzled by this problem. I did solve the issue. As it turns out the amsart document class is not compatible with hyperref.
Just binged your whole LaTeX series, so so so helpful as someone who has never encountered it before...I know it's been a while so it's a long shot, but please make that referencing video you mentioned in the previous guide! That would make my whole year. Either way, thanks for the great tutorials!
Thank you so much for commenting! I apologise for how slow I've been with the rest of the series, unfortunately RL got in the way a bit (new job, moving house, etc, caused some chaos!). I'm hoping to get back to them soon, since the references video is more than halfway done already. I'm glad they helped, if you do have any specific questions about references I would be happy to try and troubleshoot with you :)
I'm not sure about "easily" - there are some online tools, software plugins, and command line utilities that will help you do it, but often they don't get it right first time so you will probably have a bit of hand-editing to do afterwards. Pandoc is probably the most popular option (johnmacfarlane.net/pandoc), but you'll definitely want to double-check your results after to make sure it's all gone how you expected it to.
You can insert LaTeX syntax into markdown. If you compare the two then LaTeX is a lot more powerful than RMarkdown when it comes to formatting in general. However, you can run equations inside RMarkdown. Although it can be done in LaTeX it is a lot more difficult.
I can definitely look into it! I've not used R Markdown myself, so I'm not very familiar with it at the moment. I am plotting a mini series on documentation, which will use Markdown (probably), so it might be a good idea! I'll see what I can do :)
Great video. I avoided learning LaTeX during my bachelor's in physics because I was sure I was gonna end up getting a job at some private sector business. Now I have said job and it turns out they want to use LaTeX for project documentation lol. Btw I had no issues with reading the text on the screen.
Thanks for the feedback! I'm glad you managed to get the job you were looking for! You can probably get around not knowing LaTeX in the short term if you use Sphinx + Markdown (pandoc will allow you to convert md to LaTeX), but if you can invest the time to learn LaTeX it will allow you get a lot more out of Sphinx in the longer term. At least they're not making you use any expensive proprietary software!
I published a 274-page PhD dissertation in MS Word 2000 + Mathtype 6.0 in 2000 in differential algebra and 8 peer reviewed math papers across 4 different journals in MS Word 2000 and Mathtype. I love MS Word because it frees me up to do mathematics. I literally do algebra and math within MS Word by cutting and pasting formula. I love that I just point and click and drag. There is none of this INSANITY of memorizing massive amounts of obscure code and then running it through some processor in the hopes of producing some document you can read. You literally see exactly what you will get. The ONLY negative you CAN say about it is that it's not open-source and is not saved as a small .txt file. Now, in WHICH UNIVERSE is it YOU are living in where you are NOT freed up from worrying about formatting to work on math instead if you use MS Word?
I wrote a 140-page dissertation in MS Word. I could not scroll more than ten pages at a time. This drove me nuts. I can scroll through a 1000-page PDF rendered from LaTeX almost instantly. Overleaf can render a 1000-page document for me in under a minute.
Great video and a start. Wish it were available in 1080p resolution. A bit difficult to read the writings in the video with 720p even in full screen. Letters still readable but look slightly fuzzy. (13" 2019 MacBook Pro).
Thanks for the feedback, that's really helpful for me to know. I'll see what I can do about it, I might have to re-render and upload it again. Since this video, I've been trying a couple of different ways of making the writing more visible because I thought the text was a bit small. I'm now using a combination of capturing only the part of the screen I'm typing in (Overleaf), and using Canva to create the text deliberately so I can more easily highlight the bits I want to. It takes a lot longer to produce videos that way than how I made this first one but I think it's visually clearer. I'd be curious to know if you find it helps or not :)
I really like how concise and informative your tutorials are. Thank you. I would like to see an example of how an entire research paper should be formatted in LaTeX or overleaf. Your walkthroughs are top-notch in every way. Please discuss the table, which is multiple pages long and difficult to comprehend.
Those are both excellent suggestions! Long tables (those that go across multiple pages) are annoying to work with, but I can definitely do a video on them :D Actually I had some in my own thesis and one of my papers, so I'm very familiar with how they work. 600 images, all in one giant table. Poor reviewers, lol. With regards to formatting a paper - would I be right to assume you're working with a template provided by a journal? If yes, let me know if there are any specific aspects of the template that are causing you problems. I'm happy to try and troubleshoot, or let you know about specific packages you might be missing or whatever. The video on it might take a little bit longer :D
Are there any table formatters in built that can make the table look good in the code also? I personally use a website for generating LaTeX tables but it would make process even faster if it's natively built in.
I don't tend to use them myself, so I'm actually not sure. I know what you mean though, I like the columns to line up properly, but the only solution I've ever found for that is to manually put in the spaces and tabs myself, which is very tedious and annoying. In the end, I just got used to having wonky tables in the code, as long as the output looks good I learned not to care :D if you do find a tool that does it automatically though, I'd love to hear about it!
I really loved the video and the way you explain it. Its the first time I hear about LaTeX and I'm considering to use it for my academic stuff. Hoping to see a tutorial of how to customize the commands output; like in "\tableofcontents", that I want another name for the table in the pdf
The beauty of LaTeX is that literally everything can be customised. The problem is that there are multiple ways to do most of this customisation lol. But, for changing the name of the table of contents, you can use the command enewcommand{\contentsname}{I want to call my TOC something else}. Renewcommand is a very versatile command that will allow you to apply new rules to the formatting of the whole document. \contentsname tells the compiler to change the name of the table of contents, and in the second squiggly bracket, you put whatever you want to replace "Table of contents" with. If it's because you're writing the document in a language other than English though, you might want to look into the "babel" package which, if I remember right, will automatically translate a lot of the output into whatever language you set (which is more useful if you want to change more than just the TOC display name). I hope this helps! Thanks for watching :D
@@rysan3262 This is where you can find the documentation about Babel www.ctan.org/pkg/babel But if you get stuck or run out of time then the first option I mentioned will also work :) good luck!
@@miguelreina2173 Ahh with a third party reference manager? As far as I know it's not straightforward and you have to do a bit of file conversion before you can use it. I don't use reference managers myself so not 100% sure of the exact process, but I'll make sure to find out and include it!
At last! It's here! The World's Slowest Builders and an endless parade of software fails couldn't stop it. I'm pleased to (finally!) present the guide to making tables in LaTeX. Despite their fearsome reputation, we can discuss everything you need to know in less than ten minutes! I hope you enjoy it, and if there's anything you'd like me to answer for you, please let me know now it's back in my box to work on the next one
Thank you for saying that! It really does mean a lot to know that they're useful :) the next one is in the final stages of production and on its way soon™
I've playing with LaTeX for sometime. I think the main issue I run into is there's a lot of gotchas for the new user, or even user who needs to use some part of it they haven't used before. For example suppose I want to include the formula for the hyperbolic sine function. Like a fool I type: \begin{equation} sinh x = \frac{e^x - e^-x}{2} \end{equation} The only parts of that which work as expected are the \begin{} and \end{}, and kinda the \frac{}{}. The x on the e^-x isn't superscripted and there's no space between the sinh and the x so it's sinhx which makes it look either I've invented a new trig function or I'm looking for the sine of the product of two variables, h and x. To get it to work I need to use: \begin{equation} sinh\: x = \frac{e^{x} - e^{-x}}{2} \end{equation} One I'm still struggling with is where I want to treat two or more equations as a single block, e.g. I want to where a variable is defined as a certain equation then an operation on that variable gives a certain results but the nearest I can get is: Where\\ \begin{equation*} y = tan\: ax \end{equation*} \begin{equation} \frac{\delta y}{\delta x} = sec^2\: ax \end{equation} Which is inelegant. For clarity and avoidance of doubt, I'm very much pro-LaTeX. That is probably why I find these gotchas so frustrating.
I can definitely feel your frustration, and maths is one of those things where there's literally so many different commands it's almost impossible to know them all. Hopefully I can help make it a bit easier though! With regards to the trig functions, you can treat them as commands to get them to display correctly. So for sinh(x) you can just do \sinh{x} and same for \tan{ax}. This list has a bunch (although not all) the mathematical commands available - hope it helps! The trig functions are at the bottom: oeis.org/wiki/List_of_LaTeX_mathematical_symbols
Hi, I refactorized your code: \begin{equation} \sin h~x = {e^x - e^{-x} \over 2} \end{equation} For two or more equations as a single block use eqnarray environment: \begin{eqnarray} y &=& \tan ax\\ {\delta y \over \delta x} &=& \sec^2 ax \end{eqnarray}
@@atoBeto Thank you. I think I may not have defined my usecase for two or more equations in a single block fully enough. What I'm looking for is a single equation with a reference and the others are just definitions of items in that equation. So in my example the equation I'm interested in is the differential of y vs x but first need to define y in terms of x. I might write it as: \begin{equation} \frac{\delta \tan\;ax}{\delta x} = sec^2\: ax \end{equation} which is readable for a simple equation but if y were more complex, like say: \begin{equation*} y = \frac{e^{iax}}{h * \lambda ^2} \end{equation*} (I have no idea if that exists as an equation, I pulled some random stuff out of thin air) then I might end up with something like: \begin{equation} Q = \frac{\delta \frac{e^{iax}}{h * \lambda ^2}}{\delta x} \end{equation} Which is a mess. Possibly a more realistic example would be where I have an equation that uses a number of constants and I want to define those constants before using them in the equation. For context, I'm currently looking to develop my data analysis skills and as part of that am trying to improve my statistics knowledge. I'm taking the approach that the best way to learn something is to try to teach it to someone else so as I learn things I'm writing them up as if I'm writing a text book. That way I might end up with a better understanding and, if it all works out, can put the resulting text book on Kindle Direct Publishing for like $1 or free and hopefully help some other people. I am curious as to why you use the TeX primitive \over rather than LaTeX \frac? Is it just personal preference or is there a specific reason? Overleaf complains mightily about \over.
Sorry, I missed that part of your original question. Re: multi-line equations, I would recommend using the align environment (so, \begin{align}). Each line is ended with a double backslash, and you set where you want the equations to align using the ampersand (usually right before the equals, so &= is your marker) - basically the same as an array or table. Any lines where you don't want any numbering to appear (e.g. where you're just defining bits of equations to save the final equation looking a mess), put onumber on that line and it will suppress numbering just on that line. If you want to be able to refer to any of the lines by an equation number in the text (i.e., by giving it a label) you can wrap those individual lines in a subequation environment. There are a whole host of ways to achieve the same outcome, but this particular solution has the greatest utility (imo) for different situations. Hope this helps!
@@soswriting Yes, I started using it last year, when, in my first year of Physics undergrad, I wrote my first lab report with LaTeX on Overleaf. Since then, I just couldn't do without this precious instrument and, just by experimenting, I have learned a lot in just a year. In my last two lab reports i also started playing around with Tikz and the results that LaTeX can carry are just superb! I am very glad that someone like you is making courses, to explain with passion what this underrated medium is capable of!
@@stefanocarini8117 Overleaf has honestly been a revelation, and I recommend it to literally everyone lol. I'm sure people are bored of hearing about it, but I just love it so much. It's made learning LaTeX sooo much easier than it was 10 years ago when I first started with it. Now you can focus on the important parts of learning LaTeX instead of endlessly battling with the compiler - you're proof of that! :D Tikz is very complicated and a lot of LaTeX users are afraid to try it, so kudos to you for making it work, and congratulations on your progress! I wish you all the best for the remainder of your course :D