Index: Makefile.in =================================================================== diff -u -rbbb3b8350056fa3cac96cafb5b6a3d1708c3ca57 -r6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5 --- Makefile.in (.../Makefile.in) (revision bbb3b8350056fa3cac96cafb5b6a3d1708c3ca57) +++ Makefile.in (.../Makefile.in) (revision 6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5) @@ -207,7 +207,13 @@ # Do nothing, use the environment variable as is. endif +ifeq ($(CHROME),) + CHROME="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" +else + # Do nothing, use the environment variable as is. +endif + # # Not used, but retained for reference of what libs Tcl required TCL_LIBS = @TCL_LIBS@ @@ -373,16 +379,15 @@ # for now, just the two doc files doc: - $(ASCIIDOC) $(src_doc_dir)/next-migration.txt - $(ASCIIDOC) $(src_doc_dir)/next-tutorial/next-tutorial.txt + $(ASCIIDOC) -a stylesheet=$(abspath $(src_doc_dir))/nx.css $(src_doc_dir)/next-migration.txt +#$(ASCIIDOC) -a stylesheet=$(abspath $(src_doc_dir))/nx-small.css $(src_doc_dir)/next-tutorial/next-tutorial.txt + $(ASCIIDOC) -a stylesheet=$(abspath $(src_doc_dir))/nx.css $(src_doc_dir)/next-tutorial/next-tutorial.txt pdfdoc: (cd $(src_doc_dir); \ - prince --javascript --style=nx-small.css next-migration.html \ - -o next-migration.pdf) + $(CHROME) --headless --disable-gpu --print-to-pdf-no-header --print-to-pdf=next-migration.pdf next-migration.html) (cd $(src_doc_dir)/next-tutorial; \ - prince --javascript --style=../nx.css next-tutorial.html \ - -o next-tutorial.pdf) + $(CHROME) --headless --disable-gpu --print-to-pdf-no-header --print-to-pdf=next-tutorial.pdf next-tutorial.html) example-doc: $(EXAMPLE_SCRIPTS) @@ -440,9 +445,10 @@ man-pdf: $(NX_MAN3:%.man=%.pdf) $(src_doc_dir)/%.pdf : $(src_doc_dir)/%.html - @for m in $(?F) ; do \ + @files=$(basename $(?F)); \ + for m in $$files ; do \ echo " Generating pdf manpage for $$m" ; \ - (cd $(src_doc_dir); prince -s man-princexml.css $$m) ; \ + (cd $(src_doc_dir); $(CHROME) --headless --disable-gpu --print-to-pdf-no-header --print-to-pdf=$$m.pdf $$m.html) ; \ done; install: install-binaries install-shells \ Index: doc/man.css =================================================================== diff -u -r941450461ede24e81b307ee50e66f78f0ef5c417 -r6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5 --- doc/man.css (.../man.css) (revision 941450461ede24e81b307ee50e66f78f0ef5c417) +++ doc/man.css (.../man.css) (revision 6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5) @@ -1,4 +1,3 @@ - body { color: #252525; font: 13px/1.231 "Arial","Verdana", sans-serif; @@ -206,3 +205,60 @@ height: 1px; background: #89a618; } + +@media print { + body { + font-size: 13px !important; + /*prince-linebreak-magic: auto;*/ + } + + pre.doctools_example { + font-size: 80% !important; + white-space: wrap !important; + page-break-inside: avoid; + } + + ul.syntax { + margin-left: 0 !important; + padding-left: 0 !important; + } + + ul.syntax li { + text-indent: 1em hanging !important; + } + + h2 { string-set: chapter-title content() } +} + +@page { + size: A4; + /* DIV 15 for A4 paper */ + margin: 19.80mm 14mm; + + /* Not supported by Chrome, kept for later reference */ + @top-center { + font-family: "Arial","Verdana", sans-serif; + color: #666; + font-size: 80%; + content: string(chapter-title) + } + + @bottom-center { + font-family: "Arial","Verdana", sans-serif; + font-size: 80%; + color: #666; + content: "- " counter(page) " -" + } +} + +@page:first { + @top { content: normal } +} + + + + + + + + Index: doc/nx-small.css =================================================================== diff -u -r61bbf1805091c68da1ef7db9c16710a0398c951b -r6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5 --- doc/nx-small.css (.../nx-small.css) (revision 61bbf1805091c68da1ef7db9c16710a0398c951b) +++ doc/nx-small.css (.../nx-small.css) (revision 6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5) @@ -1,3 +1,4 @@ +@media print { body {font-size: 10pt; text-align: justify;} .nx {font-size: 65%; color: #000000; font-weight: normal; font-style: normal; padding-left: 10px} table.nx {border-collapse: collapse; border-spacing: 3px;} @@ -14,16 +15,32 @@ div.toclevel3 {display: block;} div.toclevel4 {display: block;} +div.tableblock table { + page-break-inside: avoid; +} + +div.listingblock pre { + page-break-inside: avoid; +} + +} + @page { - @top { + size: A4; + /* DIV 15 for A4 paper */ + margin: 19.80mm 14mm; + + /* Not supported by Chrome, kept for later reference */ + + @top-center { color: #717ab3;font-style: italic; font-size: 80%; content: string(chapter-title) } - @bottom { + @bottom-center { font-size: 80%; color: #717ab3; content: "- " counter(page) " -" } } -h2 { string-set: chapter-title content() } \ No newline at end of file +h2 { string-set: chapter-title content() } Index: doc/nx.css =================================================================== diff -u -r61bbf1805091c68da1ef7db9c16710a0398c951b -r6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5 --- doc/nx.css (.../nx.css) (revision 61bbf1805091c68da1ef7db9c16710a0398c951b) +++ doc/nx.css (.../nx.css) (revision 6f2b5aabb36c05dd3609e8035aa7be5dd6f3f5b5) @@ -1,3 +1,5 @@ +@media print { + body {font-size: 10pt; text-align: justify;} #header {text-align: left;} .nx {font-size: 90%; color: #000000; font-weight: normal; font-style: normal; padding-left: 10px} @@ -15,16 +17,31 @@ div.toclevel3 {display: block;} div.toclevel4 {display: block;} +div.tableblock table { + page-break-inside: avoid; +} + +div.listingblock pre { + page-break-inside: avoid; +} + +} + @page { - @top { + size: A4; + /* DIV 15 for A4 paper */ + margin: 19.80mm 14mm; + + /* Not supported by Chrome, kept for later reference */ + @top-center { color: #717ab3;font-style: italic; font-size: 80%; content: string(chapter-title) } - @bottom { + @bottom-center { font-size: 80%; color: #717ab3; content: "- " counter(page) " -" } } -h2 { string-set: chapter-title content() } \ No newline at end of file +h2 { string-set: chapter-title content() }