Graphics, Figures & TablesPossible conflict between fancyhdr and pstricks

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sesquiup
Posts: 1
Joined: Tue Aug 25, 2009 2:04 am

Possible conflict between fancyhdr and pstricks

Post by sesquiup »

I am using both fancyhdr and pstricks in the same document. When I write this code:

Code: Select all

\documentclass[12pt]{article}
\usepackage{pspicture,pstricks,fancyhdr}
\usepackage[margin=1in]{geometry}

\pagestyle{fancy}

\rhead{\textsf{J. Lee} \\ Fall 2009}
\lhead{NSC Math 381 \\ Class Notes \#1}

\begin{document}

We partition the triangle into four smaller equilateral triangle, where each of the smaller triangles has side length $\frac{1}{2}$, as in this picture:
\begin{center}
\begin{pspicture}(0,0)(10,8.7)
\pstriangle(5,0)(10,8.66025404)
\pstriangle[gangle=180](5,4.33012702)(5,4.33012702)
\uput[0](2.5,0.4){$\frac{1}{2}$}
\uput[0](7.5,0.4){$\frac{1}{2}$}
\end{pspicture}
\end{center}


\end{document}
It comes out fine as a dvi -- then I use dvi2ps, then ghostview to convert to PDF. As a pdf file, the top is shaved off. I've attached the pdf file so you can see what the problem is.

This seems to be a problem with my setup only, as my colleague ran created a perfectly good pdf using the same steps.

Thanks for any help.
Attachments
headererror.pdf
(10.75 KiB) Downloaded 202 times

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Possible conflict between fancyhdr and pstricks

Post by gmedina »

Hi,

your code works OK in my system. Add \listfiles as the first line of your code, process the document and search the .log file for the *File List* section. Here's mine:

Code: Select all

 *File List*
 article.cls    2005/09/16 v1.4f Standard LaTeX document class
  size12.clo    2005/09/16 v1.4f Standard LaTeX file (size option)
pspicture.sty    1999/04/11/ v2.02 Picture mode via PS specials (DPC)
pstricks.sty    2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2009/05/19 v1.29 `PSTricks' (tvz,hv)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
fancyhdr.sty    
geometry.sty    2008/12/21 v4.2 Page Geometry
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
   ifpdf.sty    2009/04/10 v2.0 Provides the ifpdf switch (HO)
  ifvtex.sty    2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
geometry.cfg
 ***********
Compare with yours; perhaps you are using old versions of some packages.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Possible conflict between fancyhdr and pstricks

Post by localghost »

The pspicture package is obsolete and superseded by the pict2e package. But both packages are not needed when using pstricks.


Best regards and welcome to the board
Thorsten
Post Reply