Front page | perl.perl5.porters |
Postings from April 2000
[ID 20000418.006] pod2latex does not correctly generate latexfiles (patch included)
From:
'David Scott Urban
Date:
April 18, 2000 09:58
Subject:
[ID 20000418.006] pod2latex does not correctly generate latexfiles (patch included)
Message ID:
200004181657.KAA01862@spica.ast.lmco.com
Pod2latex does not correctly generate latex files.
Below is a change log entry and a patch that allows pod2latex to correctly
generate latex files from pod pages.
D. S. Urban
email : urban@ast.lmco.com
-------------------------------------------------------------------------------
To be the person, you must know the person. To know the person, you must
understand the person. To understand the person, you must listen. To listen,
you must open your mind and put aside all preconceived ideas and notions.
-------------------------------------------------------------------------------
All opinions expressed are my own not that of my employer
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=hpux, osvers=10.20, archname=PA-RISC1.1
uname='hp-ux spica b.10.20 a 9000735 2008140532 two-user license '
config_args='-Dcc=gcc -Dprefix=/home/urban/local/hp'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='gcc', optimize='-O0', gccversion=2.96 20000103 (experimental)
cppflags='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-fno-strict-aliasing'
ccflags ='-D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN
-fno-strict-aliasing'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld', ldflags ='-L/usr/local/lib -L/home/urban/local/hp/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib /home/urban/local/hp/lib
libs=-lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt -lsec
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred '
cccdlflags='-fpic', lddlflags='-b -L/usr/local/lib
-L/home/urban/local/hp/lib'
Characteristics of this binary (from libperl):
Compile-time options:
Built under hpux
Compiled at Apr 17 2000 15:02:34
@INC:
/home/urban/local/hp/lib/perl5/5.6.0/PA-RISC1.1
/home/urban/local/hp/lib/perl5/5.6.0
/home/urban/local/hp/lib/perl5/site_perl/5.6.0/PA-RISC1.1
/home/urban/local/hp/lib/perl5/site_perl/5.6.0
/home/urban/local/hp/lib/perl5/site_perl/5.005/PA-RISC1.1
/home/urban/local/hp/lib/perl5/site_perl/5.005
/home/urban/local/hp/lib/perl5/site_perl
.
-------------------------- Change Log entry ------------------------------------
2000-04-17 D. Scott Urban <urban@ast.lmco.com>
* pod2latex.PL: Added commands and uncommented lines to allow pod2latex to
generate a correct latex file.
Index pod2latex.PL
================================================================================
diff -c -3 -p pod2latex.PL.old pod2latex.PL
*** pod2latex.PL.old Tue Apr 18 09:10:48 2000
--- pod2latex.PL Tue Apr 18 09:22:08 2000
*************** while (<POD>) {
*** 505,510 ****
--- 505,511 ----
}
print LATEX "\n";
+ print LATEX "\\end{document}\n";
close(POD);
close(LATEX);
*************** close(LATEX);
*** 512,524 ****
#########################################################################
sub do_hdr {
print LATEX "% LaTeX document produced by pod2latex from \"$pod.pod\".\n";
print LATEX "% The followings need be defined in the preamble of this
document:\n";
! print LATEX "%\\def\\C++{{\\rm
C\\kern-.05em\\raise.3ex\\hbox{\\footnotesize ++}}}\n";
! print LATEX "%\\def\\underscore{\\leavevmode\\kern.04em\\vbox{\\hrule
width 0.4em height 0.3pt}}\n";
! print LATEX "%\\setlength{\\parindent}{0pt}\n";
print LATEX "\n";
$podq = &escape_tex_specials("\U$pod\E");
print LATEX "\\section{$podq}%\n";
print LATEX "\\index{$podq}";
print LATEX "\n";
--- 513,528 ----
#########################################################################
sub do_hdr {
+ print LATEX "\\documentclass{article}\n";
+ print LATEX "\\normalsize\n";
print LATEX "% LaTeX document produced by pod2latex from \"$pod.pod\".\n";
print LATEX "% The followings need be defined in the preamble of this
document:\n";
! print LATEX "\\def\\C++{{\\rm
C\\kern-.05em\\raise.3ex\\hbox{\\footnotesize ++}}}\n";
! print LATEX "\\def\\underscore{\\leavevmode\\kern.04em\\vbox{\\hrule width
0.4em height 0.3pt}}\n";
! print LATEX "\\setlength{\\parindent}{0pt}\n";
print LATEX "\n";
$podq = &escape_tex_specials("\U$pod\E");
+ print LATEX "\\begin{document}\n";
print LATEX "\\section{$podq}%\n";
print LATEX "\\index{$podq}";
print LATEX "\n";