Marcus Harnisch | 2 Jul 22:32
X-Face
Picon

Framed boxes and listings

Hi all

For a presentation I would like to create framed code blocks using the
great listings package. With delightment I noticed that the
environments provided by listings work in almost every case. It
triggered only one case where things didn't work as expected.

History: Framed boxes in LaTeX suck when used on low-resolution
devices such as projectors. The piecewise assembly using ruleboxes and
other stuff I don't even want to think about, causes rounding errors
which is a pain in the eye. No matter whether anti-aliased diaplay is
used or not. Each way is equally bad, although in different respects.
Antialiased display suffers mostly from different line thickness,
while a normal display has overshoots in most corners of a box.

Given that I use PDF output only, my goal is to use a "native"
frame. I got excellent results from putting the listing into a
rectangular node. Since that seemed a bit to baroque I tried stripping
down the solution to using a framed `tikzpicture' and \pgftext with my
`lstlisting' as argument. Somehow, in the latter case, PGF did not get
the bounding box of the environment right.

My two questions are now:

1. What did I miss. What is the Right Way to achieve what I want?

2. Why does it not work with \pgftext? Was I completely off-track?

3. Ideally I'd have a solution that wraps all that into a new
environment. Potential users don't want to bother with PGF/TikZ just
(Continue reading)

Till Tantau | 3 Jul 09:54
Picon
Favicon

Re: Compatibility problems with pgf 1.18

Hi Andreas,

this is, indeed, a broken compatibility issue. The \pgfnodeconncurve  
got kicked out in version 0.65 and when Mark and I fiddled in the new  
math code we forgot to check this super-old code...

I fixed this in the CVS. To fix it yourself without doing a checkout,  
find the file .../latex/pgf/compatibility/pgfcomp-version-0-65.sty.  
In this file, before the line

\let\pgfdegree=\pgfsincos

add the following:

