mirror of https://github.com/CGAL/cgal
* switched to xml output for comments (makes transition easier from
doc_tex to doxygen) * bugfix (html): made footnotes always appear _after_ alphabetical list of refpages * bugfix: ccReferToExampleCode is now typeset in alltt
This commit is contained in:
parent
cfd35946e6
commit
7e670c317b
|
|
@ -417,7 +417,7 @@ main( int argc, char **argv) {
|
|||
macroX( "\\lciContentsFilename"));
|
||||
short_contents_stream = open_file_for_write( tmp_path +
|
||||
macroX( "\\lciShortContentsFilename"));
|
||||
comments_stream = open_file_for_write( tmp_path + "comments.txt" );
|
||||
comments_stream = open_file_for_write( tmp_path + "comments.xml" );
|
||||
|
||||
package_overview_stream = open_file_for_write( tmp_path +
|
||||
macroX( "\\lciPkgOverviewFilename") );
|
||||
|
|
@ -564,7 +564,7 @@ main( int argc, char **argv) {
|
|||
assert_file_write( *HREF_stream, macroX( "\\lciHREFFilename"));
|
||||
delete HREF_stream;
|
||||
|
||||
assert_file_write( *comments_stream, "comments.txt" );
|
||||
assert_file_write( *comments_stream, "comments.xml" );
|
||||
delete comments_stream;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1883,63 +1883,77 @@ void format_constructor( const char* signature) {
|
|||
void handle_two_column_layout( char key, const char* decl) {
|
||||
if ( current_ostream) {
|
||||
*current_ostream << "[cccbegin]";
|
||||
(*comments_stream) << " <item>" << std::endl
|
||||
<< " <kind>";
|
||||
decl = handle_template_layout( *current_ostream, decl, false);
|
||||
switch ( key) {
|
||||
case 'A':
|
||||
format_class_declaration( decl);
|
||||
(*comments_stream) << "\\class@";
|
||||
(*comments_stream) << "class";
|
||||
break;
|
||||
case 'B':
|
||||
format_struct( decl);
|
||||
(*comments_stream) << "\\struct@";
|
||||
(*comments_stream) << "struct";
|
||||
break;
|
||||
case 'C':
|
||||
format_nested_type( decl);
|
||||
(*comments_stream) << "\\nested_type@";
|
||||
(*comments_stream) << "nested_type>";
|
||||
break;
|
||||
case 'D':
|
||||
format_enum( decl);
|
||||
(*comments_stream) << "\\enum@";
|
||||
(*comments_stream) << "enum>";
|
||||
break;
|
||||
case 'E':
|
||||
format_constructor( decl);
|
||||
(*comments_stream) << "\\constructor@";
|
||||
(*comments_stream) << "constructor>";
|
||||
break;
|
||||
default:
|
||||
printErrorMessage( UnknownKeyError);
|
||||
}
|
||||
*current_ostream << "[cccend]";
|
||||
}
|
||||
(*comments_stream) << decl << "@" << std::endl;
|
||||
string my_decl = decl;
|
||||
crop_string( my_decl );
|
||||
(*comments_stream) << "</kind>" << std::endl
|
||||
<< " <name>";
|
||||
print_ascii_to_html( *comments_stream, my_decl.c_str() );
|
||||
(*comments_stream) << "</name>" << std::endl;
|
||||
}
|
||||
|
||||
void handle_three_column_layout( char key, const char* decl, bool empty) {
|
||||
if ( current_ostream) {
|
||||
*current_ostream << "[cccbegin]";
|
||||
(*comments_stream) << " <item>" << std::endl
|
||||
<< " <kind>";
|
||||
decl = handle_template_layout( *current_ostream, decl, true);
|
||||
switch ( key) {
|
||||
case 'L': // member function
|
||||
format_function( true, decl, empty);
|
||||
(*comments_stream) << "\\memberfunction@";
|
||||
(*comments_stream) << "memberfunction";
|
||||
break;
|
||||
case 'M': // function
|
||||
format_function( false, decl, empty);
|
||||
(*comments_stream) << "\\function@";
|
||||
(*comments_stream) << "function";
|
||||
break;
|
||||
case 'N':
|
||||
format_variable( decl, empty);
|
||||
(*comments_stream) << "\\variable@";
|
||||
(*comments_stream) << "variable>";
|
||||
break;
|
||||
case 'O': // typedef
|
||||
format_variable( decl, empty, true);
|
||||
(*comments_stream) << "\\typedef@";
|
||||
(*comments_stream) << "typedef";
|
||||
break;
|
||||
default:
|
||||
printErrorMessage( UnknownKeyError);
|
||||
}
|
||||
*current_ostream << "[cccend]";
|
||||
}
|
||||
(*comments_stream) << decl << "@" << std::endl;
|
||||
string my_decl = decl;
|
||||
crop_string( my_decl );
|
||||
(*comments_stream) << "</kind>" << std::endl
|
||||
<< " <name>";
|
||||
print_ascii_to_html( *comments_stream, my_decl.c_str() );
|
||||
(*comments_stream) << "</name>" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -259,9 +259,11 @@
|
|||
}
|
||||
|
||||
\newcommand{\ccReferToExampleCode}[1]{%
|
||||
\begin{alltt}%
|
||||
\lcRawHtml{<a href="}\lciOutputUppath\lcRawHtml{../../}\input{#1.filename}\lcRawHtml{">}%
|
||||
\input{#1.filename}%
|
||||
\lcRawHtml{</a>}%
|
||||
\end{alltt}%
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -575,7 +577,7 @@
|
|||
\gdef{\lciIfHtmlClassIndex}{\lcTrue}%
|
||||
\gdef{\lciIfHtmlRefLinks}{\lcTrue}%
|
||||
\gdef{\lciIfHtmlRefIndex}{\lcTrue}%
|
||||
\lciPushOutput{comments}\lcRawHtml{\end
|
||||
\lciPushOutput{comments}\lcRawHtml{</refpage>
|
||||
|
||||
}
|
||||
\lciPopOutput
|
||||
|
|
@ -606,18 +608,21 @@
|
|||
\lciRefDeclDefFilenameX{\ccPureRefScope}{#1}{\ccRefCategory}%
|
||||
{\ccRefPureGlobalScope}{\lciCCParameter}}
|
||||
|
||||
|
||||
\newcommand{\lciPrintToComments}[2]{%
|
||||
\lcRawHtml{<}#1\lcRawHtml{>}\lcAsciiToHtml{#2}\lcRawHtml{</}#1\lcRawHtml{>}%
|
||||
}
|
||||
% #1 = local scope (may be empty)
|
||||
% #2 = classname (functioname etc.) without template parameters
|
||||
% #3 = Ref category
|
||||
% #4 = global scope (may be empty)
|
||||
\newcommand{\lciRefDeclDefFilenameX}[5]{%
|
||||
\lciPushOutput{comments}%
|
||||
\lcRawHtml{\localscope@#XC1@}
|
||||
\lcRawHtml{\id@#XC2@}
|
||||
\lcRawHtml{\refcat@#XC3@}
|
||||
\lcRawHtml{\globalscope@#XC4@}
|
||||
\lcRawHtml{\other@#XC5@
|
||||
}
|
||||
\lcRawHtml{<refpage id="#XC2">}
|
||||
\lciPrintToComments{localscope}{#XC1}
|
||||
\lciPrintToComments{refcat}{#XC3}
|
||||
\lciPrintToComments{globalscope}{#XC4}
|
||||
\lciPrintToComments{other}{#XC5}
|
||||
\lciPopOutput
|
||||
|
||||
\newcommand{\ccPureClassName}{#XC1#C2}%
|
||||
|
|
@ -640,6 +645,7 @@
|
|||
\gdef{\lciIfHtmlRefLinks}{\lcFalse}%
|
||||
\gdef{\lciIfHtmlRefIndex}{\lcFalse}%
|
||||
\lciParseUntilDelimiter{\lciSkipOneParameter}@}% skip remaining part
|
||||
|
||||
\newcommand{\lciRefDeclOpenFilenameX}[3]{\begin{ccReferenceFile}{#1#GXC2}{#3}}
|
||||
|
||||
%% Args: ccCategory, ccRefName
|
||||
|
|
@ -865,8 +871,8 @@
|
|||
\gdef{\lciIfHtmlLinks}{\lcTrue}%
|
||||
\gdef{\lciIfHtmlIndex}{\lcTrue}%
|
||||
\lciPushOutput{comments}%
|
||||
\lcRawHtml{\comment@#C2@
|
||||
}
|
||||
\lcRawHtml{ }\lciPrintToComments{comment}{#C2}
|
||||
\lcRawHtml{</item>}
|
||||
\lciPopOutput
|
||||
}
|
||||
|
||||
|
|
@ -908,8 +914,8 @@
|
|||
\gdef{\lciIfHtmlIndex}{\lcTrue}%
|
||||
\gdef\ccIsFunctionTemplate{\ccFalse}%
|
||||
\lciPushOutput{comments}%
|
||||
\lcRawHtml{\comment@#C2@
|
||||
}
|
||||
\lcRawHtml{ }\lciPrintToComments{comment}{#C2}
|
||||
\lcRawHtml{</item>}
|
||||
\lciPopOutput
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -256,9 +256,10 @@ td.TocChapter { font-weight: normal; }
|
|||
\lcRawHtml{<H1>Package Overview</H1>}
|
||||
\lcRawHtml{<table cellpadding="2" cellspacing="0">}
|
||||
\lciPopOutput%
|
||||
\lciPushOutput{comments}%
|
||||
\lcRawHtml{<manual_tools_output>}
|
||||
\lciPopOutput%
|
||||
}{%
|
||||
% print remaining footnotes at the end of the conversion
|
||||
\lciPrintFootnotes\lciResetFootnotes
|
||||
% close all parts, chapters, and sections at the end of the conversion
|
||||
\lciEndPart
|
||||
% finish table of contents
|
||||
|
|
@ -274,6 +275,9 @@ td.TocChapter { font-weight: normal; }
|
|||
\lciHtmlNavigationBottom
|
||||
\lciHtmlFileFooter%
|
||||
\lciPopOutput%
|
||||
\lciPushOutput{comments}%
|
||||
\lcRawHtml{</manual_tools_output>}
|
||||
\lciPopOutput%
|
||||
}
|
||||
|
||||
% Args: tmp-path, main-rootname: reads *.auxtmp file created by latex_to_html
|
||||
|
|
@ -1133,12 +1137,7 @@ td.TocChapter { font-weight: normal; }
|
|||
\gdef{\lciIfHtmlIndex}{\lcTrue}%
|
||||
\lciHtmlPartHeader{}{#1}}
|
||||
|
||||
\newcommand{\lciEndPart}{%
|
||||
\lciEndChapter
|
||||
\lciIfDefined{\lciTheFirstPartHasAlreadyBeenProcessedFlag}{ % check for first part
|
||||
\lciPrintFootnotes\lciResetFootnotes
|
||||
}{\newcommand{\lciTheFirstPartHasAlreadyBeenProcessedFlag}{}}%
|
||||
}
|
||||
\newcommand{\lciEndPart}{\lciEndChapter}
|
||||
|
||||
\gdef\lciReplaceWithCurrentPathToken{REPLACE_WITH_CURRENT_PATH}%
|
||||
|
||||
|
|
@ -1204,8 +1203,7 @@ td.TocChapter { font-weight: normal; }
|
|||
\lciPopFootnotes
|
||||
% navigation footer
|
||||
\addtocounter{createdfiles}{1}%
|
||||
\lcRawHtml{[internal:Next_#GC1_link_}\value{part}\_\value{createdfiles}\lcRawHtml{]
|
||||
}
|
||||
\lcRawHtml{[internal:Next_#GC1_link_}\value{part}\_\value{createdfiles}\lcRawHtml{]}
|
||||
\lciHtmlNavigationBottom
|
||||
\lciHtmlFileFooter
|
||||
\lciPopOutput
|
||||
|
|
@ -1231,8 +1229,7 @@ td.TocChapter { font-weight: normal; }
|
|||
\lcRawHtml{ <div class="NavNext"><hr> Next: <a href="}%
|
||||
\lcRawHtmlExpanded{\lciReplaceWithCurrentPathToken}%
|
||||
\lcRawHtmlExpanded{\lciOutputBasename}%
|
||||
\lcRawHtml{">}\lciRemoveNewlines{#1}\lcRawHtml{</a></div>
|
||||
}%
|
||||
\lcRawHtml{">}\lciRemoveNewlines{#1}\lcRawHtml{</a></div>}
|
||||
\lcRawHtml{i Up_chapter_link_}\value{part}\_\value{createdfiles}%
|
||||
\lcRawHtml{ <a href="}%
|
||||
\lcRawHtmlExpanded{\lciReplaceWithCurrentPathToken}%
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ convert() {
|
|||
|
||||
cp -r ${ConfigHtml}/Biblio ${OutDir}
|
||||
|
||||
cp ${TmpDir}/comments.txt ${OutDir}
|
||||
cp ${TmpDir}/comments.xml ${OutDir}
|
||||
|
||||
# finish, write timing to logfile and close it
|
||||
# -------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ void set_current_output( const string& key) {
|
|||
macroX( "\\lciShortContentsFilename") );
|
||||
anchor_stream = global_anchor_stream;
|
||||
} else if ( key == "comments") {
|
||||
current_output = Output_file( comments_stream, string("comments.txt") );
|
||||
current_output = Output_file( comments_stream, string("comments.xml") );
|
||||
new_filename = false;
|
||||
} else if ( key == "index") {
|
||||
current_output = Output_file( index_stream,
|
||||
|
|
|
|||
|
|
@ -697,7 +697,7 @@ Reference~Manual}%
|
|||
\textbf{File: }\input{#1.filename}
|
||||
\end{alltt}
|
||||
}
|
||||
\newcommand{\ccReferToExampleCode}[1]{\texttt{#1}}
|
||||
\newcommand{\ccReferToExampleCode}[1]{\begin{alltt}\input{#1.filename}\end{alltt}}
|
||||
|
||||
% +--------------------------------------------------------------------------
|
||||
% | A handy macro to define macros for RCS entries in a TeX file
|
||||
|
|
|
|||
Loading…
Reference in New Issue