Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previaÚltima revisiónAmbos lados, revisión siguiente |
es:howtos:software:asciidoc [2019/08/26 14:31 (UTC)] – [Dblatex] slackwarespanol | es:howtos:software:asciidoc [2019/08/26 17:03 (UTC)] – [DokuWiki] slackwarespanol |
---|
[[http://slackbuilds.org/graphics/dblatex/|dblatex]] de SlackBuilds.org. Ver | [[http://slackbuilds.org/graphics/dblatex/|dblatex]] de SlackBuilds.org. Ver |
[[http://dblatex.sourceforge.net/|documentation]], [[#PDF]]. | [[http://dblatex.sourceforge.net/|documentation]], [[#PDF]]. |
==== Source-highlight ==== | ==== Fuente resaltada ==== |
To highlight source listings, install | Para resaltar listados de origen, instale |
[[http://slackbuilds.org/system/source-highlight/|source-highlight]] from SlackBuilds.org. See [[https://www.gnu.org/software/src-highlite/source-highlight.html|online manual]]. | [[http://slackbuilds.org/system/source-highlight/|source-highlight]] de SlackBuilds.org. Consulte [[https://www.gnu.org/software/src-highlite/source-highlight.html|manline en línea]]. |
This: | Esta: |
<code> | <code> |
[source,bash] | [source,bash] |
</code> | </code> |
| |
renders as (this is DokuWiki's GeSHi highlighting, but gives the general idea): | se muestra como (este es el resaltado GeSHi de DokuWiki, pero da la idea general): |
<code bash> | <code bash> |
#!/bin/bash | #!/bin/bash |
| |
| |
==== Vim Syntax Highlighter ==== | ==== Marcador de sintaxis de Vim ==== |
If //asciidoc.vim// is not available locally, [[https://asciidoc.googlecode.com/hg/vim/syntax/asciidoc.vim|download]]. Otherwise: | Si //asciidoc.vim// no está disponible localmente, [[https://asciidoc.googlecode.com/hg/vim/syntax/asciidoc.vim|download]]. De otra manera: |
| |
**''$ mkdir -p $HOME/.vim/syntax''** | **''$ mkdir -p $HOME/.vim/syntax''** |
| |
**''$ cp /usr/share/vim/vimVERSION/syntax/asciidoc.vim $HOME/.vim/syntax/''** | **''$ cp /usr/share/vim/vimVERSION/syntax/asciidoc.vim $HOME/.vim/syntax/''** |
| y vea [[http://www.methods.co.nz/asciidoc/chunked/ape.html|Appendix E. Vim Syntax Highlighter]]. |
| |
and see [[http://www.methods.co.nz/asciidoc/chunked/ape.html|Appendix E. Vim Syntax Highlighter]]. | El resaltado también puede funcionar insertando en la parte inferior del archivo: |
| |
Highlighting can also work by inserting at the bottom of the file: | |
<code>// vim: set syntax=asciidoc:</code> | <code>// vim: set syntax=asciidoc:</code> |
| |
| |
| |
===== User Guide ===== | ===== Guía del usuario ===== |
The user guide file is found in ///usr/doc/asciidoc-VERSION/doc/asciidoc.txt//. To make the //AsciiDoc User Guide//: | El archivo de la guía del usuario se encuentra en ///usr/doc/asciidoc-VERSION/doc/asciidoc.txt//. Para hacer la // Guía del usuario de AsciiDoc //: |
| |
**''$ asciidoc -b xhtml11 -a icons -a iconsdir=/etc/asciidoc/images/icons FILENAME''** | |
| |
and see ///usr/doc/asciidoc-VERSION/doc/asciidoc.html//. For more see [[http://asciidoc.org/|asciidoc.org]]. | ** '' $ asciidoc -b xhtml11 -a icons -a iconsdir = / etc / asciidoc / images / icons FILENAME '' ** |
| |
| y ver ///usr/doc/asciidoc-VERSION/doc/asciidoc.html//. Para más información, consulte [[http://asciidoc.org/|asciidoc.org]]. |
===== Source Files ===== | ===== Source Files ===== |
==== TXT ==== | ==== TXT ==== |
It is a //convention// for //asciidoc// files to have a //.txt// extension. | It is a //convention// for //asciidoc// files to have a //.txt// extension. |
| |
==== Common Variables ==== | ==== Variables comunes ==== |
To organize the use of common variables in all files, make a directory //include//. Common paths, for example, can be put in a //paths.txt// as a series of: | Para organizar el uso de variables comunes en todos los archivos, cree un directorio // include //. Las rutas comunes, por ejemplo, se pueden poner en //paths.txt// como una serie de: |
| |
<file> | <file> |
</file> | </file> |
| |
Then, at the header of each file put: | Luego, en el encabezado de cada archivo, coloque: |
| |
<file> | <file> |
</file> | </file> |
| |
and in text use as: | y en uso de texto como: |
| |
<file> | <file> |
</file> | </file> |
| |
==== System Attributes ==== | ==== Atributos del sistema ==== |
Any variable that can be defined in //bash// with | Cualquier variable que se pueda definir en // bash // con |
**''NAME="$(commands)"''** | ** '' NOMBRE = "$ (comandos)" '' ** |
can also be defined in //asciidoc// as a [[http://asciidoc.org/userguide.html#X24|system attribute]]. First define the attribute in the header section: | también se puede definir en // asciidoc // como un [[http://asciidoc.org/userguide.html#X24|system attribute]]. Primero defina el atributo en la sección del encabezado: |
<file> | <file> |
:NAME: {sys:commands} | :NAME: {sys:commands} |
</file> | </file> |
then use in text as: | luego usar en texto como: |
<file> | <file> |
{NAME} | {NAME} |
| |
==== Man ==== | ==== Man ==== |
Linking to //man// pages in HTML is very useful. See [[howtos:software:man2html_mini_howto|man2html Mini HOWTO]] on how to set the infrastructure. To see grep(1) use | Vincular a // man // páginas en HTML es muy útil. Consulte [[howtos: software: man2html_mini_howto | man2html Mini HOWTO]] sobre cómo configurar la infraestructura. Para ver grep (1) use |
<file> | <file> |
http://localhost/cgi-bin/man/man2html?1+grep[grep(1)] | http://localhost/cgi-bin/man/man2html?1+grep[grep(1)] |
===== Output ===== | ===== Output ===== |
==== XHTML ==== | ==== XHTML ==== |
To make an HTML file: | Para hacer un archivo HTML: |
| |
**''$ asciidoc -b xhtml11 FILENAME''** | **''$ asciidoc -b xhtml11 FILENAME''** |
| Para usar iconos, principalmente para párrafos de advertencia, agregue las opciones: |
To use icons, mainly for admonition paragraphs, add the options: | |
| |
**''-a icons -a iconsdir=/etc/asciidoc/images/icons''** | **''-a icons -a iconsdir=/etc/asciidoc/images/icons''** |
| |
| Para tener un HTML de ancho fijo, agregue: |
To have a fixed-width HTML, add: | |
| |
**''-a max-width=45em''** | **''-a max-width=45em''** |
| |
| Para usar CSS personalizado adicional, agregue: |
To use additional custom CSS, add: | |
| |
**''-a stylesheet=/path/to/stylesheet.css''** | **''-a stylesheet=/path/to/stylesheet.css''** |
| |
| Puede ser útil poner un alias en //.bashrc//: |
It may be helpful to put an alias in //.bashrc//: | |
<code bash> | <code bash> |
alias ad="/usr/bin/asciidoc.py \ | alias ad="/usr/bin/asciidoc.py \ |
| |
==== PDF ==== | ==== PDF ==== |
To make a PDF file, first install [[#dblatex]]. Then: | Para hacer un archivo PDF, primero instale [[#dblatex]]. Entonces: |
| |
**''$ asciidoc -b docbook45 FILENAME''** | **''$ asciidoc -b docbook45 FILENAME''** |
==== DokuWiki ==== | ==== DokuWiki ==== |
| |
The //asciidoc// files can be converted to //DokuWiki// format for the Slackware Documentation Project. There are various ways to do this, and one of the more straightforward ones is to convert the HTML files produced by //asciidoc// using the //perl// module [[http://search.cpan.org/~diberri/HTML-WikiConverter-DokuWiki-0.53/lib/HTML/WikiConverter/DokuWiki.pm|HTML::WikiConverter::DokuWiki]], see also [[http://search.cpan.org/dist/HTML-WikiConverter/lib/HTML/WikiConverter.pm|HTML::WikiConverter]]. | Los archivos // asciidoc // se pueden convertir al formato // DokuWiki // para el Proyecto de documentación de Slackware. Hay varias formas de hacer esto, y una de las más sencillas es convertir los archivos HTML producidos por // asciidoc // usando el módulo // perl // [[http://search.cpan.org/~diberri /HTML-WikiConverter-DokuWiki-0.53/lib/HTML/WikiConverter/DokuWiki.pm|HTML::WikiConverter::DokuWiki]], consulte también [[http://search.cpan.org/dist/HTML-WikiConverter/lib /HTML/WikiConverter.pm|HTML::WikiConverter]]. |
| |
**''# cpan''** | **''# cpan''** |