\def\pgfsincos#1{%
   \pgfmathparse{#1}%
   \pgfmathcos@{#1}\pgf <at> y=\pgfmathresult pt%
   \pgfmathsin@{#1}\pgf <at> x=\pgfmathresult pt%
}

That should solve the problem.

If you find further similar problems please feel free to send them to  
me. Also consider using the pgf-user mailing list instead of the  
latex-beamer user list since this is not a beamer problem.

Best regards,
Till

Am 03.07.2007 um 07:41 schrieb Andreas Tille:
(Continue reading)

Andreas Tille | 3 Jul 21:52
Picon
Favicon

Re: Compatibility problems with pgf 1.18

On Tue, 3 Jul 2007, Till Tantau wrote:

> \let\pgfdegree=\pgfsincos
>
> add the following:
>
> \def\pgfsincos#1{%
>   \pgfmathparse{#1}%
>   \pgfmathcos@{#1}\pgf <at> y=\pgfmathresult pt%
>   \pgfmathsin@{#1}\pgf <at> x=\pgfmathresult pt%
> }
>
> That should solve the problem.

Yes, it in fact solves the problem.  I builded an inofficial Debian
package with this patch and filed a bug report about it.

> If you find further similar problems please feel free to send them to
> me. Also consider using the pgf-user mailing list instead of the
> latex-beamer user list since this is not a beamer problem.

I'm currently only reading latex-beamer mailing list because I'm
mostly focussed on this list.  On the other hand I have two
remaining questions:

    1. If \pgfnodeconncurve seems to be outdated, what is the
       suggested alternative?
    2. How can I build the PGF manual?

Kind regards and thanks for your great presentation tools
(Continue reading)

Favicon

order of options critical?

Hi,

Is the behavior of the accompanying example correct?
I expected all three capital letters to appear at the same
height, but the order of the options seems to be critical.

Regards,

Jürgen


\documentclass{scrartcl}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \draw (0,0) -- (3,0);
  \draw (0,0) node[right,below,inner sep=0pt] {A};
  \draw (1,0) node[below,right,inner sep=0pt] {B};
  \draw (2,0) node[below,inner sep=0pt] {C};
\end{tikzpicture}
\end{document}



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
Jorge Scandaliaris | 9 Jul 14:48
Picon
Picon
Favicon

Gantt charts with pgf/tikz?

Hi,
I am completely new to pgf/tikz. I have searched google for gantt charts
 and pgf/tikz and found nothing. I did something like this with pstricks
before, but I've been thinking to switch to pgf/tikz for a long time. At
this stage I am not competent in pgf/tikz, but I would like experienced
people to let me know if this is feasible and how involved it would be
in pgf/tikz? If the answer is yes, not too difficult, I'd appreciate any
pointers to get me going.
Thanks in advance,

jorges

PS: [Off-topic] I do use beamer and I like it a lot. Thanks to Till
Tantau for these packages, even if I haven't used pgf/tikz yet, I did
received very nice comments about it.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Till Tantau | 9 Jul 16:02
Picon
Favicon

Re: order of options critical?

Hi!

indeed, the order of options is critical since "right" and "below" do  
not accumulate. The last option used replaces the one before. You  
actually wish to use "below right" instead.

There is a feature request that this is changed, but till then, use  
"below right".

Best regards,
Till

Am 09.07.2007 um 14:33 schrieb Goebel, Juergen, OPES26:

> Hi,
>
> Is the behavior of the accompanying example correct?
> I expected all three capital letters to appear at the same
> height, but the order of the options seems to be critical.
>
> Regards,
>
> Jürgen
>
>
> \documentclass{scrartcl}
> \usepackage{tikz}
> \begin{document}
> \begin{tikzpicture}
>   \draw (0,0) -- (3,0);
>   \draw (0,0) node[right,below,inner sep=0pt] {A};
>   \draw (1,0) node[below,right,inner sep=0pt] {B};
>   \draw (2,0) node[below,inner sep=0pt] {C};
> \end{tikzpicture}
> \end{document}
>
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/ 
> _______________________________________________
> pgf-users mailing list
> pgf-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgf-users

--
Prof. Dr. Till Tantau <tantau <at> tcs.uni-luebeck.de>
http://www.tcs.uni-luebeck.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Favicon

Re: order of options critical?

> Till Tantau wrote:

> indeed, the order of options is critical since "right" and 
> "below" do  
> not accumulate. The last option used replaces the one before. You  
> actually wish to use "below right" instead.

Oh yes, I see (even the manual tells it =:-0). I should take the
time and read it again ...

> There is a feature request that this is changed, but till then, use  
> "below right".

That's ok, now I know of it.

Thanks a lot (and of course for the great tools beamer and pgf)

Jürgen

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Till Tantau | 9 Jul 16:23
Picon
Favicon

Re: Gantt charts with pgf/tikz?

Hi!

indeed, there is no gantt chart library for TikZ, currently. This  
would not be particularly hard to implement (for someone who knows  
how to do this, I expect a day's work), but for a newbie this will be  
hard to do.

Nevertheless, it is certainly not too hard to do a "simple" gantt  
chart "by hand" quite quickly and easily. The harder part is thinking  
of and introducing a good and robust syntax.

So, just to get you going, you might try something like the following:

\newcommand\ganttline[4]{% line, tag, start end
   \node at (0,#1) [anchor=base east] {#2};
   \fill[blue] (#3/20,#1-.2) rectangle (#4/20,#1+.2);}

\begin{tikzpicture}[y=-1cm]

   \draw[help lines] (0,4.5) grid (8,0.5);

   \ganttline{1}{Kickoff-Meeting}{20}{40}
   \ganttline{2}{Thinking}{45}{50}
   \ganttline{3}{Implementation}{50}{100}
   \ganttline{4}{Testing}{100}{140}
\end{tikzpicture}

This is not what a real library would look like, but the result does  
look like a gantt chart...

Best regards,
Till

Am 09.07.2007 um 14:48 schrieb Jorge Scandaliaris:

> Hi,
> I am completely new to pgf/tikz. I have searched google for gantt  
> charts
>  and pgf/tikz and found nothing. I did something like this with  
> pstricks
> before, but I've been thinking to switch to pgf/tikz for a long  
> time. At
> this stage I am not competent in pgf/tikz, but I would like  
> experienced
> people to let me know if this is feasible and how involved it would be
> in pgf/tikz? If the answer is yes, not too difficult, I'd  
> appreciate any
> pointers to get me going.
> Thanks in advance,
>
> jorges
>
> PS: [Off-topic] I do use beamer and I like it a lot. Thanks to Till
> Tantau for these packages, even if I haven't used pgf/tikz yet, I did
> received very nice comments about it.

You are welcome!

--
Prof. Dr. Till Tantau <tantau <at> tcs.uni-luebeck.de>
http://www.tcs.uni-luebeck.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Jorge Scandaliaris | 10 Jul 19:04
Picon
Picon
Favicon

Re: Gantt charts with pgf/tikz?

Till Tantau wrote:
> Hi!
> 
> indeed, there is no gantt chart library for TikZ, currently. This would
> not be particularly hard to implement (for someone who knows how to do
> this, I expect a day's work), but for a newbie this will be hard to do.
> 
> Nevertheless, it is certainly not too hard to do a "simple" gantt chart
> "by hand" quite quickly and easily. The harder part is thinking of and
> introducing a good and robust syntax.
> 
> So, just to get you going, you might try something like the following:
> 
> \newcommand\ganttline[4]{% line, tag, start end
>   \node at (0,#1) [anchor=base east] {#2};
>   \fill[blue] (#3/20,#1-.2) rectangle (#4/20,#1+.2);}
> 
> \begin{tikzpicture}[y=-1cm]
> 
>   \draw[help lines] (0,4.5) grid (8,0.5);
> 
>   \ganttline{1}{Kickoff-Meeting}{20}{40}
>   \ganttline{2}{Thinking}{45}{50}
>   \ganttline{3}{Implementation}{50}{100}
>   \ganttline{4}{Testing}{100}{140}
> \end{tikzpicture}
> 
> This is not what a real library would look like, but the result does
> look like a gantt chart...
> 
> Best regards,
> Till
> 
Thanks, I'll try it and see how it goes.

jorges

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
Detmar | 11 Jul 01:09
Picon

How to best draw aligned text with arrows? (dependency grammar representations)


Hi,

I'm trying to use pgf/tikz to layout a sentence where the words are
connected by 
arrows that have labels (these are used to represent dependency grammar
analyses 
of sentences in linguistics). Here is an example:
http://www.nabble.com/file/p11531422/pdt-adv-co.png 

I recently started using pgf/tikz and after reading the manual and trying
out various 
examples am rather overwhelmed with how to achieve such layout. Apart from
general 
suggestions on how to tackle this, I'd specifically appreciate help with
finding out the best way 
to create the nodes for the text. The constraints are:

a) the words need to look like ordinary text (i.e. baseline aligned and with
ordinary 
    spacing between the words) 

b) the words in the translation line need to align below the source words

c) the center of the words needs to be accessible as reference point for the 
    arrows (and how does one then best realize those arrows)?

Any suggestions would be much appreciated - thanks!

Best,
Detmar

--

-- 
View this message in context: http://www.nabble.com/How-to-best-draw-aligned-text-with-arrows--%28dependency-grammar-representations%29-tf4059042.html#a11531422
Sent from the pgf-users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane