Tag Info

Hot answers tagged

16

Here is another suggestion: \documentclass[varwidth,margin=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{fadings} \newcommand\fadingtext[3][]{% \begin{tikzfadingfrompicture}[name=fading letter] \node[text=transparent!0,inner xsep=0pt,outer xsep=0pt,#1] {#3}; \end{tikzfadingfrompicture}% \begin{tikzpicture}[baseline=(textnode.base)] ...


10

Would take a bit of work to get up to the full picture but it's a start I suppose: \documentclass[border=5]{standalone} \usepackage{tikz} \tikzset{darken down/.style={top color=#1, bottom color=#1!75!black}} \def\tikzcubecs#1,#2,#3\@{% \pgfpointxyz{(#1)*(1+(#3)/75}{(#2)*(1+(#1)/50)*(1+(#3)/50)}{(#3)*(1+(#1)/75)}% } ...


10

Your data is not sorted so TikZ goes back and forth to draw the points. I would really recommend pgfplots for this. I've sorted your table and plotted again \documentclass{standalone} \usepackage{pgfplotstable}%<- Loads pgfplots anyway \pgfplotsset{compat=1.10} \pgfplotstableread[header=false]{data.dat}\mytable ...


9

You cannot perform arithmetic (division) on node names. You have to deal with their x and y part separately, which would require the use of the let ... in construct. It is much easier to use the barycentric coordinate system, as follows: \coordinate (com) at (barycentric cs:m1=0.5,m2=0.5,m3=0.5,m4=0.5,f1=0.5); \filldraw[yellow] (com) circle (5); and get: ...


9

You can use the poisson disc sampling library (you can get it in this answer). You need to copy/paste the content of poisson.sty and poisson.lua from that answer into two files with these names. You need also a working lualatex to compile. Then, using it, you can compile the following code (this one requires PGF=>3.0, see later on for other examples that ...


9

Edit: answer rewritten After seeing the intended results: For the "curved" lines, I defined a wavy style which uses snake decoration For the background grey markings, use a pgfonlayer and redraw those lines with a big line width.   \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,arrows,backgrounds,decorations.pathmorphing} ...


8

The mnthesis.cls redefines \@xfloat according to some quite old version of it in the kernel (probably the LaTeX 2.09 version). Thus it becomes incompatible with TikZ and with all other packages that use color. Here is a kludge for making it work: according to the notes in the class, the redefinition is meant to use single spacing in floats. % save a copy ...


8

Is this sort of what you want? I tweaked manually but should be doable if you know what you are doing with the text. \documentclass{article} \usepackage{tikz,kantlipsum} \usetikzlibrary{tikzmark,decorations.text} \begin{document} \kant[1] Then some more text finishing randomly on the sentence in the next line and I placed a tikzmark right ...


8

Yes, it is possible. In this answer I will try to cover the vertical shading: the concepts can be applied in the same way to the horizontal shading. Radial shading, instead is a bit different and the idea has been already implemented in TikZ: radial shading of a ring to some extent. The code: \documentclass[tikz,border=10pt]{standalone} \makeatletter ...


8

The logos can be found on the internet. You can then insert the logos using the includegraphics command. \section{\includegraphics[scale=0.03]{linkedinLogo.png}} {linkedin.com/in/yourname} ~ \section{\includegraphics[scale=0.03]{skypeLogo.png}} {skype:yourname?call} ~ Another possibility is to draw the logos using Tikz. I have created the LinkedIN logo in ...


8

Assuming I got the equation bit right then you could try using LuaLaTeX: \documentclass[border=5]{standalone} \usepackage{tikz} \directlua{ function coth (i) return math.cosh(i) / math.sinh(i) end function brillouin (J, x) if x == 0 then return 0 else return (2*J+1)/(2*J)*coth((2*J+1)/(2*J)*x) - 1/(2*J)*coth(1/(2*J)*x) end end } ...


8

Something like this. Use of \draw plot command in tikz. Update Based on the OP's comment about not matching the original figure, this update provides a first order exponential plot with time constant capability. (One can change the y label 2 to 1.) Change parameter \a value for different plots with corresponding time constants. Code ...


7

This is an attempt. On the first plot, the first quadrant is the same as the second plot, but x-axis and y-axis are labeled interchangeably, then draw the x-axis line on the negative direction. For detail usages of the commands, they can be found in the documentation of tikz-3dplot. Code \documentclass[border=10pt,varwidth]{standalone} ...


7

1st option: You may use a multiplication instead of a division (the sum of the weights must be one): \coordinate (com) at ($.2*(m1)+.2*(m2)+.2*(m3)+.2*(m4)+.2*(f1)$); or \pgfmathsetmacro\weight{1/5} \coordinate (com) at ($\weight*(m1)+\weight*(m2)+\weight*(m3)+\weight*(m4)+\weight*(f1) $); 2nd option: You may use barycentric cs (the barycentric ...


7

When PGF puts an arrowhead on a line it "backs-up" along the last path segment so that the end of the arrow tip is at the end of path. As plots are (usually) lots of small straight lines PGF backs up along the last straight line segment. When the gradient of the line segments are changing relatively slowly (as in the end points of the sine curve in the ...


7

\chaptermark sets \markboth and then you can use \leftmark for the chapter in the header. Similarly, \sectionmark sets \markright. So \rightmark can be used for the section entry in the header. \documentclass{scrbook} \usepackage[ top=25mm, bottom=30mm, inner=20mm, outer=70mm, marginparsep=7mm, marginparwidth=45mm, ]{geometry} \usepackage{tikz}% ...


6

You could define your own conditional, say \ifTikZVthree and use \ifTikZVthree % <TikZ version 3 stuff> \else % <TikZ version pre-3 stuff> \fi in your document to define separate version 3/pre-3 stuff. The following minimal example defines \checkTikZversion that checks the version of tikz via the macro \ver@tikz.sty - defined whenever a ...


6

An alternative method, which is much slower and leads to much less appealing results than JLDiaz's Poisson sampling is the brute force one from tikz: Distribute evenly and randomly circles. The only advantage is that this doesn't require lualatex. \documentclass{standalone} \usepackage{tikz} \begin{document} \def\xlist{4} \def\ylist{4} ...


6

If we were dealing with circles, then the radius would be perpendicular to the tangent, so we would need to find a right triangle connecting the center C, point P, and the circle. If you recall your geometry, any triangle inscribed in a circle where one side of the triangle passes through the center will form a right triangle. So if we construct a circle ...


6

I put some nonlinear transformation but I have no idea whether the result is meaningful or not. I can try to check for mistakes if you can show the before and after result One thing to consider is that r -> log(r) is a pretty contractive transformation so I boosted up by converting the units to centimeters. I don't know whether it is wise to do. ...


6

You can use every node/.style={font=\strut} Code \documentclass[tikz,margin=10pt]{standalone} \begin{document} \begin{tikzpicture}[ shorten >=1pt, every node/.style={font=\strut}, node distance=1cm, auto ] \node(q_0) {$c$}; \node(q_1) [right of=q_0] {$b$}; \node(q_2) [right of=q_1] {$a$}; \node(q_3) [right of=q_2] {$c$}; ...


6

The problem of the alignment in the lines is due to the line width. I propose a different approach to code your figure, which IMHO simplifies a lot the input of the "grid" and makes also simpler to add the required dimensions. My solution uses a matrix of nodes to draw the grid. First, we define some styles for each kind of square: \tikzset{ X/.style = ...


6

The new version of the library can use custom time intervals. As a result, it is now possible to set up a timeline with the names of the months: \timeline[custom interval=true]{January, March, May, July, September, November} A complete example: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{timeline} \begin{document} ...


6

Well first that's a different projection so it's not a cube you are trying to achieve if the end goal is this image. Also it's not that trivial to do in my humble opinion. Draw it in any mouse-based tool and convert it to TikZ code. Then it would be done with no hassle. But if you really want to do this then you can still use the 3d coords. I randomly ...


6

Here's an option using pgfplots, which is based on tikz, but eases the plotting of such functions. % arara: pdflatex % !arara: indent: {overwrite: yes} \documentclass[tikz,border=2pt]{standalone} \usepackage{pgfplots} % arrows are stealth fighters \tikzset{>=stealth} \begin{document} \begin{tikzpicture}[ /pgf/declare ...


6

This can give you a starting point: \documentclass[border=4pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{array} \usepackage{tikz} \usetikzlibrary{ shapes.multipart, matrix, positioning, shapes.callouts, shapes.arrows, calc} \definecolor{myyellow}{RGB}{245,177,0} \definecolor{mysalmon}{RGB}{255,145,73} \begin{document} { \sffamily ...


5

Is this OK? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shadings} \begin{document} \begin{tikzpicture} \begin{scope}[xscale=2] \clip (-2,0) rectangle (2,2); \shade[shading=color wheel] [even odd rule] (0,0) circle (2) (0,0) circle (1); \end{scope} \end{tikzpicture} \end{document} Remove the \clip ...


5

You have to measure the bigger picture. \documentclass[10pt, a4paper]{amsart} \usepackage{graphicx, subfig} \usepackage{graphics} \usepackage{tikz} \usepackage[all]{xy} \usetikzlibrary{arrows,automata} \usetikzlibrary{shapes,snakes} \usetikzlibrary{positioning} \newsavebox{\bigpicture} \newcommand{\adapttobigpicture}{% \vrule height\ht\bigpicture ...


5

Here is a solution with pstricks, and more precisely with pst-grad and pst-text. It is compilable with pdf LaTeX, and the box size can be changed with \psframebox[framesep=…]{…}: \documentclass[pdf, x11names]{article} \usepackage{pst-grad,pst-text} \psset{framesep=2pt} \begin{document} Some text \begin{tabular}{lll} \psframebox[linecolor = Coral1!20]{% ...


5

For moving the axis labels closer to the axis, you can use xlabel shift and ylabel shift keys. To make room for the inset you can extend the range of the outer plot in the y axis, for example up to 2. \documentclass{standalone} % Setting graphing environment \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotsset{plot coordinates/math parser=false} ...



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