<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: letx app</title>
    <description>The latest articles on DEV Community by letx app (@letx_app_76f3cdf1c781dfd7).</description>
    <link>https://dev.to/letx_app_76f3cdf1c781dfd7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4034760%2Fc7a88f76-c1ec-4bc7-ba48-067e163e9ed7.png</url>
      <title>DEV Community: letx app</title>
      <link>https://dev.to/letx_app_76f3cdf1c781dfd7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/letx_app_76f3cdf1c781dfd7"/>
    <language>en</language>
    <item>
      <title>7 Advanced LaTeX Hacks Every AI &amp; CS Researcher Needs Before Submission published</title>
      <dc:creator>letx app</dc:creator>
      <pubDate>Tue, 18 Aug 2026 18:30:56 +0000</pubDate>
      <link>https://dev.to/letx_app_76f3cdf1c781dfd7/7-advanced-latex-hacks-every-ai-cs-researcher-needs-before-submission-published-432l</link>
      <guid>https://dev.to/letx_app_76f3cdf1c781dfd7/7-advanced-latex-hacks-every-ai-cs-researcher-needs-before-submission-published-432l</guid>
      <description>&lt;p&gt;It is 3:00 AM, twelve hours before the NeurIPS or ICLR submission deadline, and your double-column floating figure just jumped three pages downstream, turning your tight 8-page draft into a 10-page layout violation. If you have ever spent more time debugging &lt;code&gt;! Package tikz Error: Memory full&lt;/code&gt; or hunting down orphaned citation numbers than fine-tuning your model's hyper-parameters, you know the quiet desperation of academic typesetting under pressure.&lt;/p&gt;

&lt;p&gt;LaTeX remains the undisputed gold standard for technical publishing, yet most computer science and machine learning developers rely on basic templates and legacy workflows copied from decade-old StackExchange answers.&lt;/p&gt;

&lt;p&gt;Here are 7 advanced, field-tested LaTeX hacks that will optimize your compilation pipeline, save your layout under strict page limits, and shave hours off your paper writing workflow.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Reclaim Lost Page Space with &lt;code&gt;microtype&lt;/code&gt; Sub-Pixel Optimization
&lt;/h3&gt;

