10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.1.5 Placing a StampCookbook A full code sample can be found in the Cookbook topic text_output/simple_stamp.As an alternative to rotated text, the stamp feature offers a convenient method for placingtext diagonally in a box. The stamp function will automatically perform some sophisticatedcalculations to determine a suitable font size and rotation so that the textcovers the box. To place a diagonal stamp, e.g. in the page background, use PDF_fit_textline( ) with the stamp option. With stamp=ll2ur the text will be placed from the lowerleft to the upper right corner of the fitbox. However, with stamp=ul2lr the text will beplaced from the upper left to the lower right corner of the fitbox. As shown in Figure 7.8,showborder=true is used to illustrate the fitbox and the bounding box of the stamp.Fig. 7.8 Fitting a text line like a stamp from the lower left to the upper rightGenerated output Option list for PDF_fit_textline( )Giant Wing7.1.6 Using Leadersfontsize=8 boxsize={160 50} stamp=ll2ur showborder=trueLeaders can be used to fill the space between the borders of the fitbox and the text. Forexample, dot leaders are often used as a visual aid between the entries in a table of contentsand the corresponding page numbers.Leaders in a table of contents. Using PDF_fit_textline( ) with the leader option and thealignment={none right} suboption, leaders are appended to the right of the text line, andrepeated until the right border of the text box. There will be an equal distance betweenthe rightmost leader and the right border, while the distance between the text and theleftmost leader may differ (see Figure 7.9a).Cookbook A full code sample demonstrating the usage of dot leaders in a text line can be found in theCookbook topic text_output/leaders_in_textline.Cookbook A full code sample demonstrating the usage of dot leaders in a Textflow can be found in theCookbook topic text_output/dot_leaders_with_tabs.Leaders in a news ticker. In another use case you might want to create a news ticker effect.In this case we use a plus and a space character »+ « as leaders. The text line isplaced in the center, and the leaders are printed before and after the text line(alignment={left right}). The left and right leaders are aligned to the left and right border,and might have a varying distance to the text (see Figure 7.9b).138 Chapter 7: Formatting Features

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!