| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/local/bin/perl -w -s
our ($c);
use locale;
use strict;
use Biblio::Thesaurus;
my $the = shift;
my $dest = shift || "thesaurus";
my $obj = thesaurusLoad($the);
my $tit = $obj->{title} || $dest;
my $aut = $obj->{author} || "";
my $desc = $obj->{desc} || "";
open(F,">$dest.tex") or die;
binmode(F, ":utf8");
print F qq{
\\documentclass[twoside,portuges]{book}
\\RequirePackage[a4paper,top=3cm,left=2cm,right=2cm,bottom=1.5cm,nofoot]{geometry}
\\parindent 0pt
%\\parskip 3pt
\\usepackage{babel}
%\\usepackage[latin1]{inputenc}
\\usepackage[utf8]{inputenc}
\\usepackage{t1enc}
\\usepackage{aeguill}
\\usepackage{dict}
\\begin{document}
\\title{$tit}
\\author{$aut}
\\date{\\today}
\\maketitle
$desc
\\newpage
\\twocolumn
};
print F $obj->toTex({},{
## -default => sub { "\n$rel \t".join("\n\t",@terms)},
-eachTerm => sub {
$term = n($term);
$_ = n($_);
if(/\w/){"\n\\term{$term}{
\\begin{description}
$_
\\end{description}}\n"} else {"\n\\term{$term}{}\n"}},
-end => sub { "\\begin{dictionary}\n$_\n\\end{dictionary}\n"},
## -order => ["BT","NT","RT"],
});
print F q{
\end{document}
};
close(F);
sub n{ my $a = shift;
$a =~ s/^([#_])/\\$1/g;
$a =~ s/^([\^])/*$1/g;
$a =~ s/([^\\])([#_])/$1\\$2/g;
$a =~ s/([^\\])([\^])/$1*/g;
$a;
}
__END__
=head1 NAME
thesaurus2tex - ISO-Thesaurus completion and LaTeX translator
=head1 SYNOPSIS
thesaurus2tex file.the > file.tex
-c to include separators when first letters change (NOT YET)
pdflatex file
dicttex file
pdflatex file ## to make file.pdf
=head1 DESCRIPTION
=head2 EXPORT
=head1 AUTHOR
J.Joao Almeida, jj@di.uminho.pt
=head1 SEE ALSO
dicttex (http://natura.di.uminho.pt)
perl(1).
=cut