&lt;p&gt;When you are 6 lines over an 8-page conference limit, cutting meaningful technical content feels like amputating a limb. Before you delete a crucial baseline description, enable font expansion and margin kerning via the &lt;code&gt;microtype&lt;/code&gt; package.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;microtype&lt;/code&gt; adjusts font kerning, letter spacing, and hyphenation at a sub-pixel micro-typographic level. It subtly stretches or shrinks line widths to eliminate awkward word wraps ("widows" and "orphans") without altering font sizes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="c"&gt;% Add to your preamble (works with pdfLaTeX, XeLaTeX, and LuaLaTeX)&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="na"&gt;[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;microtype&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;% Micro-adjust spacing between characters&lt;/span&gt;
&lt;span class="k"&gt;\microtypecontext&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;spacing=noninclusive&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; You typically gain 10–25 lines across an 8-page paper without any perceptible change to visual readability or reviewer compliance.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Fix Floating Figure Chaos in Two-Column Papers with &lt;code&gt;stfloats&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Double-column templates (such as IEEE, ACM, or NeurIPS) frequently misplace full-width environment floats (&lt;code&gt;\begin{figure*}&lt;/code&gt; or &lt;code&gt;\begin{table*}&lt;/code&gt;). By default, LaTeX pushes full-width figures to the top of the &lt;em&gt;following&lt;/em&gt; page, often throwing your figures several sections out of order.&lt;/p&gt;

&lt;p&gt;Include &lt;code&gt;stfloats&lt;/code&gt; to enable bottom placement (&lt;code&gt;[b]&lt;/code&gt;) for two-column floats and force strict ordering:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;stfloats&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;% Enables double-column floats at the bottom of the page&lt;/span&gt;
&lt;span class="nt"&gt;\begin{figure*}&lt;/span&gt;[b]
  &lt;span class="k"&gt;\centering&lt;/span&gt;
  &lt;span class="k"&gt;\includegraphics&lt;/span&gt;&lt;span class="na"&gt;[width=0.95\linewidth]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;figures/architecture&lt;span class="p"&gt;_&lt;/span&gt;diagram.pdf&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\caption&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Overview of our proposed Transformer architecture with attention visualizer.&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\label&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;fig:architecture&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;\end{figure*}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Quick Float Placement Cheat Sheet
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Float Specifier&lt;/th&gt;
&lt;th&gt;Intended Behavior&lt;/th&gt;
&lt;th&gt;Common Gotcha&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[h]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Place float approximately &lt;em&gt;here&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;Silently ignored if page capacity is full&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[t]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Top of the current or next page&lt;/td&gt;
&lt;td&gt;Default preference for most LaTeX engines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[b]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bottom of page&lt;/td&gt;
&lt;td&gt;Requires &lt;code&gt;stfloats&lt;/code&gt; or &lt;code&gt;dblfloatfix&lt;/code&gt; for &lt;code&gt;figure*&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;[p]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Dedicated page of floats&lt;/td&gt;
&lt;td&gt;Triggered automatically when floats pile up&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Override internal layout constraints&lt;/td&gt;
&lt;td&gt;Forces placement; can disrupt text flow&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  3. Externalize TikZ Graphics for 10x Faster Compilation
&lt;/h3&gt;

&lt;p&gt;Vector graphics generated via TikZ produce gorgeous, scalable diagrams, but re-parsing complex geometric nodes on every document save slows compilation to a crawl.&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;external&lt;/code&gt; library to compile TikZ graphics once into cached PDF snippets. LaTeX will automatically reuse the compiled PDFs unless the underlying TikZ code is edited.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;tikz&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usetikzlibrary&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;external&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c"&gt;% Enable caching in a dedicated subfolder&lt;/span&gt;
&lt;span class="k"&gt;\tikzexternalize&lt;/span&gt;&lt;span class="na"&gt;[prefix=figures/compiled_tikz/]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Compilation Speed Benchmarks (50-Page Manuscript with 12 TikZ Diagrams)
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pipeline Configuration&lt;/th&gt;
&lt;th&gt;Cold Compile Time&lt;/th&gt;
&lt;th&gt;Hot Re-Compile Time&lt;/th&gt;
&lt;th&gt;Memory Usage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Standard Inline TikZ&lt;/td&gt;
&lt;td&gt;42.4 seconds&lt;/td&gt;
&lt;td&gt;41.8 seconds&lt;/td&gt;
&lt;td&gt;High (480MB RAM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standalone &lt;code&gt;.tex&lt;/code&gt; Subfiles&lt;/td&gt;
&lt;td&gt;38.1 seconds&lt;/td&gt;
&lt;td&gt;37.9 seconds&lt;/td&gt;
&lt;td&gt;Moderate (310MB RAM)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;TikZ Externalization (Cached)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;43.1 seconds&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3.2 seconds&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Low (85MB RAM)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  4. Create Publication-Grade Tables with &lt;code&gt;booktabs&lt;/code&gt; + &lt;code&gt;siunitx&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Default LaTeX tables look amateurish when cluttered with vertical lines (&lt;code&gt;|c|c|&lt;/code&gt;) and misaligned numbers. Top-tier conferences expect clean, professional typography with numeric alignment centered around decimal points.&lt;/p&gt;

&lt;p&gt;Combine &lt;code&gt;booktabs&lt;/code&gt; for formal horizontal rules with &lt;code&gt;siunitx&lt;/code&gt; for automated decimal alignment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;booktabs&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;siunitx&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;% Configure decimal alignment precision&lt;/span&gt;
&lt;span class="k"&gt;\sisetup&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;table-format=2.2, table-auto-round&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;\begin{table}&lt;/span&gt;[t]
  &lt;span class="k"&gt;\centering&lt;/span&gt;
  &lt;span class="k"&gt;\caption&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Top-1 Accuracy (&lt;span class="c"&gt;%) on ImageNet-1k across baseline models.}&lt;/span&gt;
  &lt;span class="k"&gt;\label&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;tab:results&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;\begin{tabular}&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;l S S&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;\toprule&lt;/span&gt;
    &lt;span class="k"&gt;\textbf&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Model Architecture&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; &lt;span class="k"&gt;\textbf&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Baseline (&lt;span class="k"&gt;\%&lt;/span&gt;)&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; &lt;span class="k"&gt;\textbf&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;Ours (&lt;span class="k"&gt;\%&lt;/span&gt;)&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;\\&lt;/span&gt;
    &lt;span class="k"&gt;\midrule&lt;/span&gt;
    ResNet-50                   &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 76.13                  &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 78.45              &lt;span class="k"&gt;\\&lt;/span&gt;
    ViT-Base/16                 &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 81.80                  &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 84.12              &lt;span class="k"&gt;\\&lt;/span&gt;
    ConvNeXt-Large              &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 84.30                  &lt;span class="p"&gt;&amp;amp;&lt;/span&gt; 86.91              &lt;span class="k"&gt;\\&lt;/span&gt;
    &lt;span class="k"&gt;\bottomrule&lt;/span&gt;
  &lt;span class="nt"&gt;\end{tabular}&lt;/span&gt;
&lt;span class="nt"&gt;\end{table}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  5. Automate Cross-Referencing with &lt;code&gt;cleveref&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Stop manually writing &lt;code&gt;Figure~\ref{fig:arch}&lt;/code&gt; or &lt;code&gt;Section~\ref{sec:methods}&lt;/code&gt;. Hardcoded prefixes waste time and introduce inconsistencies when moving sections around during peer review.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;cleveref&lt;/code&gt; package automatically detects whether your target reference is a figure, table, equation, algorithm, or section, applying the appropriate capitalized label automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;hyperref&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;cleveref&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c"&gt;% MUST be loaded AFTER hyperref&lt;/span&gt;

&lt;span class="c"&gt;% Usage in body text:&lt;/span&gt;
As demonstrated in &lt;span class="k"&gt;\cref&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;fig:architecture&lt;span class="p"&gt;}&lt;/span&gt; and detailed in &lt;span class="k"&gt;\Cref&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;sec:methods&lt;span class="p"&gt;}&lt;/span&gt;, our model outperforming prior baselines (&lt;span class="k"&gt;\cref&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;eq:loss&lt;span class="p"&gt;_&lt;/span&gt;function&lt;span class="p"&gt;}&lt;/span&gt;).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  6. Trim Unwanted Bibliography Metadata to Save Page Space
&lt;/h3&gt;

&lt;p&gt;Massive BibTeX files exported from Google Scholar or Zotero often include irrelevant metadata like &lt;code&gt;location&lt;/code&gt;, &lt;code&gt;isbn&lt;/code&gt;, &lt;code&gt;issn&lt;/code&gt;, &lt;code&gt;url&lt;/code&gt;, or &lt;code&gt;doi&lt;/code&gt; fields that spill over onto extra pages in the references section.&lt;/p&gt;

&lt;p&gt;If using &lt;code&gt;biblatex&lt;/code&gt;, suppress secondary fields directly in your preamble rather than editing hundreds of &lt;code&gt;.bib&lt;/code&gt; entries by hand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="k"&gt;\usepackage&lt;/span&gt;&lt;span class="na"&gt;[backend=biber, style=numeric-comp, sorting=none]&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;biblatex&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;% Suppress non-essential reference fields automatically&lt;/span&gt;
&lt;span class="k"&gt;\AtEveryBibitem&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;\clearfield&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;issn&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\clearfield&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;isbn&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\clearfield&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;doi&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\clearfield&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;url&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\clearfield&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;note&lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;\clearlist&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;language&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;\addbibresource&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;references.bib&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  7. Standardize Math Notation with Centralized Custom Macros
&lt;/h3&gt;

&lt;p&gt;When collaborating with multiple developers across institutions, inconsistent mathematical notation (e.g., one author writing &lt;code&gt;\mathbf{x}&lt;/code&gt;, another writing &lt;code&gt;\vec{x}&lt;/code&gt;, and a third writing &lt;code&gt;\bm{x}&lt;/code&gt;) creates an unpolished paper.&lt;/p&gt;

&lt;p&gt;Establish a single &lt;code&gt;macros.tex&lt;/code&gt; file defining standard semantic shorthand for vectors, matrices, expectation operators, and loss functions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tex"&gt;&lt;code&gt;&lt;span class="c"&gt;% --- Math Shorthand Definitions ---&lt;/span&gt;
&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\R&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\mathbb&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;R&lt;span class="p"&gt;}}&lt;/span&gt;                  &lt;span class="c"&gt;% Real number set&lt;/span&gt;
&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\E&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;&lt;span class="k"&gt;\mathbb&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;E&lt;span class="p"&gt;}}&lt;/span&gt;                  &lt;span class="c"&gt;% Expectation operator&lt;/span&gt;
&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\mat&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;[1]&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\mathbf&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;#1&lt;span class="p"&gt;}}&lt;/span&gt;           &lt;span class="c"&gt;% Bold matrices&lt;/span&gt;
&lt;span class="k"&gt;\newcommand&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\vec&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;[1]&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\boldsymbol&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;#1&lt;span class="p"&gt;}}&lt;/span&gt;       &lt;span class="c"&gt;% Bold vectors&lt;/span&gt;
&lt;span class="k"&gt;\DeclareMathOperator*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\argmax&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;arg&lt;span class="k"&gt;\,&lt;/span&gt;max&lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="c"&gt;% Argmax with proper limits&lt;/span&gt;
&lt;span class="k"&gt;\DeclareMathOperator*&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="k"&gt;\argmin&lt;/span&gt;&lt;span class="p"&gt;}{&lt;/span&gt;arg&lt;span class="k"&gt;\,&lt;/span&gt;min&lt;span class="p"&gt;}&lt;/span&gt;     &lt;span class="c"&gt;% Argmax with proper limits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Take Your Developer Workflow to the Next Level
&lt;/h3&gt;

&lt;p&gt;Mastering macros and preamble tricks helps eliminate layout bottlenecks, but local compilation failures, environment mismatches between co-authors, and merge conflicts during paper sprint weeks remain major productivity drains.&lt;/p&gt;

&lt;p&gt;If you are looking for a modern, browser-based LaTeX environment built from the ground up for real-time developer collaboration, check out &lt;strong&gt;&lt;a href="https://www.letx.app" rel="noopener noreferrer"&gt;LetX&lt;/a&gt;&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Unlike legacy editors, LetX offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sub-second real-time co-editing&lt;/strong&gt; without lockouts or file-saving lag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant preview compilation&lt;/strong&gt; powered by optimized cloud container infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in GitHub sync&lt;/strong&gt; and native BibTeX reference management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pre-configured conference templates&lt;/strong&gt; (NeurIPS, ICML, IEEE, ACM) ready out of the box.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Try &lt;strong&gt;&lt;a href="https://www.letx.app" rel="noopener noreferrer"&gt;LetX for free&lt;/a&gt;&lt;/strong&gt; today and make your next paper submission deadline completely stress-free.&lt;/p&gt;

</description>
      <category>compsci</category>
      <category>machinelearning</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
    <item>
      <title>We built a free collaborative LaTeX editor. Here's the part that was actually hard.</title>
      <dc:creator>letx app</dc:creator>
      <pubDate>Sat, 08 Aug 2026 19:20:29 +0000</pubDate>
      <link>https://dev.to/letx_app_76f3cdf1c781dfd7/we-built-a-free-collaborative-latex-editor-heres-the-part-that-was-actually-hard-ndm</link>
      <guid>https://dev.to/letx_app_76f3cdf1c781dfd7/we-built-a-free-collaborative-latex-editor-heres-the-part-that-was-actually-hard-ndm</guid>
      <description>&lt;p&gt;The deadline was nine hours out.&lt;/p&gt;

&lt;p&gt;My co-author was in another timezone, editing the same main.tex I had open. We were passing the file back and forth over a shared drive like it was 2020. At some point we both hit save. A results section disappeared, and neither of us could say with confidence which copy was the real one.&lt;/p&gt;

&lt;p&gt;That night didn't make me want to start a company. It made me want to throw my laptop in a river.&lt;/p&gt;

&lt;p&gt;It's also why we built LetX — a free, real-time collaborative LaTeX editor that runs in the browser.&lt;/p&gt;

&lt;p&gt;This post is about the engineering, not the pitch. Specifically: the part that took four times longer than we estimated, and why the obvious solution doesn't work.&lt;/p&gt;

&lt;p&gt;First, the question every developer asks&lt;br&gt;
"Why not just use git?"&lt;/p&gt;

&lt;p&gt;We did. For a while it was great. Then it stopped being great, for a reason that has nothing to do with git being bad.&lt;/p&gt;

&lt;p&gt;Git works when everyone editing the document understands git. In a research group, that's usually one or two people. The rest are statisticians, chemists, and supervisors who have a paper to write and no interest in learning what a rebase is.&lt;/p&gt;

&lt;p&gt;I once watched a genuinely excellent statistician spend forty minutes resolving a merge conflict in a .bib file. That's not a workflow. That's a tax on someone whose time is worth considerably more than the tooling that consumed it.&lt;/p&gt;

&lt;p&gt;There's also a structural mismatch. Git operates on line-level diffs, and LaTeX prose doesn't respect line boundaries. Reflow one paragraph and you've "changed" every line in it. Two people editing different sentences of the same paragraph produce a conflict git cannot resolve, because from git's point of view they rewrote the same line.&lt;/p&gt;

