Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've recently been using the Edward Tufte inspired style file (the handout option) for my documents and a Gantt chart package. However, if I put \usepackage{gantt} in my preamble it prevents some code that previously worked fine (a set of frameboxes in a figure environment), from working. Is there any way around this issue? I assume it is something to do with the namespace of variables in each package, but I don't know enough latex markup to be able to inspect this.

I'm using TeXshop on a Mac with OSX, and have both .sty files in the folder where I am working. The problem appears to be with this structure:

\framebox(150,150){\includegraphics[width=0.3\linewidth]{image1.pdf}}

where I make a framebox (and place an image in the framebox, though the error occurs without any image in there).

Here is the code that I am using:

\documentclass[justified,marginals=raggedright]{tufte-handout}% justification

%\geometry{showframe}% for debugging purposes -- displays the margins

\usepackage{amsmath}
\usepackage{gantt}

% Set up the images/graphics package
\usepackage{graphicx}

\usepackage{minibox}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\graphicspath{{graphics/}}

\title{Analysis}
\author[]{The authors}
\date{\today{}}  % if the \date{} command is left out, the current date will be used

% The following package makes prettier tables.  We're all about the bling!
\usepackage{booktabs}

% The units package provides nice, non-stacked fractions and better spacing
% for units.
\usepackage{units}

% The fancyvrb package lets us customize the formatting of verbatim
% environments.  We use a slightly smaller font.
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}

% Small sections of multiple columns
\usepackage{multicol}

% Provides paragraphs of dummy text
\usepackage{lipsum}

