[system] / trunk / pg / macros / PGbasicmacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGbasicmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 3135 Revision 3136
1658 1658
1659# An example of a macro which prints out a list (with letters) 1659# An example of a macro which prints out a list (with letters)
1660sub OL { 1660sub OL {
1661 my(@array) = @_; 1661 my(@array) = @_;
1662 my $i = 0; 1662 my $i = 0;
1663 my @alpha = ("A".."Z");
1664 my $letter;
1663 my $out= &M3( 1665 my $out= &M3(
1664 "\\begin{enumerate}\n", 1666 "\\begin{enumerate}\n",
1665 " \\begin{rawhtml} <OL TYPE=\"A\" VALUE=\"1\"> \\end{rawhtml} ", 1667 " \\begin{rawhtml} <OL TYPE=\"A\" VALUE=\"1\"> \\end{rawhtml} ",
1668 # kludge to fix IE/CSS problem
1666 "<OL TYPE=\"A\" VALUE=\"1\">\n" 1669 #"<OL TYPE=\"A\" VALUE=\"1\">\n"
1670 "<BLOCKQUOTE>\n"
1667 ) ; 1671 ) ;
1668 my $elem; 1672 my $elem;
1669 foreach $elem (@array) { 1673 foreach $elem (@array) {
1674 $letter = shift @alpha;
1670 $out .= MODES( 1675 $out .= MODES(
1671 TeX=> "\\item[$ALPHABET[$i].] $elem\n", 1676 TeX=> "\\item[$ALPHABET[$i].] $elem\n",
1672 Latex2HTML=> " \\begin{rawhtml} <LI> \\end{rawhtml} $elem ", 1677 Latex2HTML=> " \\begin{rawhtml} <LI> \\end{rawhtml} $elem ",
1673 HTML=> "<LI> $elem\n", 1678 #HTML=> "<LI> $elem\n",
1679 HTML=> "<br /> <b>$letter.</b> $elem\n",
1674 HTML_dpng=> "<LI> $elem <br /> <br /> \n" 1680 #HTML_dpng=> "<LI> $elem <br /> <br /> \n"
1681 HTML_dpng=> "<br /> <b>$letter.</b> $elem \n"
1675 ); 1682 );
1676 $i++; 1683 $i++;
1677 } 1684 }
1678 $out .= &M3( 1685 $out .= &M3(
1679 "\\end{enumerate}\n", 1686 "\\end{enumerate}\n",
1680 " \\begin{rawhtml} </OL>\n \\end{rawhtml} ", 1687 " \\begin{rawhtml} </OL>\n \\end{rawhtml} ",
1681 "</OL>\n" 1688 #"</OL>\n"
1689 "</BLOCKQUOTE>\n"
1682 ) ; 1690 ) ;
1683} 1691}
1684 1692
1685sub htmlLink { 1693sub htmlLink {
1686 my $url = shift; 1694 my $url = shift;

Legend:
Removed from v.3135  
changed lines
  Added in v.3136

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9