;---------------------------------------------------------------------------- ; MODULE NAME: FOOTNOTE.IH ; ; $Author: Dennis_Bareis $ ; $Revision: 1.2 $ ; $Date: 02 Oct 1999 18:40:42 $ ; $Logfile: E:/DB/PVCS.IT/OS2/PPWIZARD/NESTCHK.H_V $ ; ; DESCRIPTION: This is a simple header to make it easier to use ; footnotes in HTML a footnote is defined where required ; using the "FN" macro and then the macro "ExpandFootNotes" ; is used to list them. ;---------------------------------------------------------------------------- ;--- Make sure only included once! ------------------------------------------ #ifndef HEADER_FOOTNOTE_IH #define HEADER_FOOTNOTE_IH 99.321 #require 99.321 ;------------------------------------------------------------------------- ;--- Footnote options, including code can override (USER OPTIONS) -------- ;------------------------------------------------------------------------- #ifndef FOOTNOTE_NUMBER_IN_TEXT #define FOOTNOTE_NUMBER_IN_TEXT #endif #ifndef FOOTNOTE_NUMBER_IN_LIST #defineRexx FOOTNOTE_NUMBER_IN_LIST RxFmtFnNumb = '' || RxIndex || ''; #defineRexx #endif #ifndef FOOTNOTE_BEFORE_EACH #define FOOTNOTE_BEFORE_EACH

#endif #ifndef FOOTNOTE_BEFORE_TEXT_IN_LIST #define FOOTNOTE_BEFORE_TEXT_IN_LIST #endif #ifndef FOOTNOTE_AFTER_EACH #define FOOTNOTE_AFTER_EACH #endif #ifndef FOOTNOTE_FONTSTART #define FOOTNOTE_FONTSTART #endif #ifndef FOOTNOTE_FONTEND #define FOOTNOTE_FONTEND #endif ;--- Initialization ------------------------------------------------------ #RexxVar RxFootNoteCnt = 0 #RexxVar RxFooterTxtCnt = 0 ;--- This macro is used to hold text of each footnote -------------------- ;--- This macro is used to hold text of each footnote -------------------- #define FN \ #RexxVar RxFootNoteCnt + 1 -\ #define+ FN#_TMP {$Text} -\ #evaluate ^FN#^ ^MacroGet('FN#_TMP')^ -\ -\ <$FOOTNOTE_NUMBER_IN_TEXT> ;--- Expands Footnotes --------------------------------------------------- #DefineRexx RexxExpandFootNotes if RxFootNoteCnt = 0 then RxFnText = ''; else do ;--- Die on error (easy restriction to remove) ----------- if RxFooterTxtCnt <> 0 then Error("Can't have more than one set of footnotes!"); ;--- There is at least 1 footnote ------------------------ RxFnText = '<$FOOTNOTE_FONTSTART>'; RxAfter = ''; do RxIndex = 1 to RxFootNoteCnt ;--- Get previously stored Text ---------------------- RxFnThis = MacroGet('FN#' || RxIndex); ;--- Format Footnote Number -------------------------- <$FOOTNOTE_NUMBER_IN_LIST>; ;--- Output label (target for orig footnote #) ------- RxFnText = RxFnText || ''; ;--- Output text before each FN (normally '

') ----- RxFnText = RxFnText || '<$FOOTNOTE_BEFORE_EACH>'; ;--- Output FN# as link to original footnote number -- RxFnText = RxFnText || '' || RxFmtFnNumb || ''; ;--- Output possible seperator text ------------------ RxFnText = RxFnText || '<$FOOTNOTE_BEFORE_TEXT_IN_LIST>'; ;--- Output the footnote text ------------------------ RxFnText = RxFnText || RxFnThis; ;--- Output stuff after text of footnote ------------- RxFnText = RxFnText || '<$FOOTNOTE_AFTER_EACH>'; end; RxFnText = RxFnText || '<$FOOTNOTE_FONTEND>' ;--- Reset footnote counter ------------------------------ RxFooterTxtCnt = RxFooterTxtCnt + 1; RxFootNoteCnt = 0; end; if RxFnText <> '' then call ProcessNext RxFnText #DefineRexx #define ExpandFootNotes \ #evaluate ^^ ^<$RexxExpandFootNotes>^ ;--- End of Header file ----------------------------------------------------- #endif