From 5412d52974c365e2d5bc1a8320816a729f7c10ab Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 11 Mar 2020 03:01:11 +0000 Subject: CTAN sync 202003110301 --- support/makeglossariesgui/README | 12 +- support/makeglossariesgui/makeglossariesgui-en.pdf | Bin 596234 -> 588808 bytes support/makeglossariesgui/makeglossariesgui.1 | 205 +++++ support/makeglossariesgui/src/CHANGES | 5 + support/makeglossariesgui/src/Makefile | 1 + .../src/doc/createmakeglossariesguidocs | 881 ++++++++++++++++----- .../src/doc/makeglossariesgui-en.xml | 119 ++- .../src/doc/makeglossariesgui.dtd | 2 +- .../makeglossariesgui/src/installer/install.xml | 4 +- .../src/installer/unix_shortcutSpec.xml | 5 +- .../makeglossariesgui/src/java/AppSelector.java | 2 +- .../makeglossariesgui/src/java/AuxFileFilter.java | 10 +- .../src/java/DiagnosticPanel.java | 18 + support/makeglossariesgui/src/java/FileField.java | 18 + support/makeglossariesgui/src/java/Glossaries.java | 97 +++ .../src/java/GlossariesPanel.java | 18 + support/makeglossariesgui/src/java/Glossary.java | 18 + .../src/java/GlossaryBatchMessage.java | 18 + .../src/java/GlossaryException.java | 18 + .../src/java/GlossaryMessage.java | 18 + .../src/java/GlsTransferHandler.java | 18 + .../src/java/InvalidSyntaxException.java | 2 +- .../src/java/MakeGlossariesDictionary.java | 2 +- .../src/java/MakeGlossariesGUI.java | 30 +- .../src/java/MakeGlossariesInvoker.java | 24 +- .../src/java/MakeGlossariesProperties.java | 18 + .../src/java/PropertiesDialog.java | 18 + .../makeglossariesgui/src/java/ViewEntries.java | 18 + support/makeglossariesgui/src/java/ViewFile.java | 18 + .../makeglossariesgui/src/java/XindyModule.java | 18 + .../dictionaries/makeglossariesgui-en.prop | 8 +- .../sample-disablemakegloss.tex | 18 + 32 files changed, 1355 insertions(+), 306 deletions(-) create mode 100644 support/makeglossariesgui/makeglossariesgui.1 create mode 100644 support/makeglossariesgui/src/tests/sample-disablemakegloss/sample-disablemakegloss.tex (limited to 'support') diff --git a/support/makeglossariesgui/README b/support/makeglossariesgui/README index 0515911bce..9603df8af5 100644 --- a/support/makeglossariesgui/README +++ b/support/makeglossariesgui/README @@ -3,8 +3,9 @@ Application : MakeGlossariesGUI Author : Nicola L. C. Talbot License : GPLv3+ + Copyright Nicola L. C. Talbot 2011-2020 -Home Page : http://www.dickimaw-books.com/software/makeglossariesgui/ +Home Page : https://www.dickimaw-books.com/software/makeglossariesgui/ Requirements : Java Runtime Environment (JRE 8) @@ -30,6 +31,9 @@ Run the installer: java -jar makeglossariesgui-installer.jar +If you want to run makeglossariesgui in batch mode then add the bin +subdirectory your system's PATH environment variable. + Third Party Libraries ===================== @@ -37,12 +41,12 @@ MakeGlossariesGUI depends on the following third party libraries whose jar files are placed in the application's lib directory by the installer: - - Java Help (https://javahelp.java.net/) GPL - - The Java Look and Feel Graphics Repository + - javahelp2.jar: Java Help (https://javahelp.java.net/) GPL + - jlfgr-1_0.jar: The Java Look and Feel Graphics Repository (http://www.oracle.com/technetwork/java/index-138612.html) JLFGR License If you want to build the application, you will need to fetch those jar files and add them to the lib directory. -http://www.dickimaw-books.com/ +https://www.dickimaw-books.com/ diff --git a/support/makeglossariesgui/makeglossariesgui-en.pdf b/support/makeglossariesgui/makeglossariesgui-en.pdf index 63c974045f..5377a40983 100644 Binary files a/support/makeglossariesgui/makeglossariesgui-en.pdf and b/support/makeglossariesgui/makeglossariesgui-en.pdf differ diff --git a/support/makeglossariesgui/makeglossariesgui.1 b/support/makeglossariesgui/makeglossariesgui.1 new file mode 100644 index 0000000000..af47de67a2 --- /dev/null +++ b/support/makeglossariesgui/makeglossariesgui.1 @@ -0,0 +1,205 @@ +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.if !\nF .nr F 0 +.if \nF>0 \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "MAKEGLOSSARIESGUI 1" +.TH MAKEGLOSSARIESGUI 1 "2018-05-19" "perl v5.26.2" "makeglossariesgui" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBmakeglossariesgui\fR [\fIoption\fR]+ [\fIfilename\fR] +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +MakeGlossariesGUI is a Java \s-1GUI\s0 diagnostic tool for the glossaries +LaTeX package. It can check for common problems that can cause the +entries within the glossary or the entire glossary to be omitted. In +\&\s-1GUI\s0 mode it parses both the .aux and the .log file for known error +and warning messages. +.PP +When run in batch mode, it can be used as alternative to the +makeglossaries Perl script and the makeglossaries\-lite.lua Lua +script supplied by the glossaries package. (It doesn't parse the log +file in batch mode or show all the diagnostic information that the +\&\s-1GUI\s0 mode provides.) +.PP +Note that if you are opting to use MakeGlossariesGUI because you +don't want to install Perl, then you are limiting yourself to +makeindex as xindy also requires Perl. +.SH "OPTIONS" +.IX Header "OPTIONS" +.IP "\fB\-\-version\fR (or \fB\-v\fR)" 4 +.IX Item "--version (or -v)" +Show the version number and exit. +.IP "\fB\-\-help\fR (or \fB\-h\fR)" 4 +.IX Item "--help (or -h)" +Show the help and exit. +.IP "\fB\-\-debug\fR" 4 +.IX Item "--debug" +Print debug messages to \s-1STDOUT.\s0 +.IP "\fB\-\-batch\fR (or \fB\-b\fR)" 4 +.IX Item "--batch (or -b)" +Run in batch mode. The \fIfilename\fR must be supplied with this option +and should be the name of the .aux file. (The extension may be omitted.) +.IP "\fB\-\-gui\fR" 4 +.IX Item "--gui" +Run in \s-1GUI\s0 mode (default). +.IP "\fB\-\-quiet\fR" 4 +.IX Item "--quiet" +Suppress messages that would otherwise be written to \s-1STDOUT.\s0 +.IP "\fB\-\-dry\-run\fR (or \fB\-n\fR)" 4 +.IX Item "--dry-run (or -n)" +Switch dry run mode on. +.IP "\fB\-\-nodry\-run\fR" 4 +.IX Item "--nodry-run" +Switch dry run mode off (default). +.SH "REQUIRES" +.IX Header "REQUIRES" +Java 7 and a TeX distribution. +.SH "LICENSE" +.IX Header "LICENSE" +License GPLv3+: \s-1GNU GPL\s0 version 3 or later + +This is free software: you are free to change and redistribute it. +There is \s-1NO WARRANTY,\s0 to the extent permitted by law. +.SH "RECOMMENDED READING" +.IX Header "RECOMMENDED READING" +The MakeGlossariesGUI manual (available as a \s-1PDF\s0 or through the \s-1GUI\s0). +.PP +The glossaries manual: +.PP +.Vb 1 +\& texdoc glossaries +.Ve +.SH "AUTHOR" +.IX Header "AUTHOR" +Nicola L. C. Talbot, + diff --git a/support/makeglossariesgui/src/CHANGES b/support/makeglossariesgui/src/CHANGES index 3e931d6399..07f2cb81b4 100644 --- a/support/makeglossariesgui/src/CHANGES +++ b/support/makeglossariesgui/src/CHANGES @@ -1,3 +1,8 @@ +2.2 (2020-03-09): + + * Added check for disablemakegloss and restoremakegloss + (new to glossaries.sty v4.45). + 2.1 (2018-05-23): * Added check for bib2gls. diff --git a/support/makeglossariesgui/src/Makefile b/support/makeglossariesgui/src/Makefile index b2f1d3febc..d1df2f6b2a 100644 --- a/support/makeglossariesgui/src/Makefile +++ b/support/makeglossariesgui/src/Makefile @@ -8,6 +8,7 @@ app : lib lib/makeglossariesgui.jar lib/resources lib/makeglossariesgui-splash.p dist : ../dist/makeglossariesgui-installer.jar cp doc/makeglossariesgui-en.pdf ../dist + cp doc/makeglossariesgui.1 ../dist ../dist/makeglossariesgui-installer.jar : app installer/install.xml $(IZPACKDIR)/bin/compile installer/install.xml -b . \ diff --git a/support/makeglossariesgui/src/doc/createmakeglossariesguidocs b/support/makeglossariesgui/src/doc/createmakeglossariesguidocs index 869bea79d5..0c145da861 100755 --- a/support/makeglossariesgui/src/doc/createmakeglossariesguidocs +++ b/support/makeglossariesgui/src/doc/createmakeglossariesguidocs @@ -34,15 +34,28 @@ if ($#ARGV == 1) $locale .= "-".$ARGV[1]; } +my $wwwpath; + +if (defined($ENV{'MAKEJMLRBOOKGUI_MANUAL_HTML'})) +{ + $wwwpath = $ENV{'MAKEJMLRBOOKGUI_MANUAL_HTML'}; + + if ($lang ne 'en') + { + $wwwpath .= "-$lang"; + } +} + my $encoding_file = 'utf8'; my $encoding_xml = 'UTF-8'; -open FD, "$mainclass" or die "Can't open '$mainclass' $!\n"; -binmode(FD, ":$encoding_file"); +my $fd; + +open $fd, "<:encoding($encoding_xml)", $mainclass or die "Can't open '$mainclass' $!\n"; my %dict = (); -while () +while (<$fd>) { if (/\bstatic +final +String +APP_NAME *= *"(.+)";/) { @@ -58,7 +71,7 @@ while () } } -close FD; +close $fd; my $propfile = "$dictdir/$base-$locale.prop"; @@ -78,13 +91,16 @@ unless (-e $propfile) die "Can't find '$propfile'\n"; } -open FD, "$propfile" or die "Can't open '$propfile' $!\n"; +open $fd, "<:encoding($encoding_xml)", "$propfile" or die "Can't open '$propfile' $!\n"; -$_ = ; +$_ = <$fd>; if (/# Encoding: ([^s]+)/) { - binmode(FD, ":encoding($1)"); + if ($1 ne $encoding_xml) + { + binmode($fd, ":encoding($1)"); + } } else { @@ -96,7 +112,7 @@ my $linenum = 1; my $openquote = chr(hex(2018)); my $closequote = chr(hex(2019)); -while () +while (<$fd>) { $linenum++; @@ -133,7 +149,7 @@ while () } } -close FD; +close $fd; my %docinfo = (); my @nodes = (); @@ -200,8 +216,10 @@ my @tabular_specs = (); my %counters = (); # open the TeX file -open TEXFD, ">$texfile" or die "Can't open '$texfile' $!\n"; -binmode(TEXFD, ":$encoding_file"); + +my $texfd; + +open $texfd, ">:encoding($encoding_xml)", $texfile or die "Can't open '$texfile' $!\n"; # initialize the parser my $parser = XML::Parser->new( Handlers => @@ -212,20 +230,21 @@ my $parser = XML::Parser->new( Handlers => }); $parser->parsefile( $xmlfile ); -close TEXFD; +close $texfd; # Write helpset files -open HSFD, ">$helpsetdir/$base.hs" +my $hsfd; + +open $hsfd, ">:encoding($encoding_xml)", "$helpsetdir/$base.hs" or die "Can't open '$helpsetdir/$base.hs' $!\n"; -binmode(HSFD, ":$encoding_file"); my $toctitle = &get_label('manual.toc'); my $manualtitle = &get_label('manual.title'); my $indextitle = &get_label('manual.index'); my $searchtitle = &get_label('manual.search'); -print HSFD <<_END_HS_HEAD; +print $hsfd <<_END_HS_HEAD; _END_HS_HEAD -close HSFD; +close $hsfd; + +my $htmlfd; -open HTMLFD, ">$helpsetdir/$base.html" +open $htmlfd, ">:encoding($encoding_xml)", "$helpsetdir/$base.html" or die "Can't open '$helpsetdir/$base.html' $!\n"; -binmode(HTMLFD, ":$encoding_file"); -print HTMLFD &html_head($docinfo{Title}, '', $nodes[0]->{Tag}); +print $htmlfd &html_head($docinfo{Title}, '', $nodes[0]->{Tag}); + +print $htmlfd "\n"; + +print $htmlfd "

", $docinfo{Title}, "

\n"; + +print $htmlfd "

$docinfo{Author}

\n" if ($docinfo{Author}); + +print $htmlfd "
"; + +print $htmlfd "

$docinfo{Date}

\n" if ($docinfo{Date}); + +print $htmlfd "
"; + +print $htmlfd &html_nav('', $nodes[0]); + +print $htmlfd "\n\n"; + +close $htmlfd; + +my $wwwfd; +my $wwwsidebarfd; + +if (defined($wwwpath)) +{ + open $wwwfd, ">:encoding($encoding_xml)", "$wwwpath/index.shtml" + or die "Can't open '$wwwpath/index.shtml' $!\n"; + + print "Writing '$wwwpath/index.shtml'\n"; + + print $wwwfd &html_www_head($docinfo{Title}, '', $nodes[0]->{Tag}); + + print $wwwfd '

', $docinfo{Title}, "

\n"; + + if ($docinfo{Author}) + { + my $docauthor = $docinfo{Author}; + + $docauthor=~s~(.*?)
~$1~sg; -print HTMLFD "\n"; + $docauthor=~s~(.*?)~
$1
~sg; -print HTMLFD - "

", - $docinfo{Title}, "

\n"; + $docauthor=~s~(.*?)~$1~sg; + + print $wwwfd "$docauthor\n"; + } -print HTMLFD "

$docinfo{Author}

\n" if ($docinfo{Author}); + print $wwwfd "
"; -print HTMLFD "
"; + print $wwwfd "$docinfo{Date}
\n" if ($docinfo{Date}); -print HTMLFD "

$docinfo{Date}