% These commands are used to pretty-print LaTeX commands
\newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically
\newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument
\newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument
\newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment
\newcommand{\docenv}[1]{\textsf{#1}}% environment name
\newcommand{\docpkg}[1]{\texttt{#1}}% package name
\newcommand{\doccls}[1]{\texttt{#1}}% document class name
\newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name

\begin{document}

\maketitle% this prints the handout title, author, and date

%\printclassoptions

\section{Objective of Analysis} \label{sec:objective}

\begin{figure*}[htbp]
\mbox{
\framebox(150,150){}
\framebox(150,150){}
\framebox(150,150){}
}
 \caption{Data sources used in this analysis;}
 \label{fig:map1} 
\end{figure*}
The analysis description is here


\end{document}

The contents of \listfile is as follows:

*File List*
tufte-handout.cls    2009/12/11 v3.5.0 Tufte-handout class
tufte-common.def    2009/12/11 v3.5.0 Common code for the Tufte-LaTeX styles
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
 xifthen.sty    2009/04/17 v1.3 Extended ifthen features
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
 ifmtarg.sty    2009/09/02 v1.2a check for an empty argument
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   ifpdf.sty    2009/04/10 v2.0 Provides the ifpdf switch (HO)
 ifxetex.sty    2009/01/23 v0.5 Provides ifxetex conditional
titlesec.sty    2007/08/12 v2.8 Sectioning titles
titletoc.sty    2007/08/12 v1.6 TOC entries
hyperref.sty    2009/10/09 v6.79a Hypertext links for LaTeX
  ifvtex.sty    2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
 hycolor.sty    2009/10/02 v1.5 Code for color options of hyperref/bookmark (HO
)
xcolor-patch.sty    2009/10/02 xcolor patch
  pd1enc.def    2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)
etexcmds.sty    2007/12/12 v1.2 Prefix for e-TeX command names (HO)
infwarerr.sty    2007/09/09 v1.2 Providing info/warning/message (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
kvoptions.sty    2009/08/13 v3.4 Keyval support for LaTeX options (HO)
kvsetkeys.sty    2009/07/30 v1.5 Key value parser with default handler support 
(HO)
   puenc.def    2009/10/09 v6.79a Hyperref: PDF Unicode definition (HO)
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
  bitset.sty    2007/09/28 v1.0 Data type bit set (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (HO)
bigintcalc.sty    2007/11/11 v1.1 Expandable big integer calculations (HO)
pdftexcmds.sty    2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (
HO)
ifluatex.sty    2009/04/17 v1.2 Provides the ifluatex switch (HO)
 ltxcmds.sty    2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)

atbegshi.sty    2008/07/31 v1.9 At begin shipout hook (HO)
 hpdftex.def    2009/10/09 v6.79a Hyperref driver for pdfTeX
ragged2e.sty    2009/05/21 v2.1 ragged2e Package (MS)
everysel.sty    1999/06/08 v1.03 EverySelectfont Package (MS)
geometry.sty    2008/12/21 v4.2 Page Geometry
geometry.cfg
changepage.sty    2009/10/20 v1.0c check page and change page layout
paralist.sty    2002/03/18 v2.3b Extended list environments (BS)
textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)
letterspace.sty    2009/03/27 v2.3d Robust letterspacing (RS)
setspace.sty    2000/12/01 6.7 Contributed and Supported LaTeX2e package
  natbib.sty    2009/07/16 8.31 (PWD, AO)
bibentry.sty    2007/10/30 1.5 (PWD)
     Jan.bbl
optparams.sty    2004/08/14 v0.9 multiple optional parameters in macros
placeins.sty    2005/04/18  v 2.2
mathpazo.sty    2005/04/12 PSNFSS-v9.2a Palatino w/ Pazo Math (D.Puga, WaS) 
  helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS) 
beramono.sty    2004/01/31 (WaS)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
textcomp.sty    2005/09/27 v1.99g Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
fancyhdr.sty    
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2009/08/25 v0.04m Graphics/color for pdfTeX
dvipsnam.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
  svgnam.def    2007/01/21 v2.11 Predefined colors according to SVG 1.1 (UK)
multicol.sty    2008/12/05 v1.6h multicolumn formatting (FMi)
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
   gantt.sty    
    tikz.sty    2008/02/13 v2.00 (rcs-revision 1.27)
     pgf.sty    2008/01/15 v2.00 (rcs-revision 1.12)
  pgfrcs.sty    2008/02/20 v2.00 (rcs-revision 1.21)
  pgfrcs.code.tex
 pgfcore.sty    2008/01/15 v2.00 (rcs-revision 1.6)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2009/08/28 v1.8 graphics configuration of TeX Live
  pgfsys.sty    2008/02/07 v2.00 (rcs-revision 1.31)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/01/23  (rcs-revision 1.6)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.00 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.00 (rcs-revision 1.1)
  pgffor.sty    2007/11/07 v2.00 (rcs-revision 1.8)
  pgffor.code.tex
    tikz.code.tex
 forloop.sty    2006/09/18 v3.0 For Loops for LaTeX
 minibox.sty    2009/04/21 v0.1 Another type of box.
booktabs.sty    2005/04/14 v1.61803 publication quality tables
   units.sty    1998/08/04 v0.9b Typesetting units
nicefrac.sty    1998/08/04 v0.9b Nice fractions
fancyvrb.sty    2008/02/07
  lipsum.sty    2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text
  ts1cmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions
  t1pplj.fd    2004/09/06 font definitions for T1/pplj.
 nameref.sty    2007/05/29 v2.31 Cross-referencing by name of section
refcount.sty    2008/08/11 v3.1 Data extraction from references (HO)
     Jan.out
     Jan.out
supp-pdf.mkii
 ***********
share|improve this question
1  
This is probably not enough detail to diganose the problem. Can you post a minimal example that shows the problem (i.e. a complete document that should load only tufte-latex and gantt, and a single framebox or whatever to show the error and/or bad output.) –  Alan Munn Jan 12 '11 at 16:16
    
@celenius - I had a similar problem sometime back, just try removing the xcolor or color package from gantt. Are you getting an options clash? –  Yiannis Lazarides Jan 12 '11 at 16:34
    
using tufte-book and gant doesn't cause any error! –  Herbert Jan 12 '11 at 16:44
    
@Alan, ok I'll do that shortly. –  celenius Jan 12 '11 at 17:03
1  
A snarky answer: Tufte thinks Gantt charts are bad visual design, so why would they appear in articles in his style? :P –  David Roberts Mar 15 '11 at 2:10

2 Answers 2

up vote 4 down vote accepted

I'm posting this as an answer, because it is an answer to your question, even though your question is not, in fact, the right question. There is no conflict between tufte-handout and gantt.sty; if you had produced a true minimal document to find what was causing the problem, you would have discovered this yourself. (This is why constructing minimal documents is both important and informative.) Here is a minimal document that shows the problem you are having:

\documentclass{article}
\usepackage{gantt} % comment out to see the correct output

\begin{document}

\framebox(150,150){}

\end{document}

This shows that there is a problem with gantt.sty and the \framebox command. A look at gantt.sty reveals the problem: it globally sets a value for \unitlength (1cm) instead of defining its own length. \unitlength is also used in the \framebox command and which tries to make a square 150cm on a side, which is a little bigger than the page.

The fix to gantt.sty is relatively simple, but needs to be done carefully.

  1. add \newlength{\ganttunitlength}
  2. replace all instances of \unitlength in the style with \ganttunitlength
  3. remove \makeatletter and \makeatother from gantt.sty (they shouldn't be used in packages)
  4. change \usepackage to \RequirePackage (equivalent package command)
  5. add \ProvidesPackage{gantt.sty}[2011/03/14 Gantt diagrams] as the first line

Clearly gantt.sty wasn't quite ready for primetime. I've sent its author a fixed version.

UPDATE: There is now a new version of gantt.sty posted on the author's web site.

share|improve this answer
1  
6. Change question title to remove reference to tufte-article –  Matthew Leingang Mar 14 '11 at 21:22

I have no problem with your testfile. Put \listfiles into your preamble and compare the file list, which is at the end of your log file:

 *File List*
tufte-handout.cls    2009/12/11 v3.5.0 Tufte-handout class
tufte-common.def    2009/12/11 v3.5.0 Common code for the Tufte-LaTeX styles
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
 xifthen.sty    2009/04/17 v1.3 Extended ifthen features
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
    calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
 ifmtarg.sty    2009/09/02 v1.2a check for an empty argument
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   ifpdf.sty    2010/01/28 v2.1 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
titlesec.sty    2007/08/12 v2.8 Sectioning titles
titletoc.sty    2007/08/12 v1.6 TOC entries
hyperref.sty    2010/12/16 v6.81z Hypertext links for LaTeX
 ltxcmds.sty    2010/04/26 v1.7 LaTeX kernel commands for general use (HO)
pdftexcmds.sty    2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
kvsetkeys.sty    2010/03/01 v1.9 Key value parser (HO)
etexcmds.sty    2010/01/28 v1.3 Prefix for e-TeX command names (HO)
pdfescape.sty    2010/03/01 v1.9 Provides hex, PDF name and string conversions 
(HO)
  ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
 hycolor.sty    2009/12/12 v1.6 Color options of hyperref/bookmark (HO)
xcolor-patch.sty    2009/12/12 xcolor patch
letltxmacro.sty    2008/06/24 v1.3 Let assignment for LaTeX macros (HO)
kvoptions.sty    2010/02/22 v3.7 Keyval support for LaTeX options (HO)
  pd1enc.def    2010/12/16 v6.81z Hyperref: PDFDocEncoding definition (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
   puenc.def    2010/12/16 v6.81z Hyperref: PDF Unicode definition (HO)
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
  bitset.sty    2007/09/28 v1.0 Data type bit set (HO)
bigintcalc.sty    2007/11/11 v1.1 Expandable big integer calculations (HO)
atbegshi.sty    2010/03/25 v1.12 At begin shipout hook (HO)
 hpdftex.def    2010/12/16 v6.81z Hyperref driver for pdfTeX
atveryend.sty    2010/03/24 v1.5 Hooks at very end of document (HO)
rerunfilecheck.sty    2010/03/16 v1.6 Rerun checks for auxiliary files (HO)
uniquecounter.sty    2009/12/18 v1.1 Provides unlimited unique counter (HO)
ragged2e.sty    2009/05/21 v2.1 ragged2e Package (MS)
everysel.sty    2009/05/30 v1.1 EverySelectfont Package (MS)
geometry.sty    2010/09/12 v5.6 Page Geometry
changepage.sty    2009/10/20 v1.0c check page and change page layout
paralist.sty    2002/03/18 v2.3b Extended list environments (BS)
textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)
letterspace.sty    2010/01/10 v2.4 Robust letterspacing (RS)
setspace.sty    2000/12/01 6.7 Contributed and Supported LaTeX2e package
  natbib.sty    2010/09/13 8.31b (PWD, AO)
bibentry.sty    2007/10/30 1.5 (PWD)
optparams.sty    2004/08/14 v0.9 multiple optional parameters in macros
placeins.sty    2005/04/18  v 2.2
mathpazo.sty    2005/04/12 PSNFSS-v9.2a Palatino w/ Pazo Math (D.Puga, WaS) 
  helvet.sty    2005/04/12 PSNFSS-v9.2a (WaS) 
beramono.sty    2004/01/31 (WaS)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
textcomp.sty    2005/09/27 v1.99g Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
fancyhdr.sty    
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2010/11/26 v0.05c Graphics/color for pdfTeX
dvipsnam.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
  svgnam.def    2007/01/21 v2.11 Predefined colors according to SVG 1.1 (UK)
multicol.sty    2008/12/05 v1.6h multicolumn formatting (FMi)
 amsmath.sty    2000/07/18 v2.13 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
   gantt.sty    
    tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)
     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)
  pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)
  pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)
 pgfkeys.sty    
 pgfkeys.code.tex
  pgffor.code.tex
    tikz.code.tex
 forloop.sty    2006/09/18 v3.0 For Loops for LaTeX
 minibox.sty    2009/04/21 v0.1 Another type of box.
booktabs.sty    2005/04/14 v1.61803 publication quality tables
   units.sty    1998/08/04 v0.9b Typesetting units
nicefrac.sty    1998/08/04 v0.9b Nice fractions
fancyvrb.sty    2010/05/14
  lipsum.sty    2005/01/26 v1.0 150 paragraphs of Lorem Ipsum dummy text
  ts1cmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions
  t1pplj.fd    2004/09/06 font definitions for T1/pplj.
 nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
refcount.sty    2008/08/11 v3.1 Data extraction from references (HO)
gettitlestring.sty    2009/12/18 v1.3 Cleanup title references (HO)
      zz.out
      zz.out
supp-pdf.mkii
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2007/09/30 v1.0 Managing graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 ***********
share|improve this answer
    
I just did that; is there anything I should be looking for in particular? –  celenius Jan 13 '11 at 16:29
    
@celenius: as seen, there are a lot of files with an older date. At least update hyperref, then delete your auxiliary files .aux, .bbl, .idx and run it again. And, by the way, it maybe a good idea, if you could provide the error message ... –  Herbert Jan 13 '11 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.