LaTeX package for Pascal-like triangles 0 ▲ John D. Cook 1 hour ago · Tech · hide · 0 comments When I wrote about the harmonic triangle yesterday, I displayed the triangle left-aligned using fixed-width text because that was easier than producing the format you usually see for Pascal’s triangle and related triangles. 1 1/2 1/2 1/3 1/6 1/3 1/4 1/12 1/12 1/4 1/5 1/20 1/30 1/20 1/5 … I asked Claude to write a LaTeX package to make it easier to create Pascal-like triangles and it did a great job, including handy features I didn’t think to ask for. You can download it here: numtriangle.sty. I used this package to create the more attractive display below. Here’s the LaTeX code that produced the image above. \documentclass[border=4pt]{standalone} \usepackage{numtriangle} \NewTriangle{\Leibniz}{start=1, edges=1/\n, rule=\L - \P, fractions, format=\displaystyle, xsep=2.8em, ysep=2.8em} \begin{document} \Leibniz[rows=5] \end{document} I then compiled the code to an SVG file with the following. pdflatex leibniz.pdf pdftocairo -svg leibniz.pdf leibniz.svg Bell’s triangle is not defined in… No comments yet. Log in to reply on the Fediverse. Comments will appear here.