From: Carl Peterson Date: Thu, 12 Dec 2013 06:08:57 +0000 (-0500) Subject: Add comments to lilypond-texi2html.init X-Git-Tag: release/2.19.0-1~47^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=695313b2bdce8fa4136ee008a5f49c6254bbe3e7;p=lilypond.git Add comments to lilypond-texi2html.init Adding inline comments to lilypond-texi2html.init to explain the added lines of code in the file to enable the manual-specific CSS styling. Also cleaned up the code indentation levels. --- diff --git a/Documentation/lilypond-texi2html.init b/Documentation/lilypond-texi2html.init index fbd7f1425b..b8b1f511f8 100644 --- a/Documentation/lilypond-texi2html.init +++ b/Documentation/lilypond-texi2html.init @@ -1095,11 +1095,23 @@ sub lilypond_css_lines ($$) } } -my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'}); - -$documentstatus = 'devStatus'; - -$Texi2HTML::Config::BODYTEXT = 'lang="' . $Texi2HTML::THISDOC{current_lang} . '" class="' . $docu_name . ' ' . $documentstatus . '"'; + ## This section makes the manual name visible to CSS through the body tag + ## so that styles can be applied per manual. It will add the manual + ## directory name (e.g., 'notation' or 'learning') as a CSS class, as well + ## as a development status. + + # Parse the input file name to determine the manual we're dealing with. + my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'}); + + # Hard-coded value to indicate if this is a development version + # ('devStatus') or stable version ('stableStatus') + # TODO: Figure out how to automatically set this value based on the even/odd minor revision number or some other mechanism. + $documentstatus = 'devStatus'; + + # Create the extra information for the tag. + # For example, the development Notation reference in English + # will output in HTML as + $Texi2HTML::Config::BODYTEXT = 'lang="' . $Texi2HTML::THISDOC{current_lang} . '" class="' . $docu_name . ' ' . $documentstatus . '"'; }