TeX.social

TeX Community Aggregator

Page 3 of 13

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 →

【新刊案内】『TikZによるLaTeXグラフィックス』 – New TikZ book in Japanese

In November 2024, a translation of the TikZ book written by Stefan Kottwitz has been released by Asakura Publishing. ​2024年11月に、Stefan Kottwitz著のTikZに関する書籍の翻訳版が朝倉書店から発売されました。LaTeXで画像を作るための実用的な入門書。TikZにより数学、科学、技術論文に図や画像を簡単に入れられる。アイデアやデータを可視化してプロフェッショナルな図表やプロットを2次元でも3次元でも表示できるようになるために。 本書の内容 第1章「TikZで始める」はTikZ入門だ。他のグラフィックスパッケージと比較してTikZの利点を論じる。TikZとは何かという全体像と独特の哲学を理解する。TikZをインストールする方法を学び、簡単な図を作成していく。さらに、TikZや他のパッケージのマニュアルなどを参照するための役立つヒントが得られる。 第2章「TikZで最初の画像を作る」では、LaTeX文書を一から作る。TikZの構文を理解して、2 次元および3 次元のデカルト座標と極座標を学ぶ。さらに、基本的な多角形の作り方、画像での色の使い方を学ぶ。 第3章「ノードの位置決めと描画」ではノードという基本的概念を与える。様々な形態のノードを位置決めして並べ、テキスト、画像、ラベルを追加する方法を学ぶ。 第4章「辺と矢印を描く」では、ノードの間を辺、直線、曲線、矢印でつなぐ方法を示す。辺にテキストラベルをつける方法や並べ方、位置、方向を調整する方法を学ぶ。線のスタイルや矢頭の形状をカスタマイズしたり両方向にする方法も学ぶ。 第5章「スタイルと画像の読み込み」では、TikZ要素をグローバルまたはローカルなstyleで定義して使う方法を学ぶ。ノードと辺でスタイルを使う方法とスコープを使って画像全体や画像の一部に対してスタイルを適用する方法を学ぶ。さらに、ミニTikZ画像を他の画像の構成要素として使う方法も学ぶ。 第6章「木とグラフの描画」では、親子の階層関係を表す木構造を作る方法を示す。アイデアを可視化するマインドマップの描き方やグラフを生成する簡潔な構文を与える。さらに、LaTeXのtabular環境と同様な行列形式にオブジェクトを配置する方法も示す。/p> 第7章「塗りつぶし、クリッピング、シェーディング」では、より高度な技法から始める。複雑なパスで塗りつぶす方法、特定の領域の画像をクリップしたり、ある色から別の色になめらかに色を変える方法を学ぶ。 第8章「パスの豊かな表現」では、線を曲げたりジグザグにしたり波打たせるようなクリエイティブな効果を加える技法を学ぶ。テキストを曲線に沿わせたり、1 つのパスに複数の作用を適用する方法も学ぶ。 第9章「レイヤー、オーバーレイ、透明性を使う」では、様々なレイヤーに描画して、オブジェクトをテキストや画像の背後に置く方法を学ぶ。透明性を使ってこの効果を上げる方法も学ぶ。さらに、TikZのビジュアルな注釈を通常のLaTeX文書にスーパーインポーズしたり、透かしのような背景画像を追加したりする方法を学ぶ。 第10章「座標とパスで計算する」では、TikZで座標値を計算する効率的な方法を示す。この章は座標計算、距離や射影を使った座標の計算、パスの交点の計算を扱う。また、repeatコマンドでループしてコードを簡単にする方法を学ぶ。 第11章「座標とキャンバスを変換する」では、変換による移動、回転、拡大縮小に焦点を絞る。図に対してちょっとした手直しや複雑な変更を加える必要がある場合に、適切な調整や位置変更ができるスキルを学ぶ。 第12章「なめらかな曲線を描く」では簡単な曲線の曲がりを変えたり、なめらかにして角の尖りをなくし、手書きのように簡単に曲線を描く様々な方法を学ぶ。 第13章「2Dおよび3Dでのプロット」では、座標系でデータをプロットする方法を扱う。2Dおよび3Dでデカルト座標と極座標の座標軸のカスタマイズ、凡例の追加、パラメトリック曲線のプロット、プロットの交点の計算、プロットの間の色塗りを扱う。 第14章「各種チャートを描く」では、フローチャート、関係図、説明図、数量を表す図の作り方を学ぶ。図全体を自動的に作れるようにパッケージの活用法を学ぶ。 第15章「TikZで楽しもう」では、スキルの高いTikZユーザが追加パッケージのプログラミングを楽しみTikZコミュニティでシェアする方法などを列挙する。かわいい動物、人物、国旗、パズルやゲームを描画する方法も学ぶ。… 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 →

