diff options
author | Tim Moore <timoore@redhat.com> | 2009-12-18 19:14:25 +0100 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-12-18 19:14:25 +0100 |
commit | 547a3b44141e7c7b6548d130bb37f18a634a50a2 (patch) | |
tree | f13c681a2f045d8d133e9388aded783bf9de4e0d /doc/.latex2html-init | |
parent | 471fca5e53a239f7fa4d04b7b6d6f53765a3d598 (diff) | |
parent | a18a40d0cf1408d5575165ebc4374a1ab4f9fbc0 (diff) | |
download | systemtap-steved-547a3b44141e7c7b6548d130bb37f18a634a50a2.tar.gz systemtap-steved-547a3b44141e7c7b6548d130bb37f18a634a50a2.tar.xz systemtap-steved-547a3b44141e7c7b6548d130bb37f18a634a50a2.zip |
Merge commit 'origin/master'
Diffstat (limited to 'doc/.latex2html-init')
-rw-r--r-- | doc/.latex2html-init | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/.latex2html-init b/doc/.latex2html-init new file mode 100644 index 00000000..541fc497 --- /dev/null +++ b/doc/.latex2html-init @@ -0,0 +1,28 @@ +$CUSTOM_TITLES = 1; +$CUSTOM_TITLES_LENGTH = 6; + +# modified version of make_long_title +# does not include the section number in the title (name) of the file +sub custom_title_hook { + local($_)= @_; + local($num_words) = $CUSTOM_TITLES_LENGTH; + #RRM: scan twice for short words, due to the $4 overlap + # Cannot use \b , else words break at accented letters + $_ =~ s/(^|\s)\s*($GENERIC_WORDS)(\'|(\s))/$4/ig; + $_ =~ s/(^|\s)\s*($GENERIC_WORDS)(\'|(\s))/$4/ig; + #remove leading numbering, unless that's all there is. + local($sec_num); + if (!(/^\d+(\.\d*)*\s*$/)&&(s/^\s*(\d+(\.\d*)*)\s*/$sec_num=$1;''/e)) + { $num_words-- }; + &remove_markers; s/<[^>]*>//g; #remove tags + #revert entities, etc. to TeX-form... + s/([\200-\377])/"\&#".ord($1).";"/eg; + $_ = &revert_to_raw_tex($_); + + # get $LONG_TITLES number of words from what remains + $_ = &get_first_words($_, $num_words) if ($num_words); + # ...and cleanup accents, spaces and punctuation + $_ = join('', (0 ? $sec_num : ''), $_); + s/\\\W\{?|\}//g; s/\s/_/g; s/\W/_/g; s/__+/_/g; s/_+$//; + $_; +} |