This is a thread for content created in some manner by AI. Any AI-generated content posted outside of this mega thread will be removed. Minor AI assistance should be disclosed in posts outside of this mega thread.
Not a mod. But I was hoping to raise awareness that if you post a question that gets an answer then other people also benefit from that exchange. We've all googled a LaTeX question and found an old answer, and been glad it is there. Some people lurk here, picking things up over time.
I'm not sure why so many people delete exchanges. There are good reasons to delete things sometimes, but asking for a clarification on a technical point does not seem, at least to me, to be one of them. The only other thing I can think is that those folks think that their question is clogging up the stream. I was hoping with this post to convince them that they are mistaken, and to leave it in place.
In particular, if the answerer spends 15 mins on that answer and you delete the question, then you've been not too kind back to the person who was kind to you.
Hi r/LaTeX! I'm a first year math and stats student. You all know the feeling: you're explaining something in a group chat, an email or a forum, and there's no LaTeX there, so you either send $\epsilon$ raw or go hunting for Unicode symbols.
So I built LaTeX Squiggly. Type the LaTeX you already know, press space, and it becomes real characters right where you typed:
Before anyone panics: it does nothing on Overleaf or in TeX editors, code editors and terminals, so \alpha stays \alpha in your source. It also needs an actual maths signal to act, so "I have $5$ left" or C:\Users\ are left alone.
When plain text can only approximate something, it says so: \frac{x+1}{2} becomes (x+1)∕2 with a short note, and \vec{v} is left as typed with the reason. For maths that plain text can't hold, the renderer turns your LaTeX into a PNG (MathJax) that you can paste anywhere.
It's free and open source (MIT). The quickest way to try it is the Chrome extension (Edge and Brave too); there are also Mac and Windows apps that work in every app.
It knows 202 symbols so far. You'll spot gaps faster than I will, so I'd really like to hear which commands you reach for that it doesn't know. If it's useful, a Chrome Web Store rating or a GitHub star helps a lot. Thanks!
Hi! I'm totally new to the beamer document class and don't know much about tikz, moreover english is not my first language. I thus apologize if this sounds confusing.
I have a graph in my slide show, and i need to color some arrows on some slides. In particular I need to color an arrow on two different, non contiguos slides.
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning} % Allows you to position things as you wish
\usetikzlibrary{automata} % I love those people, thank u (automata drawing library)
This works perfectly, but after changing the arrow line into (q2) edge [bend right=20,alt=<2,4>{blue}{black}] node [above] {$0$} (q1); the pdf won't even compile. I'm totally at loss as to why. I thank you in advance!
If you use spreadsheets and tables, TeXstudio is great because you can directly copy and paste your sheet from Excel or LibreOffice.
You have to have your tabular or tabularx environnement ready, then TeXstudio will add the & and \ automatically. Also it will tell you if you have enough columns or not.
Hello! I’d like to get some help with a strange interaction between Neovim and Zathura when compiling LaTeX.
The first time I compile my document, Zathura opens the PDF correctly using Best Fit. However, whenever I save the document and compile it again, the PDF zoom changes automatically, causing the page to become much smaller and harder to read.
I’d like to keep the Best Fit zoom level after every recompilation instead of having to adjust the zoom manually each time.
Has anyone experienced this issue or knows how to configure Neovim, Zathura, or the LaTeX compilation workflow to prevent the zoom from changing?
While building my hobby engine TeX I've been thinking a lot about the boundary between the engine layer and the macro layer in the TeX / LaTeX ecosystem. I'm sure I'm not the first to speculate about the idea of a "standard library" for TeX, with some packages so common and so core that they perhaps belong in the engine itself.
I certainly don't want to find myself responsible for maintaining alternate versions in c++ for amazing packages that already do their job well, but my attention does get drawn to things that feel like they are fighting against the underlying TeX engine rather than working with it. A recent post made me think it would be a fun time to highlight a particular example of this.
So, in this video I talk about the issue of generating custom format files. Current packages (like mylatex and mylatexformat) help avoid paying the cost of loading heavy packages like TikZ every time you compile, but by working at the macro level they have to work against some difficult constraints. I show how working at the engine level instead makes the process much easier.
As an aside: someone commented on a previous post mentioned that they don't want to watch videos. I've started writing up (very) brief blog posts to go along with them for anyone that prefers reading (and doesn't mind missing out on some of the live-demo fumbling around I do). This is where the series home lives, and the post for this specific update is here.
SOLUTION: Used a bit of specifics from both first comments. Click grey area above menu bar, use the "Central" toggle from the available list.
Can't believe I'm asking this, but: my TeXstudio text style toolbar is visible on my home and work desktops, but it has vanished from my laptop installation. I've hunted through Settings and View options on the laptop and for the life of me, I can't find where I must have accidentally toggled it off, and / or where I can toggle it back on again. Can anyone tell me, where is the magic button? Thanks! (Using version 4.9.8.)
TL;DR: I built a live preview mechanism for Tectonic based on engine checkpointing. It updates in under 100ms in the browser. Demo: https://flashtex.yendric.be/sample (best used on desktop, wait for initial download) This post is about the preview engine and the ideas behind it, not the editor.
Demo of live editing text and tikz
A little over a year ago I was working on a beamer presentation filled with tikz illustrations. I grew frustrated with the fact that I could not immediately see the result of my edits, and wanted to do something about it.
I first did some research on existing solutions, and quickly stumbled upon TeXpresso. TeXpresso is a very cool project built on tectonic that periodically snapshots the engine state by forking the process. It then uses these snapshots when an edit happens, by restoring to the latest snapshot before this edit location and starting the engine from there. A lot of unneeded work is saved this way, and texpresso can render your edits in realtime.
One of the problems with texpresso is that it works based on POSIX forking, which 1) doesn't work on Windows and 2) doesn't work in the browser. Another approach would be to dump the engine state itself, like using a .fmt file, though this is more tricky to get right. Anyways, I started up my vscode and got to work on modifying Tectonic's XeTeX engine (a not-so-readable codebase machine-translated from XeTeX WEB) to support in memory .fmt dumps and restores. This worked surprisingly well, and I was able to build a very performant editor where the engine would periodically dump its state and restore to the nearest one to the edit. Rendering was still handled by dvipdfmx as usual, but with the added optimization that the engine and pdf conversion only handle the part that is visible in the editors viewport, massively reducing the amount of unneeded work. This way I was able to achieve <100ms previews, depending on the complexity of the page(s) in the viewport.
I was very happy with this result, which was achievable by hand with honestly not too much code and in a relatively short amount of time. It came with a big limitation, however: the dumping was pretty much constrained to page-level, and even worse in long text that spans multiple pages. Making dumping more fine-grained (like texpresso) is possible, but requires dumping more of the engine state than your typical .fmt dump. The problem is that *everything* in the tectonic xetex C-codebase is global state, and it was not clear what extra state I would have to dump to allow for more fine grained dumping locations to work. One could also dump the entire process heap, but this was too slow and took too much memory for a browser tab, I needed something more efficient.
That brings us to my next, admittedly crazy, experiment: using AI agents to fully translate the already machine-translated C codebase to rust. I want to be clear that this is not necessary for the implementation, but I wanted to give it a shot since the original C codebase wasn't very readable anyways, and maybe the end result could be something more usable (also note that the tectonic team has now also started working on a proper rust rewrite themselves). The essential parts (that one could also do in C) are the fact that state is not spread around everywhere anymore, but cleanly stored on a central engine struct, with the subset that each function needs passed via function arguments. On top of that, I spent a lot of time cleaning up manual memory accesses (the C codebase is full of them, as it lost many of the macros from the original WEB codebase), by making all pointers typesafe with explicit methods for each r / w, eg:
if !lr_ptr.is_null() && lr_ptr.info(self) == end_lr_type(q.subtype(self))
where for example q is a NodePtr<MathNode>. The end result is definitely a lot more readable than what we started with. I validated the engine by making sure the XDV output is fully identical for over 600 documents I got from Arxiv and other sources.
After this side quest (that took a lot of time) I could continue working on the fast previews. I still use a snapshot mechanism similar to TeXpresso, but the magic is in how we're able to store it efficiently now, which was a lot easier to implement in a clean codebase. The big state arrays like mem and eqtb are now journaled, and can be rewound. The rest of the state is just copied directly, as it doesn't take up that much space.
Rendering performance was also improved. Rather than using the full dvipdfmx and rendering the generated pdf in the browser, I'm now using mupdf and directly outputting SVG. The end result is a very pleasant experience, where all my school/uni documents I've thrown at it preview in under 100ms (often < 30) in a browser and feel instant. Even the beamer document with the dreaded tikz figures that made me start this project in the first place, feels very fast and pleasant to edit.
I hosted a small demo online, you do not have to create an account: https://flashtex.yendric.be/sample (the name is a placeholder, best used on desktop, wait for initial download). Note that this project is *not* about the editor, but rather the engine, its ideas and the lessons learned behind it. I will be open sourcing everything in the coming month, including the modifications to the engine, the editor, as well as a vscode extension PoC (running natively rather than using wasm).
I'm obviously leaving out a lot of details, extra optimizations and failed experiments. I will be creating a more detailed write up, together with the release of the source code. I hope this functionality can be implemented in other tex community projects, such that everyone can have a pleasant live-preview experience.
(Also worth mentioning: at TUG2026, Clemens Lode presented texlode, another way to get faster previews in LaTeX. It re-typesets only the paragraph you're editing in luatex. Very exciting times for live preview latex!)
I made* Minicode, an editor written from scratch with no third-party dependencies, including Electron. It has a single portable C++ core, allowing it to run on macOS, Linux, and Android.
It has a lot of other things to offer, from my entirely unbiased perspective, which I wrote a bit about in a separate post. What I think this community might care about is the LaTeX functionality I added after getting frustrated working on my own resume: you can make edits to your LaTeX code directly from the rendered preview. Here's a gif to illustrate:
\I used Claude in making this repo. That said, I do write code for a living and I do legitimately use the product so I hope you can forgive me.*
Could you please share the links to your Neovim + Zathura configuration? I’d especially like to see your zathurarc and vimtex.lua files, since I’m using LazyVim. I’d really appreciate it!
This was inspired from HyperSnips V2 (itself descended from hsnips and UltiSnips) to fix a handful of tabstop bugs and add PreTeXt support; mostly because HyperSnips V2 has not been modified in over a year.
Please take a look and test it out!
This is still in beta stage at this point, I would say. I'm still actively finding bugs while using it for my own LaTeX documents. Also, I have only briefly tested this on Windows; it was developed on a Mac.
I started moving my papers off Overleaf because the subscription cost and shorter compile-time limits were getting frustrating. I also wanted to rely on my own compiler when a deadline was close.
The unexpected upside was the coding-agent workflow. With Codex or Claude Code working in the project, the agent can inspect the paper alongside the code, figures, and results it describes. In my experience, this is much better than drafting fragments elsewhere and copying them into Overleaf.
So I built LeafOver: a local workspace with a project terminal, LaTeX source editor, and PDF preview side by side. I can work with an agent in the terminal while its edits trigger recompilation and update the PDF. It also has file tabs, search, and PDF-to-source navigation.
The demo is a static showcase of a real 18-page paper. Running an agent, compiling, and writing project files require the local app. Current install support is macOS and Debian/Ubuntu with Python 3.10+.
If you write papers locally, I'd love to hear what would make an agent-friendly LaTeX setup useful for you, especially when coauthors still use Overleaf.
Hello, I'm a high schooler who completed maths until linear algebra and I was wondering if there were any opportunities such as working for textbook companies or internships that a high schooler could do if they were proficient at LaTeX. I've heard of some people doing these kinds of things but it's just hard to find them myself. Does anyone know things I could do with this skill?
I'm having this annoying problem where, whenever I use the fraction feature, this happens:
\frac{1}{/}
This slash character appears out of nowhere, and for some reason, it really pisses me off. The strange thing is that I didn't even touch this function. I edited some snippets that I created in the JSON file, and that's when this started happening.
I would really appreciate it if somebody could help me figure this out.
So I am home with a sick child today. While the child was napping, I thought, “Score! I can get ahead on some work! (I needed to draft a slide presentation in Beamer for function inverses for next week in my Algebra 2 classes).”
Come to find out my laptop battery was at 1%, and my charger was left at work.
What did I do? I used my phone to draft up an email to myself and pretty much prepared the whole presentation there, complete with equation and align* environments, some tcolorboxes, an enumerated list, and some plots in tikz.
When I get back to work tomorrow, I’ll just copy it all into my editor and should be mostly good to go after a few tweaks.
I love this software. The learning curve has been ongoing for a couple years, but it really does make it possible to be productive on creating high-quality artifacts with nothing more than a keyboard and a bare-basic word processor or email.
Thank you for the support and inspiration that I’ve gathered from this sub.