diff --git a/CMakeLists.txt b/CMakeLists.txt index d4140aaa3..27c8e3296 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,10 +76,10 @@ set(JAPANESE_GOTHIC_TTF "ume-tmo3.ttf" CACHE STRING "Gothic TrueType font used f set(japanese_fontdir "${CMAKE_SOURCE_DIR}/fonts/truetype" CACHE STRING "Directory to search for Japanese fonts") # Set the default XSL file path -set(BASE_XSLT_HTML "${CMAKE_SOURCE_DIR}/xsl/general-customization.xsl") -set(BASE_XSLT_PDF "${CMAKE_SOURCE_DIR}/xsl/general-fo-customization.xsl") -set(BASE_XSLT_EPUB "${CMAKE_SOURCE_DIR}/xsl/general-epub-customization.xsl") -set(BASE_XSLT_CHM "${CMAKE_SOURCE_DIR}/xsl/general-chm-customization.xsl") +set(BASE_XSLT_HTML "${CMAKE_SOURCE_DIR}/xsl/gnc-custom-html.xsl") +set(BASE_XSLT_PDF "${CMAKE_SOURCE_DIR}/xsl/gnc-custom-pdf.xsl") +set(BASE_XSLT_EPUB "${CMAKE_SOURCE_DIR}/xsl/gnc-custom-epub.xsl") +set(BASE_XSLT_CHM "${CMAKE_SOURCE_DIR}/xsl/gnc-custom-chm.xsl") # Buildtime destination directories for our generated documentation set(DATADIR_BUILD "${CMAKE_BINARY_DIR}/share") diff --git a/cmake/AddHtmlTarget.cmake b/cmake/AddHtmlTarget.cmake index cd4abe204..3e8ffa159 100644 --- a/cmake/AddHtmlTarget.cmake +++ b/cmake/AddHtmlTarget.cmake @@ -28,7 +28,6 @@ function (add_html_target targetbase lang entities figures xslt_file) COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_DIR}/stylesheet" COMMAND ${XSLTPROC} ${XSLTPROCFLAGS} ${XSLTPROCFLAGS_HTML} -o "${BUILD_DIR}/" - --param use.id.as.filename "1" --stringparam chunker.output.encoding UTF-8 "${xslt_file}" "${CMAKE_CURRENT_SOURCE_DIR}/index.docbook" diff --git a/cmake/AddPdfTarget.cmake b/cmake/AddPdfTarget.cmake index 5025cca9c..10edcb873 100644 --- a/cmake/AddPdfTarget.cmake +++ b/cmake/AddPdfTarget.cmake @@ -6,19 +6,6 @@ function (add_pdf_target targetbase lang entities figures xslt_file) set(BUILD_DIR "${DOCDIR_BUILD}/${lang}") - # Determine paper format depending on language (which maps to the document's directory name) - # * for language "C" (fallback language) determine paper format based on current locale - # * all others use A4. - set (XSLTFLAGS_FO "--stringparam paper.type A4") - if (lang STREQUAL "C") - # For the fallback language determine paper format depending on locale - # Only US or C will be set to letter. All others use A4. - set (ENV_LANG $ENV{LANG}) - if (ENV_LANG AND ENV_LANG MATCHES ".*_us.*|C") # Replacing ENV_LANG here with if ($ENV{LANG}) won't work. - set (XSLTFLAGS_FO "--stringparam paper.type letter") - endif() - endif() - if (NOT IS_ABSOLUTE ${xslt_file}) set(xslt_file "${CMAKE_CURRENT_SOURCE_DIR}/${xslt_file}") endif() @@ -28,9 +15,7 @@ function (add_pdf_target targetbase lang entities figures xslt_file) COMMAND ${CMAKE_COMMAND} -E make_directory "${BUILD_DIR}" COMMAND ${XSLTPROC} ${XSLTPROCFLAGS} ${XSLTPROCFLAGS_FO} -o "${CMAKE_CURRENT_BINARY_DIR}/${fofile}" - --stringparam fop1.extensions 1 - --stringparam variablelist.as.blocks 1 - --stringparam glosslist.as.blocks 1 + --stringparam gnc.lang ${lang} "${xslt_file}" "${CMAKE_CURRENT_SOURCE_DIR}/index.docbook" DEPENDS ${entities} "index.docbook" "${CMAKE_SOURCE_DIR}/docbook/gnc-docbookx.dtd") diff --git a/xsl/fo-lists.xsl b/xsl/fo-lists.xsl new file mode 100644 index 000000000..418594acb --- /dev/null +++ b/xsl/fo-lists.xsl @@ -0,0 +1,54 @@ + + + + + + + +1 +1 + + +1.6em + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.0em + 0.0em + 0.2em + + + 0.0em + 0.0em + 0.2em + + + diff --git a/xsl/fo-titlepage.xsl b/xsl/fo-titlepage.xsl new file mode 100644 index 000000000..4fe87aa58 --- /dev/null +++ b/xsl/fo-titlepage.xsl @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + bold + 24pt + center + + + + + + + + + + + + + + 20pt + center + + + + + : + + + + + + + + 20pt + center + + + + + : + + + + + + + diff --git a/xsl/general-chm-customization.xsl b/xsl/general-chm-customization.xsl deleted file mode 100644 index 5c7a90921..000000000 --- a/xsl/general-chm-customization.xsl +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/xsl/general-epub-customization.xsl b/xsl/general-epub-customization.xsl deleted file mode 100644 index 3505dc2dd..000000000 --- a/xsl/general-epub-customization.xsl +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/xsl/general-fo-customization.xsl b/xsl/general-fo-customization.xsl deleted file mode 100644 index a50c91a22..000000000 --- a/xsl/general-fo-customization.xsl +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - diff --git a/xsl/gnc-custom-chm.xsl b/xsl/gnc-custom-chm.xsl new file mode 100644 index 000000000..675af6e00 --- /dev/null +++ b/xsl/gnc-custom-chm.xsl @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/xsl/gnc-custom-common.xsl b/xsl/gnc-custom-common.xsl new file mode 100644 index 000000000..5dfc4ef00 --- /dev/null +++ b/xsl/gnc-custom-common.xsl @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/gnc-custom-epub.xsl b/xsl/gnc-custom-epub.xsl new file mode 100644 index 000000000..4c04569db --- /dev/null +++ b/xsl/gnc-custom-epub.xsl @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/xsl/general-customization.xsl b/xsl/gnc-custom-html.xsl similarity index 50% rename from xsl/general-customization.xsl rename to xsl/gnc-custom-html.xsl index a6eeebdf1..7f92134df 100644 --- a/xsl/general-customization.xsl +++ b/xsl/gnc-custom-html.xsl @@ -1,8 +1,6 @@ + version='1.0'> @@ -10,78 +8,71 @@ + + +1 +UTF-8 +0 + + + + of tags in the title page. --> - + for book and aricle --> + - - - +1 - - - - - - - - + - + - + - + - + - + - + - + - + - - - - - - - - - - - + - + - + - + - + + + + + + diff --git a/xsl/gnc-custom-pdf.xsl b/xsl/gnc-custom-pdf.xsl new file mode 100644 index 000000000..d7ee579e2 --- /dev/null +++ b/xsl/gnc-custom-pdf.xsl @@ -0,0 +1,87 @@ + + + + + + + + + +1 +1 4 1 + + + + underline + + + + + 9 + +0.30em + + +book toc,title,figure,table,example,equation + + + + + + USletter + A4 + + + + + + + + +../../stylesheet/ + + + + + 24pt + + + + + pt + + 0.2em + 0.0em + 0.2em + + + 0.0em + 0.0em + 0.0em + 0.4em + 0.2em + 0.4em + + + 0.6em + 0.4em + 0.8em + 0.6em + 0.4em + 0.8em + + + + + + + + + + + + + + + diff --git a/xsl/admonitions.xsl b/xsl/html-admonitions.xsl similarity index 100% rename from xsl/admonitions.xsl rename to xsl/html-admonitions.xsl diff --git a/xsl/author.xsl b/xsl/html-author.xsl similarity index 100% rename from xsl/author.xsl rename to xsl/html-author.xsl diff --git a/xsl/chunk-common2.xsl b/xsl/html-chunk-common2.xsl similarity index 100% rename from xsl/chunk-common2.xsl rename to xsl/html-chunk-common2.xsl diff --git a/xsl/copyright.xsl b/xsl/html-copyright.xsl similarity index 100% rename from xsl/copyright.xsl rename to xsl/html-copyright.xsl diff --git a/xsl/glossary.xsl b/xsl/html-glossary.xsl similarity index 100% rename from xsl/glossary.xsl rename to xsl/html-glossary.xsl diff --git a/xsl/keycombo.xsl b/xsl/html-keycombo.xsl similarity index 100% rename from xsl/keycombo.xsl rename to xsl/html-keycombo.xsl diff --git a/xsl/legalnotice.xsl b/xsl/html-legalnotice.xsl similarity index 100% rename from xsl/legalnotice.xsl rename to xsl/html-legalnotice.xsl diff --git a/xsl/othercredit.xsl b/xsl/html-othercredit.xsl similarity index 100% rename from xsl/othercredit.xsl rename to xsl/html-othercredit.xsl diff --git a/xsl/procedure.xsl b/xsl/html-procedure.xsl similarity index 100% rename from xsl/procedure.xsl rename to xsl/html-procedure.xsl diff --git a/xsl/publisher.xsl b/xsl/html-publisher.xsl similarity index 100% rename from xsl/publisher.xsl rename to xsl/html-publisher.xsl diff --git a/xsl/releaseinfo.xsl b/xsl/html-releaseinfo.xsl similarity index 100% rename from xsl/releaseinfo.xsl rename to xsl/html-releaseinfo.xsl diff --git a/xsl/revhistory.xsl b/xsl/html-revhistory.xsl similarity index 100% rename from xsl/revhistory.xsl rename to xsl/html-revhistory.xsl diff --git a/xsl/titlepage2.xsl b/xsl/html-titlepage2.xsl similarity index 100% rename from xsl/titlepage2.xsl rename to xsl/html-titlepage2.xsl diff --git a/xsl/toc.xsl b/xsl/html-toc.xsl similarity index 100% rename from xsl/toc.xsl rename to xsl/html-toc.xsl diff --git a/xsl/variablelist.xsl b/xsl/html-variablelist.xsl similarity index 100% rename from xsl/variablelist.xsl rename to xsl/html-variablelist.xsl diff --git a/xsl/l10n.xml b/xsl/l10n.xml index ad9834c2f..563e40c35 100644 --- a/xsl/l10n.xml +++ b/xsl/l10n.xml @@ -29,27 +29,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -72,34 +72,57 @@ - - - - - - - - + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + diff --git a/zh/xsl/lang-stylesheet-html.xsl b/zh/xsl/lang-stylesheet-html.xsl index 818cf9073..3f0ac297e 100644 --- a/zh/xsl/lang-stylesheet-html.xsl +++ b/zh/xsl/lang-stylesheet-html.xsl @@ -9,8 +9,7 @@ version='1.0'> - - + diff --git a/zh/xsl/zh-chm.xsl b/zh/xsl/zh-chm.xsl index 2da381051..00ff3cf94 100644 --- a/zh/xsl/zh-chm.xsl +++ b/zh/xsl/zh-chm.xsl @@ -5,7 +5,7 @@ exclude-result-prefixes="#default"> - + gbk diff --git a/zh/xsl/zh-fo.xsl b/zh/xsl/zh-fo.xsl index 6b2c84d3b..fbcb5d8dd 100644 --- a/zh/xsl/zh-fo.xsl +++ b/zh/xsl/zh-fo.xsl @@ -9,7 +9,7 @@ version='1.0'> - + .5em