Radar-like diagram

Drawing a radar-like diagram. Text can be added with the function putText; the legend is written next to the data sector. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{asydef} struct RadarPlot{ real[] data; string[] Legend; pen[] Pens; pen gridPen; pen axisPen; pen labelPen; pen legendPen;… Continue Reading →

Projection of Circle onto Spherical Surface

\documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] import graph3; currentprojection=orthographic(-5,-4,2,center=true); guide3 sphere_x_cyl(real a, real r, real R, int n=10){ // return a closed curve of the Sphere–cylinder intersection (top part) // only for the case when a cylinder is completely inside // except… Continue Reading →

Reuleaux Triangle

The boundary of a Reuleaux triangle is a constant width curve based on an equilateral triangle. All points on a side are equidistant from the opposite vertex. (Wikipedia) \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] path triangle = scale(1/2)*polygon(3); pair a = point(triangle,… Continue Reading →

Coloring the faces of a graph

\documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] pen lineAb=black+3pt; pen lineAt=white+1.2pt; pen lineB=dashed+darkblue+1.3pt; pen circA=lightyellow; pen circB=darkblue; pen rimA=red; pen rimB=blue; pen shade=springgreen; guide circ=unitcircle; real d=5; pair a,b,c,u; a=(0,-d); b=(d,-d); c=(d,0); u=1.618b; guide ga=shift(a.x,a.y)*circ; guide gc=shift(c.x,c.y)*circ; guide garc=a{dir(-45)}..u..{dir(135)}c; pair xa=intersectionpoint(ga,c–a); pair xc=intersectionpoint(gc,a–c);… Continue Reading →

Spiral of Roots

