[texhax] boders on top and bottom only with \fcolorbox -solved

Brent Legge Brent.Legge at messagingdirect.com
Fri Jun 30 22:19:48 CEST 2006


Alright, I figured it out.  Nothing like a good 45min workout to clear 
the mind.  I got it to work with strategicly placec \vskip(s) to move 
the position of the \fcolorbox in tandem with the \rule(s)

\newcommand{\accountheader}[4]{
  \sffamily\fontseries{bx}\fontshape{n}\selectfont
  \parbox{17.55cm}{
    \parbox[1pt]{17.55cm}{\vskip10mm\rule{17.95cm}{1pt}}%
   
    \vskip-0.25mm\fcolorbox {lightgray}{lightgray}{
      \parbox{17.55cm}{\hskip-3pt
    \parbox{4.8cm}{\vskip2pt \scriptsize Nr~rachunku \vskip4pt
      \footnotesize \an{#1}\vskip2pt}
    \parbox{7cm}{\vskip2pt \scriptsize Rodzaj~rachunku \vskip4pt
      \footnotesize \an{#2}\vskip2pt}
    \parbox{3cm}{\vskip2pt \scriptsize Oprocentowanie~rachunku \vskip4pt
      \footnotesize\hfil \an{#3}\hfill\vskip2pt}\nobreak
    \hskip3pt\parbox{2cm}{\vskip2pt \scriptsize\hfil 
Waluta~rachunku\hfill \vskip4pt
      \footnotesize \hfil\an{#4}\hfill\vskip2pt}
      }
    }
    \parbox{17.55cm}{\vskip-0.25mm\rule{17.95cm}{1pt}}
  }
    \sffamily\fontseries{m}\fontshape{n}\selectfont
}



Brent Legge wrote:

>Sorry I should be more clear about the carriage return.  I have it there 
>so the \fcolorbox does not get pushed off the page by the preceding \rule.
>
>Brent Legge wrote:
>
>  
>
>>Hi TexHax,
>>
>>I'm trying to do a shaded text area with a dark border, but I only want 
>>the border to occur on the tob and bottom of the box.  I've attempted 
>>this using \rule in the following code:
>>
>>\newcommand{\accountheader}[4]{
>> \sffamily\fontseries{bx}\fontshape{n}\selectfont
>> \parbox{17.55cm}{
>>   \parbox[1pt]{17.55cm}{\vskip10mm\rule{18cm}{1pt}}%
>>  
>>   \fcolorbox {lightgray}{lightgray}{
>>     \parbox{17.55cm}{\hskip-3pt
>>   \parbox{4.8cm}{\vskip2pt \scriptsize Nr~rachunku \vskip4pt
>>     \footnotesize \an{#1}\vskip2pt}
>>   \parbox{7cm}{\vskip2pt \scriptsize Rodzaj~rachunku \vskip4pt
>>     \footnotesize \an{#2}\vskip2pt}
>>   \parbox{3cm}{\vskip2pt \scriptsize Oprocentowanie~rachunku \vskip4pt
>>     \footnotesize\hfil \an{#3}\hfill\vskip2pt}\nobreak
>>   \hskip3pt\parbox{2cm}{\vskip2pt \scriptsize\hfil 
>>Waluta~rachunku\hfill \vskip4pt
>>     \footnotesize \hfil\an{#4}\hfill\vskip2pt}
>>     }
>>   }
>>   \parbox{17.55cm}{\vskip-0.5mm\rule{18cm}{1pt}}
>> }
>>   \sffamily\fontseries{m}\fontshape{n}\selectfont
>>}
>>
>>But this results in a small gap between the top border and the gray box 
>>(introduced by the carriage return).
>>
>>Is there another package that can be used to accomplish this or is there 
>>something missing in \fcolorbox that I could be using?
>>
>> 
>>
>>    
>>
>
>
>  
>


-- 
Brent Legge - Support Supervisor
e-Courier Support - ACI Worldwide (MessagingDirect)

email: leggeb at aciworldwide.com
Phone: (780) 424-4922 x364
Fax: (780) 424-4925
Toll Free: 1-800-850-0114

------------------------------------------------------------------------

This e-mail message and any attachments may contain confidential, 
proprietary or non-public information. This information is intended 
solely for the designated recipient(s). If an addressing or transmission 
error has misdirected this e-mail, please notify the sender immediately 
and destroy this e-mail. Any review, dissemination, use or reliance upon 
this information by unintended recipients is prohibited. Any opinions 
expressed in this e-mail are those of the author personally.


More information about the texhax mailing list