Friday, April 23, 2021

Making your own album 15

click the 'Documents' header to see previous entries
https://rainbowstampsandcoins.blogspot.com/search/label/documents 

4.2.2     Page_text_paragraph

In 4.1.3 we saw how to integrate larger parts of text, by using the paragraph-command.

PAGE_TEXT_PARAGRAPH_START(HB 16 CENTRE)

Texts and other items, can be added without having to worry about double quotes. It can also be placed on top op a background image.
PAGE_TEXT_PARAGRAPH_END

The previous command : "page_text" is default aligned left. This "paragraph_start" command, has no default alignment, so we always have to choose, ‘left’, ‘centre’ or ‘right’.

Between the ‘start’ and the ‘end’ command, we don’t have to worry about the double (straight) quotes  no more. The other command : \n to start a new line, can be used as before.

Pressing ‘enter’ while typing the paragraph text, will not result in a blank line in the PDF when generated, but will also not cause any error if used while programming.

The code PAGE_TEXT_PARAGRAPH_START was actually recently added to AlbumEasy, en offered an alternative way to put text on a page. It offers the same functionality as the (older) Page_text-command, The Page_text_paragraph-command, is more user frendly than its older brother especially when it comes to larger text parts.

Besides aligning left, right or centered, the paragraph-command offers a new possibility to align justified (both left and right), with the option to keep a certain distance to the margins.

Reopen Test Design 6
Following code can be placed after the last part of what you already had:
Copy-past the codes below, generate and see the PDF.

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

# The third page
# ------------------------------------------------------------------------------

PAGE_START

PAGE_RULE_H (0.1 0 8)

PAGE_TEXT_CENTRE (HB 12 "examples of the use of \nthe PAGE_TEXT_PARAGRAPH_START command.")

PAGE_TEXT_PARAGRAPH_START(TN 10 LEFT)
LEFT:\n
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
.

PAGE_TEXT_PARAGRAPH_END

PAGE_TEXT_PARAGRAPH_START(TN 10 RIGHT)
RIGHT:\n
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
.

PAGE_TEXT_PARAGRAPH_END

PAGE_TEXT_PARAGRAPH_START(TN 10 CENTRE)
CENTRE:\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

PAGE_TEXT_PARAGRAPH_END

PAGE_TEXT_PARAGRAPH_START(TN 10 JUSTIFIED)

JUSTIFIED:\n
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

PAGE_TEXT_PARAGRAPH_END

PAGE_TEXT_PARAGRAPH_START(TN 10 JUSTIFIED 6.0)
JUSTIFIED with 6.0 mm distance to the margins:\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

PAGE_TEXT_PARAGRAPH_END

Examples of the Page_Text_Paragraph-command
 

There are even more ways to work with texts, see module 3 B

to be continued... 

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

No comments: