# Tag Info

22

Unfortunately, it doesn't calculate the score. Requires the latest release of PGF. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{shapes.geometric} \def\lettertoscrabblescore#1{% \def\tmp{#1}% \expandafter\count\expandafter0\expandafter`#1\relax\advance\count0 by-65\relax% \ifcase\count0\relax% ...

10

Here's an alternative in Metapost, purely for amusement, and to illustrate a way to make the path of a box with spikes on the sides and the use of a long list of suffixes to draw a repetitive pattern prologues := 3; outputtemplate := "%j%c.eps"; spike_size = 2; tile_size = 24; vardef spiked_square(expr n) = save t, side; path side; % length of ...

6

A possible TikZ free solution with automatic width calculation and allowing multi-line texts (a TikZ solution is below): The command \EightTexts has eight mandatory arguments and LaTeX performs all necessary calculations using simple conditional tests on the length of the corresponding strings. The code in the image was produced using ...

6

You can use a tikz matrix which simplifies the placement, and creation of node markers, and then \draw the boxes after: Code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,matrix} % http://tex.stackexchange.com/questions/33703/extract-x-y-coordinate-of-an-arbitrary-point-in-tikz \newdimen\XCoordA \newdimen\XCoordB \newdimen\YCoordA ...

4

Try: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[ inner/.style={draw, solid,% <-- added fill=blue!5,thick,inner sep=3pt,minimum width=8em}, outer/.style={draw=gray,dashed,fill=green!1,thick,inner sep=5pt} ] \node[outer] (A) { \begin{tikzpicture}[node distance=1cm,outer ...

4

Using fit and backgrounds for avoiding nested tikzpicture. The Zarko's answer is easier than mine but i wanted to illustrate this option. It can be useful in other contexts. \documentclass[tikz]{standalone} \usetikzlibrary{fit,backgrounds} % <- added \begin{document} \begin{tikzpicture}[ inner/.style={draw,fill=blue!5,thick,inner sep=3pt,minimum ...

3

matrix of math nodes implements the following node structure \node (<matrixname>-<row #>-<col#>) {$<contents>$}; Here <contents> is replaced with whatever is found as the matrix entry. When the \nodepart is used, it is still in math mode and it trips up the macro. The correct way should have been \node ...

3

3

(I'm not entirely sure if this is what you're after.) By adding name=leg to the legend style, the legend box will get the (node) name leg. You can add nodes relative to this, if you place them outside the axis. For example: \documentclass[ a4paper ]{scrartcl} \usepackage{ amsmath, tikz, pgfplots, } \usepackage{lmodern} \usepackage[T1]{fontenc} ...

3

This simple thing needs no tikz: \documentclass{article} \usepackage{calc} \newlength\mylen \settowidth\mylen{Even larger text} \newcommand{\row}[4]{% \fbox{\makebox[\mylen][c]{\rule[-0.55ex]{0ex}{1.2em}#1}}% \hfill \fbox{\makebox[\mylen][c]{\rule[-0.55ex]{0ex}{1.2em}#2}}% \hfill \fbox{\makebox[\mylen][c]{\rule[-0.55ex]{0ex}{1.2em}#3}}% \hfill ...

3

Here is a possible solution: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} \usetikzlibrary{automata} \usetikzlibrary{graphs} \usetikzlibrary{shadows} \def\nd{% \begin{tikzpicture}% [font=\scriptsize, baseline=1ex,shorten >=.1pt,node distance=6mm,on grid, ...

2

I guess you are looking for a way to scale not only the global coordinates but also every single node. In this case you just have to introduce every node/.style={scale=0.65}, like \documentclass{article} \usepackage{amsmath, amsthm, amssymb} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} ...

2

A LuaTeX + TikZ solution. \documentclass{article} \usepackage{xcolor} \usepackage{tikz} \usepackage{luacode} \usepackage[active, tightpage]{preview} \definecolor{tilecolor}{HTML}{CDC6A9} \definecolor{textcolor}{HTML}{463D3C} \definecolor{dwscolor}{HTML}{E9BCAC} \definecolor{twscolor}{HTML}{E5654F} \definecolor{dlscolor}{HTML}{AAD2CE} ...

2

I guess this is one way of doing it: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{matrix} \begin{document} \tikzset{ entity/.code={ \tikzset{ rounded corners, name=#1, inner sep=2pt, every entity/.try, }% \def\entityname{#1}% }, entity ...

1

Update: This seems to be what the OP really wants. Code \documentclass[]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ pipe/.style = { draw, %top color=gray!60, %bottom color=gray!20, minimum width=4cm, minimum height=.1cm, anchor=east, }, source/.style = { draw, %top color=gray!60, ...

1

Let me answer my own question because I think I have solved my problem. I met some difficulties to get there so if it can be used for other I'll explain in detail. 1/ I downloaded the PGF_3.0.0 package here. 2/ I unzipped it and save it on my desktop. 3/ I copy all the folders in the following directory : /Desktop/pgf_3.0.0.tds/tex/generic 4/ I paste ...

1

This is a possible solution. There is no node name ls for the integrator v2p. This solution thinks it should be right of=m, the mechanical system under control. To reduce the feedback gap, use outer/inner sep=0pt or negative number because nodes were used to place the text and they have non-zero inner/outer sep. Note: some node distances may have been added ...

1

So, probably you need to use the \phantom{} command. Here is a MWE but I am sure you will get the idea: \documentclass[border=0.125cm,tikz]{standalone} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture}[blk/.style={rectangle,minimum height=1cm,draw,align=center},node distance=2cm,line width=1pt,inner sep=0] \node (a) [blk] at ...

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