• No results found

GraphicxBox Test File Using the GraphicxSP Package

N/A
N/A
Protected

Academic year: 2021

Share "GraphicxBox Test File Using the GraphicxSP Package"

Copied!
6
0
0

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

Hele tekst

(1)

AcroTEX.Net

GraphicxBox Test File Using the GraphicxSP Package

D. P. Story

Copyright c 2014 dpstory@acrotex.net

Prepared: January 10, 2014 www.acrotex.net

(2)

This is a demo file for the graphicxbox package for those who are using the graphicxsp package, which requires the distiller. This package delivers two commands, \graphicxbox and \fgraphicxbox. These two are modeled af- ter \colorbox and \fcolorbox of the color package. These new commands are similar to their colorful counterparts, but they insert a graphical back- ground in the box rather than a color background.

The syntax for \graphicxbox is

\graphicxbox[<includegraphics options>,name=<name>]

{<graphic>}{<box content>}

The optional parameter is passed to the \includegraphics command,

1

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 required parameter {<graphic>} is not used and can be left empty.

Let’s see an example.

1Including addition key-value pairs defined in theGraphicxSP 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>,name=<name>]{<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][\heightOf{grandcanyon}bp-2\fboxsep]

{\widthOf{grandcanyon}bp-2\fboxsep}

\footnotesize\bfseries\color{white}This is the mighty Grand Canyon, as seen from the south rim. Beautiful!

\end{minipage}

Here, 149.99963bp and 112.99971bp are the dimensions of the photo.

Now, wrap this box in \graphicxbox using the grandcanyon photo

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!

Cool! That’s the graphicxbox package.

Notes: This file has a size of 83KB,

2

and grfxbox tst.pdf, as produced by pdftex, has file size 111KB. GraphicxSP embeds the file once, and reuses the graphic. We got a slight savings on file space.

See the demo file grfxbox tst indians.pdf for an example of the use of transparency and tiling.

283KB before additional text and fonts were introduced into this version of the doc- ument.

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

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

(\textup should be applied to hand-coded item identifiers when using an AMS class; AMS style conforms to traditional math typography in this respect, with item