This example plots a spiral of roots. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asydef} unitsize(2cm); import fontsize; defaultpen(fontsize(9pt)); pen linepen=deepblue+0.8bp; pen labelpen=black; pen markpen=gray+0.6bp; void spiralOfRoots(int n){ assert(n>0); real w=0.15; pair O=0E,a=E,b; pair p,q,r; for(int i=1;i<=n;++i){ draw(O–a,linepen); label(“$\sqrt{“+string(i)+”}$”,O–a,O,labelpen,UnFill); b=a+dir(degrees(a)+90); draw(a–b,linepen); p= w*dir(b-a); r=-w*dir(a);… Continue Reading →

Torus

This example plots a lattice of points on the surface of a torus. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; import graph3; pen surfPen=rgb(1,0.7,0); pen xarcPen=deepblue+0.7bp; pen yarcPen=deepred+0.7bp; currentprojection=perspective(5,4,4); real R=2; real a=1; triple fs(pair t) { return ((R+a*Cos(t.y))*Cos(t.x),(R+a*Cos(t.y))*Sin(t.x),a*Sin(t.y)); }… Continue Reading →

Cubes

This solution illustrates (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; unitsize(1cm); import three; currentprojection=orthographic(3,2,1,center=true,zoom=.8); //currentprojection=orthographic(0,10,0,zoom=.8); light White=light(new pen[] {rgb(0.38,0.38,0.45),rgb(0.6,0.6,0.67), rgb(0.5,0.5,0.57)},specularfactor=3, new triple[] {(5,5,5),(0,5,5),(-0.5,0,2)}); currentlight=White; real a=3.2, b=1.5; path3[] p=unitbox; surface q=unitcube;… Continue Reading →

Fish

A fish for fun \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; real w=600,h=400; size(h,w); pen bgPen=rgb(0,0.647,1), bodyPen=rgb(0.847,0.196,0.133), whitePen=rgb(1,1,1), eyePen=rgb(0.004,0.18,1)+opacity(0.01), mouthPen=rgb(1,1,1), scalesPen=rgb(0.98,1,0)+12pt; pair[][] bBody={ {(454,270),(436,252),(443,251),},{(433,269),(424,286),(398,322),}, {(361,352),(324,382),(276,405),},{(218,394),(160,382),(92,334),}, {(55,295),(18,256),(12,226),},{(13,187),(14,149),(21,102),}, {(65,66),(109,30),(189,3),},{(243,2),(296,1),(322,24),}, {(348,46),(374,68),(398,89),},{(414,109),(430,129),(437,149),}, {(450,143),(463,137),(481,105),},{(504,80),(526,55),(552,37),}, {(568,40),(585,43),(592,66),},{(584,97),(576,128),(553,166),}, {(542,181),(531,197),(531,189),},{(543,204),(555,218),(579,256),}, {(585,286),(591,316),(578,339),},{(571,349),(563,359),(561,356),}, {(538,338),(515,320),(472,287),}, }; pair[][] bWhite={ {(223,261),(227,278),(209,303),},{(192,312),(174,321),(156,315),}, {(141,304),(127,293),(115,276),},{(116,260),(118,244),(132,228),}, {(143,222),(155,215),(162,220),},{(179,227),(195,234),(220,244),}, };… Continue Reading →

Möbius strip

The Möbius strip, as a parametric surface. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; import graph3; size(200,IgnoreAspect); size3(200,IgnoreAspect); currentprojection=orthographic(camera=(1.5,0.3,2),up=Z,target=(0.5,0,0),zoom=0.8); real r=2, w=1; real x(real u, real v){return (r+v/2*cos(3pi*u))*cos(2pi*u);}; real y(real u, real v){return (r+v/2*cos(3pi*u))*sin(2pi*u);}; real z(real u, real v){return (v/2*sin(3pi*u));};… Continue Reading →

Trefoil knot

\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 graph3; import tube; size(200,0); currentlight.background=paleyellow+opacity(0.0); currentprojection=orthographic(camera=(-40,9,70), up=Z); real x(real t){return sin(t)+2sin(2t);} real y(real t){return cos(t)-2cos(2t);} real z(real t){return -sin(3t);} guide3 g=graph(x,y,z, 0, 2pi,operator..); draw(tube(g,circle((0,0),0.618)),white); \end{asy} \end{document} Source: TeX.SE Author: g.kov (License) See… Continue Reading →

One-sided trefoil knot

\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 graph3; import tube; size(200,0); currentlight.background=paleyellow+opacity(0.0); currentprojection=orthographic(camera=(-10,49,-58),up=(0.92,0.36,0.14)); real x(real t){return sin(2pi*t)+2sin(2*2pi*t);} real y(real t){return cos(2pi*t)-2cos(2*2pi*t);} real z(real t){return -sin(3*2pi*t);} guide3 g=graph(x,y,z, 0, 1,operator..); pair[][] p={ {(-40, 20),( -56.8421, 23.4210),( -78.9473, 28.6842),(-90, 20)}, {(-90,… Continue Reading →

Blowup of a plane at a point

The following image illustrates the blowup of a plane at a point–an important construction in algebraic geometry. \documentclass[border=10pt]{standalone} \usepackage[inline]{asymptote} \begin{document} \begin{asy}[width=\the\linewidth,inline=true] settings.outformat=”pdf”; settings.render=0; settings.prc=false; usepackage(“lmodern”); usepackage(“fontenc”,”T1″); usepackage(“amssymb”); // for the \mathbb command defaultpen(fontsize(10pt)); import graph3; size(400,400); currentprojection=orthographic(5,-10,4); real R=8; struct… Continue Reading →

Bezier control points of a letter

\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 fontsize; defaultpen(fontsize(9pt)); real wd=0.6bp; pen dotPen=deepblue+wd; pen dotFill=dotPen; pen dotPenB=blue+wd; pen dotPenC=red+wd; pen linePen=deepblue+wd; pen fillPen=lightgreen+opacity(0.5); pen thinLinePen=black+wd/2; guide[] g; g=texpath(“$\Omega$”); filldraw(g,fillPen,linePen); pair a,b,c,d; pair labdir; int pointNo=0; for(int i=0;i<g.length;++i){ for(int… Continue Reading →

Chain

\documentclass[margin=10pt,convert]{standalone} \usepackage{asymptote} \begin{document} \begin{asydef} // Global Asymptote definitions real linkLen=1, linkWidth=2pt; real rl=2+linkLen; // distance between beads guide link=(1,0)–(1+linkLen,0); // a link pen beadColor=orange; pen linkColor=beadColor; void bead(transform t){ draw(t*link,linkColor+linkWidth); radialshade(t*unitcircle, beadColor,shift(t)*(-0.4,0.3),0.01 ,black,shift(t)*(-0.4,0.3),1.5); } pair operator>(pair pos=(0,0), real phi){ transform… Continue Reading →

Basic QED processes (LO)

Some leading-order diagrams of basic QCD processes, inspired by Table 7.1 of Griffith’s Introduction to Elementary Particles (2008). Electron-muon scattering Electron-electron scattering Electron-positron scattering Compton scattering Inelastic scattering Click on a diagram to jump to the code & download links… Continue Reading →

Chains of Rings

% chain.tex : % \begin{filecontents*}{chainofrings.asy} struct chainOfRings{ int n; // number of rings real w; pair origin; pen[] clrA={deepgreen,deepblue}; pen[] clrB={white,lightyellow,palered}; guide qring; real Rscaled(int); real rscaled(int); real eps; void drawHalf(int i,real Rt,real rt, pair p,real phi){ qring=rotate(phi)*(arc((0,0),Rt,-eps,90+eps)–reverse(arc((0,0),rt,-eps,90+eps))–cycle); radialshade(shift(p)*qring ,clrA[i%clrA.length],… Continue Reading →

Plot a function in integral form

\documentclass{article} \usepackage[inline]{asymptote} \usepackage{lmodern} \begin{document} \begin{asy} size(300,200,IgnoreAspect); import graph; real F(real t){return 4/sqrt(1+t^4);} real f(real x){return simpson(F,x,2x);} pen axPen=darkblue; pen fPen=red+1bp; draw(graph(f,-7,7,n=200),fPen); string noZero(real x) {return (x==0)?””:string(x);} defaultpen(fontsize(10pt)); xaxis(axPen,LeftTicks(noZero,Step=2)); yaxis(axPen,RightTicks(noZero,Step=0.5)); label(“$f:x\mapsto \displaystyle\int_x^{2x}” +”\frac{4}{\sqrt{1+t^4}}\, \textrm{d}t$” ,(1.7,f(1.7)),NE); \end{asy} \end{document} Source: TeX.SE Author: g.kov… Continue Reading →

Are you loading incompatible packages with a template?

(Reader, this is going to be a long, ranty, rambling piece; I apologise beforehand.) There are LaTeX packages for typesetting all kinds of things. And sometimes, there are more than one LaTeX  packages that can do (almost) the same thing… Continue Reading →

Zotero 7

Nach langer und gründlicher Vorbereitung wurde gestern Zotero 7 freigegeben, und die neue Version ist schön geworden. Nachdem ich zwei Jahre lang Zotero 6 unter macOS mit Rosetta betrieben habe, ist der Performance-Zuwachs durch die neue native Version auch unter Apple Silicon… Continue Reading →

Blurred curve

\documentclass[border=10pt]{standalone} \usepackage{textgreek} \usepackage[inline]{asymptote} \usepackage{lmodern} \begin{document} \begin{asy} size(200); import graph; pair[] botP={(0,0.09),(0.252,0.196),(0.383,0.429),(0.479,0.588), (0.574,0.668),(0.733,0.726),(0.883,0.747),(1,0.747),}; pair[] topP={(0,0.341),(0.252,0.451),(0.383,0.677),(0.479,0.841), (0.574,0.92),(0.733,0.977),(0.883,0.993),(1,1),}; pair[] midP=0.5*(topP+botP); guide gtop=graph(topP,operator..); guide gbot=graph(botP,operator..); guide gmid=graph(midP,operator..); real f(real x){ real t=times(gmid,x)[0]; return point(gmid,t).y; }; real s(real x){ real tt=times(gtop,x)[0]; real tb=times(gbot,x)[0]; return point(gtop,tt).y-point(gbot,tb).y;… Continue Reading →

Quarter sessile drop

\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 three; import solids; unitsize(1cm); currentprojection = orthographic(5,4,2); path3 x = (-1,0,0)–(4.5,0,0); draw(x,EndArrow3); label(“$x$”,(4.7,0,0)); path3 y = (0,-1,0)–(0,4.5,0); draw(y,EndArrow3); label(“$y$”,(0,4.7,0)); path3 z = (0,0,-1)–(0,0,4.5); draw(z,EndArrow3); label(“$z$”,(0,0,4.7)); label(“$O$”,(0,-0.3,-0.5)); path3 a = arc(O,3,0,0,90,0); draw(a); revolution… Continue Reading →

Emacs ohne Maintainer für macOS und Windows

Es mag vorkommen, dass einem die eine oder die andere Anmerkung auf der Emacs-Devel-Liste entgeht. Aber dann gibt es ja immer noch die wöchentliche Zusammenfassung der Emacs News von Sacha Chua. In der heutigen Ausgabe verlinkt sie einen Teil-Thread, in… Continue Reading →

AUCTeX wird nur noch über ELPA verteilt

Nach einer längeren Diskussion hat Tassilo Horn heute Morgen bekanntgegeben, dass AUCTeX, die Entwicklungsumbegung für (La)TeX in Emacs, nicht mehr als Tarball verteilt werde. AUCTeX kann seitdem nur noch über das Archiv ELPA bezogen werden. AUCTeX 13.3 war demnach die letzte… Continue Reading →

« Older posts Newer posts »

© 2026 TeX.social