docbook:index
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
docbook:index [2009/02/16 17:15] – rlunaro | docbook:index [2022/12/02 21:02] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Docbook ====== | ====== Docbook ====== | ||
- | Por motivos profesionales tengo que aprender a usar DocBook. Ando buscando | + | Cómo instalar Docbook en un sistema |
- | + | ||
- | Parece ser que Docbook satisface mis necesidades, además de ser una herramienta de código abierto que funciona en Windows | + | |
Las presentes páginas las he creado para documentar mis progresos: cómo crear desde cero un sistema de procesado de documentos y también cómo conseguir el objetivo propuesto de obtener varios formatos. Además lo quiero en Windows y Linux y que me soporte Unicode (porque soportaré documentos en varios idiomas, no necesariamente Western European). | Las presentes páginas las he creado para documentar mis progresos: cómo crear desde cero un sistema de procesado de documentos y también cómo conseguir el objetivo propuesto de obtener varios formatos. Además lo quiero en Windows y Linux y que me soporte Unicode (porque soportaré documentos en varios idiomas, no necesariamente Western European). | ||
+ | **Resumen de pruebas en linux** | ||
- | ===== Necesitamos un procesador | + | El fichero Makefile funciona prácticamente sin ajustar en Ubuntu 11 64 bit, gracias a que gran parte de los comandos son linux-alike. |
- | Bueno, no sé muy bien lo que es, pero necesitamos un procesador de xslt. Hay varios disponibles ((Tomado de http:// | ||
- | ==== Eligiendo un procesador de XSLT ==== | + | ===== Máquina virtual java ===== |
- | Saxon | + | Es preciso tener la máquina virtual java, así que recomiendo |
+ | que nos hagamos una descarga de http:// | ||
+ | con la instalación. | ||
- | Saxon (http:// | + | ===== Instalar cygwin ==== |
- | Xalan | + | **Añadido recientemente, |
- | Xalan (http://xml.apache.org/ | + | He descubierto recientemen cygwin. Cygwin es un conjunto de utilidades Unix que funcionan en windows. Es una excelente idea instalarse cygwin para hacer funcionar docbook: todo resulta mucho más sencillo. |
- | xsltproc | + | El sitio web de cygwin es [[http:// |
- | The xsltproc (http:// | ||
- | ==== Instalando el procesador de XSLT ==== | ||
- | Me he decantado por xsltproc. Puede descargarse para windows [[http:// | + | ===== Necesitamos un procesador de XSLT ===== |
+ | |||
+ | Bueno, no sé muy bien lo que es, pero necesitamos un procesador de xslt. Hay varios disponibles ((Tomado de http:// | ||
+ | |||
+ | Me he decantado por xsltproc. Puede descargarse para windows [[http:// | ||
+ | |||
+ | * iconv | ||
+ | * libxmlsec | ||
+ | * openssl | ||
+ | * libxml2 | ||
+ | * libxslt | ||
+ | * zlib | ||
+ | |||
+ | Para juntarlos todos, descomprimalos | ||
+ | " | ||
+ | |||
+ | Yo he creado un paquete xsltproc_todo.zip que ya lo contiene así. Hemos incluido la | ||
+ | ruta al programa " | ||
+ | ventana de comandos, basta con escribir " | ||
< | < | ||
Line 34: | Line 50: | ||
</ | </ | ||
- | desde cualquier punto, se ejecutará el programa. | + | Nos tiene que salir la ayuda del programa. |
- | === Comprobando que el procesador de XSLT funciona === | ||
- | Me queda la duda de si la instalación ha ido bien, me dejo pendiente este punto para adivinar cómo debe comprobarse que funciona y que no me faltan librerías. | + | ===== Descargando las hojas de estilo XSL de DocBook ===== |
- | ===== Algunos recursos interesantes | + | Esto es realmente DocBook: unas hojas de estilo que nos permiten procesar un documento DocBook (que está en xml) para obtenerlo en un formato " |
+ | |||
+ | Las hojas de estilo se descargan del [[http:// | ||
+ | |||
+ | La primera prueba sencilla. | ||
+ | |||
+ | Hemos creado un libro muy sencillo: | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <book lang=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <!-- Los comentarios tienen este aspecto --> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Para generar la salida en formato html: | ||
+ | |||
+ | < | ||
+ | C: | ||
+ | </ | ||
+ | |||
+ | Para generar la salida en formato html help de microsoft: | ||
+ | |||
+ | < | ||
+ | xsltproc --output prueba.html --stringparam use.extensions 0 / | ||
+ | </ | ||
+ | |||
+ | |||
+ | Obtendremos un fichero html único. | ||
+ | |||
+ | |||
+ | ===== Pasos adicionales para generar un fichero rtf o pdf ===== | ||
+ | |||
+ | Hay que instalarse una utilidad que se llama FOP. | ||
+ | |||
+ | Esta utilidad, desarrollada por apache, puede descargarse del sitio | ||
+ | web de apache en http:// | ||
+ | |||
+ | En concreto el fichero fop-0.95-bin.zip. | ||
+ | |||
+ | Lo he descomprimido en archivos de programa y he puesto la ruta | ||
+ | al programa " | ||
+ | |||
+ | |||
+ | |||
+ | HACEMOS UN FICHERO BAT QUE HACE LA COMPILACION DE UN DOCUMENTO EN WINDOWS | ||
+ | |||
+ | <code bat> | ||
+ | rem | ||
+ | rem compilar - genera el libro en varios formatos: chm, html_single, | ||
+ | rem | ||
+ | |||
+ | set document=minibook | ||
+ | |||
+ | set docbook=C: | ||
+ | |||
+ | set XML_CATALOG_FILES=%docbook%\catalog.xml | ||
+ | |||
+ | rem | ||
+ | rem HTML una sola pagina | ||
+ | rem | ||
+ | set dest_folder=html_single | ||
+ | rem copiamos todo el contenido de la carpeta images a la carpeta | ||
+ | rem de destino dest_folder | ||
+ | xcopy images %dest_folder%\images /e /i /y | ||
+ | xsltproc --output " | ||
+ | |||
+ | |||
+ | rem | ||
+ | rem HTML multipágina | ||
+ | rem | ||
+ | set dest_folder=html_multi | ||
+ | rem copiamos todo el contenido de la carpeta images a la carpeta | ||
+ | rem de destino dest_folder | ||
+ | xcopy images %dest_folder%\images /e /i /y | ||
+ | xsltproc --output " | ||
+ | |||
+ | rem | ||
+ | rem CHM (ayuda de microsoft) | ||
+ | rem | ||
+ | set dest_folder=chm | ||
+ | rem copiamos todo el contenido de la carpeta images a la carpeta | ||
+ | rem de destino dest_folder | ||
+ | xcopy images %dest_folder%\images /e /i /y | ||
+ | xsltproc --output " | ||
+ | |||
+ | REM rem | ||
+ | REM rem RTF | ||
+ | REM rem | ||
+ | REM set dest_folder=rtf | ||
+ | REM rem copiamos todo el contenido de la carpeta images a la carpeta | ||
+ | REM rem de destino dest_folder | ||
+ | REM xcopy images %dest_folder%\images /e /i /y | ||
+ | REM xsltproc --output " | ||
+ | REM fop " | ||
+ | |||
+ | |||
+ | rem | ||
+ | rem PDF | ||
+ | rem | ||
+ | set dest_folder=pdf | ||
+ | rem copiamos todo el contenido de la carpeta images a la carpeta | ||
+ | rem de destino dest_folder | ||
+ | xcopy images %dest_folder%\images /e /i /y | ||
+ | xsltproc --output " | ||
+ | fop " | ||
+ | </ | ||
+ | |||
+ | ===== Fichero makefile ===== | ||
+ | |||
+ | Al final le he dado otro cuarto de vuelta al asunto de docbook, y he hecho lo siguiente: | ||
+ | |||
+ | * he descargado cygwin | ||
+ | * he instalado fop | ||
+ | * he instalado htmlhelp | ||
+ | * he creado un fichero makefile que hace lo de los pasos anteriores, pero un poco más estructurado. lo adjunto aquí. | ||
+ | |||
+ | |||
+ | <code Makefile> | ||
+ | # | ||
+ | # Makefile | ||
+ | # | ||
+ | # make clean : clean out all unnecesary, temporal files | ||
+ | # | ||
+ | # make book my_book=filename-without-extension: | ||
+ | # | ||
+ | # | ||
+ | # make book : generate all the documentation in various formats: | ||
+ | # html single page, html multiple pages, chm, pdf | ||
+ | # | ||
+ | # make book_en : make the book in english | ||
+ | # | ||
+ | # make html_single | ||
+ | # make html | ||
+ | # make chm | ||
+ | # make pdf | ||
+ | # make rtf | ||
+ | # : generate one specific document | ||
+ | # | ||
+ | # | ||
+ | |||
+ | |||
+ | # my book's name (FILENAME WITHOUT EXTENSION) | ||
+ | my_book ?= PUT_HERE_THE_FILENAME | ||
+ | |||
+ | book_version = `cat version.txt` | ||
+ | |||
+ | # options of the different programs | ||
+ | xsltproc_options = --nonet | ||
+ | |||
+ | # directories and programs | ||
+ | tmp_dir = " | ||
+ | xsltproc_dir = "/ | ||
+ | hhc = / | ||
+ | fop = / | ||
+ | |||
+ | .PHONY: book | ||
+ | book: chm html html_single pdf | ||
+ | |||
+ | .PHONY: book_en | ||
+ | book_en: | ||
+ | make book my_book=PUT_HERE_THE_FILENAME_en | ||
+ | |||
+ | .PHONY: chm | ||
+ | chm: | ||
+ | # make chm directory if don't exist | ||
+ | if [ -d chm ] ; then true; else mkdir chm; fi; | ||
+ | # copy the content of the gfx and images directory | ||
+ | cp -R gfx chm | ||
+ | cp -R images chm | ||
+ | cp docbook.css chm | ||
+ | xsltproc $(xsltproc_options) --output chm/ chm.xsl " | ||
+ | # to ignore errors, start the command with a hyphen | ||
+ | -$(hhc) chm/ | ||
+ | # move the resulting file into the " | ||
+ | if [ -d " | ||
+ | mv " | ||
+ | |||
+ | .PHONY: pdf | ||
+ | pdf: | ||
+ | # make pdf directory if it don't exist | ||
+ | if [ -d pdf ] ; then true; else mkdir pdf; fi; | ||
+ | xsltproc $(xsltproc_options) --output " | ||
+ | $(fop) " | ||
+ | # move the resulting file into the " | ||
+ | if [ -d " | ||
+ | mv " | ||
+ | |||
+ | .PHONY: rtf | ||
+ | rtf: | ||
+ | # make rtf directory if it don't exist | ||
+ | if [ -d rtf ] ; then true; else mkdir rtf; fi; | ||
+ | xsltproc $(xsltproc_options) --output " | ||
+ | $(fop) " | ||
+ | # move the resulting file into the " | ||
+ | if [ -d " | ||
+ | mv " | ||
+ | |||
+ | .PHONY: html_single | ||
+ | html_single: | ||
+ | # make html_single directory if it don't exist | ||
+ | if [ -d html_single ] ; then true; else mkdir html_single; | ||
+ | # copy the content of the gfx and images directory | ||
+ | cp -R gfx html_single | ||
+ | cp -R images html_single | ||
+ | cp docbook.css html_single | ||
+ | xsltproc $(xsltproc_options) --output " | ||
+ | # move the resulting file into the " | ||
+ | if [ -d " | ||
+ | cp -R " | ||
+ | |||
+ | .PHONY: html | ||
+ | html: | ||
+ | # make html directory if it don't exist | ||
+ | if [ -d html ] ; then true; else mkdir html; fi; | ||
+ | # copy the content of the gfx and images directory | ||
+ | cp -R gfx html | ||
+ | cp -R images html | ||
+ | cp docbook.css html | ||
+ | xsltproc $(xsltproc_options) --output " | ||
+ | # move the resulting file into the " | ||
+ | if [ -d " | ||
+ | cp -R " | ||
+ | |||
+ | |||
+ | clean: | ||
+ | # to ignore errors, start the command with a hyphen | ||
+ | -rm -f chm/* | ||
+ | -rm -f html/* | ||
+ | -rm -f html_single/ | ||
+ | -rm -f pdf/* | ||
+ | -rm -f rtf/* | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Otros ficheros que me he descargado ===== | ||
+ | |||
+ | **xmlNotepad**: | ||
+ | del sitio web de descargas de microsoft http:// | ||
+ | |||
+ | **Microsoft HTML Help Compiler**: compilador de ayudas de microsoft, para | ||
+ | generar los archivos de ayuda de microsoft (*.chm). | ||
+ | |||
+ | **Manual de referencia de docbook**: puede descargarse de esta | ||
+ | página web http:// | ||
+ | |||
+ | Hay dos ficheros: uno es el fichero " | ||
+ | en formato chm, y el otro viene en formato zip: tdg5-0.0.25.zip. | ||
+ | |||
+ | ===== Personalizando la salida de docbook ===== | ||
+ | |||
+ | Para configurar el comportamiento de docbook es necesario definir algunos parámetros que afectan a las | ||
+ | hojas de estilo xsl. | ||
+ | |||
+ | Yo he definido esos parámetors en varias hojas xsl que a continuación adjunto. | ||
+ | |||
+ | ==== chml.xsl ==== | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- Taken from http:// | ||
+ | < | ||
+ | < | ||
+ | <link rel=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== html.xsl ==== | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- Taken from http:// | ||
+ | < | ||
+ | < | ||
+ | <link rel=" | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== html_single.xsl ==== | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- Taken from http:// | ||
+ | < | ||
+ | < | ||
+ | <link rel=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== fo.xsl ==== | ||
+ | |||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <!-- xsl:param name=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | |||
+ | </ | ||
+ | |||
+ | Es muy importante ese < | ||
+ | |||
+ | Ah!!! que no se nos olvide copiar el fichero docbook.css en el resultado html, ya que de lo contrario, los estilos no se aplicarán. | ||
+ | |||
+ | |||
+ | ==== El fichero docbook.css ==== | ||
+ | |||
+ | <code css> | ||
+ | /* css 2.0 stylesheet for DocBook generated XHTML */ | ||
+ | /* (c) 2002 e-novative GmbH. */ | ||
+ | /* http:// | ||
+ | |||
+ | /* | ||
+ | 01-02-2012 | ||
+ | Changes : superman_ha_muerto at yahoo dot com | ||
+ | - Minor changes and personalization | ||
+ | |||
+ | 17-03-2003 - 21-03-2003 | ||
+ | Changes : Bruno.Vernay at LaPoste dot net | ||
+ | - Replaced the title background with underline (better distinguish from | ||
+ | programlisting.) | ||
+ | - distinguish the h2 (from chapter) and the h2 from section | ||
+ | (div[class=section]) | ||
+ | |||
+ | */ | ||
+ | |||
+ | /* Note that due to different browser interpretation of the standards, the */ | ||
+ | /* html pages still do not look exactly the same on every browser and system | ||
+ | |||
+ | /* This css file formats the html generated by the eDE */ | ||
+ | /* Please modify this file according to your personal preferences. | ||
+ | |||
+ | /* In many spots, this file is not too well-documented currently. However, | ||
+ | /* we will improve documentation over the time */ | ||
+ | |||
+ | /* basic settings for the document body, some elements inherit from these */ | ||
+ | body | ||
+ | { | ||
+ | /* foreground color = black */ | ||
+ | color: #000; | ||
+ | |||
+ | /* background-color = white */ | ||
+ | background-color: | ||
+ | |||
+ | /* center the body content in browser window */ | ||
+ | /* Note: this is different from text-align | ||
+ | /* margin depends on browser window width */ | ||
+ | margin: auto; | ||
+ | |||
+ | /* padding (" | ||
+ | /* browser window border and html body content | ||
+ | padding: 24px; | ||
+ | |||
+ | /* width depends on browser window width */ | ||
+ | width: auto; | ||
+ | |||
+ | /* text-alignment | ||
+ | /* alternative: | ||
+ | text-align: justify; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* set font for most elements | ||
+ | /* p: paragraphs (regular text, docbook < | ||
+ | /* (...) */ | ||
+ | /* body: anything else */ | ||
+ | body, p, td, li, dt, dd, .itemizedlist | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font: 12px/ | ||
+ | } | ||
+ | |||
+ | |||
+ | /* pararaphs (docbook: < | ||
+ | p | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font: 12px/18px Arial, Helvetica, Sans-Serif; | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 0 15px 6px 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* images */ | ||
+ | /* docbook: < | ||
+ | img | ||
+ | { | ||
+ | /* no margin */ | ||
+ | margin: 0; | ||
+ | |||
+ | /* no padding (" | ||
+ | padding: 0; | ||
+ | |||
+ | /* no border */ | ||
+ | border: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* emphasized text, can occur in most places */ | ||
+ | /* docbook: < | ||
+ | em | ||
+ | { | ||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | /* italic */ | ||
+ | font-style: italic; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* sect(ion)1 title */ | ||
+ | h2 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 125%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* underlined text */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #009; | ||
+ | |||
+ | /* background color: gray */ | ||
+ | /* background-color: | ||
+ | border-bottom: | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 0 15px 0; | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 12px 15px 12px 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* modif BV 14-03-2003 : | ||
+ | permet de distinguer titre de chapitre et titre de section */ | ||
+ | /* section title apr�s un chapitre */ | ||
+ | div[class=section] * h2 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 110%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* underlined text */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #00A; | ||
+ | |||
+ | /* background color: gray */ | ||
+ | /* background-color: | ||
+ | border-bottom: | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 0 0 0 15px; | ||
+ | } | ||
+ | |||
+ | /* sect(ion)2 title */ | ||
+ | h3 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 110%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* underlined text */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #009; | ||
+ | |||
+ | /* background-color is a very light grey */ | ||
+ | /* alternative: | ||
+ | /* background-color: | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 0 0 0 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* sect(ion)3 title */ | ||
+ | h4 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 100%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* underlined text */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #009; | ||
+ | |||
+ | /* background-color is a very light grey */ | ||
+ | /* alternative: | ||
+ | /* background-color: | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 0 0 0 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* sect(ion)4 title */ | ||
+ | h5 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 100%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* not underlined */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #009; | ||
+ | |||
+ | /* background-color is a very light grey */ | ||
+ | /* alternative: | ||
+ | /* background-color: | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 0 0 0 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | : | ||
+ | { | ||
+ | text-decoration: | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | /* define special font for e-novative logo */ | ||
+ | /* list of fonts provides fallbacks in case selected fonts are not present */ | ||
+ | .logo | ||
+ | { | ||
+ | font-family: | ||
+ | } | ||
+ | |||
+ | |||
+ | /* the following formats refer to the docbook tags of the same name */ | ||
+ | /* for more information, | ||
+ | /* http:// | ||
+ | |||
+ | .mediaobject | ||
+ | { | ||
+ | /* center */ | ||
+ | text-align: center; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* */ | ||
+ | .calloutlist, | ||
+ | { | ||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 30px 15px 30px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* */ | ||
+ | .itemizedlist, | ||
+ | { | ||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 30px 15px 15px; | ||
+ | } | ||
+ | |||
+ | /* blockquote formatting is a little more complex | ||
+ | /* because block quotes are rendered as a html table */ | ||
+ | |||
+ | /* blockquote block */ | ||
+ | .blockquote | ||
+ | { | ||
+ | /* override bottom margin, the other margins are inherited */ | ||
+ | margin-bottom: | ||
+ | } | ||
+ | |||
+ | .blockquote p, .blockquote td | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font: 12px/18px Arial, Helvetica, Sans-Serif; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | |||
+ | .epigraph | ||
+ | { | ||
+ | /* override bottom margin, the other margins are inherited */ | ||
+ | margin-bottom: | ||
+ | } | ||
+ | |||
+ | .epigraph p, .epigraph td | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font: 10px/14px Arial, Helvetica, Sans-Serif; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | /* custom e-novative header and footer that are displayed on all pages */ | ||
+ | # | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 80%; | ||
+ | |||
+ | /* line height, relative to body font size */ | ||
+ | line-height: | ||
+ | |||
+ | |||
+ | text-align: center; | ||
+ | vertical-align: | ||
+ | color: #fff; | ||
+ | background-color: | ||
+ | } | ||
+ | |||
+ | |||
+ | /* leave more space between last paragraph and footer | ||
+ | /* some browser do not add up the bottom margin of the prior element */ | ||
+ | /* and the top margin of the footer */ | ||
+ | # | ||
+ | margin-top: 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | /* table { margin: 0 15px 6px 15px; } */ | ||
+ | |||
+ | |||
+ | /* title and navigation links in header and footer */ | ||
+ | .navheader th, .navheader td, .navfooter th, .navfooter td | ||
+ | { | ||
+ | font-size: 11px; | ||
+ | font-weight: | ||
+ | } | ||
+ | |||
+ | |||
+ | /* table of contents, list of figures and list of tables */ | ||
+ | .toc, .list-of-figures, | ||
+ | { | ||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 30px 15px 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* the " | ||
+ | .toc p, .list-of-figures p, .list-of-tables p | ||
+ | { | ||
+ | /* no margin */ | ||
+ | margin: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | .figure | ||
+ | { | ||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 5px 5px 5px 5px; | ||
+ | |||
+ | /* no padding (" | ||
+ | padding: 0; | ||
+ | |||
+ | /* no border */ | ||
+ | border: 0; | ||
+ | |||
+ | /* center text */ | ||
+ | text-align: center; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* figure title */ | ||
+ | .figure p, .table p, .example p | ||
+ | { | ||
+ | font-size: 80%; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* | ||
+ | acronym { | ||
+ | border-bottom: | ||
+ | cursor: help; | ||
+ | } | ||
+ | */ | ||
+ | |||
+ | |||
+ | /* admonition headings */ | ||
+ | div.note, div.important, | ||
+ | { | ||
+ | padding: 0px 15px 0px 0px; | ||
+ | } | ||
+ | |||
+ | div.note th, div.important th, div.warning th, div.caution th, div.tip th | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font: 12px/18px Arial, Helvetica, Sans-Serif; | ||
+ | |||
+ | font-weight: | ||
+ | |||
+ | text-decoration: | ||
+ | |||
+ | /* left align */ | ||
+ | text-align: left; | ||
+ | } | ||
+ | |||
+ | .note p, .important p, .warning p, .caution p, .tip p | ||
+ | { | ||
+ | margin: 0; | ||
+ | } | ||
+ | |||
+ | .note img, .important img, .warning img, .caution img, .tip img | ||
+ | { | ||
+ | margin: 0px 15px 0px 15px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* programlisting */ | ||
+ | pre.programlisting | ||
+ | { | ||
+ | /* non-proportional font */ | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* color: black */ | ||
+ | color: #000; | ||
+ | |||
+ | /* background color: gray */ | ||
+ | background-color: | ||
+ | |||
+ | /* no margin */ | ||
+ | margin: 0; | ||
+ | |||
+ | /* gray dotted border, 1 px wide */ | ||
+ | border: 1px dotted #ddd; | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 6px 6px 6px 6px; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* title page */ | ||
+ | |||
+ | |||
+ | /* heading1 is used for document title */ | ||
+ | h1 | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 150%; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* line height, relative to body line height */ | ||
+ | line-height: | ||
+ | |||
+ | /* center */ | ||
+ | text-align: center; | ||
+ | |||
+ | /* foreground color: dark blue */ | ||
+ | color: #009; | ||
+ | |||
+ | /* background color: gray */ | ||
+ | background-color: | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 0 15px 0; | ||
+ | |||
+ | /* no padding (" | ||
+ | padding: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | /* author on title page is formatted as h3 */ | ||
+ | /* these settings overwrite the regular h3 settings */ | ||
+ | h3.author | ||
+ | { | ||
+ | /* set font size and line height | ||
+ | /* list of fonts provides fallbacks in case selected fonts are not present */ | ||
+ | font: 12px/18px Arial, Helvetica, Sans-Serif; | ||
+ | |||
+ | /* bold face, higher number is more bold */ | ||
+ | font-weight: | ||
+ | |||
+ | /* do not underline */ | ||
+ | text-decoration: | ||
+ | |||
+ | /* center text */ | ||
+ | text-align: center; | ||
+ | |||
+ | /* color: black */ | ||
+ | color: #000; | ||
+ | |||
+ | /* background-color is a very light grey */ | ||
+ | /* alternative: | ||
+ | background-color: | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 0 15px 15px 15px; | ||
+ | |||
+ | /* no padding */ | ||
+ | padding: 0; | ||
+ | |||
+ | /* no border */ | ||
+ | border: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* copyright and date */ | ||
+ | .copyright, .pubdate | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 90%; | ||
+ | |||
+ | /* center */ | ||
+ | text-align: center; | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 15px 15px 15px 15px; | ||
+ | |||
+ | /* no padding (" | ||
+ | padding: 0; | ||
+ | |||
+ | /* no border */ | ||
+ | border: 0; | ||
+ | } | ||
+ | |||
+ | |||
+ | /* legal notice box */ | ||
+ | div.legalnotice | ||
+ | { | ||
+ | /* list of fonts provides fallbacks if a font is not present */ | ||
+ | font-family: | ||
+ | |||
+ | /* font size, relative to body font size */ | ||
+ | font-size: 90%; | ||
+ | |||
+ | /* color: black */ | ||
+ | color: #000; | ||
+ | |||
+ | /* background color: gray */ | ||
+ | background-color: | ||
+ | |||
+ | /* margin settings are top - right - bottom - left (think clockwise) */ | ||
+ | margin: 10px 45px 10px 45px; | ||
+ | |||
+ | /* padding (" | ||
+ | /* (think clockwise) | ||
+ | padding: 5px 5px 5px 5px; | ||
+ | |||
+ | /* solid black border, 1px wide */ | ||
+ | border: 1px solid #000; | ||
+ | } | ||
+ | |||
+ | /* | ||
+ | Taken from http:// | ||
+ | */ | ||
+ | .screen { | ||
+ | font-family: | ||
+ | font-size: 1em; | ||
+ | display: block; | ||
+ | padding: 10px; | ||
+ | border: 1px solid #bbb; | ||
+ | background-color: | ||
+ | color: #000; | ||
+ | overflow: auto; | ||
+ | border-radius: | ||
+ | -moz-border-radius: | ||
+ | margin: 0.5em 2em; | ||
+ | |||
+ | } | ||
+ | |||
+ | .programlisting { | ||
+ | font-family: | ||
+ | font-size: 1em; | ||
+ | display: block; | ||
+ | padding: 10px; | ||
+ | border: 1px solid #bbb; | ||
+ | background-color: | ||
+ | color: #000; | ||
+ | overflow: auto; | ||
+ | border-radius: | ||
+ | -moz-border-radius: | ||
+ | margin: 0.5em 2em; | ||
+ | } | ||
+ | |||
+ | |||
+ | .guimenu, | ||
+ | .guimenuitem | ||
+ | { | ||
+ | font-family: | ||
+ | color: #0000ff; | ||
+ | background-color: | ||
+ | } | ||
+ | |||
+ | .guibutton, | ||
+ | .guilabel, | ||
+ | .guiicon | ||
+ | { | ||
+ | font-family: | ||
+ | color: #0000ff; | ||
+ | background-color: | ||
+ | border-top: 1px solid #cfcfcf; | ||
+ | border-left: | ||
+ | border-bottom: | ||
+ | border-right: | ||
+ | } | ||
+ | |||
+ | .application | ||
+ | { | ||
+ | font-family: | ||
+ | font-style: italic; | ||
+ | } | ||
+ | |||
+ | /* | ||
+ | class=" | ||
+ | */ | ||
+ | |||
+ | .tip, | ||
+ | .caution, | ||
+ | .note, | ||
+ | .important | ||
+ | { | ||
+ | outline:# | ||
+ | margin: 20px; | ||
+ | } | ||
+ | |||
+ | .tip table, | ||
+ | .caution table, | ||
+ | .note table, | ||
+ | .important table | ||
+ | { | ||
+ | padding: 20px; | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </ | ||
- | **[[http:// | ||
- | Un bloc de notas de una persona que ha tenido el mismo problema que yo: hacer un documento en DocBook desde cero: buscar software, hacer las primeras pruebas, construir un entorno " | + | ===== Starter kit ===== |
- | **[[http:// | + | He compilado lo más esencial en un " |
- | Un libro que habla de DocBook XSLT, donde me he enterado | + | * Un makefile para hacer crear pdf, html, html en una página |
+ | * Una cheatseet con varios ejemplos | ||
+ | * Un comienzo | ||
+ | * Hojas de estilo y xsl personalizadas (en la carpeta xsl) | ||
+ | {{: | ||
docbook/index.1234804506.txt.gz · Last modified: 2022/12/02 21:02 (external edit)