ubuntuusers.de

Problem beim erstellen einer Manpage

Status: Ungelöst | Ubuntu-Version: Ubuntu 16.04 (Xenial Xerus)
Antworten |

JakobDev

Avatar von JakobDev

Anmeldungsdatum:
11. Dezember 2015

Beiträge: 290

Wohnort: Saarland

Ich hoffe mal, ich bin im richtigen Forum, da ich kein passendes für mein Thema gefunden habe. Jetzt aber zu meinem Problem: Ich erstelle gerade eine eigene Manpage. Dazu schreibe ich die manpage von gedit um, da hier schon alle Strukturen existieren und ich nicht von vorne anfangen muss. Allerdings habe ich das Problem, dass nach --path kein Zeilenumbruch existiert (siehe Anhang). Ersetze ich path durch ein beliebiges anderes Wort, ist der Zeilenumbruch da. Was kann ich da tun? Hier noch der gesamte jetzige Code:

.TH GEDIT 1 "17 May 2010"
.SH NAME
\fBgedit\fP \- text editor for the GNOME Desktop

.SH SYNOPSIS
.br
.B gedit
[\fIOPTION\fR...] [\fIFILE\fR...] [+\fILINE\fR[:\fICOLUMN\fR]]
.br
.B gedit
[\fIOPTION\fR...] -

.SH DESCRIPTION
.B gedit
is the official text editor of the GNOME desktop environment.

While aiming at simplicity and ease of use,
.B gedit
is a powerful general purpose text editor.
It can be used to create and edit all kinds of text files.

.B gedit
features a flexible plugin system which can be used to dynamically add 
new advanced features to
.B gedit
itself.
.LP
.SH OPTIONS
        
.TP
\fB\-\-input\fR
Select the input format
.TP
\fB\-\-output\fR
Select the output format
.TP
\fB\-\-path\fR
Select the path where the files are
.TP
\fB\-w, \-\-wait\fR
Open files and block the
.B gedit
process.
.TP
\fB\-\-help\fR
Prints the command line options.
.TP
\fB\-\-version\fR
Output version information and exit.
.TP
\fBFILE\fR
Specifies the file to open when
.B gedit
starts. If this is not specified,
.B gedit
will load a blank file with an "Unsaved Document" label. Multiple files can be loaded if they are
separated by spaces.
.B gedit
also supports handling of remote files. For example, you can pass the location
of a webpage to
.B gedit
, like "http://www.gnome.org", or load a file from a FTP server,
like "ftp://ftp.gnome.org/robots.txt".
.TP
\fB-\fR
.B gedit will read from stdin
.TP
\fB+LINE\fR
For the first file, go to the line specified by LINE (do not insert a space between the "+" sign and the number).
If LINE is missing, go to the last line.
.TP
\fBCOLUMN\fR
For the first file, go to the column specified by COLUMN.
If COLUMN is missing, go to the first column.

.SH BUGS
If you find a bug, please report it at the GNOME bug tracker. See https://wiki.gnome.org/Apps/Gedit/ReportingBugs.
.SH AUTHORS
Paolo Maggi (paolo@gnome.org)
.TP
Paolo Borelli (pborelli@gnome.org)
.TP
Steve Frécinaux (code@istique.net)
.TP
Jesse van den Kieboom (jessevdk@gnome.org)
.TP
Ignacio Casal Quinteiro <icq@gnome.org>
.TP
James Willcox (jwillcox@gnome.org)
.TP
Federico Mena Quintero (federico@novell.com)
.TP
Chema Celorio
Bilder

Vain

Avatar von Vain

Anmeldungsdatum:
12. April 2008

Beiträge: 2510

Du meinst das --path in der TP-Aufzählung? Das ist Absicht. Hinter --help ist auch kein Umbruch. Wenn das Wort kurz genug ist, um mitsamt seiner Beschreibung in dieselbe Zeile zu passen, wird da kein Umbruch gesetzt.

– edit: Doof formuliert. Wenn das Wort kurz genug ist, um vor seiner eigenen Beschreibung in die Zeile zu passen, wird kein Umbruch gesetzt. So. Du weißt, was ich meine, hoffe ich. 😬

JakobDev

(Themenstarter)
Avatar von JakobDev

Anmeldungsdatum:
11. Dezember 2015

Beiträge: 290

Wohnort: Saarland

Vain schrieb:

Du meinst das --path in der TP-Aufzählung? Das ist Absicht. Hinter --help ist auch kein Umbruch. Wenn das Wort kurz genug ist, um mitsamt seiner Beschreibung in dieselbe Zeile zu passen, wird da kein Umbruch gesetzt.

– edit: Doof formuliert. Wenn das Wort kurz genug ist, um vor seiner eigenen Beschreibung in die Zeile zu passen, wird kein Umbruch gesetzt. So. Du weißt, was ich meine, hoffe ich. 😬

Kann man da einen Umbruch erzwingen?

Vain

Avatar von Vain

Anmeldungsdatum:
12. April 2008

Beiträge: 2510

Phew. Weiß ich nicht. Für die Ausgabe im Terminal kannst du den gewünschten Effekt so erreichen:

\fB\-\-path\fR
.br
Select the path where the files are

Bei Ausgabe als PS/PDF sieht es auch noch gut aus. Aber schon bei HTML ist es kaputt.

Ich bin mir auch nicht sicher, ob es klug ist, den Umbruch zu erzwingen. Im Allgemeinen weiß das Textsatzprogramm schon ganz gut, wann ein Umbruch sinnvoll ist und wann nicht.

Antworten |