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

Commit

Permalink
htlatex: make LaTeX labels also to HTML anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Nov 1, 2013
1 parent 92efeed commit e400536
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion manuals/en/main/Makefile
Expand Up @@ -17,7 +17,7 @@ html: html/bareos-manual-main-reference.html

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

%.idx:
$(LATEX) bareos-manual-main-reference.tex
Expand Down
12 changes: 12 additions & 0 deletions manuals/en/main/bareos-manual-main-reference.htlatex.cfg
@@ -0,0 +1,12 @@
\Preamble{html}
\begin{document}
%\Css{body { color : red; }}

% redefine \label to also create a HTML anchor
\let\labelOrig\label
\renewcommand{\label}[1]{
\HCode{<A NAME="}#1\HCode{"></A>}
\labelOrig{#1}
}

\EndPreamble

0 comments on commit e400536

Please sign in to comment.