Skip to content

Commit

Permalink
Fix --header1 support for web pages (Issue #515)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Feb 11, 2024
1 parent 41d79db commit 8003be2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changes in HTMLDOC v1.9.18

- Fixed `--header1` support for web page output (Issue #515)
- Fixed markdown emphasized, strong, and struck-through text (Issue 517)


Expand Down
16 changes: 7 additions & 9 deletions htmldoc/ps-pdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* broken into more manageable pieces once we make all of the output
* "drivers" into classes...
*
* Copyright © 2011-2023 by Michael R Sweet.
* Copyright © 2011-2024 by Michael R Sweet.
* Copyright © 1997-2010 by Easy Software Products. All rights reserved.
*
* This program is free software. Distribution and use rights are outlined in
Expand Down Expand Up @@ -68,7 +68,7 @@ extern "C" { /* Workaround for JPEG header problems... */

#define HTMLDOC_ASCII85
//#define HTMLDOC_INTERPOLATION
#define HTMLDOC_PRODUCER "htmldoc " SVERSION " Copyright 2011-2022 by Michael R Sweet"
#define HTMLDOC_PRODUCER "htmldoc " SVERSION " Copyright 2011-2024 by Michael R Sweet"


/*
Expand Down Expand Up @@ -1471,14 +1471,12 @@ pspdf_prepare_page(int page) /* I - Page number */
* Add chapter header & footer...
*/

if (page > chapter_starts[chapter] || OutputType != OUTPUT_BOOK)
pspdf_prepare_heading(page, print_page, pages[page].header, top,
page_text, sizeof(page_text));
if (page == chapter_starts[chapter])
pspdf_prepare_heading(page, print_page, pages[page].header1, top, page_text, sizeof(page_text));
else
pspdf_prepare_heading(page, print_page, pages[page].header1, top,
page_text, sizeof(page_text));
pspdf_prepare_heading(page, print_page, pages[page].footer, 0,
page_text, sizeof(page_text));
pspdf_prepare_heading(page, print_page, pages[page].header, top, page_text, sizeof(page_text));

pspdf_prepare_heading(page, print_page, pages[page].footer, 0, page_text, sizeof(page_text));
}

/*
Expand Down

0 comments on commit 8003be2

Please sign in to comment.