Kjell Magne Fauske | 4 Nov 10:02
Picon

Fwd: Tracking small caps using microtype fails in tikz-boxes

Dear PGF developers,

I'm forwarding this post from comp.text.tex about an issue with
microtype and small caps in tikz-boxes:
http://groups.google.com/group/comp.text.tex/browse_thread/thread/c2e3c3ce1e03267e#

---------- Forwarded message ----------
From: Robert <w....@gmx.net>
Date: Nov 3, 5:49 pm
Subject: Tracking small caps using microtype fails in tikz-boxes
To: comp.text.tex

On 03.11.2009 15:20 Uhr, Kjell Magne Fauske wrote:

> On Nov 2, 2:25 pm, Brian Rantz <brian.ra...@googlemail.com> wrote:
>> On Nov 2, 8:08 am, Kjell Magne Fauske <kjel...@gmail.com> wrote:
>>> On Nov 2, 7:06 am, hscm <henkmetsel...@gmail.com> wrote:
>>>> hi,
>>>> I made some tikz pictures with small caps in textboxes. They compile
>>>> fine, but when I try to add tracking using microtype I get compilation
>>>> errors (did you forget a semicolon? No I didn't)
>>>> I'm using texlive2009-pre on debian. Is this a known problem? Does a
>>>> solution exist?
>>>> \documentclass{memoir}
>>>> \usepackage[tracking=true]{microtype}
>>>> \usepackage{tikz}
>>>> \begin{document}
>>>> \begin{tikzpicture}
>>>> \draw(0,0) -- node[anchor=west,text width=5cm]{\textsc{test}}(1,1);
>>>> \end{tikzpicture}
(Continue reading)

Christophe Jorssen | 4 Nov 12:44
Picon
Favicon

Coordinate tranformation matrix and arrows

Hello all,

I'd like to know why the coordinate transformation matrix (cm) has no 
effect on arrows. I need to use \pgflowlevelsynccm to have an effect on 
them. Is there a workaround like [transform shape] for nodes?

Thanks in advance

\documentclass{minimal}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[>=latex]
   \draw[->] (0,0) -- (1,1);
   \begin{scope}[cm={cos(30),sin(30),cos(70),sin(70),(0,0)}]
     \draw[->,red] (0,0) -- (1,1);
   \end{scope}
   \begin{pgfscope}
     \tikzset{cm={cos(30),sin(30),cos(70),sin(70),(0,0)}}
     \pgflowlevelsynccm
     \draw[->,green] (0,0) -- (1,1);
   \end{pgfscope}
\end{tikzpicture}
\end{document}

--

-- 
Christophe

------------------------------------------------------------------------------
(Continue reading)

Nicolas Girard | 5 Nov 09:36
Picon

\notation (gauge or progress bar)

Hi all,
I'm experiencing a problem with some old code that used to work using
TeXlive 2008 but not any more using TeXlive 2009.
The idea is, that typing \notation{7/10} would produce, for instance, 7
blue rectangles followed with 3 grey rectangles, like a gauge or a progress bar.

Here's the error i'm getting using texlive 2009:

 ! Use of \pgf <at> lib <at> dec <at> parsemark doesn't match its definition.
 <argument> b
            etween positions 0 and 1 step \note <at> sep  with { \node [inner
 sep...
 l.142 ...rlé \notation{7/10}\hfill{}\vspace{0pt}}

 The source code follows ; I'm not especially proud of it, so i'd be glad if
 someone could give me a hand and even happier with a simpler solution to
 achieve the same results.

 Thanks very much in advance,
 Nicolas

 %==========
 \newlength\note <at> sep
 \newlength\firststep
 \newlength\laststep
 \newlength\tickheight
 \pgfkeys{
    /note/.code args={#1/#2}{\def\notea{#1}\def\noteb{#2}},
    /note/tick/.initial=rectangle,
    /note/tick size/.cd,.default=1ex,
(Continue reading)

Mark Wibrow | 5 Nov 16:57

Re: \notation (gauge or progress bar)

Hi,

Not sure what the problem is. Sorry.

However, it being an unusually slow day, how about this:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\makeatletter
\pgfkeys{/progress bar/.cd,
	.unknown/.code={\expandafter\tikzset\expandafter{\pgfkeyscurrentname=#1}},		
	completed/.code args={#1/#2}{\def\pb <at> completed{#1}\def\pb <at> total{#2}},
	completed=0/10,
	completed block/.style={
		draw=none,
		red!65!black
	},
	to do block/.style={
		draw=none,
		fill=blue!50!black
	},
	every block/.style={
		fill
	},
	block width/.initial=1ex,
	block height/.initial=1.5ex,
	block sep/.initial=0.5ex,
(Continue reading)

Nicolas Girard | 5 Nov 17:57
Picon

Re: \notation (gauge or progress bar)

2009/11/5 Mark Wibrow <m.wibrow <at> googlemail.com>:
> Hi,
>
> Not sure what the problem is. Sorry.
>
> However, it being an unusually slow day, how about this:
>

Wow ! Fantastic ! Very nice piece of code, thanks for your efforts !
It might be a good addition to the Tikz example gallery (
http://www.texample.net/tikz/examples/ )
Thanks again,
Nicolas

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Mark Wibrow | 6 Nov 00:48

Re: \notation (gauge or progress bar)

Hi,

This is much more general solution where an arbitrary path can be used
for the progress bar, and arbitrary code can be used for each block:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations}

\begin{document}

\makeatletter
\tikzset{
	block width/.code=\pgfmathsetlengthmacro\progressbarblockwidth{#1},
	block height/.code=\pgfmathsetlengthmacro\progressbarblockheight{#1},
	block sep/.code=\pgfmathsetlengthmacro\progressbarblocksep{#1},
	block width=1ex,
	block height=1ex,
	block sep=0.5ex,
	completed block/.style={
		draw=none,
		fill=red!75!black
	},
	remaining block/.style={
		draw=none,
		fill=blue!75!black
	},
	every block/.style={	
	},
	completed/.code args={#1/#2}{%
(Continue reading)

How to cut the bounding box of a flowchart in TikZ

Hi,
I have used TikZ  package for the flowchart itself, but now I need to 
cut and remove the blank spots around it. Unfortunately I do not know 
how, so I'll be very grateful if anyone could tell me how to do it.
Best regards: M. Hristov

Here the source code:

\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[cp1251]{inputenc}
\usepackage[english,bulgarian]{babel}
\usepackage{pifont}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows,calc}

\begin{document}

% Define block styles
\tikzstyle{dia} = [diamond, draw, fill=blue!20,text width=5em, text 
badly centered, node distance=2.5cm, inner sep=0pt,]
\tikzstyle{rec} = [rectangle, draw, fill=blue!20,text width=14em, text 
centered, rounded corners, minimum height=2.5em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{round rec} = [draw, rounded 
rectangle,fill=orange!20,draw=orange, thick, node distance=3cm,minimum 
height=2em, text width=5em, text centered]
\tikzstyle{del} = [draw=none,fill=none, inner sep=-5pt, minimum 
size=2pt, node distance=6.3em,minimum height=0.1mm]

(Continue reading)

Picon
Favicon

Re: How to cut the bounding box of a flowchart in TikZ

I think the preview package is what you need.

http://www.ctan.org/tex-archive/macros/latex/contrib/preview/

Sebastian

Мариян Христов a écrit :
> Hi,
> I have used TikZ  package for the flowchart itself, but now I need to 
> cut and remove the blank spots around it. Unfortunately I do not know 
> how, so I'll be very grateful if anyone could tell me how to do it.
> Best regards: M. Hristov
>
> Here the source code:
>
> \documentclass{article}
> \usepackage[T2A]{fontenc}
> \usepackage[cp1251]{inputenc}
> \usepackage[english,bulgarian]{babel}
> \usepackage{pifont}
> \usepackage{tikz}
> \usetikzlibrary{shapes,arrows,calc}
>
> \begin{document}
>
> % Define block styles
> \tikzstyle{dia} = [diamond, draw, fill=blue!20,text width=5em, text 
> badly centered, node distance=2.5cm, inner sep=0pt,]
> \tikzstyle{rec} = [rectangle, draw, fill=blue!20,text width=14em, text 
> centered, rounded corners, minimum height=2.5em]
(Continue reading)

Mark Wibrow | 7 Nov 22:28

Re: \notation (gauge or progress bar)

Hi,

In answer to the original question, the reason why the original code
failed was because the step argument was a macro, for example:

mark=between positions 0 and 1 step \somemacro width {...}

Because the space after \somemacro is ignored by the TeX parser, the
TikZ parser chokes as it is expecting one. The solution here is to use
parenthesis as the expression is parsed by the mathematical engine:

mark=between positions 0 and 1 step (\somemacro) width {...}

Anyway, the markings decoration is powerful enough to do what was
required. In what is shown below everything is not paramaterised, but
it is simple to see how it could be.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

\tikzset{
	completed/.style args={#1/#2}{
		decoration={
			markings,
			mark=between positions 0 and 1 step (1/#2) with {
				\ifnum\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}>#1\relax%
(Continue reading)

Mark Wibrow | 7 Nov 22:29

Re: \notation (gauge or progress bar)

Obviously I meant

mark=between positions 0 and 1 step (\somemacro) with {...}

tha is, `with' not `width'.

2009/11/7 Mark Wibrow <m.wibrow <at> googlemail.com>:
> Hi,
>
> In answer to the original question, the reason why the original code
> failed was because the step argument was a macro, for example:
>
> mark=between positions 0 and 1 step \somemacro width {...}
>
> Because the space after \somemacro is ignored by the TeX parser, the
> TikZ parser chokes as it is expecting one. The solution here is to use
> parenthesis as the expression is parsed by the mathematical engine:
>
> mark=between positions 0 and 1 step (\somemacro) width {...}
>
> Anyway, the markings decoration is powerful enough to do what was
> required. In what is shown below everything is not paramaterised, but
> it is simple to see how it could be.
>
>
> \documentclass{article}
>
> \usepackage{tikz}
> \usetikzlibrary{decorations.markings}
>
(Continue reading)


Gmane