Monday, April 26, 2021

Making your own album 18

4.4    Aligning boxes and headers(2 D)

4.4.1     Improving box alignments

In Module 1 D, we learned how to add empty boxes to our album pages, how we can align those boxes and how we put text in and underneath them.
In this part, we will learn more about additional possibilities.
Open a new document in AlbumEasy 4.2.1 and copy-paste the codes below:

# ------------------------------------------------------------------------------

# Setting the standards for the album
# ------------------------------------------------------------------------------

ALBUM_PAGES_SIZE (210.0 297.0)
# A4 size – or 215.9 279.4 for US Letter)
ALBUM_PAGES_MARGINS (12.0 12.0 15.0 15.0)

# W/E/N/S margins
ALBUM_PAGES_BORDER (0.5 0.1 0.0 1.0)
#4 pm (in pt) frames : line 1/ line 2 / line 3 / distance in-between
ALBUM_TITLE ("My Newest Album")
#title of the album
ALBUM_AUTHOR ("Johnny Collector")

#the author of the album

ALBUM_PAGES_SPACING (6.0 6.0)

#default spacing

ALBUM_DEFINE_FONT (DJ "DejaVu Sans")

#default font

# ------------------------------------------------------------------------------
# Page 1

# ------------------------------------------------------------------------------

PAGE_START

PAGE_TEXT_CENTRE (HB 12 "\naligning boxes")

Save this as Test Design 8

We start by adding a working line (see Mod. 1 D) where we put 3 boxes.
This time we use _FS (fixed spacing)

 

ROW_START_FS

#4 pm’s : font, size, distance to margins, fixed distance between boxes

 

We add boxes with the STAMP_ADD  command (there can be 8 pm’s or 6 pm’s:

STAMP_ADD

# 8 pm : width and hight of the box – text in the box (3) – text under the box (3)

Or…

STAMP_ADD

# 6  pm : width and hight of the box – text in the box (1) – text under the box (3))

 

I prefer the last option, as we normally will not put 3 text lines in the boxes.
If you need a second, or third line, IN the box, the command \n can also be used, as we will see in the example.

This command requires 6 pairs of double straight quotes (8 pm version) or 4 pairs of double straight quotes (6 pm version) – never 5

We can add the following commands to what we already have so far :

 

PAGE_RULE_H (0.1 0 5)

PAGE_TEXT_CENTRE (HB 12 "\nExamples of STAMP_ADD:\n")
PAGE_RULE_H (0.1 0 5)

PAGE_TEXT (HB 10 "a row of boxes")
ROW_START_FS (HN 6 0.1 6.0)

STAMP_ADD (25.0 28.0 "1/2d \n green" "sg 3" "" "sacc 2")
STAMP_ADD (25.0 28.0 "1d \n rose red" "sg 4" "" "sacc 3")

STAMP_ADD (25.0 28.0 "1 1/2d \n chesnut" "sg 5" "" "sacc 4")

Click Generate + PDF - then close the PDF again

Thanks to one extra code, we can adjust all boxes with one simple parameter.
This command needs tob e placed before we start adding lines with boxes.
Stamp_Boxes_Size_Adjust has only one parameter, the adjustment in mm of the boxes, in relation to what we put in the stamp_add parameters.
This can be useful, if we put the exact dimensions of the stamp/note/document/ … in the stamp_add pm’s. The adjustment will make all frames slightly larger (or smaller).

Copy paste the last 5 commands to your program, but add the Stamp_box_Size_Adjust – command before the row_start_fs – command:

The parameter we add is 4 (4 mm larger)

PAGE_TEXT (HB 10 "Same row, with STAMP_BOXES_SIZE_ADJUST(4.0):")
STAMP_BOXES_SIZE_ADJUST(4)

ROW_START_FS (HN 6 0.1 6.0)
STAMP_ADD (25.0 28.0 "1/2d \n green" "sg 3" "" "sacc 2")

STAMP_ADD (25.0 28.0 "1d \n rose red" "sg 4" "" "sacc 3")

STAMP_ADD (25.0 28.0 "1 1/2d \n chesnut" "sg 5" "" "sacc 4")

Click Generate + PDF - then close the PDF again


Once more, we copy-paste the last part, but now with a negative number in the parameter: (-5.5)

PAGE_TEXT (HB 10 "Same row, with STAMP_BOXES_SIZE_ADJUST(-5.5):")

STAMP_BOXES_SIZE_ADJUST(-5.5)
ROW_START_FS (HN 6 0.1 6.0)

STAMP_ADD (25.0 28.0 "1/2d \n green" "sg 3" "" "sacc 2")

STAMP_ADD (25.0 28.0 "1d \n rose red" "sg 4" "" "sacc 3")

STAMP_ADD (25.0 28.0 "1 1/2d \n chesnut" "sg 5" "" "sacc 4")

Click Generate + PDF - then close the PDF again

Changing the pm in this one command, can alter all boxes at once in your complete album, from the moment you add the command to the program.

If you like, you can also stop the stamp_box_size_adjust command at the end of each page, or whenever you want, and returning to the original box sizes.
For this we need to add :
STAMP_BOXES_SIZE_ADJUST(0)
This command cancels all further adjustments tot he boxes.

to be continued...

previous part : https://rainbowstampsandcoins.blogspot.com/2021/04/making-your-own-album-17.html
next part : https://rainbowstampsandcoins.blogspot.com/2021/04/making-your-own-album-19.html

No comments: