osjerick
  • Member for 9 years, 7 months
  • Last seen more than a month ago
24 answers
200 votes
17k views
Showcase TeX Typography for TUG's Calendar
96 votes

A very simple demonstration of using LaTeX fonts with pdfLaTeX. A pamphlet with a powerful message from George Orwell. Code \documentclass{article} \usepackage[landscape,a4paper,hmargin=1.5cm,...

View answer
24 answers
200 votes
17k views
Showcase TeX Typography for TUG's Calendar
77 votes

I'm not a type designer or a typographer, but I thought use TikZ to illustrate a type design. Here is my idea: I add a text to right side to complement the figure and show typography with a Sans ...

View answer
3 answers
52 votes
4k views
Holiday contest! Drawing a picture of Krampus for Yule
41 votes

I'm not a good artist, but here I leave a bust of Krampus. Drawn using a thing designed to draw things. :( Code \documentclass[tikz]{standalone} \usetikzlibrary{shadings} \definecolor{LightGreen}{rgb}...

View answer
21 answers
115 votes
8k views
Showcase of optical illusions made with TeX/LaTeX/LuaTeX/ConTeXt
39 votes

They are or not parallels? A very popular one. The perpendicular lines that do not match row to row create an illusion of the lines between them being not parallel. NetLogo Models Library: Optical ...

View answer
4 answers
18 votes
6k views
What is the best way to produce TikZ picture for discrete signals?
Accepted answer
24 votes

Using TikZ and pgfplots the best option is adding ycomb to your plot, as follows: \documentclass{article} \usepackage{tikz,pgfplots}%http://www.ctan.org/pkg/pgf http://www.ctan.org/pkg/pgfplots \...

View answer
21 answers
115 votes
8k views
Showcase of optical illusions made with TeX/LaTeX/LuaTeX/ConTeXt
21 votes

Beautiful curved grid? A variant and a combination of Hering's and Zöllner's illusion. The red grid is completely straight all the time. Code \documentclass[border=10pt,tikz]{standalone} \pagecolor{...

View answer
5 answers
27 votes
3k views
TikZ: fill a glass tube with red color
12 votes

Two separate solutions. Code \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \fill[color=red!80] (-1,-4) arc (180:0:1 ...

View answer
3 answers
9 votes
3k views
draw a cone with two regions
12 votes

Other solution also using Tikz, but is automatic, you just need to define the cone dimensions. Code \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{shadings,calc} \begin{...

View answer
2 answers
3 votes
10k views
automatic creating of tables
11 votes

You can use the PGFplotstable package, with it you can create automatic tables on a easy way, from text files or with other options, avoiding the basic way of latex for creating tables, here an ...

View answer
3 answers
11 votes
3k views
How to create simple causal chains with TikZ
Accepted answer
9 votes

Other solution, also using TikZ. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[% >=latex', circ/.style={draw, shape=...

View answer
1 answers
6 votes
3k views
Drawing filter banks
Accepted answer
9 votes

Using the package Tikz/PGF you will draw this filter banks with a simple codification. Tikz is very powerfull LaTeX package for drawing. The website TeXample contains a great compilation of examples ...

View answer
1 answers
5 votes
4k views
how to draw $|x-2|$ with tikz?
Accepted answer
8 votes

The plot is incorrect because the number of samples taken to draw the function is little. Take a large number of samples or use a different domain that allows x=2, TikZ plot path operation and ...

View answer
4 answers
6 votes
3k views
Drawing randomly ragged lines in technical drawings
8 votes

You can obtain similar result using the tikz library decorations.pathmorphing, that allows you to create decorations with radom steps. Also, using the clip option in path you can cut the vertical ...

View answer
1 answers
8 votes
3k views
Fill pgfplot bars with colorbrewer
Accepted answer
7 votes

You can add every axis plot/.append style={fill} to solve the fill problem. Also, you can call a specific color from the cycle list by using Dark2-<color letter>, if the cycle list initialized ...

View answer
3 answers
11 votes
3k views
tikz projection parallel to given line
6 votes

Like this? Code \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0); % Initial point of the line \...

View answer
3 answers
3 votes
2k views
Hysteresis Loop
Accepted answer
6 votes

You can use a function as the sigmoid function to draw a beautiful hysteresis loop. Here an example using PGFPlots. Code \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{...

View answer
2 answers
3 votes
3k views
Author-year format for citations in a revtex document
Accepted answer
6 votes

The revtex class loads the natbib package with sort&compress option, that is for numerical citations. If you want an author-year citation in a revtex document, you need to set the citation style ...

View answer
2 answers
4 votes
2k views
drawing two curves in the same figure
Accepted answer
6 votes

You can use additionaly the pgfplots package. The first way is using the coordinates directly in the code to produce the graphic. \documentclass{article} \usepackage{tikz,pgfplots} \begin{document} ...

View answer
2 answers
7 votes
2k views
pgfplots axis abbreviation
5 votes

Instead doing Jake's solution, you can use SI prefixes, including a prefix inside the x axis unit. Code \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{units} \begin{document} ...

View answer
2 answers
4 votes
597 views
Center/align input nodes in neural network
Accepted answer
5 votes

You are placing the nodes badly into the matrix. Just add text within nodes by adding {<text>} into the proper matrix cell. \begin{tikzpicture}[plain/.style={draw=none,fill=none}, ...

View answer
5 answers
17 votes
6k views
How to use colors from a pgfplots colormap in own draw
5 votes

Something like this? I've used PGFPlots \addplot to make possible the use of \pgfplotscolormapdefinemappedcolor for color mapping. Maybe this is not a fancy solution, I think there must be a better. ...

View answer
2 answers
3 votes
138 views
Defining Commands With Multiple Meaning
Accepted answer
5 votes

Something like this? Code \documentclass{article} \newcommand*{\IN}[1][0]{% \ifnum#1=0 interface\fi \ifnum#1=1 Interface\fi \ifnum#1=2 interfaces\fi } \begin{document} \IN, \IN[1], \IN[...

View answer
2 answers
6 votes
506 views
Is this possible in Tikz?
5 votes

You need to know at least the zig-zag's peaks coordinates. Because the angles of zig-zag lines and level separation are the same, a simple way to draw the zig-zag with stars is by using decorations. ...

View answer
1 answers
3 votes
2k views
Reduce or delete the label of caption in a figure environment on beamer
Accepted answer
5 votes

You are using beamer, the caption package don't work well. You must use in the preamble: \setbeamerfont{caption}{size=\tiny} to change the size of whole caption, and \setbeamerfont{caption name}{size=\...

View answer
3 answers
5 votes
3k views
Basic layout of flow chart in LateX
4 votes

A different approach using the smartdiagram package: Code \documentclass{article} \usepackage{smartdiagram} \usesmartdiagramlibrary{additions} \usepackage{lipsum} \begin{document} \lipsum[2] ...

View answer
2 answers
4 votes
529 views
How to scale equation only when it is larger than linewidth?
Accepted answer
4 votes

You can define a simple macro, in which you can make a comparison of lengths, here is an attempt using the calc package and \resizebox command from the graphicx package. \documentclass{article} \...

View answer
2 answers
3 votes
1k views
tikz arrows on block diagrams, double right
4 votes

There is a lot of ways to do this thing. Here is my attempt to teach you what is happening here: Code \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, shapes} \...

View answer
1 answers
5 votes
1k views
tikz legend in caption and colorbrewer
Accepted answer
4 votes

The problem occurs because you are using a wrong cycle list name and a wrong pgf key. You must use cycle list name=Name, and a proper cycle name as Dark2-5, see the list definition inside ...

View answer
6 answers
0 votes
555 views
I'm new to Latex Drawing. Can Someone show me how to draw this diagram
4 votes

Just for fun, this illustrates some capacities (relative positioning, custom decorations, \foreach loops, etc.) of TikZ/PGF. Code \documentclass[tikz]{standalone} \usetikzlibrary{calc, decorations....

View answer
2 answers
9 votes
4k views
How to annotate TikZ plotted function using axis values?
4 votes

You can use draw, path or node configurations to annotate plot coordinates, also you can use pin option for nodes and configure it to your requirements. Here an example: Code \documentclass[border=...

View answer