• No results found

GraphicxBox Test File Using the Graphicx Package

N/A
N/A
Protected

Academic year: 2021

Share "GraphicxBox Test File Using the Graphicx Package"

Copied!
6
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

AcroTEX.Net

GraphicxBox Test File Using the Graphicx Package

D. P. Story

Copyright c 2014 dpstory@acrotex.net

Prepared: January 10, 2014 www.acrotex.net

(2)

This demo file—produced by pdftex—for the graphicxbox package for users that are using the graphicx package, and not the graphicxsp package, the lat- ter requiring the distiller.

1

This package delivers two commands, these are

\graphicxbox and \fgraphicxbox. These two are modeled after \colorbox and \fcolorbox of the color package. These new commands are similar to their colorful counterparts, but they insert a graphical background in the box rather than a color background.

The syntax for \graphicxbox is

\graphicxbox[<includegraphics options>]{<graphic>}

{<box content>}

The optional parameter is passed to the \includegraphics command, which is used. Do not use the scale, width or height options of \include- graphics, the graphic is scaled to fit the box by \graphicxbox. The re- quired parameter {<graphic>} is also passed to \includegraphics.

Let’s see an example.

1The package should work for any driver that supports the color package.

(3)

This is ‘the Indian Blanket’ background graphic.

These graphical background can be used for more interesting displays of content, or for an eye- catching presentation. Every time you create a box using \graphicxbox or \fgraphicxbox, you im- port the graphic once again.

\fgraphicxbox does the same as \graphicxbox, but places a colorful frame around the box, just as \fcolorbox does. The syntax is

\fgraphicxbox[<model>]{<specification>}

[<includegraphics options>]{<graphic>}{<box content>}

The first two (color) parameters are passed to the \color command, which takes two parameters. The other three parameters are the same ones for

\graphicxbox.

Here’s an example

This is ‘the Indian Blanket’ background graphic.

These graphical background can be used for more interesting displays of content, or for an eye- catching presentation. Every time you create a box using \graphicxbox or \fgraphicxbox, you im- port the graphic once again.

(4)

As with \colorbox and \fcolorbox, the space around the box is equal to

\fboxsep on all sides, and the width of the rule is \fboxrule. These can be changed as desired.

Here’s a few more examples of graphical backgrounds.

This is a wood-brown background, perhaps ‘webgreen’ is not the best text color for this background, but, then again, I have no feel for color at all. In fact, I really wonder if I know what I’m doing at all. I’m pretty confused and disoriented most all the time.

Here’s a gradient-type background that I downloaded from the Internet.

Once can, in theory, download any of your favorite backgrounds and use them as background graphics for a box.

What if you have a graphic that has an aspect ratio that cannot be changed

because it would distort the graphic? To use such a graphic requires the

knowledge of the dimensions of the graphic.

(5)

Let’s try a photo for a graphic, now we must take care to preserve the aspect ratio. We simply create the box so that its dimensions have the same aspect ratio as that of the photo. Like so

\begin{minipage}[b][112.45bp-2\fboxsep]{149.665bp-2\fboxsep}

\footnotesize\bfseries\color{white}%

This is the mighty Grand Canyon, as seen from the south rim.

Beautiful!

\end{minipage}

Here, 149.665bp and 112.45bp are the dimensions of the photo. Wrap this box in \graphicxbox using the grandcanyon photo and we have. . .

This is the mighty Grand Canyon, as seen from the south rim. Beau- tiful!

(6)

Interesting. Now, let’s try framing this picture.

This is again, the mighty Grand Canyon, as seen from the south rim. Beautiful!

We’ve also modified the lengths of \fboxsep and \fboxrule.

Cool! That’s the graphicxbox package.

Referenties

GERELATEERDE DOCUMENTEN

For long section headings to wrap around within the TOC, we need to take the hyperref option linktocpage, unless pdflatex or xelatex are used.. 1.1 Now is the time for all good men

If you’re used to the glossaries package, note the difference in using \gls: hyper-text markup language (html).. And again (no difference): hyper-text markup language

The default values for the items in the \paperref environment are the following command punctation begin commands end commands.. \by ,

The EASYBMAT package is a macro package for supporting block matri- ces having equal column widths or equal rows heights or both, and support- ing various kinds of rules (lines)

The package EASYEQN introduces some equation environments that sim- plify the typesetting of equations.. It uses a syntax similar to the array envi- ronment to define the

The EASYMAT package is a macro package for supporting block matrices having equal column widths or equal rows heights or both, and supporting various kinds of rules (lines) between

The EASYTABLE package is a macro package for writing tables, with equal column widths or equal rows heights or both, with various kinds of rules (lines) between rows and columns..

In the first case, it creates the new command (macro) \cmd which executes \cmda when in scalar mode and \cmdb when in vector mode. In the second case it creates a new command \cmd