From: <ai...@us...> - 2013-08-21 22:10:55
|
Revision: 12494 http://sourceforge.net/p/plplot/code/12494 Author: airwin Date: 2013-08-21 22:10:51 +0000 (Wed, 21 Aug 2013) Log Message: ----------- Implement XSL configuration method for print results for the default -DDOCBOOK_XML_BACKEND=ON case. Use this configuration method to establish ansi style for funcsynopsis for pdf and ps results. Tested by Alan W. Irwin <ai...@us...> using the -DBUILD_DOC=ON cmake option and the pdf_target target. Modified Paths: -------------- trunk/doc/docbook/src/CMakeLists.txt Added Paths: ----------- trunk/doc/docbook/src/plplotdoc-print.xsl.in Modified: trunk/doc/docbook/src/CMakeLists.txt =================================================================== --- trunk/doc/docbook/src/CMakeLists.txt 2013-08-21 21:18:36 UTC (rev 12493) +++ trunk/doc/docbook/src/CMakeLists.txt 2013-08-21 22:10:51 UTC (rev 12494) @@ -350,9 +350,18 @@ ) if(BUILD_PRINT) + # Custom commands for building html version of documentation + set(STYLESHEET_PRINT ${PLPLOTDOC}-print.xsl) + set(STYLESHEET_PRINT_IN ${STYLESHEET_PRINT}.in) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/${STYLESHEET_PRINT_IN} + ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_PRINT} + @ONLY + ) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BASE}.ps.gz - COMMAND ${XMLTO} -vv --with-fop ps ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-print.xml + COMMAND ${XMLTO} -vv --with-fop -x ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_PRINT} ps ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-print.xml COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/plplotdoc-print.ps ${CMAKE_CURRENT_BINARY_DIR}/${BASE}.ps COMMAND ${GZIP} -f ${BASE}.ps DEPENDS @@ -379,7 +388,7 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BASE}.pdf - COMMAND ${XMLTO} -vv --with-fop pdf ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-print.xml + COMMAND ${XMLTO} -vv --with-fop -x ${CMAKE_CURRENT_BINARY_DIR}/${STYLESHEET_PRINT} pdf ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-print.xml COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/plplotdoc-print.pdf ${CMAKE_CURRENT_BINARY_DIR}/${BASE}.pdf DEPENDS ${SOURCE_FILES} Added: trunk/doc/docbook/src/plplotdoc-print.xsl.in =================================================================== --- trunk/doc/docbook/src/plplotdoc-print.xsl.in (rev 0) +++ trunk/doc/docbook/src/plplotdoc-print.xsl.in 2013-08-21 22:10:51 UTC (rev 12494) @@ -0,0 +1,54 @@ +<?xml version='1.0'?> +<!-- + plplotdoc-print.xsl.in: XSL customization for the HTML PLplot docs + + Copyright (C) 2013 Alan W. Irwin + + Redistribution and use in source (XML DocBook) and "compiled" forms + (HTML, PDF, PostScript, DVI, TeXinfo and so forth) with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code (XML DocBook) must retain the + above copyright notice, this list of conditions and the following + disclaimer as the first lines of this file unmodified. + + 2. Redistributions in compiled form (transformed to other DTDs, + converted to HTML, PDF, PostScript, and other formats) must + reproduce the above copyright notice, this list of conditions and + the following disclaimer in the documentation and/or other + materials provided with the distribution. + + Important: THIS DOCUMENTATION IS PROVIDED BY THE PLPLOT PROJECT "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PLPLOT PROJECT BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<!-- +These ideas for customizing the PLplot html documentation are adapted +from +http://www.sagehill.net/docbookxsl/CustomMethods.html#CustomizationLayer +http://www.sagehill.net/docbookxsl/SettingParams.html +http://www.sagehill.net/docbookxsl/Chunking.html#ChunkFilenames +http://www.sagehill.net/docbookxsl/UsingCSS.html +http://www.sagehill.net/docbookxsl/Parameters.html +http://docbook.sourceforge.net/release/xsl/current/doc/html/ +.... +--> +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version="1.0"> + +<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> + +<xsl:param name="funcsynopsis.style" select="'ansi'"/> + +</xsl:stylesheet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |