#!/usr/bin/perl -s if($header){ print ' \documentclass[twoside,twocolumn]{book} \usepackage[portuges]{babel} \usepackage[isolatin]{inputenc} \usepackage{a5,dict} \begin{document} \title{Title to be edit} \author{author to be edit} \maketitle ' } print "\\begin{dictionary}\n"; $fl=""; while(<>){ chomp(); next if /^#/; s/[#%&]/\\$&/g; s/\[/ [\\emph{/; s/\]/}] /; if(/(.*) (.*)/){$k=$1; $inf=$2} else {$k=$_; $inf=""} if($k =~ /([a-zA-Záéíóúà])/ and uc($1) ne $fl ) { $fl = uc($1); print "\\bigletter{$fl}\n";} print "\\term{$k}{$inf}\n"; } print "\\end{dictionary}\n"; if($header){ print ' \end{document} ' } __END__ =head1 NAME tab2dic - Perl scrit to translate tab separated dictionaries to LaTeX =head1 SYNOPSIS tab2dic [-header] dict > dict.tex =head1 DESCRIPTION This command translates tab separated dictionaries to LaTeX. In the input, each line is a term definition. Each term is separated by e tab from the information. =head Use tad2dic -header dict > d.tex latex d dicttex d latex d dvips -o d.ps d =head1 AUTHOR J.Joao Almeida, jj@di.uminho.pt =head1 SEE ALSO perl(1). dicttex(1). latex(1). =cut