Tag Info

New answers tagged

1

And here's a slightly different approach using Metapost. prologues := 3; outputtemplate := "%j%c.eps"; % routine to make a ragged version of a path vardef ragged(expr n, r, p) = save s; s = arclength(p)/n; point 0 of p for t=s step s until arclength(p)-s: -- point arctime t of p of p shifted (r*normaldeviate, r*normaldeviate) ...


4

Would this be what you seek? styledefinitions block is for horizontal blocks, blockB is for vertical blocks (being rotated 90). all text phrases are allocated via node with options like above, below, above left, above right, etc., you may want to adjust to fit your needs. Update: Small modifications to fit the OP's need. Some explanations are added. See ...


5

No need of defining a new node e_second_integer_largest. You can use orthogonal coordinates like (second_integer_smallest |- q_first_integer_largest) which means that x coordinate same as second_integer_smallest and y coordinate same as q_first_integer_largest in \path [line] (second_integer_smallest) -- (second_integer_smallest |- ...


13

A start of solution using pic operation: \documentclass[tikz,border=10pt]{standalone} \tikzset{sequence label/.store in=\seqlab, sequence label={}, sequence/.pic={ \fill (0,0) circle[radius=2pt] node[below]{\seqlab}; \draw (-1,0)--++(0,1); \draw (-0.6,0)--++(0,1); \draw (1,0)--++(0,1); \draw (0.6,0)--++(0,1); ...


1

The syntax of xy makes the codes short but hard to read. Nevertheless xy is powerful so I put it here. \documentclass{amsart} \usepackage{tikz-cd}\usetikzlibrary{decorations.pathmorphing} \usepackage[all,pdf]{xy}\SelectTips {cm}{} \DeclareMathOperator{\Hom}{Hom} \DeclareMathOperator\id{id} \begin{document} \section{Commutative $k$-algebra} \[\xymatrix{ ...


3

And now for the pstricks way: here is the code for the counity diagram: \documentclass[pdf]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{pst-node} \DeclareMathOperator\id{id} \begin{document} \[ \psset{arrows = ->, nodesep = 3pt, labelsep = 3pt}%, \begin{psmatrix}[colsep = 1.6] C & C \otimes C \\ C \otimes C & K ...


3

I recommend tikz-cd. Let's see some examples (the last one is from page 3 of these notes \documentclass{amsart} \usepackage{tikz-cd} \DeclareMathOperator{\Hom}{Hom} \begin{document} \section{Commutative $k$-algebra} \[ \begin{tikzcd} A\otimes A \arrow[rr,"\iota"] \arrow[dr,swap,"\mu"] && A\otimes A \arrow[dl,"\mu"] \\ & A \end{tikzcd} \] ...


2

You also can easily do such an homotopy diagram with the psmatrix environment (from the pst-node package. The syntax is different from tikz-cd: you first describe the matrix of nodes, then the connections between these nodes. The nodes can have names, but you can use their i,j position in the matrix. It can be compiled with pdflatex if you set the switch ...


6

It's quite easy with tikz-cd. The first bit is the arrow direction: d for “down”, r for “right” and so on. The label on an arrow is by default on the left side (in the arrow direction); with swap we place it on the other side Similarly, shift left refers to a movement towards the left side of the arrow (in the arrow direction); shift right does the same in ...


3

I know is almost one year ago question, but I want share my solution. This is the code: \documentclass[tikz,margin=5pt,12pt]{standalone} \usepackage{xparse} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \NewDocumentCommand{\irregularline}{% O {2mm} % Amplitude of irregularity. Optional. Default value = 2mm m % First point ...


0

The problem is solved. It's an eps format problem. The eps files are generated by a Macs OX graphic software, thus they aren't compatiple with latex environment in Windows 7. Using GIMP2 to open and re-export the eps files is the solution. Thank you all.


2

Next code shows another possibility for drawing parallel lines between nodes without using calc tikzlibrary. It uses (node.angle) syntax for starting points and |- or -| intersection coordinate for ending ones. If you want exact coordinates like 1/3 of node's vertical length you need calc library, but if you can accept something just visually good enough, ...


5

You may want to learn tikz-cd: \documentclass{article} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd}[row sep=2.5em] A' \arrow[rr,"f'"] \arrow[dr,swap,"a"] \arrow[dd,swap,"g'"] && B' \arrow[dd,swap,"h'" near start] \arrow[dr,"b"] \\ & A \arrow[rr,crossing over,"f" near start] && B \arrow[dd,"h"] \\ C' \arrow[rr,"k'" near ...


0

This behaviour may be due to the option [h!], which forces the figure to be here. Try using [h], or (even better) something like [htbp] (Here, or on Top, or on Bottom, or at least on a Page for the remaining floating objects).


2

You can use the calc-library to set the connection-points for your lines. It's a simple approach which should be enough in the most situations. A small MWE: \documentclass[tikz, border=5mm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \node at (0,0) [draw, rectangle, minimum height=2cm, minimum width=.5cm] (mynode) {}; ...


3

And a Metapost approach... prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); % r = side of hexagon, n = repetitions of the grid (- and +) r = 5mm; n=10; % make a shape to draw path tri; tri = for t=0 step 120 until 359: origin -- (r,0) rotated t -- endfor cycle; % save the pattern as a picture centered on the origin picture grid; grid = ...


3

Another way could be to draw hexagonal nodes over an adjusted coordinate system. The idea came adapting Paul Gaborit's Pascal triangle for How can I draw Pascal's triangle with some its properties?. shapes.geometric library helps to draw hexagon where the minimum size is the diameter of the circumcircle. Therefore, selecting adjusted values for x ...


6

Here's a different approach using Metapost that preserves the right angles in the OP art work. The link above explains how to get started with Metapost. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); % unit width, height, and radius of the nodes u = 46; v = 17; r = 4; % a W-shaped path to draw % with five points: points 0 and 4 are the ...


12

Again with tikz but using pic: \documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{patterns,calc} \tikzset{% pics/.cd, dam/.style args={#1#2#3#4#5}{ code={ \begin{scope}[shift={(#1)}] \coordinate (a) at (0,0); %% starting point \coordinate (b) at +(0,#2); % height of right side \coordinate (c) at ...


14

A tikz solution where an L shape pool is drawn by a macro called mypool that takes 6 arguments, displayed below. #1=starting point, #2=vertically down length, #3=for Label L4-L8, #4=horizontal length of the pool #5=end point #6=Pool label 1-5. Update: The OP wants the Labels be somewhere above the water border and center. Well, here just modify the ...


10

A PSTricks solution: \documentclass{article} \usepackage[pdf]{pstricks} \newpsobject{water}{psframe}{ dimen = m, linestyle = none, fillstyle = solid, fillcolor = blue!30 } \newpsobject{basin}{psframe}{ dimen = m, linestyle = none, fillstyle = hlines, hatchsep = 2pt } \def\pool(#1,#2)[#3,#4]#5#6{ \water(#1,#2)(!#1 #4 add #2 0.5 add) ...


9

Here a simple way using pst-node and multido: \documentclass[1pt, pdf, svgnames]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage{pstricks-add} \usepackage{xcolor} \begin{document} \begin{pspicture}(-1,-4)(4,6) \psset{radius = 0.15, xunit = 2cm, yunit = 1.2cm, fillstyle = solid} \psaxes[yaxis = false, ...


5

You can use the approach from Probability density function of Uniform Distribution. The actual plot is defined using this code: \begin{axis}[ clip=false, jump mark left, ymin=0,ymax=1, xmin=0, xmax=6, every axis plot/.style={very thick}, discontinuous, table/create on use/cumulative distribution/.style={ create ...


3

Your question is quite vague which is why I was hesitating to post an answer. But I suspect (unless you're actually using A, B, and C as compounds) the answer will be “I'd use chemfig”, anyway... Chemical schemes can be typeset fairly easy with chemfig once you understand how the \arrow command works. The siunitx package can be used for numbers with units, ...


4

This is essentially the same as Tikz and babel error \documentclass[a4paper,12pt, brazil]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{tikz-cd} \tikzset{ every picture/.prefix style={ execute at begin picture=\shorthandoff{"} } } \begin{document} \[ \begin{tikzcd}[column sep=small] Y_1 \ar[dr, ...


10

portuges.ldf (loaded by option brazil) makes " an active shorthand that disturbs the tikz-cd code. The shorthand can be disabled via \shorthandoff: \documentclass[a4paper,12pt,brazil]{article} \usepackage{babel} \usepackage{tikz-cd} \begin{document} \shorthandoff{"} \[\begin{tikzcd}[column sep=small] Y_1 \ar[dr, "\pi_1"'] \ar[rr, "f"]& & ...


4

Is this what you want? Problem 1: Adding the pictures, like database Display Database Instance Relationship with TikZ, for example in the cells (stack-5-6) (stack-6-6) with the name to make an arrow in future. Cells (stack-5-6) (stack-6-6) doesn't exist because you declared option nodes in empty cells=false and no nodes are created in empty cells. But ...


3

Using hobby package (\usetikzlibrary{hobby}) and calc for operations with coordinates we get this (PGF/Tikz 3.0.x) \documentclass[12pt,twoside,a4paper]{book} \usepackage{graphicx,wrapfig,tikz} \usetikzlibrary{calc,hobby} % To draw the smooth curve \begin{document} \tikzset{ circ/.pic={ % Defines a `circle` to mark the coordinates. \fill (0,0) ...


8

This is an attempts where pics skill is used, requiring tikz 3.0 Code \documentclass[border=10pt]{standalone}%[12pt,twoside,a4paper]{book} \usepackage{graphicx,wrapfig,tikz} \usetikzlibrary{positioning,shapes} \tikzset{myarrow/.pic = { \begin{scope}[rotate=-90,scale=0.5] \draw[fill=black] (-0.5,0) -- (0,0.5)--(0.5,0)--(0.5,1)-- ...


1

This demonstrates left and right shifted images with captions aligned with both the text and with the images. \documentclass{scrartcl} \usepackage{scrextend} \usepackage{geometry} \geometry{ top=3.5cm, bottom=3.5cm, outer=6cm, inner=2cm, heightrounded, marginparsep=0.8cm, marginparwidth=4.7cm, twoside=true, ...


0

I finally came up using the following code with some examples how to set up the pictures and captions: \documentclass{scrartcl} \usepackage{scrextend} \usepackage{geometry} \geometry{ top=3.5cm, bottom=3.5cm, outer=6cm, inner=2cm, heightrounded, marginparsep=0.8cm, marginparwidth=4.7cm, twoside=true, hmarginratio=1:1 } ...


7

You can prepare your diagrams using TikZ, but you ought to convert them to EPS afterwards. It's best to have them as seperate standalone files. For more information, see: Export eps figures from TikZ 'Standalone' TikZ pictures But the basic idea is the following: Prepare your figures using the standalone class, for example: ...


2

Nice work on your solution! Someone may come along with a better way to do this, but I've taken your code, added the page numbers, and solved the page height problem. I also added a conditional for the last page, to check if it was already printed as part of the last double-page spread. For my example, I used the biblatex manual which should be available ...


9

The following is intentionally made simple without labels just for fun with PSTricks. \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pst-eucl,pst-plot} \pstVerb{realtime srand} \psset { algebraic, saveNodeCoors, NodeCoorPrefix=N, PointName=none, PointSymbol=none, } ...


19

I decided to post this answer for several reasons: This picture gives me the opportunity to show some useful options for users of TikZ. I defined customizable macros for: Dimensions of the tank \tankwidth, \tankheight and \waterheight. This allows to change them without affect the picture (without exaggeration); I defined a color for the water to allow ...


21

\documentclass[tikz,border=5]{standalone} \usetikzlibrary{decorations.pathmorphing} \usepackage[detect-all]{siunitx} \tikzset{ ragged border/.style={ decoration={random steps, segment length=1mm, amplitude=0.5mm}, decorate, } } \begin{document} \begin{tikzpicture} \fill[cyan!30] decorate[ragged border]{ (0,2) -- (6,2) ...



Top 50 recent answers are included