/r/LaTeX

Photograph via snooOG

Whether you are just getting started with LaTeX and wondering what the fuss is about, here to share the clever trick you've discovered, or need urgent help with your bibliography, welcome to the LaTeX subreddit!


Resources:

Getting started

Topic specific resources

Dedicated users of this sub may write to the mods for a custom flair :)


Related subs

/r/LaTeX

60,906 Subscribers

2

VSCode LaTex Workshop PDF Resolution is Driving me CRAZY

I can't I have been trying to figure out how to up the quality of the internal pdf viewer in latex workshop for like 6 hours now.

Beyond frustrating. I want something more customizable then texstudio, so I am trying to move all the things that I like from there over to VSCode, but for the life of me, I cannot get the resolution of the pdf internal viewer to increase. It is driving me crazy. I have changed like 30 files inside LaTex Workshop's folder, and nothing seems to work.

Any advice? I don't wanna use a external viewer because I am on 1 screen. I am thinking about maybe just making my own pdf viewer idk

2 Comments
2024/11/10
09:43 UTC

2

Referencing an equation that hasnt defined yet

Hello,

Is there a way to reference an equation that you write on the next page?

For example: (but it should work)

\documentclass[11pt,a4paper]{amsart}

\begin{document}

\section{sec 1}

\setcounter{equation}{3}

\begin{equation}

eq 4

\end{equation}

\eqref{1: dsfs}

\section{sec 2}

\setcounter{equation}{2}

\begin{equation}

eq 1

\end{equation}

\label{1: eq}

\end{document}

1 Comment
2024/11/10
09:34 UTC

9

Do we have a tool to autocorrect bad usage of math symbols?

Hi, as title, do we have any tools to automatically check and correct bad syntaxes and spacings for math symbols and equations? For example, one should use \text{d} x in the integral. \[\] is more preferred since it has better spacing than $$ $$.

I am always afraid of doing some bad practice of math writing and make people think I'm not well-educated.

