From 5b69308f4d7b2e641cb05178c8e6809365f560d2 Mon Sep 17 00:00:00 2001 From: "Elf M. Sternberg" Date: Sat, 6 Dec 2014 09:57:35 -0800 Subject: [PATCH] Consistent with modern latex2man features. --- Makefile | 12 +++++++++--- mp_suggest_man.tex | 35 +++++++++++++++++++++-------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index b794f3a..99777c9 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,19 @@ FILES = AUTHORS COPYING INSTALL README TODO \ TARFILES = ${FILES} mp_suggest_man.html mp_suggest.1 mp_suggest.man mp_suggest_man.html: mp_suggest_man.tex - latex2man -H mp_suggest_man.tex mp_suggest_man.html + latex2man -H $< $@ mp_suggest.1: mp_suggest_man.tex - latex2man mp_suggest_man.tex mp_suggest.1 + latex2man $< $@ mp_suggest.man: mp_suggest.1 - nroff -Tascii -man mp_suggest.1 > mp_suggest.man + nroff -Tascii -man $< > $@ + +mp_suggest_man.pdf: mp_suggest_man.tex + xelatex $< + +clean: + rm mp_suggest.man mp_suggest.1 mp_suggest_man.log mp_suggest_man.out mp_suggest_man.aux mp_suggest_man.pdf all: ${TARFILES} diff --git a/mp_suggest_man.tex b/mp_suggest_man.tex index f11484b..fc2899f 100644 --- a/mp_suggest_man.tex +++ b/mp_suggest_man.tex @@ -1,20 +1,27 @@ \documentclass[english]{article} \usepackage[latin1]{inputenc} \usepackage{babel} +\usepackage{verbatim} +%% do we have the `hyperref package? +\IfFileExists{hyperref.sty}{ + \usepackage[bookmarksopen,bookmarksnumbered]{hyperref} +}{} + +%% do we have the `fancyhdr' package? \IfFileExists{fancyhdr.sty}{ -\usepackage[fancyhdr,pdf]{latex2man} +\usepackage[fancyhdr]{latex2man} }{ - +%% do we have the `fancyheadings' package? \IfFileExists{fancyheadings.sty}{ -\usepackage[fancy,pdf]{latex2man} +\usepackage[fancy]{latex2man} }{ -\usepackage[nofancy,pdf]{latex2man} +\usepackage[nofancy]{latex2man} \message{no fancyhdr or fancyheadings package present, discard it} }} -\setVersionWord{Version:} -\setVersion{0.1a} +\setVersionWord{Version:} %%% that's the default, no need to set it. +\setVersion{0.0.1} \begin{document} @@ -28,13 +35,13 @@ \section{Synopsis} %%%%%%%%%%%%%%%%%% -\Prog{mp\_suggest} \OptArg{-g --genre}{Set the genre externally} - \OptArg{-p --artist}{Set the artist externally} - \OptArg{-a --album}{Set the album externally} - \Opt{-n --usedir}{Use the album name found in the directory} - \Opt{-n --usefilename}{Use the fine name to set the title} - \Opt{-h --help}{This help message} - \Opt{-v --version}{Version information} +\Prog{mp\_suggest} \oOptArg{-g}{genre} + \oOptArg{-r}{artist} + \oOptArg{-a}{album} + \oOpt{-d} + \oOpt{-n} + \oOpt{-h} + \oOpt{-v} \section{Description} %%%%%%%%%%%%%%%%%%%%% @@ -57,7 +64,7 @@ commands can be tweaked, and all of them override the techniques \begin{description}\setlength{\itemsep}{1cm} \item[Hy] \Prog{mp\_suggest} requires Hy version $>=$ 0.10.0, as well as - a local install of bothe eyeD3 and django. I'll try to get these + a local install of both eyeD3 and django. I'll try to get these fixed eventually. \end{description}