Adding and subtracting with named patterns and back
references
In many cases it is convenient to be able to specify a page number
offset in an APA file. Both addition (+) and subtraction (-) are
supported.
The following are all valid ASSIGN statements:
ASSIGN= "Page.p[#PgPosition].pdf" "*" [#PgPosition] 1
ASSIGN= "Page.p[#PgPosition].pdf" "*" [#PgPosition] - 50 1
ASSIGN= "Page.p[#PgPosition].pdf" "*" [#PgPosition] + 50 + 30 1
ASSIGN= "Page[#Num].p[#PgPosition].pdf" "*" [#Num] +
[#PgPosition] + 50 1
The rules are:
●
Pattern-matching must use the # character.
●
Math expressions are valid with or without spaces.
For example the following two expressions are treated the same:
[#Num]-24
[#Num] - 24
●
Math operations are not supported for the GEOM statement.
This example include all page assignments for a book consisting of
seven files. The page position is calculated using the page number from
the page name ([#PgPosition]) plus the number of pages in each of the
preceding files.
ASSIGN= "1_frontcovers.p[#PgPosition].pdf" "*" [#PgPosition] 1
ASSIGN= "2_intro.p[#PgPosition].pdf" "*" [#PgPosition]+10 1
ASSIGN= "3_chpt_1.p[#PgPosition].pdf" "*" [#PgPosition]+10+38 1
ASSIGN= "4_chpt_2.p[#PgPosition].pdf" "*" [#PgPosition]
+10+38+516 1
ASSIGN= "5_chpt_3.p[#PgPosition].pdf" "*" [#PgPosition]
+10+38+516+8 1
ASSIGN= "6_chpt_4.p[#PgPosition].pdf" "*" [#PgPosition]
+10+38+516+8+30 1
ASSIGN= "7_appendix.p[#PgPosition].pdf" "*" [#PgPosition]
+10+38+516+8+30+8 1
The 10 pages from the 1_frontcovers file are assigned to page positions
one to 10.
The 38 pages from the 2_intro file are assigned to page positions 11 to
49.
414
Chapter 11— Page sets and impositions