TeX.social

TeX Community Aggregator

Interpreting a PDF Structure Tree as XML

Extracting a Tagged PDF Structure Tree as XML The project has produced a new tool to extract the Structure Tree from a tagged PDF file as XML. This is a Lua script just requiring the texlua that is distributed with… Continue Reading →

Reverse counting in LaTeX

LaTeX has ability to integrate many standard and user-defined counters that count from a, b, …, roman and arabic numbers and many more. Even counting backwards are relatively straightforward if you set a static number from which LaTeX can count… Continue Reading →

TeX Users Group meeting 2025

The TeX Users Group (TUG) meeting 2025 will take place in Trivandrum, Kerala, India, from July 18-20 (Fri-Sun), 2025. It is hosted by TeXFolio, an institutional member and sponsor of the TeX Users Group. Conference information and the registration form… Continue Reading →

A part of the fundamental group of an n-dimensional bean

Original drawing by Daniel Littmann on X/Twitter, here drawn in TikZ. I used the hobby library for smooth open or closed paths, “to” paths with in and out angles for further smooth paths with a certain looseness, all nodes set… Continue Reading →

スターン・ブロコット木 (Stern–Brocot tree)

X/Twitterで、こちらの投稿を@884_96さんによって見かけました。 (4) の木構造が気に入ったので、素早くこの図を作成しました: Screenshot コードは以下の通りです: \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[every node/.style = { execute at begin node = $, execute at end node = $}, level distance = 1cm, level 1/.style = {sibling distance = 2cm}, level 2/.style = {sibling distance… Continue Reading →

切頭円錐

\documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{angles,calc,decorations.markings} \begin{document} \begin{tikzpicture}[thick, draw only after/.style = { preaction ={decorate, decoration={markings,mark=at position 0 with {\pgfmathsetmacro\mypoff{\pgfdecoratedpathlength*#1}\xdef\mypoff{\mypoff} \pgfmathsetmacro\mypl{\pgfdecoratedpathlength}\xdef\mypl{\mypl}}}}, postaction={draw, dash pattern = on 0pt off \mypoff on \mypl}}] \coordinate (o) at (0,0); \coordinate (a1) at (0.72, 1.33); \coordinate (a2) at (0.72,… Continue Reading →

\documentclass[border=10pt,tikz]{standalone} \usepackage{dsfont} \usetikzlibrary{angles, decorations.pathmorphing} \begin{document} \tikzset{smallcircle/.style = {circle, draw, fill=white, inner sep=2pt}} \def\r{1.2} \newcommand*{\U}[5]{% \path (#2,#3) coordinate (0) +(#4:\r) coordinate (1) +(#5:\r) coordinate (2) pic[thick, draw = red!80!black, angle radius=\r cm] {angle = 1–0–2} pic[thick, draw = black, angle radius=\r… Continue Reading →

Season’s Greetings from the LaTeX Project!

A Tagged PDF-themed holiday video! See also: Original Source by the LaTeX project team

ttbar plus W/Z boson production in pp

This posts shows code examples of Feynman diagrams of ttbar quark plus W or Z boson production in proton-proton collisions. For a nice overview from the experimental point of view, have a look at this review article by the CMS… Continue Reading →

Drawing solids

Asymptote can draw standard shapes (spheres, cylinders, cubes, etc) which you can then scale, rotate, and shift to create many other shapes. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy} import three; settings.render = 0; //Setup View size(200); currentprojection=orthographic(5,4,2); //Draw Axes pen thickblack =… Continue Reading →

Planes intersecting a hyperboloid

\documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy} // settings.outformat=”pdf”; // settings.prc = false; // settings.render = 16; settings.render = 0; import three; import graph; size(8cm,0); currentprojection = orthographic(2,0,10, up=Y); draw(-2X–2X,arrow=Arrow3(),L=Label(“$X$”, position=EndPoint)); draw(-2Y–2Y,arrow=Arrow3(),L=Label(“$U$”, position=EndPoint)); draw(-2Z–2Z); label(“$w \to \infty$”,(2,1,0)); draw((0.5,-1,1)–(0.7,-0.2,1),arrow=Arrow3(size=5bp),L=Label(“$\Pi_w$”, position=BeginPoint)); draw((1.5,-1.3,0)–(1.3,-0.8,0),arrow=Arrow3(size=5bp),L=Label(“$X+U = L \mathrm{e}^{w/L}$”,… Continue Reading →

LearnLaTeX in more languages

We launched learnlatex to provide high-quality teaching of core LaTeX concepts with interactive examples. From the start, we wanted to offer the ‘course’ in multiple languages: this was part of the structure from the start. Over time, several people have… Continue Reading →

Single top quark production in pp

This posts shows code examples of Feynman diagrams of single top production in proton-proton collisions, like those at the Large Hadron Collider (LHC). For a nice overview from the experimental point of view, have a look at this (13 TeV)… Continue Reading →

Better multicolumn marks: Pre-release of LaTeX 2025-06-01 is available for testing

We submitted the first pre-release version for the 2025-06-01 LaTeX kernel to CTAN recently. It should have made its way into TeX Live for everyone by now, so it’s ready for users to try. As the first pre-release, this contains… Continue Reading →

From a Hand Drawing to a TikZ Diagram

On X (Twitter), I saw a post by Ben Levinstein asking if any AI could do a good job turning hand-drawn diagrams into TikZ equivalents. I guess AI is not ready for this yet, but I can show how I… Continue Reading →

Cuti-cuti Malaysia: Customisable state-by-state holiday calendar for 2025

Annual cuti-cuti Malaysia calendar time — 2025 is nigh upon us. The Cuti-cuti Malaysia 2025 calendar LaTeX source files are available as an Overleaf Overleaf read-only project here. By default, when you open the project, it compiles and generates (may… Continue Reading →

TUGboat 45:3 published

TUGboat volume 45, number 3, has been mailed to TUG members. It is also available online and from the TUG store. In addition, prior TUGboat issue 45:2 is now publicly available. Submissions for the next regular issue are welcome and… Continue Reading →

Updated Thesis Template for Universiti Putra Malaysia

University Putra Malaysia has an updated thesis LaTeX template by Sina Abdipoor! Available as an Overleaf template here. See also: Original Source by LianTze Lim

The mythical LaTeX3

When the LaTeX Project team took over maintenance of LaTeX from Leslie Lamport, LaTeX2e was planned as an intermediate release to resolve immediate issues with the then-current LaTeX2.09. The ‘e’ (or properly ε) was meant to indicate a small change… Continue Reading →

A tree with fork edges

On X/Twitter, I saw a drawing by 黄餅もち. It is pretty easy to do in TikZ, so I quickly made this drawing, using LuaLaTeX: The code is: \documentclass[tikz,border=10pt]{standalone} \usepackage{luatexja-fontspec} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[edge from parent fork right, grow=east, every node/.style={draw}] \node… Continue Reading →

Perspective from Bergson

On X/Twitter, I saw a drawing by toshᴉzumi. It’s pretty complex, well made, I like it very much. I had a few thoughts how I would adjust it a bit to my taste. toshᴉzumi shared the code, so I played… Continue Reading →

Engine news from the LaTeX Project

The latest release of LaTeX went to CTAN on Friday, and moves us forward in truly automatic tagging for PDFs, particularly for mathematics. As part of the work, we have been looking at the capabilities of different engines. Here, I… Continue Reading →

Iso-Papier mit LaTeX und dem gridpapers Paket

Hier ein Beispiel aus der gridpapers Doku, wie man mit LaTeX isometrische Papiere gestalten kann. \documentclass{article} \usepackage[pattern=iso, %tri für senkrecht patternsize=0.5cm, textarea, bgcolor=white, %majorcolor={green}, minorcolor={lightgray}, geometry={a4paper, margin=1cm}]{gridpapers} \begin{document} \thispagestyle{empty} ~ \end{document} gridpapers-iso gridpapers-tri Uwe Uwe Ziegenhagen likes LaTeX and Python,… Continue Reading →

Drum Patterns mit LaTeX

Hier ein erster Entwurf, wie man mit LaTeX Drum Patters setzen kann. \documentclass[12pt,ngerman]{scrartcl} \usepackage[margin=1cm]{geometry} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{graphicx} \usepackage{xcolor} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Define the pattern as a comma-separated list \def\pattern{x,-,-,-,-,x,x,-,-,-,x,x,-,-,-,x} \def\cellsizex{1cm} \def\cellsizey{0.5cm} \node[draw, rectangle,minimum width = \cellsizex, align=left,minimum height=\cellsizey] (a)… Continue Reading →

LaTeX 2024-11-01 released and distributed

We sent the 2024-11-01 release of the LaTeX kernel to CTAN yesterday. By tomorrow it should be available to most users via TeX Live or MiKTeX. Thirty years of LaTeX2e This release marks 30 years since the first release of… Continue Reading →

Drawing, clipping, and aligning in TikZ

I saw a question on X/Twitter by とと about drawing certain circles, partially filled, together with aligned equations. So, I quickly wrote some TikZ code to demonstrate how such drawings can be done. This is the result: And this is… Continue Reading →

Annotated chemical equation

I saw a question on X/Twitter by @ritsudesu_yoro about drawing arrows and adding labels to chemical equation. @RARARARAICHUUU recommended doing it in TikZ, and I fully agree with this suggestion. So I wrote quickly some TikZ code to demonstrate how… Continue Reading →

Proton-proton hard scattering

Below are some code examples of Feynman diagrams showing hard processes in proton-proton collisions. Click on a diagram to jump to the code & download links below: Inelastic hard process: \documentclass[11pt,border=4pt]{standalone} \usepackage{feynmp-auto} \begin{document} \begin{fmffile}{feyngraph} \fmfframe(-2,44)(0,44){ % padding (L,T)(R,B) \begin{fmfgraph*}(160,80) %… Continue Reading →

TUGboat 45:2 published

TUGboat volume 45, number 2, the proceedings of the TUG’24 conference, has been mailed to TUG members. It is also available online and from the TUG store. In addition, prior TUGboat issue 45:1 is now publicly available. Submissions for the… Continue Reading →

ttbar production in pp

This posts shows code examples of Feynman diagrams of ttbar production in proton-proton collisions, like those at the Large Hadron Collider (LHC). For a nice overview from the experimental point of view, have a look at this review article by… Continue Reading →

Back-to-back topology & track multiplicity

Illustration of a back-to-back event topology of two τ leptons (to define acoplanarity or azimuthal separation Δφ in the transverse plane), and multiplicity of pileup (PU) and hard scattering (HS) tracks in a small window along the beam axis (z)…. Continue Reading →

TUG Conference 2024 in Prague: talks and accessibility workshop

The TUG conference 2024 in Prague was a hybrid conference, i.e., all talks were recorded and also streamed. The recordings have been cut and cleaned up by Norbert Preining and are now available on YouTube. All in all, there are… Continue Reading →

Tagging project progress

The LaTeX Project have been working for about 4 years now on creation of automatically tagged PDFs from (more-or-less) unmodified LaTeX documents. We’ve been reporting regularly in LaTeX News, and things are moving forward nicely. We (Frank, Ulrike and I)… Continue Reading →

How to create your own fine-tuning or training dataset for computer vision using Supervisely

In an earlier post, I described the considerations that go into creating a training dataset for Computer Vision, including how read more How to create your own fine-tuning or training dataset for computer vision using Supervisely See also: Original Source… Continue Reading →

Photon-induced dilepton production in pp (g-2)

Below are some code examples of photon-induced processes in proton-proton collisions. See for example this CMS observation of γγ → ττ and the constrains on the τ anomalous electromagnetic moments, which I worked on. I presented some of the diagrams… Continue Reading →

Anomalous magnetic moment (g-2)

Below are some code examples the leading contribution to the anomalous magnetic moment (g-2), which is the one-loop diagram that was famously calculated by Julian Schwinger in 1948. Some of the diagrams below were presented in this seminar talk (UZH,… Continue Reading →

Plane in space

\documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy} settings.render=0; unitsize(1cm); import three; draw(Label(“$x$”,EndPoint,align=SW),O–2.5X,Arrow3); draw(Label(“$y$”,EndPoint),O–4Y,Arrow3); draw(Label(“$z$”,EndPoint),O–3Z,Arrow3); triple A=(1,sqrt(3),0), B=2Z; path3 p=plane(A,B); draw(surface(p),magenta+opacity(.2)); draw(p,magenta+.6pt); label(“$x\sqrt{3} -y =0$”,A+B,NE,magenta); draw(Label(scale(.6)*”$1$”,EndPoint,align=NW,black),A–(A.x,0,0),gray+dashed); draw(Label(scale(.6)*”$\sqrt{3}$”,EndPoint,align=.4dir(60),black),A–(0,A.y,0),gray+dashed); \end{asy} \end{document} Source: TeX.SE Author: Black Mild (License) See also: Original Source

Double cone

\documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy} settings.render=0; import graph3; currentprojection=orthographic(2,2,.5,zoom=.9); unitsize(1cm); pen plane1=red, plane2=cyan, plane3=blue,pcone=yellow; real a=1.8,h=3; surface c=scale(a,a,h)*shift(0,0,-1)*unitcone; draw(zscale3(-1)*c,pcone+opacity(.5)); draw(c,pcone+opacity(.3)); real b=2.2; path3 g=scale3(b/a)*unitcircle3; draw(shift(0,0,b)*g,plane1+1pt); draw(shift(0,0,-b)*g,plane3+1pt); surface pl=shift(-3,-4,0)*scale(6,8,0)*unitplane; draw(shift(0,0,b)*pl,plane1+opacity(.3)); draw(pl,plane2+opacity(.3)); draw(shift(0,0,-b)*pl,plane3+opacity(.3)); draw(Label(“$\eta_1$”,EndPoint),O–4*X,Arrow3); draw(Label(“$\eta_2$”,EndPoint),O–5*Y,Arrow3); draw(Label(“$\eta_3$”,EndPoint,align=E),-3Z–4*Z,Arrow3); \end{asy} \end{document} Source: TeX.SE Author: Black Mild… Continue Reading →

Higgs pair production in pp

This posts shows code examples of Feynman diagrams of Higgs pair production in proton-proton collisions, like those at the Large Hadron Collider (LHC). For a nice overview from the experimental point of view, have a look at this article by… Continue Reading →

Higgs decay

This posts shows code examples of Feynman diagrams of Higgs boson decay. For a nice overview from the experimental point of view, have a look at this article by the CMS collaboration, published in Nature. For an overview of the… Continue Reading →

Higgs production in pp

This posts shows code examples of Feynman diagrams of single Higgs boson production in proton-proton collisions, like those at the Large Hadron Collider (LHC). For a nice overview from the experimental point of view, have a look at this article… Continue Reading →

How to annotate fast

In 2017, I had an internship at the German Historical Institute in Paris, where my task was to annotate around 1,200 regests. My job was to get them from source data in a Word document to TEI-XML in the end,… Continue Reading →

Constructing a triangle

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[inline=true] import math; import graph; struct construct{ pair[] loc; string[] name; pair[] namePos; guide[] straight; pen[] straightPen; guide[] circ; pen[] circPen; pen thinpen; bool pqr(pair p, pair q, pair r){ return (p.x*(q.y-r.y)+(r.y-p.y)*q.x+r.x*(p.y-q.y))>0; }; pair lastpoint(){ assert(loc.length>0); return… Continue Reading →

Drawing multiple plots

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[inline=true] settings.tex=”pdflatex”; import graph; import math; import palette; size(12cm); import fontsize;defaultpen(fontsize(8pt)); real xmin=-3.6, xmax=5; real ymax=1.6, ymin=-ymax; real dxmin=0, dxmax=0.1; real dymin=0.1, dymax=dymin; xaxis(“$x$”,xmin-dxmin,xmax+dxmax,RightTicks(Step=1,step=0.2,OmitTick(0,2.2)),above=true); yaxis(“$y$”,ymin-dymin,ymax+dymax,LeftTicks (Step=1,step=0.2,OmitTick(0,1.4)),above=true); real[] n={-3, -2, -1, 0, 1, 2, 3}; pen[] p=Gradient(n.length, blue,red);… Continue Reading →

Filled contour plot

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[inline=true] import graph; import contour; import palette; defaultpen(fontsize(10pt)); size(14cm,8cm,IgnoreAspect); pair xyMin=(1,74); pair xyMax=(3,86); real f(real x, real y) {return -2.051^3*1000/(2*3.1415*(2.99*10^2)^2)/(x^2*Cos(y)^2);} int N=200; int Levels=16; defaultpen(1bp); bounds range=bounds(-3,-0.10); // min(f(x,y)), max(f(x,y)) real[] Cvals=uniform(range.min,range.max,Levels); guide[][] g=contour(f,xyMin,xyMax,Cvals,N,operator –); pen[] Palette=Gradient(Levels,rgb(0.3,0.06,0.5),rgb(0.9,0.9,0.85));… Continue Reading →

Blobs

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; size(7cm); import graph; import patterns; import fontsize; defaultpen(fontsize(9pt)); texpreamble(“\usepackage{lmodern}”); pen hatchPen=orange+0.4bp; pen borderPen=deepblue+1bp; pen arrPen=red+1bp; pen areaBG=palegreen; pair[] dots={ (25,280), (60,280), (25,140), }; pair star=(60,137); guide[] arrows={(25,265)–(25,160), (60,265){dir(-90)}..(60,200)..(40,160), }; guide[] markedArrows={ (150,280)–(200,280), (150,140)–(200,140),… Continue Reading →

Vertical spiral in cylinder

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; import solids; import graph3; usepackage(“newtxmath”); size(200,400); real r=3; real h=2.5pi; currentprojection=orthographic(8,2,4); revolution R=cylinder(O,r,h); // The circular helix triple f(real t){ real a=r*cos(t); real b=r*sin(t); real c=t; return (a,b,c); } real k=7; path3 plane=(k,k,0)–(k,-k,0)–(-k,-k,0)–(-k,k,0)–cycle;… Continue Reading →

Folium of Descartes

\documentclass[border=10pt]{standalone} \usepackage{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.render=8; settings.prc=false; size(8cm); import three; import graph; import fontsize; defaultpen(fontsize(9pt)); pen[] fillpen={ red, orange, yellow, green, lightblue, blue, darkblue }; real xmin=0, xmax=20, ymin=0, ymax=20; xaxis(xmin,xmax,RightTicks(Step=10,step=5)); yaxis(ymin,ymax, LeftTicks(Step=10,step=5)); real ra(real t, real a){return 3*a*sin(t)*cos(t)/(sin(t)^3+cos(t)^3);}; real r(real);… Continue Reading →

« Older posts

© 2025 TeX.social