I used to have a advisor that is really picky about it. He always says that you are doomed/unprofessional if you do not follow the standard. He also insists using ]0,1[ instead of (0,1).

11 Comments
2024/11/10
01:17 UTC

0

Alternatives to Overleaf for publishing templates?

I am currently working on template I wanted to publish. I was using Overleaf hoping to submit the template, however I am not an expert in Latex and my file has some programming errors that are hard to fix since the document is pretty complex. Even if the .tex produces the wanted PDF without any error, Overleaf blocks me to submit this template.

I understand why the platform proceeds in this way so I am not gonna criticize it, but I was wondering if there is another alternative platform to publish that can make me avoid this problem for the moment.

Any suggestion is welcome

8 Comments
2024/11/10
00:23 UTC

2

How do I fix spacing differences?

The spacing is different in these two pages but I didn't do anything weird with the code, at least I don't think so.

2nd and 3rd pages' spacing is different(???)

Here's the code

0 Comments
2024/11/10
00:03 UTC

29

Subfigures are not side-by-side and its killing me

18 Comments
2024/11/09
14:37 UTC

9

How to set multiple fonts for multiple languages in the same document?

Title. I'm using LuaLaTeX and polyglossia package. I need English, IPA, Japanese and Bengali typeset in the same document but I'm having trouble making fonts work. Here's a minimal working example:-

/documentclass{article}
/usepackage{fontspec}
/usepackage{polyglossia}

/setdefaultlanguage{english}
/setotherlanguages{bengali,japanese}

/setmainfont{Noto Sans}

/begin{document}
abʈʉʒβŋ
অআইউ
いろは
/end{document}

abʈʉʒβŋ is rendering all right but the Bengali and Japanese text is appearing as empty boxes; I've no idea how to individually configure fonts for each of them individually.

7 Comments
2024/11/09
13:42 UTC

4

Space after title

Hi everyone I am using overleaf How to add space after the title? I need the name to be near the end of the page Thank you

4 Comments
2024/11/09
06:23 UTC

2

How can I use mtpro2lite in my Overleaf project?

I've been researching for over a week now and haven't found any useful information on this subject; if I find anything, it's either external to Overleaf, or they just recommend switching from Overleaf, or it's just about mtpro2 instead of mtpro2lite, and I can't get around to any of these solutions.

I don't even know what files I should download or which ones I should put them in or in which folders. If you know of an Overleaf manual or a site where I can specifically learn how to use mtpro2lite in Overleaf, I'd really appreciate it if you could share it. And if it's not possible for some reason, I'd also appreciate some clarification.

3 Comments
2024/11/08
18:03 UTC

0

Using unsupported 32-bit MikTex

32-bit MiKTex is now unsupported. But it still works. I am using TexStudio and it takes a long time to generate the error message ": major issue: You are running the unsupported 32-bit version of MiKTeX for Windows." But it then compiles the file.

Is there some way to continue with 32-bit MikTex and avoid the long time to produce the error message ?

1 Comment
2024/11/08
14:37 UTC

10

What is this J-looking symbol?

I can't tell what the J-looking symbol is in this standard model physics below - anyone know?

Screenshot

10 Comments
2024/11/08
14:32 UTC

2

Paginating long and wide tables across multiple pages?

Hi everybody!

I am a little familiar with LaTeX and used back then in university. Right now I am confronted with a challenge and at this point I don't know where to look forward. Maybe you have an idea.

The task is to print huge tables across multiple pages. For long tables, I used to use the longtable package back in university, which was very straightforward. Now, imagine having a long table but also 10 or 20 columns or so. My current workaround is to slice up the table outside of latex and then put individual slices in their own table environment, but this is very unsatisfying.

Additionally, two things to mention:

- The pagination should work "Z"-style rather than "reverse-N" style, i.e. the printed "subtable slices" should be displayed horizontally, then going to the next "row slice"

- Similar to "repeated headers", i.e. rows on top of each page slice, I'd like to have "repeated columns", as they indicate a group and subgroup variable.

Do be more verbose, an example, a long+wide table with 100 rows and 10 columns: A, B, C, D, E, F, H, I, J, K
The first page would show rows 1..30 and columns A, B, C, D, E,
The second page whould show rows 1..30 and columns A, B, F, G, H
The third page would show rows 1..30 and columns A, B, I, J, K
4th page ... rows 31..60 and cols A, B, C, D, E
5th page ... rows 31..60 and cols A, B, F, G, H
6th page ... rows 31..60 and cols A, B, I, J, K
7th page ... rows 61..90 and cols A, B, C, D, E
8th page ... rows 61..90 and cols A, B, F, G, H
9th page ... rows 61..90 and cols A, B, I, J, K
10th page ... rows 91..100 and cols A, B, C, D, E
11th page ... rows 91..100 and cols A, B, F, G, H
12th page ... rows 91..100 and cols A, B, I, J, K

Any idea+recommendation welcome!

0 Comments
2024/11/08
13:44 UTC

0

does anyone know what's wrong that i'm unable to visualize the document?? even starting new one wont let me see it

11 Comments
2024/11/08
12:41 UTC

1

Help request for table settings

Good morning,

I need help with formatting a table in LaTeX.

I would like all rows and columns to be visible in the table, except for the central columns in "attribute 1" and "attribute 2" rows, where I only want the left outer border, the first column border (as it is correctly displayed in the table), and the right outer border.

However, I am encountering an issue. As you can see in the image of the table, I cannot insert the right outer border for these rows. Could you help me understand how to fix this?

Additionally, the border for the row "attribute 1 - second" extends outside the table, but I don’t understand why. Could you advise me on how to remove it?

Thank you very much for your help!

The code is provided below.

https://preview.redd.it/vvxe3ly0rnzd1.png?width=866&format=png&auto=webp&s=5527d41810556b5dac4e077edf149c2dffc67acb

\documentclass{article}

\usepackage{graphicx}

\usepackage{multirow}

\usepackage{array}

\usepackage{booktabs}

\usepackage[margin=1in, landscape]{geometry}

\usepackage{adjustbox}

\usepackage{rotating}

\usepackage{makecell}

\usepackage[table,xcdraw]{xcolor}

\begin{document}

\begin{table}[h]

\centering

\caption{Example table}

\adjustbox{max width=\textwidth}{

\renewcommand{\arraystretch}{1.5}

\begin{tabular}{|>{\centering\arraybackslash}m{7cm}| c|c|c|c|c|c|c|}

\hline

& A & B & C & E & F & G & H \\

\hline

\textbf{Area (Ha)} &

\textbf{694} &

\textbf{151} &

\textbf{59} &

\textbf{81} &

\textbf{140} &

\textbf{69} &

\textbf{37} \\

\hline

\textbf{Attribute 1} \\

\hline

First &

1 &

\cellcolor[HTML]{ffdfd4}1 &

\cellcolor[HTML]{ff9e81}0 &

\cellcolor[HTML]{ffdfd4}0 &

1 &

\cellcolor[HTML]{ff9e81}1 &

\cellcolor[HTML]{ff5232}1

\\

\hline

Second &

\cellcolor[HTML]{ffdfd4} 1 &

\cellcolor[HTML]{ffbfaa} 1&

\cellcolor[HTML]{ff9e81} 1&

\cellcolor[HTML]{ffdfd4} 1 &

\cellcolor[HTML]{ffdfd4} 1 &

\cellcolor[HTML]{ff9e81} 1 &

1

\\

\hline

Third &

\cellcolor[HTML]{ffdfd4} 1 &

1&

\cellcolor[HTML]{ffbfaa} 1 &

1 &

\cellcolor[HTML]{ffbfaa} 1 &

\cellcolor[HTML]{ffbfaa} 1 &

\cellcolor[HTML]{ffbfaa} 1

\\

\hline

\textbf{Attribute 2} \\

\hline

First &

1 &

\cellcolor[HTML]{ffdfd4} 1 &

\cellcolor[HTML]{ffbfaa} 1&

1&

1 &

\cellcolor[HTML]{ff9e81} 1 &

\cellcolor[HTML]{ff9e81} 1

\\

\hline

Second &

1 &

\cellcolor[HTML]{ffdfd4} 1&

1 &

1 &

1 &

\cellcolor[HTML]{ff9e81} 1 &

\cellcolor[HTML]{ff7b5a}1

\\

\hline

Third &

\cellcolor[HTML]{ffdfd4}

1 & \cellcolor[HTML]{ffdfd4}1

& \cellcolor[HTML]{ffbfaa}1 &

1 &

1 &

\cellcolor[HTML]{ffdfd4} 1 &

\cellcolor[HTML]{ffdfd4} 1

\\

\hline

\hline

\end{tabular}| % Aggiunta la linea verticale alla fine della tabella

}

\label{tab:benefits_nbs}

\end{table}

\end{document}

3 Comments
2024/11/08
10:49 UTC

6

Integration of Overleaf GitHub: also saving the PDF on GitHub?

Hello

I use overleaf pro with GitHub sync. Works like a charm however only the files to build the pdf not the pdf output of my overleaf thing syncs on GitHub.

Is there any (more or less easy/automatic) way to also sync the pdf to my GitHub?

Thank you for any help!

My current work around is:

Create file in overleaf. Commit from overleaf to git hub. Download pdf. Upload pdf to GitHub. Seems a bit of a long way to do things…

11 Comments
2024/11/08
09:29 UTC

32

Favourite latex font

What is your favourite latex font?

43 Comments
2024/11/08
09:11 UTC

4

Does anyone know how I can remove the page number at the end of each referenced list? I suspect something is wrong with my package.

10 Comments
2024/11/07
21:47 UTC

24

What is this exact mathbb{R} style?

It’s not mathds…

9 Comments
2024/11/07
20:36 UTC

2

How to format LaTeX math blocks in Markdown?

I use Obsidian on Linux and I find the combination of using Markdown and LaTeX for math equations nice.
Even though I use Obsidian Latex Suite plugin, I struggle to make my LaTeX math code readable for future editing which begs the question if there's a plugin or a piece of software (command line programs are welcome) that can help me format the LaTeX code just like IDEs format programming code; for example having even spacing between variables, operators and braces, indentation, etc...

1 Comment
2024/11/07
15:32 UTC

12

Add arrow with text above symbol without distortion

7 Comments
2024/11/07
13:17 UTC

5

How to export only cited bibtex entries on overleaf?

Hey there

I have a far too long bibtex file and want to now change it so that I have a second, shorter one, that only has those references I cite in it.

Is that possible within overleaf?

I am happy to download some files, as written in this comment to this unanswered question elsewhere https://tex.stackexchange.com/questions/664376/in-overleaf-export-a-bib-file-with-only-cited-references-using-narbig-on-mac-i

Thank you!

8 Comments
2024/11/07
11:17 UTC

28

Making a Chart in LaTeX as an beginner. Hi guys I want to create this chart in LaTeX but this is beyond my skills. I would be glad if anyone could help me out here. :) I also want to make points on the chart and name them. Thank you! :)

