Graphics, Figures & Tablespgfgantt | Link Adjustments

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Anicka
Posts: 13
Joined: Tue Oct 12, 2010 1:20 pm

pgfgantt | Link Adjustments

Post by Anicka »

Hallo!

I'm trying to figure out how to align two five-part links in pgfgantt. At the moment the two links align on the right side, but not on the left and it looks a bit ugly. Anyone that has an suggestion?

Thanks in advance
Anicka

Code: Select all

\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfgantt}

\begin{document}
\begin{frame}
\begin{ganttchart}{12}
\gantttitle{Weeks}{12}\\
\gantttitlelist{1,...,12}{1}\\
\ganttbar{Literature review}{1}{2}\\
\ganttmilestone[inline]{Things ordered}{2}\\
\ganttbar{Writing review}{3}{10}
\ganttlink{elem0}{elem1}
\ganttlink[link mid=0.25]{elem0}{elem2}
\end{ganttchart}
\end{frame}
\end{document}
Last edited by localghost on Tue May 29, 2012 10:52 am, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

pgfgantt | Link Adjustments

Post by Stefan Kottwitz »

Hi Anicka,

did you try this example you posted?

It is not compilable. Each ganttchart must be surrounded by a tikzpicture environment. Even if I fix that, the compiler doesn't know elem0, elem1, elem2. So, whatever you did, it's different to this description code. Perhaps show a compilable example, which actually shows the problem.

Stefan
LaTeX.org admin
Anicka
Posts: 13
Joined: Tue Oct 12, 2010 1:20 pm

Re: pgfgantt | Link Adjustments

Post by Anicka »

Hallo Stefan!

The example compiles without problem for me (using Tex Live on Mac). Uploading the resulting pdf with this post.

Anicka
Attachments
test.pdf
(30.21 KiB) Downloaded 582 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: pgfgantt | Link Adjustments

Post by Stefan Kottwitz »

Hi Anicka,

could you please also post the .log file? I'm interested in seeing why it runs, to make it run for testing on my system.

Stefan
LaTeX.org admin
Anicka
Posts: 13
Joined: Tue Oct 12, 2010 1:20 pm

Re: pgfgantt | Link Adjustments

Post by Anicka »

Sure!

Log file is attached.

Anicka
Attachments
test.log
Log-file
(50.5 KiB) Downloaded 335 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

pgfgantt | Link Adjustments

Post by Stefan Kottwitz »

Ok, I installed a newer version of pgfgantt, as I saw in your log file, which implicitly loads TikZ and works without a tikzpicture environment. Also the other errors are gone, I can compile it.

I just don't understand what you mean here:
Anicka wrote:At the moment the two links align on the right side, but not on the left
Links are the relations between elements, done here by

Code: Select all

\ganttlink{elem0}{elem1}
\ganttlink[link mid=0.25]{elem0}{elem2}
Do you really want to align the links? Or do you mean the text for the bars?

Stefan
LaTeX.org admin
Anicka
Posts: 13
Joined: Tue Oct 12, 2010 1:20 pm

Re: pgfgantt | Link Adjustments

Post by Anicka »

The two links starting on the top row are superimposing for the top bit and the part that is on the right. The middle part (that has been adjusted by the link mid command) are different in length so the fourth bit of the links (the left part) are not superimposing, but are parallel. I think it looks odd.

If I introduce the bulge command, the middle part of the link would grow but in both directions and I have not found an intuitive way of "bulging" the link on only one side.

I hope that explains the issue further.

Anicka
Post Reply