diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-28 19:02:10 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2001-07-28 19:02:10 +0000 |
commit | c835aed2eeaf2283e1aea6beeb2fd141efb2654e (patch) | |
tree | ba2380ad58da468e145d996756d753c67c9b4745 | |
parent | beda91a975e126132121ee97923361b4402df35f (diff) | |
download | gnutls-c835aed2eeaf2283e1aea6beeb2fd141efb2654e.tar.gz |
fixes in tex production (gdoc)
-rwxr-xr-x | doc/scripts/gdoc | 64 | ||||
-rw-r--r-- | doc/tex/Makefile.am | 6 |
2 files changed, 53 insertions, 17 deletions
diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc index 261c00706d..3816f741d1 100755 --- a/doc/scripts/gdoc +++ b/doc/scripts/gdoc @@ -1,6 +1,7 @@ #!/usr/bin/perl ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ## +## hacked to allow -tex option --nmav ## ## ## ## This software falls under the GNU Public License. Please read ## ## the COPYING file for more information ## @@ -75,7 +76,8 @@ # match expressions used to find embedded type information $type_constant = "\\\%(\\w+)"; -$type_func = "(\\w+\\(\\))"; +#$type_func = "(\\w+\\(\\))"; +$type_func = "(\\(w||\\\\)+\\(\\))"; $type_param = "\\\@(\\w+)"; $type_struct = "\\\&(\\w+)"; $type_env = "(\\\$\\w+)"; @@ -91,10 +93,10 @@ $type_env = "(\\\$\\w+)"; $type_param, "<tt><b>\$1</b></tt>" ); $blankline_html = "<p>"; -%highlights_tex = ( $type_constant, "{\\it \$1}", - $type_func, "{\\bf \$1}", - $type_struct, "{\\it \$1}", - $type_param, "{\\bf \$1}" ); +%highlights_tex = ( $type_constant, "{\\\\it \$1}", + $type_func, "{\\\\bf \$1}", + $type_struct, "{\\\\it \$1}", + $type_param, "{\\\\bf \$1}" ); $blankline_tex = "\\par"; # sgml, docbook format @@ -273,14 +275,31 @@ sub output_tex { my %args = %{$_[0]}; my ($parameter, $section); my $count; - print "\n\n\\subsection{". $args{'function'} . "}\n"; + my $func = $args{'function'}; + my $param; + my $param2; + my $sec; + my $check; + my $type; - print "{\\it ".$args{'functiontype'}."}\n"; - print "{\\bf ".$args{'function'}."}\n"; + $func =~ s/_/\\_/g; + + print "\n\n\\subsection{". $func . "}\n"; + + $type = $args{'functiontype'}; + $type =~ s/_/\\_/g; + + print "{\\it ".$type."}\n"; + print "{\\bf ".$func."}\n"; print "(\n"; $count = 0; foreach $parameter (@{$args{'parameterlist'}}) { - print "{\\it ".$args{'parametertypes'}{$parameter}."} {\\bf ".$parameter."}\n"; + $param = $args{'parametertypes'}{$parameter}; + $param2 = $parameter; + $param =~ s/_/\\_/g; + $param2 =~ s/_/\\_/g; + + print "{\\it ".$param."} {\\bf ".$param2."}\n"; if ($count != $#{$args{'parameterlist'}}) { $count++; print ", "; @@ -288,18 +307,35 @@ sub output_tex { } print ")\n"; - print "\n\\large{Arguments}\n"; + print "\n{\\large{Arguments}}\n"; + print "\\begin{itemize}\n"; + $check=0; foreach $parameter (@{$args{'parameterlist'}}) { - print "\\item {\\it ".$args{'parametertypes'}{$parameter}."} {\\bf ".$parameter."}\n"; + $param = $args{'parametertypes'}{$parameter}; + $param =~ s/_/\\_/g; + $param2 = $parameter; + $param2 =~ s/_/\\_/g; + + $check = 1; + print "\\item {\\it ".$param."} {\\bf ".$param2."}\n"; print "\n"; - output_highlight($args{'parameters'}{$parameter}); + + output_highlight($param{$parameter}); + } + if ($check==0) { + print "\\item void\n"; } print "\\end{itemize}\n"; + foreach $section (@{$args{'sectionlist'}}) { - print "\\large{$section}\n"; + print "{\\large{$section}}\n"; print "\\begin{rmfamily}\n"; - output_highlight($args{'sections'}{$section}); + + $sec = $args{'sections'}{$section}; + $sec =~ s/_/\\_/g; + $sec =~ s/&/\\&/g; + output_highlight($sec); print "\\end{rmfamily}\n"; } print "\n"; diff --git a/doc/tex/Makefile.am b/doc/tex/Makefile.am index 612b6e76fc..f87107fb5d 100644 --- a/doc/tex/Makefile.am +++ b/doc/tex/Makefile.am @@ -8,8 +8,8 @@ gnutls-api.tex: @../scripts/gdoc -tex ../../lib/*.c >> gnutls-api.tex gnutls.ps: gnutls.tex gnutls-api.tex - latex gnutls.tex - dvips gnutls.dvi -o gnutls.ps + -latex gnutls.tex + -dvips gnutls.dvi -o gnutls.ps gnutls.html: gnutls.tex gnutls-api.tex - latex2html gnutls.tex -no_subdir 1 -split 0 + -latex2html gnutls.tex -no_subdir 1 -split 0 |