16 Comments
2024/11/07
10:42 UTC

1

Partial overlay of 2 backgrounds

Is it possible to overlay 2 PDF files to make up one background?

My university split our logo into two different pdf files, and I cannot merge the two pictures together in Overleaf. They only provide the full logo for our math department.

I guess the problem is that the logo itself takes up an entire page, so my question is, if it's possible to overlay the 2 pictures?

https://preview.redd.it/1fopd6egagzd1.jpg?width=724&format=pjpg&auto=webp&s=aba49da2dfa4d335592b6a7633c20851cf07639e

https://preview.redd.it/btic86egagzd1.jpg?width=724&format=pjpg&auto=webp&s=cbc9b140dca24efb4d189663fcac8eba93a10bd0

2 Comments
2024/11/07
09:46 UTC

2

Underfull hbox because of "_" in url

Hi,

I'm pretty new to latex and have to write an article for work. In my references, I have to put a website that contains underscores in the url. If I just put it like this, it makes an error. The way I found to go around it is to use this sintax I found online :

\bibitem{OpenCV_tresh} OpenCV, \`Thresholding Operations using inRange.,'' 2024, [Online]. Available : {{https://docs.opencv.org/3.4/da/d97/tutorial\_threshold\_inRange.html}}`

Using the double bracket + \_ (slash + underscore)

