Herramientas de usuario

¡Esta es una revisión vieja del documento!


Groff

groff o GNU troff, es un conjunto de programas de aplicación y macros de composición pensadas para dar formato a textos. A través de “comandos punto”, describe el formato de documentos a aplicar.

Con groff puede producir diferente tipos de salida de aspecto profesional, incluyendo HTML para la difusión en la world wide web, y PostScript para salida impresa, o bien PDF para ver en línea.

Comandos de Groff

General

Comando Funcionalidad
.RP [no] Imprime página de cubierta aislada. Puede ser evitada con .RP no
.TL Título del documento.
.AU Nombre del autor.
.AI Institución del autor.
.AB [no] and .AE block Abstract beginning and end blocks. .AB no ensures the abstract keyword is silenced
.DA [XXX] Current date on title page and footers
.ND [XXX] Current date only on the title page
.1C Texto a una columna
.2C Texto a dos columnas
.MC [WIDTH[GUTTER]] Multiple column layout (by default 2 with no args)
.XS page_num and .XE Bloque de Tabla de Contenidos
.XA page_num Entrada en el Bloque de Tabla de Contenidos
.PX Print a manually-generated table of contents without resetting the page number.

Text Formatting

Comando Funcionalidad
.B Bold
.I Italics
.BI Bold and Italics
.P1 Prints the header on page 1. The default is to suppress the header.
.BX Box
.UL Underline
.LG Prints all text following in larger type (2 points larger than the current point size)
.SM Prints all text following in smaller type (2 points smaller than the current point size)
.NL Prints all text following in the normal point size
.R Sets its first argument in roman (or regular) type. It operates similarly to the B macro otherwise.
.CW Sets its first argument in italic type. It operates similarly to the B macro otherwise.

Paragraph Formatting

Comando Funcionalidad
.PP Standard paragraph
.QP Quoted paragraph
.XP The XP macro produces an exdented paragraph. The first line of the paragraph begins at the left margin, and subsequent lines are indented (the opposite of PP).
.RS y .RE Start and end a section of indented text, respectively. The PI register controls the amount of indent.
.IP List points. Use .IP \(bu [width] for bullet points with given width. Use .IP [number] for numbered points.
.TA Tabbing

Headings

Comando Funcionalidad
.NH xxx Numbered heading where numbers specify levels of depth
.SH xxx Section heading (un-numbered)
.LH Left header
.CH Center header
.RH Right header
.LF Left footer
.CF Center footer
.RF Right footer
.OH Headers for odd pages. eg: .OH 'left'center'right'
.EH Headers for even pages.

Pre Processing

Comando Funcionalidad
.TS [H] y .TE Denotes a table, to be processed by the tbl preprocessor. The optional H argument instructs groff to create a running header with the information up to the TH macro.
.PS y .PE Denotes a graphic, to be processed by the pic preprocessor. You can create a pic file by hand, using the AT&T pic manual available on the Web as a reference, or by using a graphics program such as xfig.
.EQ [align] and .EN Denotes an equation, to be processed by the eqn preprocessor. The optional align argument can be C, L, or I to center (the default), left-justify, or indent the equation.
.[ y .] References and citations block, to be processed by the refer preprocessor.

Custom Macros

Comando Funcionalidad
.de y .. You can define macros between this block. They can then be sourced by the same file as well as other files
.so fichero Source macros from filename

Gráficos

Comando Funcionalidad
.PSPIC -[L/R/C/I n] [width[Height]] filename.eps Insert a post script image into groff.
.PDFPIC -[L/R/C/I n] [width[Height]] filename.eps Insert a PDF image into groff.

Configurar tamaño de papel

Puede configurar el tamaño de su papel virtual usaando el postprocesador incorporado en groff. Se usa -P para pasar argumentos al postprocesador:

groff -k -Tpdf -P-pa4 -P-l -ms fichero.ms > fichero.pdf

Para tomar un papel virtual tamaño A4 en orientación horizontal. Otros formatos válidos son las páginas de tamaño A, B, D, junto con tamaño letter, statement, ledger, y tabloid.

Full reference is available in the DESC section of the groff_font man page.

Este sitio web utiliza cookies para guardar datos esenciales de su actividad, como su autenticación. Al entrar acepta el uso de cookies.

Más información