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}
\...
43
votes
Seasonal Challenge (Contributions from TeXing Dead Welcome)
Here is a minimalist contribution
\phantom{}
\end
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 ...
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
\...
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}\...
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 ...
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 ...
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 ...
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 ...
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 ...
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}
\...
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
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 ...
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 ...
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[...
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,...
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=...
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{...
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/...
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}
\...
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 ...
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:...
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) ...
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 ...
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 ...
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 ...
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:
// ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
metapost × 499tikz-pgf × 77
context × 70
diagrams × 47
pstricks × 40
graphics × 37
luatex × 36
asymptote × 33
metafun × 26
metafont × 23
pdftex × 18
fonts × 16
metauml × 15
luamplib × 14
miktex × 10
labels × 9
pgfplots × 8
plot × 8
macros × 7
color × 7
graphs × 6
loops × 6
svg × 6
feynman × 6
feynmf × 6