mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-11 17:10:45 +08:00
nasmdoc.pdf: always begin a chapter on an odd page
If we want to print the document, we really want each chapter to start on an odd (right-facing) page; otherwise it gets rather strange. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
84deac219d
commit
7e9d4fdf8d
@ -829,6 +829,8 @@ sub ps_break_pages($$) {
|
||||
# First line of a new chapter heading. Start a new page.
|
||||
undef $columnstart;
|
||||
$curpage++ if ( $curypos > 0 || defined($columnstart) );
|
||||
# Always start on an odd page
|
||||
$curpage |= 1;
|
||||
$curypos = $chapstart;
|
||||
} elsif ( defined($columnstart) && $$linfo[0] !~ /$columnregexp/o ) {
|
||||
undef $columnstart;
|
||||
@ -1232,10 +1234,10 @@ ps_start_page();
|
||||
foreach $line ( @pslines ) {
|
||||
my $linfo = $line->[0];
|
||||
|
||||
if ( $$linfo[4] != $curpage ) {
|
||||
while ( $$linfo[4] > $curpage ) {
|
||||
ps_end_page($curpage > 2);
|
||||
ps_start_page();
|
||||
$curpage = $$linfo[4];
|
||||
$curpage++;
|
||||
}
|
||||
|
||||
print '[';
|
||||
|
Loading…
Reference in New Issue
Block a user