Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
create index with proper links (htlatex)
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Sep 18, 2014
1 parent 36d7a22 commit 86b9262
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 9 deletions.
22 changes: 19 additions & 3 deletions manuals/en/main/Makefile
Expand Up @@ -14,6 +14,13 @@ INDEXES = bareos-manual-main-reference.console.ind \
bareos-manual-main-reference.fd.ind \
bareos-manual-main-reference.sd.ind \
bareos-manual-main-reference.monitor.ind
HTINDEXES = bareos-manual-main-reference.console.htind \
bareos-manual-main-reference.director.htind \
bareos-manual-main-reference.general.htind \
bareos-manual-main-reference.fd.htind \
bareos-manual-main-reference.sd.htind \
bareos-manual-main-reference.monitor.htind


LOG = bareos-manual-main-reference.log

Expand All @@ -27,7 +34,7 @@ pdf: bareos-manual-main-reference.pdf

html: html/bareos-manual-main-reference.html

html/bareos-manual-main-reference.html: *.sty *.tex $(INDEXES) bareos-manual-main-reference.toc
html/bareos-manual-main-reference.html: depend *.sty *.tex $(HTINDEXES) bareos-manual-main-reference.toc
mkdir -p html
htlatex bareos-manual-main-reference "bareos-manual-main-reference.htlatex.cfg" "" -d./html/

Expand All @@ -37,10 +44,19 @@ html/bareos-manual-main-reference.html: *.sty *.tex $(INDEXES) bareos-manual-mai
%.ind: %.idx
$(MAKEINDEX) $<

%.htidx:
htlatex bareos-manual-main-reference "bareos-manual-main-reference.htlatex.cfg" "" -d./html/

%.4dx: %.htidx
name=`basename $< .htidx`; tex "\def\filename{{$$name}{htidx}{4dx}{htind}} \input idxmake.4ht"

%.htind: %.4dx
name=`basename $< .4dx`; $(MAKEINDEX) -o $${name}.htind $<

bareos-manual-main-reference.toc: *.tex
$(LATEX) bareos-manual-main-reference.tex

bareos-manual-main-reference.dvi: *.sty *.tex $(INDEXES) bareos-manual-main-reference.toc
bareos-manual-main-reference.dvi: depend *.sty *.tex $(INDEXES) bareos-manual-main-reference.toc
$(LATEX) bareos-manual-main-reference.tex
$(LATEX) bareos-manual-main-reference.tex

Expand All @@ -55,6 +71,6 @@ check: bareos-manual-main-reference.pdf
@if ! grep "LaTeX Warning: Hyper reference .* undefined on input\|LaTeX Warning: There were undefined references." $(LOG); then true; else false; fi

clean:
rm -f *.aux *.dvi *.idx *.log *.out *.pdf *.toc *.4ct *.4tc *.idv *.lg *.tmp *.xref html/* bareos-manual-main-reference.html bareos-manual-main-reference.css
rm -f *.4ct *.4dx *.4ix *.4tc *.aux *.dvi *.htidx *.htind *.idx *.log *.out *.pdf *.toc *.idv *.lg *.tmp *.xref html/* bareos-manual-main-reference.html bareos-manual-main-reference.css
@for I in ${subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; $(MAKE) clean || exit 1); done
23 changes: 17 additions & 6 deletions manuals/en/main/bareos-manual-main-reference.tex
Expand Up @@ -49,12 +49,23 @@
\usepackage{bareos}

\makeindex
\newindex{general}{general.idx}{general.ind}{General Index}
\newindex{dir}{director.idx}{director.ind}{Director Index}
\newindex{fd}{fd.idx}{fd.ind}{File Daemon Index}
\newindex{sd}{sd.idx}{sd.ind}{Storage Daemon Index}
\newindex{console}{console.idx}{console.ind}{Console Index}
\newindex{monitor}{monitor.idx}{monitor.ind}{Monitor Index}
\ifdefined\HCode
%htlatex code here
\newindex{general}{general.htidx}{general.htind}{General Index}
\newindex{dir}{director.htidx}{director.htind}{Director Index}
\newindex{fd}{fd.htidx}{fd.htind}{File Daemon Index}
\newindex{sd}{sd.htidx}{sd.htind}{Storage Daemon Index}
\newindex{console}{console.htidx}{console.htind}{Console Index}
\newindex{monitor}{monitor.htidx}{monitor.htind}{Monitor Index}
\else
%pdflatex code here
\newindex{general}{general.idx}{general.ind}{General Index}
\newindex{dir}{director.idx}{director.ind}{Director Index}
\newindex{fd}{fd.idx}{fd.ind}{File Daemon Index}
\newindex{sd}{sd.idx}{sd.ind}{Storage Daemon Index}
\newindex{console}{console.idx}{console.ind}{Console Index}
\newindex{monitor}{monitor.idx}{monitor.ind}{Monitor Index}
\fi

% set links back to TOC. Failed to work with htlatex
% \titleformat{\chapter}[display]
Expand Down

0 comments on commit 86b9262

Please sign in to comment.