\n" if ($docinfo{Date}); -print HTMLFD "
"; + open $wwwsidebarfd, ">:encoding($encoding_xml)", "$wwwpath/sidebar.shtml" + or die "Can't open '$wwwpath/sidebar.shtml' $!\n"; -print HTMLFD &html_nav('', $nodes[0]); + print $wwwsidebarfd "$dict{appname}"; -print HTMLFD "\n\n"; + print $wwwsidebarfd <<_END_SIDEBAR_LI; +
    + +
  • + +
  • + +_END_SIDEBAR_LI + print $wwwsidebarfd "", &get_label("manual.toc"), ""; -close HTMLFD; + print $wwwsidebarfd <<_END_SIDEBAR_LI; + +
  • + +
  • + +_END_SIDEBAR_LI + print $wwwsidebarfd "", &get_label("manual.glossary"), ""; +} my $prev = $base; +my $wwwprev = 'glossary'; + +my $tocfd; -open TOCFD, ">$helpsetdir/${base}TOC.xml" +open $tocfd, ">:encoding($encoding_xml)", "$helpsetdir/${base}TOC.xml" or die "Can't open '$helpsetdir/${base}TOC.xml' $!\n"; -binmode(TOCFD, ":$encoding_file"); -print TOCFD <<_END_TOC_HEAD; +print $tocfd <<_END_TOC_HEAD; {Type}}+$level <= $prevlevel) { - print TOCFD "\n"; + print $tocfd "\n"; + } + + if (defined($wwwfd) and $section_levels{$node->{Type}}+$level < $prevlevel) + { + print $wwwfd "\n
\n"; + + print $wwwsidebarfd "\n\n"; } } - print TOCFD "{Title}\" target=\"$node->{Tag}\">\n"; + print $tocfd "{Title}\" target=\"$node->{Tag}\">\n"; + + if (defined($wwwfd)) + { + if ($section_levels{$node->{Type}} > $prevlevel) + { + print $wwwfd "\n\n" if defined($wwwsidebarfd); } } -print TOCFD "\n\n"; +print $tocfd "\n\n"; + +close $tocfd; + +if (defined($wwwfd)) +{ + print $wwwfd &html_www_foot('', 'glossary'); + + close $wwwfd; -close TOCFD; + close $wwwsidebarfd; + + # write glossary file + &write_www_glossary($nodes[0]); +} # write map file -open MAPFD, ">$helpsetdir/Map.jhm" +my $mapfd; + +open $mapfd, ">:encoding($encoding_xml)", "$helpsetdir/Map.jhm" or die "Can't open '$helpsetdir/Map.jhm' $!\n"; -binmode(MAPFD, ":$encoding_file"); -print MAPFD <<_END_MAP_HEAD; +print $mapfd <<_END_MAP_HEAD; _END_MAP_HEAD -print MAPFD "\n"; -print MAPFD "\n"; -print MAPFD "\n"; -print MAPFD "\n"; -print MAPFD "\n"; +print $mapfd "\n"; +print $mapfd "\n"; +print $mapfd "\n"; +print $mapfd "\n"; +print $mapfd "\n"; &hs_map_id(\%tags); &hs_map_id(\%terms); -print MAPFD "\n"; -close MAPFD; +print $mapfd "\n"; +close $mapfd; # Write the helpset index file -open IDXFD, ">$helpsetdir/${base}Index.xml" +my $idxfd; + +open $idxfd, ">:encoding($encoding_xml)", "$helpsetdir/${base}Index.xml" or die "Can't open '$helpsetdir/${base}Index.xml' $!\n"; -binmode(IDXFD, ":$encoding_file"); -print IDXFD <<_END_IDX_HEAD; +print $idxfd <<_END_IDX_HEAD; \n"; -close IDXFD; +print $idxfd "\n"; +close $idxfd; sub print_idx_entries{ my ($hash) = @_; @@ -468,7 +633,7 @@ sub print_idx_entries{ $text=~s/<\/?[^>]*>//g; - print IDXFD "\n"; @@ -477,7 +642,7 @@ sub print_idx_entries{ &print_idx_entries($hash->{$key}->{Children}); } - print IDXFD "\n"; + print $idxfd "\n"; } else { @@ -491,7 +656,7 @@ sub handle_char{ &handle_html($string); - print TEXFD $string; + print $texfd $string; } sub hs_map_id{ @@ -501,7 +666,7 @@ sub hs_map_id{ { if ($hash->{$tag}->{Ref}) { - print MAPFD "{$tag}->{Ref}\" />\n"; + print $mapfd "{$tag}->{Ref}\" />\n"; } else { @@ -535,7 +700,15 @@ sub hs_index_term{ sub hs_popup{ my ($href, $text) = @_; + my $tag = $href; + + if ($href=~/(.*)\.html/) + { + $tag = $1; + } + my $html = <<_END_POPUP; + @@ -546,7 +719,8 @@ sub hs_popup{ _END_POPUP - $html.$text + # no EOL after text + return "$html$text"; } sub handle_html{ @@ -652,12 +826,12 @@ sub start_manual{ $fontenc = $attrs{'fontenc'}; } - print TEXFD "% arara: pdflatex\n"; - print TEXFD "% arara: makeglossaries\n"; - print TEXFD "% arara: pdflatex\n"; - print TEXFD "% arara: makeindex\n"; - print TEXFD "% arara: pdflatex\n"; - print TEXFD "\\documentclass[index=totoc,$babel{$locale}]{makeglossariesgui}\n"; + print $texfd "% arara: pdflatex\n"; + print $texfd "% arara: makeglossaries\n"; + print $texfd "% arara: pdflatex\n"; + print $texfd "% arara: makeindex\n"; + print $texfd "% arara: pdflatex\n"; + print $texfd "\\documentclass[index=totoc,$babel{$locale}]{makeglossariesgui}\n"; } sub end_manual{ @@ -667,7 +841,7 @@ sub end_manual{ sub start_preamble{ my ($expat, %attrs) = @_; - print TEXFD "\\usepackage[$inputenc]{inputenc}\n", + print $texfd "\\usepackage[$inputenc]{inputenc}\n", "\\usepackage[$fontenc]{fontenc}\n", "\\usepackage{lmodern}\n", "\\usepackage{graphicx}\n", @@ -691,7 +865,7 @@ sub start_title{ push @current, 'Title'; - print TEXFD "\\title{"; + print $texfd "\\title{"; } sub end_title{ @@ -699,7 +873,7 @@ sub end_title{ pop @current; - print TEXFD "}\n"; + print $texfd "}\n"; } sub start_date{ @@ -707,7 +881,7 @@ sub start_date{ push @current, 'Date'; - print TEXFD "\\date{"; + print $texfd "\\date{"; } sub end_date{ @@ -715,7 +889,7 @@ sub end_date{ pop @current; - print TEXFD "}\n"; + print $texfd "}\n"; } sub start_author{ @@ -730,7 +904,7 @@ sub start_author{ $docinfo{Author} .= "
"; - print TEXFD "\\Author{"; + print $texfd "\\Author{"; } sub end_author{ @@ -740,19 +914,19 @@ sub end_author{ pop @current; - print TEXFD "}\n"; + print $texfd "}\n"; } sub start_document{ my ($expat, %attrs) = @_; - print TEXFD "\\begin{document}\n\\maketitle\n\\tableofcontents\n"; + print $texfd "\\begin{document}\n\\maketitle\n\\tableofcontents\n"; } sub end_document{ my ($expat) = @_; - print TEXFD "\\end{document}\n"; + print $texfd "\\end{document}\n"; } sub start_node{ @@ -816,7 +990,7 @@ sub start_node{ $tags{$attrs{tag}}->{Ref} = $attrs{tag}.'.html'; $tags{$attrs{tag}}->{Text} = $attrs{title}; - print TEXFD "\\", $attrs{type}, "{", + print $texfd "\\", $attrs{type}, "{", $attrs{title}, "}\\label{", $attrs{tag}, "}\n"; } @@ -859,19 +1033,19 @@ sub start_newacro{ # write html file used by popup window - open FD, ">$helpsetdir/acr_$tag.html" + open $fd, ">:encoding($encoding_file)", "$helpsetdir/acr_$tag.html" or die "Can't open '$helpsetdir/acr_$tag.html' $!\n"; - print FD &html_head($attrs{short}); + print $fd &html_head($attrs{short}); - print FD "\n

$attrs{short}

\n", + print $fd "\n

$attrs{short}

\n", ucfirst($attrs{long}), ".\n"; - print FD "\n\n"; + print $fd "\n\n"; - close FD; + close $fd; - print TEXFD "\\newacronym{$tag}{$attrs{short}}{$attrs{long}}\n"; + print $texfd "\\newacronym{$tag}{$attrs{short}}{$attrs{long}}\n"; } sub end_newacro{ @@ -910,31 +1084,31 @@ sub start_newterm{ # write html file used by popup window if a description has been # supplied - open FD, ">$helpsetdir/$tag.html" + open $fd, ">:encoding($encoding_file)", "$helpsetdir/$tag.html" or die "Can't open '$helpsetdir/$tag.html' $!\n"; - print FD &html_head($attrs{text}); + print $fd &html_head($attrs{text}); - print FD "\n

"; + print $fd "\n

"; if ($attrs{fmt}) { - print FD "<$attrs{fmt}>$attrs{text}"; + print $fd "<$attrs{fmt}>$attrs{text}"; } else { - print FD $attrs{text}; + print $fd $attrs{text}; } - print FD "

\n", ucfirst($attrs{description}), ".\n"; + print $fd "\n", ucfirst($attrs{description}), ".\n"; - print FD "\n\n"; + print $fd "\n\n"; - close FD; + close $fd; if ($attrs{fmt}) { - print TEXFD "\\newglossaryentry{$attrs{tag}}{name={", + print $texfd "\\newglossaryentry{$attrs{tag}}{name={", "\\html$attrs{fmt}\{", $attrs{text}, "}},sort={", $attrs{text}, "},description={", @@ -944,7 +1118,7 @@ sub start_newterm{ } else { - print TEXFD "\\newglossaryentry{$attrs{tag}}{name={", + print $texfd "\\newglossaryentry{$attrs{tag}}{name={", $attrs{text}, "},description={", $attrs{description}, "\\index{$attrs{text}}}}\n"; } } @@ -984,17 +1158,17 @@ sub start_p{ if ($attrs{align} eq 'left') { - print TEXFD "\\begin{flushleft}"; + print $texfd "\\begin{flushleft}"; $endtag="\\end{flushleft}"; } elsif ($attrs{align} eq 'right') { - print TEXFD "\\begin{flushright}"; + print $texfd "\\begin{flushright}"; $endtag="\\end{flushright}"; } elsif ($attrs{align} eq 'center') { - print TEXFD "\\begin{center}"; + print $texfd "\\begin{center}"; $endtag="\\end{center}"; } else @@ -1006,9 +1180,9 @@ sub start_p{ else { &handle_html("

"); - print TEXFD "\n\n"; + print $texfd "\n\n"; - print TEXFD "\\noindent " if $attrs{noindent}; + print $texfd "\\noindent " if $attrs{noindent}; } push @paragraph, $endtag; @@ -1019,7 +1193,7 @@ sub end_p{ &handle_html("

"); - print TEXFD pop @paragraph; + print $texfd pop @paragraph; } sub start_dl{ @@ -1027,7 +1201,7 @@ sub start_dl{ &handle_html("
"); - print TEXFD "\\begin{description}"; + print $texfd "\\begin{description}"; } sub end_dl{ @@ -1035,7 +1209,7 @@ sub end_dl{ &handle_html("
"); - print TEXFD "\\end{description}"; + print $texfd "\\end{description}"; } sub start_ul{ @@ -1043,7 +1217,7 @@ sub start_ul{ &handle_html("
    "); - print TEXFD "\\begin{itemize}"; + print $texfd "\\begin{itemize}"; } sub end_ul{ @@ -1051,7 +1225,7 @@ sub end_ul{ &handle_html("
"); - print TEXFD "\\end{itemize}"; + print $texfd "\\end{itemize}"; } sub start_tt{ @@ -1059,7 +1233,7 @@ sub start_tt{ &handle_html(""); - print TEXFD "\\texttt{"; + print $texfd "\\texttt{"; } sub end_tt{ @@ -1067,23 +1241,55 @@ sub end_tt{ &handle_html(''); - print TEXFD "}"; + print $texfd "}"; +} + +sub start_file{ + my ($expat, %attrs) = @_; + + &handle_html(""); + + print $texfd "\\texttt{"; +} + +sub end_file{ + my ($expat) = @_; + + &handle_html(''); + + print $texfd "}"; } -sub start_b{ +sub start_code{ my ($expat, %attrs) = @_; - &handle_html(""); + &handle_html(""); - print TEXFD "\\textbf{"; + print $texfd "\\texttt{"; } -sub end_b{ +sub end_code{ my ($expat) = @_; - &handle_html(''); + &handle_html(''); + + print $texfd "}"; +} + +sub start_strong{ + my ($expat, %attrs) = @_; + + &handle_html(""); - print TEXFD "}"; + print $texfd "\\textbf{"; +} + +sub end_strong{ + my ($expat) = @_; + + &handle_html(''); + + print $texfd "}"; } sub start_em{ @@ -1091,7 +1297,7 @@ sub start_em{ &handle_html(""); - print TEXFD "\\emph{"; + print $texfd "\\emph{"; } sub end_em{ @@ -1099,7 +1305,7 @@ sub end_em{ &handle_html(''); - print TEXFD "}"; + print $texfd "}"; } sub start_li{ @@ -1107,7 +1313,7 @@ sub start_li{ &handle_html("
  • "); - print TEXFD "\\item "; + print $texfd "\\item "; } sub end_li{ @@ -1122,7 +1328,7 @@ sub start_dt{ &handle_html("
    "); - print TEXFD "\\item[{"; + print $texfd "\\item[{"; } sub end_dt{ @@ -1130,7 +1336,7 @@ sub end_dt{ &handle_html("
    "); - print TEXFD "}]"; + print $texfd "}]"; } sub start_dd{ @@ -1152,7 +1358,7 @@ sub start_meta{ &handle_html("⟨"); - print TEXFD "\\meta{"; + print $texfd "\\meta{"; } sub end_meta{ @@ -1160,7 +1366,7 @@ sub end_meta{ &handle_html('⟩'); - print TEXFD "}"; + print $texfd "}"; } sub start_marg{ @@ -1168,7 +1374,7 @@ sub start_marg{ &handle_html('{'); - print TEXFD "\\marg{"; + print $texfd "\\marg{"; } sub end_marg{ @@ -1176,7 +1382,7 @@ sub end_marg{ &handle_html('}'); - print TEXFD "}"; + print $texfd "}"; } sub start_dq{ @@ -1184,7 +1390,7 @@ sub start_dq{ &handle_html('"'); - print TEXFD "\\dq{"; + print $texfd "\\dq{"; } sub end_dq{ @@ -1192,7 +1398,7 @@ sub end_dq{ &handle_html('"'); - print TEXFD "}"; + print $texfd "}"; } sub start_sq{ @@ -1200,7 +1406,7 @@ sub start_sq{ &handle_html("'"); - print TEXFD "\\sq{"; + print $texfd "\\sq{"; } sub end_sq{ @@ -1208,7 +1414,7 @@ sub end_sq{ &handle_html("'"); - print TEXFD "}"; + print $texfd "}"; } sub start_url{ @@ -1227,12 +1433,12 @@ sub start_url{ if ($attrs{text}) { - print TEXFD "\\href{", $attrs{www}, "}{", $attrs{text}, "}"; + print $texfd "\\href{", $attrs{www}, "}{", $attrs{text}, "}"; $string = "$attrs{text}"; } else { - print TEXFD "\\url{", $attrs{www}, "}"; + print $texfd "\\url{", $attrs{www}, "}"; $string = "$attrs{www}"; } @@ -1248,7 +1454,7 @@ sub start_sty{ push @current, 'sty'; - print TEXFD "\\sty{"; + print $texfd "\\sty{"; } sub end_sty{ @@ -1261,7 +1467,7 @@ sub end_sty{ &hs_index_term("sty_$sty", "$sty", "$sty.sty", \%terms); - print TEXFD "}"; + print $texfd "}"; } sub start_footnote{ @@ -1281,7 +1487,7 @@ sub start_footnote{ push @current, 'Footnote'; - print TEXFD "\\footnote{"; + print $texfd "\\footnote{"; } sub end_footnote{ @@ -1296,13 +1502,13 @@ sub end_footnote{ $docinfo{Footnote} = ''; - print TEXFD "}"; + print $texfd "}"; } sub start_blockquote{ my ($expat, %attrs) = @_; - print TEXFD "\\begin{blockquote}"; + print $texfd "\\begin{blockquote}"; &handle_html('
    '); } @@ -1310,7 +1516,7 @@ sub start_blockquote{ sub end_blockquote{ my ($expat) = @_; - print TEXFD "\\end{blockquote}"; + print $texfd "\\end{blockquote}"; &handle_html('
    '); } @@ -1333,11 +1539,11 @@ sub start_example{ . ($attrs{title}? "($attrs{title})." : '.') . '

    '); - print TEXFD "\\begin{example}"; + print $texfd "\\begin{example}"; if ($attrs{title}) { - print TEXFD '[', $attrs{title}, ']'; + print $texfd '[', $attrs{title}, ']'; } } @@ -1346,7 +1552,7 @@ sub end_example{ &handle_html(''); - print TEXFD "\\end{example}"; + print $texfd "\\end{example}"; } sub start_seealso{ @@ -1364,17 +1570,17 @@ sub start_seealso{ &handle_html("

    $seealso

      "); - print TEXFD "\n\n\\minisec{$seealso}\n"; + print $texfd "\n\n\\minisec{$seealso}\n"; - print TEXFD "\\begin{itemize}\n"; + print $texfd "\\begin{itemize}\n"; foreach my $tag (@tags) { &handle_html("
    • $tag"); - print TEXFD "\\item \\nameref{$tag}\n"; + print $texfd "\\item \\nameref{$tag}\n"; } - print TEXFD "\\end{itemize}\n"; + print $texfd "\\end{itemize}\n"; &handle_html('
    '); } @@ -1388,7 +1594,7 @@ sub start_pre{ &handle_html('
    ');
     
    -   print TEXFD "\\begin{verbatim}";
    +   print $texfd "\\begin{verbatim}";
     }
     
     sub end_pre{
    @@ -1396,7 +1602,7 @@ sub end_pre{
     
        &handle_html('
    '); - print TEXFD "\\end{verbatim}"; + print $texfd "\\end{verbatim}"; } sub start_alltt{ @@ -1404,7 +1610,7 @@ sub start_alltt{ &handle_html('
    ');
     
    -   print TEXFD "\\begin{alltt}";
    +   print $texfd "\\begin{alltt}";
     }
     
     sub end_alltt{
    @@ -1412,7 +1618,7 @@ sub end_alltt{
     
        &handle_html('
    '); - print TEXFD "\\end{alltt}"; + print $texfd "\\end{alltt}"; } sub start_verbinput{ @@ -1426,9 +1632,9 @@ sub start_verbinput{ &handle_html('
    ');
     
    -   open FD, $attrs{src} or die "Can't open '$attrs{src}' $!\n";
    +   open $fd, "<:encoding($encoding_file)", $attrs{src} or die "Can't open '$attrs{src}' $!\n";
     
    -   while ()
    +   while (<$fd>)
        {
           s/\&/\&/g;
           s/');
     
    -   print TEXFD "\\verbatiminput{$attrs{src}}";
    +   print $texfd "\\verbatiminput{$attrs{src}}";
     }
     
     sub end_verbinput{
    @@ -1459,9 +1665,9 @@ sub start_verbtabinput{
     
        &handle_html('
    ');
     
    -   open FD, $attrs{src} or die "Can't open '$attrs{src}' $!\n";
    +   open $fd, $attrs{src} or die "Can't open '$attrs{src}' $!\n";
     
    -   while ()
    +   while (<$fd>)
        {
           s/\&/\&/g;
           s/');
     
    -   print TEXFD "\\verbatimtabinput{$attrs{src}}";
    +   print $texfd "\\verbatimtabinput{$attrs{src}}";
     }
     
     sub end_verbtabinput{
    @@ -1517,7 +1723,7 @@ sub start_float{
     
        push @float_elements, \%attrs;
     
    -   &handle_html("
    "); + &handle_html("
    "); $tags{$attrs{tag}}->{Ref} = $nodes[$#nodes]->{Tag} .'.html#'.$attrs{tag}; @@ -1526,19 +1732,20 @@ sub start_float{ unless ($attrs{type} eq 'figure') { - &handle_html('

    ' . $tags{$attrs{tag}}->{Text} . ': ' - . $attrs{caption} . '

    '); + &handle_html('

    ' + . $tags{$attrs{tag}}->{Text} . ': ' + . $attrs{caption} . '
    '); } - print TEXFD "\\begin{", $attrs{type}, "}$pos\n"; - print TEXFD "\\floatconts{", $attrs{tag}, "}{\\caption"; + print $texfd "\\begin{", $attrs{type}, "}$pos\n"; + print $texfd "\\floatconts{", $attrs{tag}, "}{\\caption"; if ($attrs{listcaption}) { - print TEXFD "[", $attrs{listcaption}, "]"; + print $texfd "[", $attrs{listcaption}, "]"; } - print TEXFD "{", $attrs{caption}, "}}{"; + print $texfd "{", $attrs{caption}, "}}{"; } sub end_float{ @@ -1548,13 +1755,13 @@ sub end_float{ if ($attrs->{type} eq 'figure') { - &handle_html('

    '. $tags{$attrs->{tag}}->{Text} . ': ' - . $attrs->{caption} . '

    '); + &handle_html('
    '. $tags{$attrs->{tag}}->{Text} . ': ' + . $attrs->{caption} . '

    '); } &handle_html('
    '); - print TEXFD "}%\n\\end{", $attrs->{type}, "}\n"; + print $texfd "}%\n\\end{", $attrs->{type}, "}\n"; } sub start_nbsp{ @@ -1562,7 +1769,7 @@ sub start_nbsp{ &handle_html(' '); - print TEXFD "~"; + print $texfd "~"; } sub end_nbsp{ @@ -1574,7 +1781,7 @@ sub start_emdash{ &handle_html('—'); - print TEXFD "---"; + print $texfd "---"; } sub end_emdash{ @@ -1586,7 +1793,7 @@ sub start_hash{ &handle_html('#'); - print TEXFD "\\texttt{\\#}"; + print $texfd "\\texttt{\\#}"; } sub end_hash{ @@ -1598,7 +1805,7 @@ sub start_tilde{ &handle_html('~'); - print TEXFD "\\textasciitilde "; + print $texfd "\\textasciitilde "; } sub end_tilde{ @@ -1610,7 +1817,7 @@ sub start_lt{ &handle_html('<'); - print TEXFD "\\textless "; + print $texfd "\\textless "; } sub end_lt{ @@ -1622,7 +1829,7 @@ sub start_gt{ &handle_html('>'); - print TEXFD "\\textgreater "; + print $texfd "\\textgreater "; } sub end_gt{ @@ -1634,7 +1841,7 @@ sub start_element{ &handle_html('<'); - print TEXFD "\\element{"; + print $texfd "\\element{"; } sub end_element{ @@ -1642,7 +1849,7 @@ sub end_element{ &handle_html('>'); - print TEXFD "}"; + print $texfd "}"; } sub start_image{ @@ -1709,7 +1916,7 @@ sub start_image{ &handle_html($html); - print TEXFD "\\includegraphics[", + print $texfd "\\includegraphics[", join(',', @opts), "]{$imgfile}"; } @@ -1722,7 +1929,7 @@ sub start_LaTeX{ &handle_html('LaTeX'); - print TEXFD "\\LaTeX{}"; + print $texfd "\\LaTeX{}"; } sub end_LaTeX{ @@ -1734,7 +1941,7 @@ sub start_TeX{ &handle_html('TeX'); - print TEXFD "\\TeX{}"; + print $texfd "\\TeX{}"; } sub end_TeX{ @@ -1744,7 +1951,7 @@ sub end_TeX{ sub start_relax{ my ($expat, %attrs) = @_; - print TEXFD "\\relax "; + print $texfd "\\relax "; } sub end_relax{ @@ -1760,7 +1967,7 @@ sub start_app{ &handle_html("$text"); - print TEXFD "\\appfmt{$text}"; + print $texfd "\\appfmt{$text}"; } sub end_app{ @@ -1780,7 +1987,7 @@ sub start_dict{ &handle_html($text); - print TEXFD $text; + print $texfd $text; } sub end_dict{ @@ -1802,7 +2009,7 @@ sub start_button{ &handle_html("$text"); - print TEXFD "\\button{$text}"; + print $texfd "\\button{$text}"; } sub end_button{ @@ -1829,7 +2036,7 @@ sub start_menu{ if ($currentlabel) { $currentlabel .= ".$item"; - print TEXFD "\\mto "; + print $texfd "\\mto "; $index .= '!'; $html .= '➜'; } @@ -1842,7 +2049,7 @@ sub start_menu{ $html .= $text; - print TEXFD "\\menu{$text}"; + print $texfd "\\menu{$text}"; my $termtag = 'menu_'.$currentlabel; @@ -1863,7 +2070,7 @@ sub start_menu{ &handle_html("$html"); - print TEXFD "\\index{$index}"; + print $texfd "\\index{$index}"; } sub end_menu{ @@ -1903,7 +2110,7 @@ sub start_acr{ &hs_index_term('acr_'.$attrs{tag}, $html, ucfirst($html), \%terms); } - print TEXFD "\\gls{", $attrs{tag}, "}"; + print $texfd "\\gls{", $attrs{tag}, "}"; } sub end_acr{ @@ -1944,13 +2151,13 @@ sub start_term{ { if ($attrs{hyper} and $attrs{hyper} eq 'false') { - print TEXFD "\\gls*{", $attrs{tag}, "}"; + print $texfd "\\gls*{", $attrs{tag}, "}"; } else { $html = &hs_popup("gls_".$attrs{tag}.".html", $html); - print TEXFD "\\gls{", $attrs{tag}, "}"; + print $texfd "\\gls{", $attrs{tag}, "}"; } } else @@ -1966,7 +2173,7 @@ sub start_term{ $idx = "$idx\@\\html$fmt\{$idx\}"; } - print TEXFD "$text\\index{$idx}"; + print $texfd "$text\\index{$idx}"; } &hs_index_term($hstag, $html, $terms{$hstag}->{Text}, @@ -1991,11 +2198,11 @@ sub start_ref{ if ($attrs{text}) { - print TEXFD "\\hyperref[$attrs{tag}]{$attrs{text}}"; + print $texfd "\\hyperref[$attrs{tag}]{$attrs{text}}"; } else { - print TEXFD "\\autoref{", $attrs{tag}, "}"; + print $texfd "\\autoref{", $attrs{tag}, "}"; } } @@ -2023,10 +2230,10 @@ sub start_opt{ $terms{options}->{Children} = \%hash; } - &hs_index_term('opt_'.$attrs{tag}, "$text", $text, + &hs_index_term('opt_'.$attrs{tag}, "$text", $text, $terms{options}->{Children}); - print TEXFD "\\opt{", $attrs{tag}, "}"; + print $texfd "\\opt{", $attrs{tag}, "}"; } sub end_opt{ @@ -2038,7 +2245,7 @@ sub start_backslash{ &handle_html("\\"); - print TEXFD "\\texttt{\\char`\\\\}"; + print $texfd "\\texttt{\\char`\\\\}"; } sub end_backslash{ @@ -2050,7 +2257,7 @@ sub start_doublebackslash{ &handle_html("\\\\"); - print TEXFD "\\cs{\\char`\\\\}"; + print $texfd "\\cs{\\char`\\\\}"; } sub end_doublebackslash{ @@ -2068,9 +2275,9 @@ sub start_cs{ my $text = "\\".$attrs{tag}; - print TEXFD '\\cs{', $attrs{tag}, '}'; + print $texfd '\\cs{', $attrs{tag}, '}'; - &hs_index_term('cs_'.$attrs{tag}, "$text", $text, \%terms); + &hs_index_term('cs_'.$attrs{tag}, "$text", $text, \%terms); } @@ -2089,7 +2296,7 @@ sub start_env{ my $text = $attrs{tag}; - print TEXFD '\\env{', $attrs{tag}, '}'; + print $texfd '\\env{', $attrs{tag}, '}'; &hs_index_term('env_'.$attrs{tag}, "$text", $text, \%terms); @@ -2110,7 +2317,7 @@ sub start_tabular{ &handle_html(''); - print TEXFD "\\begin{tabular}{", $attrs{spec}, '}'; + print $texfd "\\begin{tabular}{", $attrs{spec}, '}'; my %hash = ( @@ -2128,7 +2335,7 @@ sub end_tabular{ pop @tabular_specs; - print TEXFD "\\end{tabular}"; + print $texfd "\\end{tabular}"; } sub start_tr{ @@ -2144,7 +2351,7 @@ sub end_tr{ &handle_html(''); - print TEXFD "\\tabularnewline "; + print $texfd "\\tabularnewline "; } sub start_td{ @@ -2190,7 +2397,7 @@ sub start_td{ unless ($tabular_specs[$#tabular_specs]->{column} == 1) { - print TEXFD "&"; + print $texfd "&"; } if (($orgcolspec eq $colspec) and $colspan == 1) @@ -2199,7 +2406,7 @@ sub start_td{ } else { - print TEXFD "\\multicolumn{$colspan}{$colspec}{"; + print $texfd "\\multicolumn{$colspan}{$colspec}{"; $tabular_specs[$#tabular_specs]->{egroup} = '}'; } @@ -2211,13 +2418,13 @@ sub end_td{ &handle_html(''); - print TEXFD $tabular_specs[$#tabular_specs]->{egroup}; + print $texfd $tabular_specs[$#tabular_specs]->{egroup}; } sub start_printglossary{ my ($expat, %attrs) = @_; - print TEXFD "\\printglossary"; + print $texfd "\\printglossary"; } sub end_printglossary{ @@ -2227,7 +2434,7 @@ sub end_printglossary{ sub start_printacronyms{ my ($expat, %attrs) = @_; - print TEXFD "\\printglossary[type=acronym]"; + print $texfd "\\printglossary[type=acronym]"; } sub end_printacronyms{ @@ -2237,7 +2444,7 @@ sub end_printacronyms{ sub start_printindex{ my ($expat, %attrs) = @_; - print TEXFD "\\printindex "; + print $texfd "\\printindex "; } sub end_printindex{ @@ -2249,7 +2456,7 @@ sub start_br{ &handle_html("
    "); - print TEXFD "\\\\"; + print $texfd "\\\\"; } sub end_br{ @@ -2261,7 +2468,7 @@ sub start_hr{ &handle_html("
    "); - print TEXFD "\\hrulefill "; + print $texfd "\\hrulefill "; } sub end_hr{ @@ -2271,7 +2478,7 @@ sub end_hr{ sub start_cont{ my ($expat, %attrs) = @_; - print TEXFD "\\continueline "; + print $texfd "\\continueline "; } sub end_cont{ @@ -2281,7 +2488,7 @@ sub end_cont{ sub start_contexplan{ my ($expat, %attrs) = @_; - print TEXFD &get_label('manual.cont_explanation'); + print $texfd &get_label('manual.cont_explanation'); } @@ -2293,13 +2500,16 @@ sub start_percent{ my ($expat, %attrs) = @_; &handle_html("%"); - print TEXFD "\\%"; + print $texfd "\\%"; } sub end_percent{ my ($expat) = @_; } +# Java JEditorPane (used by the helpset) only has very limited HTML +# support. + sub html_head{ my ($title, $prev, $next) = @_; @@ -2307,8 +2517,8 @@ sub html_head{ - +$title @@ -2407,6 +2626,228 @@ sub html_nav{ "$nav
    " } +# This is for actual HTML files for the Dickimaw site so not +# restricted by the JEditorPane limitations +sub html_www_head{ + my ($title, $prev, $next) = @_; + + my $nextlink = ''; + my $prevlink = ''; + + if ($next) + { + $nextlink = ""; + } + + if ($prev) + { + $prevlink = ""; + } + + $title=~s/ / /g; + + return <<_END_HTML_HEAD; + + + + + + + $title + $nextlink + $prevlink + + + + + +
    +_END_HTML_HEAD +} + +sub html_www_nav{ + my ($prevNode, $nextNode) = @_; + + my $nav = '
    " +} + +sub html_www_foot{ + my $nav = &html_www_nav(@_); + + my $year = ''; + + if ($dict{appdate}=~m/^(\d{4})/) + { + $year = $1; + } + + return <<_END_HTML_FOOT; +$nav +
    + + + + +_END_HTML_FOOT +} + +sub write_www_glossary{ + my ($nextnode) = @_; + + my $title = &get_label('manual.glossary'); + + my $fd; + + open $fd, ">:encoding($encoding_xml)", "$wwwpath/glossary.shtml" + or die "Can't open '$wwwpath/glossary.shtml' $!\n"; + + print "Writing '$wwwpath/glossary.shtml'\n"; + + print $fd &html_www_head($title, 'index', $nextnode->{Tag}); + + print $fd "

    $title

    \n"; + + &write_www_terms($fd, \%terms, \%acros); + + print $fd &html_www_foot('index', $nextnode); + + close $fd; +} + +sub write_www_terms{ + my ($fd, $terms, $acros) = @_; + + my %hash = (); + + foreach my $tag ( keys %$terms ) + { + if ($tag=~/^gls_/) + { + $hash{$tag} = (); + + $hash{$tag}{Text} = $terms->{$tag}->{Text}; + $hash{$tag}{Description} = $terms->{$tag}->{Description}; + } + } + + foreach my $tag ( keys %$acros ) + { + $hash{$tag} = (); + + $hash{$tag}{Text} = $acros->{$tag}->{Short}; + $hash{$tag}{Description} = $acros->{$tag}->{Long}; + } + + my @tags = keys %hash; + + if ($#tags == -1) + { + return; + } + + my @sorted_tags = sort {lc($hash{$a}{Text}) cmp lc($hash{$b}{Text})} @tags; + + print $fd "
    "; + + foreach my $tag ( @sorted_tags ) + { + print $fd "
    $hash{$tag}{Text}
    \n", "
    "; + + print $fd $hash{$tag}{Description}; + + print $fd "
    \n"; + } + + print $fd "
    "; + +} + sub arg_placeholder{ ""; } diff --git a/support/makeglossariesgui/src/doc/makeglossariesgui-en.xml b/support/makeglossariesgui/src/doc/makeglossariesgui-en.xml index 81816d94a4..c0b3347001 100644 --- a/support/makeglossariesgui/src/doc/makeglossariesgui-en.xml +++ b/support/makeglossariesgui/src/doc/makeglossariesgui-en.xml @@ -87,14 +87,14 @@ Command line invocation:

    - makeglossariesgui [options] [filename] + makeglossariesgui [options] [filename]

    The filename must be supplied when run in batch mode - (the .aux extension may be omitted), but + (the .aux extension may be omitted), but is optional in mode. The filename should be the auxiliary file produced by the run, but may also be - the .tex or .log file if it has the same basename as + the .tex or .log file if it has the same basename as the auxiliary file and is located in the same directory. Unlike and , filename may include the directory path. @@ -102,7 +102,7 @@

    Available options:

    -
    (or -b)
    +
    (or -b)
    Invoke in batch mode (filename must be supplied). Note that the extra checks that parse the log file aren't performed @@ -115,15 +115,15 @@
    Suppress (non-error) messages that would otherwise have been written to STDOUT.
    -
    (or -n)
    +
    (or -n)
    Dry run mode (don't run the indexing application).
    Not dry run mode (default).
    Print debug messages to STDOUT.
    -
    (or -v)
    +
    (or -v)
    Print the version details to STDOUT and exit.
    -
    (or -h)
    +
    (or -h)
    Print a brief summary of available options to STDOUT and exit.

    @@ -141,17 +141,17 @@ (see ) or in the using the menu item. You can also use the load file button on the toolbar or (if permitted by your operating system) drag and drop - the file onto the main window. The input file should be the .aux + the file onto the main window. The input file should be the .aux file created by , but if you try to load the main document - .tex file or the .log transcript file, - will assume you meant the associated .aux file. - (If you have used 's -jobname or -output-directory - options, then you won't be able to use the .tex file and will have - to use either the .aux or .log file.) + .tex file or the .log transcript file, + will assume you meant the associated .aux file. + (If you have used 's -jobname or -output-directory + options, then you won't be able to use the .tex file and will have + to use either the .aux or .log file.)

    - Suppose you have the following document (called, say, basic-sample.tex): + Suppose you have the following document (called, say, basic-sample.tex):

     \documentclass{article}
    @@ -172,23 +172,23 @@ A \gls{sample} document.
        

    First run the usual way. This should create the auxiliary file - basic-sample.aux as well as some other files including - basic-sample.glo and basic-sample.ist. Now load the auxiliary file - (basic-sample.aux) into . (Since the main .tex file - has the same basename as the .aux file, you can also use that, as + basic-sample.aux as well as some other files including + basic-sample.glo and basic-sample.ist. Now load the auxiliary file + (basic-sample.aux) into . (Since the main .tex file + has the same basename as the .aux file, you can also use that, as mentioned above.)

    - Once has successfully loaded the .aux file, it will run - on the associated .glo file (with the - .ist file as the style). + Once has successfully loaded the .aux file, it will run + on the associated .glo file (with the + .ist file as the style). In this case, there are no problems with the document and the - .tex file is now ready for another run. The general + .tex file is now ready for another run. The general information panel () shows a summary of the document glossaries. In this case, there's only one glossary (the - main one). If you edit the document source code (.tex file) + main one). If you edit the document source code (.tex file) you can use the

    menu item to reload the updated - .aux file in . + .aux file in .

    - In this example, only one entry has been indexed in the main glossary. You + In this example, only one entry has been indexed in the main glossary. You can find out more information by clicking on the Details link, which will open the window shown in .

    @@ -241,8 +241,8 @@ A \gls{sample} document. in your document. Remember that the commands described in section9 (Using Glossary Terms Without Links) of the glossaries manual don't index the terms. These essentially are all the commands in the - form glsentryfield or - glossentrynamefield, such as + form glsentryfield or + glossentrynamefield, such as , , or , and their case-changing variants. Also and @@ -250,12 +250,12 @@ A \gls{sample} document.

    If you're using the glossaries-extra package, remember that - the noindex option will suppress indexing. + the noindex option will suppress indexing.

    Now let's consider the following document (called, say, - missing-sort.tex): + missing-sort.tex):

     \documentclass{article}
    @@ -282,20 +282,20 @@ Test: \gls{S}, $\gls{alpha}$, $\gls{beta}$.
     \end{document}
        

    - As before, run as usual on this document. Since the xindy - package option has been used, this will create a .xdy file - instead of a .ist file and the .glo + As before, run as usual on this document. Since the xindy + package option has been used, this will create a .xdy file + instead of a .ist file and the .glo file is now in 's format. There are, however, problems with this document. The glossaries manual advises using the - sort key for entries that contain special characters or commands + sort key for entries that contain special characters or commands in the entry's name. This document hasn't followed that advice, and - xindy will complain. The S entry just causes a warning: + xindy will complain. The S entry just causes a warning:

    Would replace complete index key with empty string, ignoring

    - and the S entry is ignored. The alpha and beta + and the S entry is ignored. The alpha and beta entries cause an error:

    @@ -303,7 +303,7 @@ index 0 should be less than the length of the string

    Again the entries are ignored, but the message is fairly cryptic. - If we load the auxiliary file (missing-sort.aux) into + If we load the auxiliary file (missing-sort.aux) into , these problems are detected, and the following error message is displayed:

    @@ -316,7 +316,7 @@ Xindy failed with exit code 1.

    My first step, as usual, is to run on this document, which will - create the .aux file. Now if I try loading this file into + create the .aux file. Now if I try loading this file into I get the error message:

    @@ -466,11 +466,11 @@ A sample document. The diagnostics panel shows the following message:

    -There were no entries listed for the main glossary. Remember that you +There were no entries listed for the main glossary. Remember that you must index entries for them to appear in the glossary using the commands provided by the glossaries package. Entries that have been defined but not indexed won't be listed. If you don't want to use this glossary, -add the nomain package option to your document. Check the following: +add the nomain package option to your document. Check the following:
    • Have you used commands like or in the document? (If you haven't, you need to add them.)
    • @@ -481,8 +481,8 @@ in the preamble, have you remembered to put them after

    - (The sentence referencing nomain only appears if there are - no entries for the main glossary, but not for any other glossaries.) + (The sentence referencing nomain only appears if there are + no entries for the main glossary, but not for any other glossaries.)

    @@ -491,7 +491,7 @@ in the preamble, have you remembered to put them after

    - Consider the following document: + Consider the following document:

     \documentclass{article}
     
    @@ -509,9 +509,8 @@ A \gls{sample} document.
     
     \end{document}
     
    -

    - If I load the .aux file for this document into , I get + If I load the .aux file for this document into , I get the following message in the diagnostics panel:

    @@ -547,14 +546,14 @@ A \gls{sample} document.

    Package glossaries Warning: Empty glossary for -[type=acronym] Rerun may be +[type=acronym] Rerun may be required (or you may have forgotten to use commands like ) on input line 13.

    It looks as though you might have done something like -[type=acronym], but there's no -acronym glossary. +[type=acronym], but there's no +acronym glossary.

    @@ -564,7 +563,7 @@ It looks as though you might have done something like

    Note that also looks for warnings from the glossaries package, so if you are encountering any problems, make sure you - haven't suppressed the warnings with the nowarn package option. + haven't suppressed the warnings with the nowarn package option.

    @@ -604,7 +603,7 @@ if you don't want any glossaries.) This document will not have a glossary.

    Sometimes things can go so badly wrong that doesn't even - generate an auxiliary file. In this case you can load the .log + generate an auxiliary file. In this case you can load the .log file instead. (You'll need to change the file selector filter to show all files.) will parse the log file to see if it recognises any of the error messages. Some error messages can be quite @@ -660,20 +659,20 @@ It's possible that there's an expansion issue involving a fragile command. Things to check for:

      -
    • Have you used a class like beamer that doesn't make common +
    • Have you used a class like beamer that doesn't make common formatting commands like robust?
    • Have you tried using in front of fragile commands contained within your entry definitions?
    • Have you tried switching off the expansion using commands like ? (See section 4.6 Expansion in the -glossaries user manual.)
    • +glossaries user manual.)

    The problem here is that a fragile command has been used in the entry definition. The problematic command in this example is , which is normally robust, but it happens to be - fragile with the beamer class. The solution is to either + fragile with the beamer class. The solution is to either protect the problematic command with or use before you define the entries. For example: @@ -733,7 +732,7 @@ contained within your entry definitions?

  • value starts with an extended character. This doesn't work as treats the UTF-8 letter as two separate characters form from the two octets. This not only affects the - sorting but also causes a problem for the indexgroup + sorting but also causes a problem for the indexgroup style.

    will try to determine the language and input encoding from the - .aux file to pass to , but you can override + .aux file to pass to , but you can override this if you want to. Make sure that the