Diferencias
Muestra las diferencias entre dos versiones de la página.
Próxima revisión | Revisión previa | ||
es:howtos:software:asciidoc [2019/02/28 01:42 (UTC)] slackwarespanol creado |
es:howtos:software:asciidoc [2019/08/26 17:05 (UTC)] (actual) slackwarespanol [Sources] |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
====== Asciidoc ====== | ====== Asciidoc ====== | ||
- | ===== Introduction ===== | + | ===== Introducción ===== |
- | Keeping notes is an integral part of using any Linux distribution. Keeping them in plain text allows one to use them from a console during initial setup; using a consistent markup for plain text adds to the readability of the notes. | + | Mantener notas es una parte integral del uso de cualquier distribución de Linux. Mantenerlos en texto sin formato permite utilizarlos desde una consola durante la configuración inicial; El uso de un marcado consistente para texto plano aumenta la legibilidad de las notas. |
- | //asciidoc// is one of the tools that provide such a consistent markup. Source highlighting, for those who prefer it, can add to the readability of the text file. | + | // asciidoc // es una de las herramientas que proporcionan un marcado tan consistente. El resaltado de fuente, para aquellos que lo prefieren, puede aumentar la legibilidad del archivo de texto. |
- | //asciidoc// can produce HTML files, an added bonus as it allows to interlink notes and makes browsing them with //lynx// more effective. It can also work in tandem with [[howtos:software:man2html_mini_howto|man2html]] to provide HTML access to all installed //man// pages on the fly. | + | // asciidoc // puede producir archivos HTML, una ventaja adicional ya que permite interconectar notas y hace que navegar con // lynx // sea más efectivo. También puede funcionar en conjunto con [[howtos:software:man2html_mini_howto | man2html]] para proporcionar acceso HTML a todas las páginas // man // instaladas sobre la marcha. |
- | + | ||
- | For an interesting read about //asciidoc// see [[https://medium.com/@chacon/living-the-future-of-technical-writing-2f368bd0a272|Living the Future of Technical Writing]]. | + | |
+ | Para una lectura interesante sobre // asciidoc // ver [[https://medium.com/@chacon/living-the-future-of-technical-writing-2f368bd0a272|Living the Future of Technical Writing (Viviendo el futuro de la escritura técnica)]]. | ||
===== Helper Packages and Files ===== | ===== Helper Packages and Files ===== | ||
==== Asciidoctor ==== | ==== Asciidoctor ==== | ||
- | Consider installing [[http://asciidoctor.org/|Asciidoctor]]. | + | Considere instalar [[http://asciidoctor.org/|Asciidoctor]]. |
==== Dblatex ==== | ==== Dblatex ==== | ||
- | To convert //asciidoc// files to PDF, install | + | Para convertir archivos // asciidoc // a PDF, instale |
- | [[http://slackbuilds.org/graphics/dblatex/|dblatex]] from SlackBuilds.org. See | + | [[http://slackbuilds.org/graphics/dblatex/|dblatex]] de SlackBuilds.org. Ver |
[[http://dblatex.sourceforge.net/|documentation]], [[#PDF]]. | [[http://dblatex.sourceforge.net/|documentation]], [[#PDF]]. | ||
- | + | ==== Fuente resaltada ==== | |
- | ==== Source-highlight ==== | + | Para resaltar listados de origen, instale |
- | To highlight source listings, install | + | [[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]]. |
- | [[http://slackbuilds.org/system/source-highlight/|source-highlight]] from SlackBuilds.org. See [[https://www.gnu.org/software/src-highlite/source-highlight.html|online manual]]. | + | Esta: |
- | This: | + | |
<code> | <code> | ||
[source,bash] | [source,bash] | ||
Línea 32: | Línea 29: | ||
</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 | ||
Línea 39: | Línea 36: | ||
- | ==== 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''** | + | ** '' $ 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]]. | + | |
+ | 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> | ||
Línea 72: | Línea 66: | ||
</file> | </file> | ||
- | Then, at the header of each file put: | + | Luego, en el encabezado de cada archivo, coloque: |
<file> | <file> | ||
Línea 78: | Línea 72: | ||
</file> | </file> | ||
- | and in text use as: | + | y en uso de texto como: |
<file> | <file> | ||
Línea 84: | Línea 78: | ||
</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} | ||
Línea 97: | Línea 91: | ||
==== 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)] | ||
Línea 104: | Línea 98: | ||
===== 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 \ | ||
Línea 134: | Línea 124: | ||
==== 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''** | ||
Línea 142: | Línea 132: | ||
==== 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''** | ||
Línea 151: | Línea 141: | ||
- | ====== Sources ====== | + | ====== Fuentes ====== |
+ | |||
+ | * Fuente original: [[http://www.linuxquestions.org/questions/slackware-14/asciidoc-mini-howto-4175528145/|asciidoc mini howto]] | ||
+ | * Originalmente escrito por [[wiki:usuario:pdi | pdi]] | ||
+ | * Contribuciones de [[wiki: usuario:markand | markand]] | ||
+ | * Traducido por [[wiki: usuario:slackwarespanol | Víctor]] 2019/08/26 17:03 (UTC) | ||
- | * Original source: [[http://www.linuxquestions.org/questions/slackware-14/asciidoc-mini-howto-4175528145/|asciidoc mini howto]] | ||
- | * Originally written by [[wiki:user:pdi | pdi]] | ||
- | * Contributions by [[wiki:user:markand | markand]] | ||
{{tag>howtos asciidoc}} | {{tag>howtos asciidoc}} |