But because of that, the reference fill the full line :

https://preview.redd.it/kqryb7a1xfzd1.png?width=509&format=png&auto=webp&s=3d4f97bb3aab73bfa8d8454edbd3e90dbd4dd96a

And I have the error cited above. How do I stop the reference from stretching to the full line ?

3 Comments
2024/11/07
08:30 UTC

7

Part and section in a same page (and customized too!)

https://preview.redd.it/9gupjucmsfzd1.png?width=859&format=png&auto=webp&s=bfcb5b0a006496f540d72de6c4e045d900095223

So i came across this beautiful piece of note and really want to recreate it as my own template. But I just can't figure it out how to write \part without causing page break. Yes, I've read stackoverflow but to customize it freely it leads to alot of errors which is out of my understanding (sorry I have little programming experiences).

2 Comments
2024/11/07
08:08 UTC

1

Help reading / typing up an equation

Can anyone let me know if I've typed these up correctly? This maths is beyond my expertise and the integral / d^4 x doesn't seem right in the first one, and in the second one I'm not sure about the second non-phi phi-looking character. I wasn't 100% sure whether to post here, latex stack exchange, physics stack exchange, or any other subreddit so this was my first choice...

Equation 1

Typed 1

Equation 2

Typed 2

3 Comments
2024/11/06
22:30 UTC

15

A simple way to jot down math?

I am on Windows. The closest thing to what I’ve been looking for that I’ve been able to find is called Bakoma Tex, but it is abandonware. My goal is to be able to quickly jot down complicated math using only a mouse and keyboard, fully offline, and see the compiled math the moment it’s typed out. No rituals of saving and compiling. I want real-time previewing. I have a basic setup going in VS code but I can’t figure out how to automate the previewing. Castel came pretty close to this, but Zathura is not available on Windows. Also, I don’t want too many hoops to jump through. I would like a program that’s as easy to install as Notepad++ just in case I have to reformat my machine.

TLDR: I, a windows user, would like to click download, install, then be able to type and see math using programmable keywords or the default profile. If this is the wrong sub to ask for such a thing, please direct me to the right one.

46 Comments
2024/11/06
19:26 UTC

2

Number of page of a section in Toc

Hi all.

I'm finishing writing my thesis for my bachelor degree and I'm stuck. My academic tutor asked to remove the page number of a section in the table of contents.

For reference this is what I mean:

https://preview.redd.it/eafraygq2bzd1.png?width=1177&format=png&auto=webp&s=ffa9d661c25f6325d85040ff1b569edffb2ce032

My documentclass is report and I'm using Overleaf as my editor.

Is there any way that i can remove this number?

Thank you all.
PS: I'm italian so the words in the table of contents are italian.

1 Comment
2024/11/06
16:15 UTC

Back To Top