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.

Question

I am using a background image that has a black border of equal thickness all the way around it (which I created and saved as an .eps file).

In my LaTeX document, however, I cannot seem to get the border to appear in equal thickness all the way around the image. How can I solve this?

Minimum Working Example

\documentclass[landscape,a0b,final]{a0poster}

\usepackage{epsfig}
\usepackage{pstricks,pst-grad}

\newcommand{\background}[3]{
\newrgbcolor{cgradbegin}{#1}
\newrgbcolor{cgradend}{#2}
\psframe[fillstyle=gradient,gradend=cgradend,
gradbegin=cgradbegin,gradmidpoint=#3](0.,0.)(1.\textwidth,-1.\textheight)}

\newenvironment{poster}{
\begin{center}
\begin{minipage}[c]{0.95\textwidth}}{
\end{minipage} 
\end{center}}

\usepackage{eso-pic}
\newcommand\BackgroundPic{
\put(10,-50){
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
\includegraphics[width=\paperwidth,height=\paperheight,
keepaspectratio]{TheSun2.eps}\vfill}}}

\begin{document}

\AddToShipoutPicture{\BackgroundPic}

\begin{poster}
\end{poster}
\end{document}

Note

My image is a .eps file - I'm not sure how to upload this (or whether it's necessary).

Reply to Kurt's Comment

My background image is a photo with a black border round it. I took the photo and put it in Inkscape, then made a black border round it, with equal thickness round each side. I specified the thickness mathematically. In Inkscape, the border looks uniform. In Texmaker, it is obvious that the border is non-uniform (with the above MWE at 100% zoom):

enter image description here

share|improve this question
1  
With which program have you checked your eps file? Have you printed it? It often happens that you can't see correct line thickness on screen (mathematical effects) but it is printed with correct thickness ... –  Kurt Mar 17 '13 at 1:26
    
@Kurt I have edited my question. –  User 17670 Mar 17 '13 at 12:56
    
well it looks as if your image is clipped at the right hand side but impossible to tell without seeing the page dimensions and the image. –  David Carlisle Mar 17 '13 at 13:10
    
@DavidCarlisle In order to not have my border clipped, I have to go into Inkscape and make the image smaller on the page (even though trying to export the image, not the page). –  User 17670 Mar 17 '13 at 13:21

1 Answer 1

up vote 4 down vote accepted
 \usepackage{epsfig}

Is just for compatibility with the old (1980's) epsfig package syntax. You are not using that syntax anyway so you should use

 \usepackage{graphicx}

Where did these numbers come from

\put(10,-50){

Are you sure you are not clipping part of your borders off the page? You are scaling the image to the full paper width so you have to be very accurate in the positioning of the image, if it is out by a fraction then the borders will be different widths. I don't know the eso-pic package but they don't seem very natural numbers to me.

share|improve this answer
    
The background image of my poster doesn't cover the entire LaTeX page (i.e. there is some white space beyond the black border of my image). I chose (10,-50) by eye-balling the white space on all four sides of my poster and trying to make them about the same (so that my poster would sit 'in the middle' of the page). –  User 17670 Mar 17 '13 at 12:59

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.