&lt;p&gt;You can mitigate this — one sentence per line, latexdiff, semantic linefeeds. Every mitigation is a convention you now have to enforce socially across a group of people who did not agree to it.&lt;/p&gt;

&lt;p&gt;Social solutions to technical problems don't survive contact with a deadline.&lt;/p&gt;

&lt;p&gt;The actual hard part&lt;br&gt;
Real-time collaborative editing is one of those problems that looks solved from the outside. Google Docs did it in 2006. There are libraries. How hard can it be.&lt;/p&gt;

&lt;p&gt;Here's the shape of the problem. Two people type into the same document from different countries on different network conditions. Their edits arrive out of order. You need every participant to converge on an identical document, without a central referee deciding who wins, and without ever showing anyone a "someone else is editing, try again" dialog — which is just a merge conflict wearing a nicer outfit.&lt;/p&gt;

&lt;p&gt;There are two established approaches.&lt;/p&gt;

&lt;p&gt;Operational Transformation (OT) is what Google Docs uses. Every edit is an operation, and operations get transformed against concurrent ones before being applied. It works, and it's notoriously difficult to implement correctly — the transformation functions have to be right for every pair of operation types, and getting them subtly wrong produces divergence that only shows up under specific network timing.&lt;/p&gt;

&lt;p&gt;CRDTs (Conflict-free Replicated Data Types) take a different approach: design the data structure so concurrent operations commute by construction. If operations commute, order stops mattering, and convergence is a property of the type rather than something you have to prove about your transformation logic.&lt;/p&gt;

&lt;p&gt;We went with CRDTs, using Yjs. Same algorithm class Figma uses for multiplayer.&lt;/p&gt;

&lt;p&gt;The tradeoff is honest: CRDTs carry metadata overhead. Each character effectively needs identity so the structure can order operations deterministically. Yjs is very good at compressing this, but "very good at compressing overhead" is not "no overhead."&lt;/p&gt;

&lt;p&gt;For a 300-page thesis, that's a real consideration.&lt;/p&gt;

&lt;p&gt;Why LaTeX makes this harder than it looks&lt;br&gt;
Here's what a generic collaborative text editor doesn't have to worry about.&lt;/p&gt;

&lt;p&gt;LaTeX is not prose. It's a markup language with strict structural requirements, and it fails loudly and completely on violations. One unmatched brace doesn't degrade the output — it kills the compile.&lt;/p&gt;

&lt;p&gt;Consider two users editing this concurrently:&lt;/p&gt;

&lt;p&gt;\begin{theorem}&lt;br&gt;
  Let $f: X \to Y$ be a continuous map.&lt;br&gt;
\end{theorem}&lt;br&gt;
User A wraps the statement in \textbf{...}. User B, at the same moment, edits inside the same line. Both edits are individually valid. The CRDT converges — that's guaranteed, that's the whole point of the type.&lt;/p&gt;

&lt;p&gt;But converging on a consistent document and converging on a compilable document are different properties. The CRDT promises the first. It has no opinion whatsoever about the second.&lt;/p&gt;

&lt;p&gt;Now scale that to environments:&lt;/p&gt;

&lt;p&gt;\begin{align}&lt;br&gt;
  a &amp;amp;= b + c \&lt;br&gt;
  d &amp;amp;= e + f&lt;br&gt;
\end{align}&lt;br&gt;
If one user deletes \end{align} while another is typing inside the block, you get a document every client agrees on and no compiler will accept.&lt;/p&gt;

&lt;p&gt;Generic text editors don't have this failure mode, because generic text doesn't have a compiler that rejects the entire file over a single missing token. A missing  in HTML renders badly. A missing \end{align} in LaTeX produces nothing at all.&lt;/p&gt;

&lt;p&gt;Reconciling CRDT convergence with LaTeX's structural requirements is where our estimate went wrong. Not by a little.&lt;/p&gt;

&lt;p&gt;Estimates are like that.&lt;/p&gt;

&lt;p&gt;The compile loop is a latency problem, not a throughput problem&lt;br&gt;
Second architectural thing we got right early, mostly by accident.&lt;/p&gt;

&lt;p&gt;Writing LaTeX is a loop:&lt;/p&gt;

&lt;p&gt;edit → compile → look at the PDF → edit again&lt;br&gt;
You run that loop hundreds of times a day. It's not a batch job — it's an interactive feedback cycle, and it should be measured like one.&lt;/p&gt;

&lt;p&gt;This distinction matters more than it sounds. Optimizing for throughput means asking how many documents you can compile per minute across all users. Optimizing for latency means asking how long this user waits for this compile.&lt;/p&gt;

