67 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

The spooky blue screen of death: \documentclass[12pt]{beamer} \hypersetup{pdfpagemode=FullScreen} \setbeamertemplate{navigation symbols}{} \setbeamercolor{background canvas}{bg=cyan!70!blue} \...
Fran's user avatar
  • 79.4k
43 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

Here is a minimalist contribution \phantom{} \end
Guido's user avatar
  • 30.6k
41 votes

Simulating hand-drawn lines

[EDIT on August 13, 2018: better and shorter code, but unfortunately a lot slower now...] I realize I'm a bit late to the party, but here's my attempt. I tried to implement the ideas they used in ...
Frunobulax's user avatar
  • 2,126
40 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

Any Comic Sans fans here? \documentclass[border=9,tikz]{standalone} \usetikzlibrary{shadings} \usepackage{fontspec} \setmainfont{Comic Sans MS} \begin{document} \fontsize{170pt}{0}\bfseries \...
Symbol 1's user avatar
  • 36.7k
35 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

A drowning witch. (with apologies to the late Roger Price) \documentclass[varwidth]{standalone} \usepackage{pict2e} \begin{document} \begin{picture}(200,200) \thicklines \put(10,10){\line(0,1){180}\...
Mark Wibrow's user avatar
  • 70.1k
33 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

How about some haunting Minecraft mobs like a cheeky Enderman or a hot-headed Creeper? ;) These were created using tikz‑3dplot and LuaTeX. You can see the full source of the Enderman below, but all ...
szantaii's user avatar
  • 4,699
32 votes
Accepted

Seasonal Challenge (Contributions from TeXing Dead Welcome)

Third Addition (!) Now that the nightmare depicted in my original answer has become real, let us try to lighten the spirits by considering @cfr’s comment about cats. I was forced to add another ...
GuM's user avatar
  • 21.4k
30 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

OK, it has been a rainy Saturday afternoon, but I must be crazy to have wasted more than three hours doing this… The idea is that, since (La)TeX is a language primarily designed to handle text with ...
GuM's user avatar
  • 21.4k
27 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

For the sake of having a duck here, and to honour Harry Potter fans worldwide, here's my humble entry to the seasonal contest. :) As usual, the code is quite long for being posted here, so it's ...
Paulo Cereda's user avatar
  • 44.1k
26 votes

Package for typesetting Feynman diagrams (efficiency of `feynmp` and `tikz`)

The answer by Jake inspired me to write TikZ-Feynman, a dedicated package that uses TikZ' graph drawing library in order to draw Feynman diagrams. It has just recently been uploaded to CTAN and you ...
JP-Ellis's user avatar
  • 8,859
24 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

Two years ago I provided an image that some people commented looked too smiley, so here is the new improved 2016 version with a fierce scary growl. \documentclass{article} \usepackage{color} \...
David Carlisle's user avatar
22 votes

Seasonal Challenge (Contributions from TeXing Dead Welcome)

The family of Arthur's ghost Cézard with PSTricks. http://pstricks.blogspot.fr/2011/11/synthese-additive-et-soustractive-des.html
user73104's user avatar
  • 949
21 votes

Simulating hand-drawn lines

Has anyone noticed how it looks more natural when we just superpose lines? I guess that when we hand drawn we are not only introducing a random component, we some times pass the pencil again, maybe ...
alexis's user avatar
  • 481
20 votes
Accepted

Is Metapost still relevant in the age of Lua etc.?

I was one of the persons answering in the linked question with a metapost/metafun example to the tikz question, and now I see that another metapost answer was in fact selected. I do not see why ...
mickep's user avatar
  • 8,445
17 votes

Drawing minimal xy axis

Just a simple way, easy to adapt, (but the lines or not dashed). \documentclass{article} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \tkzInit[xmin=-5,xmax=5,ymin=-5,ymax=5] \tkzGrid[...
Arne Timperman's user avatar
17 votes

Flexure of a Grid

If all you need on the belt is the grid, there is an easy way by combining postactions (for lines parallel to the path) and dash patterns (for lines perpendicular to the path) \documentclass[border=9,...
Symbol 1's user avatar
  • 36.7k
16 votes

wood pattern with metapost

I just learned about the fantastic MetaPost package fiziko created by @sergey-slyusarev. The code (I use ConTeXt to generate this minimal example, it will be similar using LaTeX) \startMPpage[offset=...
mickep's user avatar
  • 8,445
15 votes
Accepted

How to draw dots equally spaced along a path?

To follow this solution, you might like to look up "arclength" and "arctime" in the Metapost manual, or read my explanation below. \documentclass{standalone} \usepackage{luamplib} \everymplib{...
Thruston's user avatar
  • 41.8k
15 votes
Accepted

wood pattern with metapost

In addition to @mickep 's answer: Sadly, there was no macro to automatically fit a woodBlock into an arbitrary path, now i've added one ( https://github.com/jemmybutton/fiziko/commit/...
Sergey Slyusarev's user avatar
14 votes

Flexure of a Grid

Here is my first attempt in Metapost, using the handy interpath operation to draw the "horizontal" grid lines. \documentclass[border=5mm]{standalone} \usepackage{luatex85} \usepackage{luamplib} \...
Thruston's user avatar
  • 41.8k
13 votes

With which package will I create, in the shortest code, two points with horizontal error bars with overlap region dashed?

Just for code-golf fun with Plain TeX and \pdfliteral; no packages required. :-) \pdfliteral{q 0.8g 0.2w 38 0m 38 20l 42 20l 42 0l B 1w 0g 0 0m 100 0l S 100 0m 95 1.5l 95 -1.5l b* 18 20m 42 20l S ...
Paul Gessler's user avatar
  • 29.4k
12 votes
Accepted

How to support unicode characters in metapost?

You don't say much about your environment so I'm guessing. Here are three ways to set unicode characters in Metapost. Traditional Latex To use UTF8 in your label strings, you can do this sort of thing:...
Thruston's user avatar
  • 41.8k
12 votes
Accepted

Format decimal(i) numbers

Tell Metapost to use better precision (see “3.9 Instances” in the Metafun manual). \startMPpage[instance=decimalfun] numeric u; path yy; u:= 3cm; for i=0 step 2/10 until 2: draw (left--right) ...
Henri Menke's user avatar
12 votes

Flexure of a Grid

I'm a bit late to the party, but wanted to study this answer of Symbol 1 in depth and give it a try here. The result is a little generalization of his code, plus a few things added for the drawing of ...
frougon's user avatar
  • 24k
11 votes

How to use Metapost to draw right-hand rule of structural mechanics

Here's a Metapost version as the OP requested. There's nothing very clever about this apart from the actual sequence of paths to draw the hand. I captured these from a sketch (of my left hand) on ...
Thruston's user avatar
  • 41.8k
11 votes

wood pattern with metapost

Here's the beginning of an answer. More work needed to make it robust and easily re-usable.... prologues := 3; outputtemplate := "%j%c.eps"; vardef wavy expr pa = point 0 of pa for a = s ...
Thruston's user avatar
  • 41.8k
10 votes

How to draw tangent line of an arbitrary point on a path in TikZ

Update an Asymptote answer (19 March 2022) simple and direct way, both 2D and 3D curves. TikZ considers tangents/normals as decorations; meanwhile Asymptote treat them as true paths. For 2D curve: // ...
Black Mild's user avatar
  • 17.3k

Only top scored, non community-wiki answers of a minimum length are eligible