&lt;p&gt;A queue is the clearest expression of the difference. Queuing is excellent for throughput and terrible for latency, and worse, it makes latency unpredictable — your compile time now depends on how many strangers happen to be compiling right now. Unpredictable delay breaks concentration in a way that consistent slowness doesn't. You can adapt to a compile that always takes three seconds. You can't adapt to one that takes one second or eleven depending on the time of day.&lt;/p&gt;

&lt;p&gt;We target roughly a second, no queue. The interesting engineering question — how you isolate arbitrary user-supplied LaTeX, which can execute shell commands under the wrong configuration, while keeping cold-start low enough for interactive use — is a whole post on its own.&lt;/p&gt;

&lt;p&gt;Note to author: dev.to readers will ask about compile sandboxing in the comments. Have a real answer ready — container per compile, gVisor, seccomp profile, -no-shell-escape, whatever you actually do. Don't hand-wave it. This is the single most likely technical question on this post.&lt;/p&gt;

&lt;p&gt;Three constraints we set and refused to relax&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The free tier has to be genuinely usable, not a demo.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Unlimited projects, unlimited collaborators, unlimited compiles. No per-seat charge for adding your advisor or the undergrad doing the figures.&lt;/p&gt;

&lt;p&gt;This is a real constraint on the business and we took it deliberately. Existing cloud editors solved collaboration and then metered it — compile timeouts, caps on how many people can be in a document, version history behind a paywall. Version history is the one feature you need most on the day something goes wrong.&lt;/p&gt;

&lt;p&gt;The people who most need LaTeX to be free are the people most likely to hit the paywall. Students, early-career researchers, labs outside well-funded institutions.&lt;/p&gt;

&lt;p&gt;As an engineering constraint, "unlimited compiles on the free tier" is a much more interesting problem than it sounds. It means compile cost per user has to be low enough that the free tier doesn't scale into a fire.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Compiles are fast and unqueued. Covered above.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unpublished work stays private.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Researchers hand an editor unpublished results, grant applications, and blind-review submissions. That's not ordinary user data and it shouldn't be treated as ordinary user data.&lt;/p&gt;

&lt;p&gt;What we got wrong&lt;br&gt;
We assumed people would come for the collaboration. Collaboration was the entire thesis of the product.&lt;/p&gt;

&lt;p&gt;What people actually asked for, repeatedly, was templates.&lt;/p&gt;

&lt;p&gt;Not because they couldn't write a preamble — because starting is the expensive part. Nobody wants to spend the first two hours of a submission hunting for the right IEEE class file, or reverse-engineering a department thesis format from a PDF a senior student emailed them.&lt;/p&gt;

&lt;p&gt;So we built the library out to 600+ templates: IEEE, ACM, Springer, Elsevier, theses, CVs, posters, grant applications.&lt;/p&gt;

&lt;p&gt;The lesson generalized further than templates. We'd been optimizing the middle of the workflow. The friction was concentrated at the very beginning of it.&lt;/p&gt;

&lt;p&gt;If you're building a tool, it's worth asking which part of the workflow you've actually instrumented. We were measuring the part we found interesting.&lt;/p&gt;

&lt;p&gt;Where we are&lt;br&gt;
1,300+ students and researchers, across 90+ universities and research labs in 35+ countries.&lt;/p&gt;

&lt;p&gt;That's a real number and a small one. I still read every piece of feedback, and a single well-argued complaint can change the roadmap in a week.&lt;/p&gt;

&lt;p&gt;Free, browser-based, nothing to install. Real-time collaborative editing, live PDF preview, version history with rollback, SyncTeX, and ZIP import for moving an existing project across.&lt;/p&gt;

&lt;p&gt;Next up, both early: an agentic LaTeX editor that can refine a section or insert a table without you leaving the document — LaTeX is unusually well suited to this, because the source is text and the output is verifiable, so you can actually check whether the model's suggestion compiled. And QuantumSketch, which turns a paper into slide decks.&lt;/p&gt;

&lt;p&gt;If you write LaTeX with other people&lt;br&gt;
letx.app — free tier, no install, import an existing project as a ZIP.&lt;/p&gt;

&lt;p&gt;If the compile loop doesn't feel faster, I'd genuinely like to know why.&lt;/p&gt;

&lt;p&gt;And if you've built collaborative editing on CRDTs and hit the structural-validity problem from a different angle, I want to hear how you handled it. That's the part I'm still least satisfied with.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
