summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/harvard
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-01-31 14:49:41 +0000
committerKarl Berry <karl@freefriends.org>2009-01-31 14:49:41 +0000
commit3b05d8fdd6f0ca1814c8cd3f265e084a2e2fbbf7 (patch)
tree6258b2aa0fbd8da14f92ac72112fc74aee077f67 /Master/texmf-dist/source/latex/harvard
parent402d869afd65161f84a8f412964fc98d606ac2d3 (diff)
harvard update (30jan09)
git-svn-id: svn://tug.org/texlive/trunk@12028 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/harvard')
-rw-r--r--Master/texmf-dist/source/latex/harvard/INSTALL19
-rw-r--r--Master/texmf-dist/source/latex/harvard/Makefile19
-rw-r--r--Master/texmf-dist/source/latex/harvard/README42
-rw-r--r--Master/texmf-dist/source/latex/harvard/doc_Makefile19
-rw-r--r--Master/texmf-dist/source/latex/harvard/harvard.perl786
5 files changed, 36 insertions, 849 deletions
diff --git a/Master/texmf-dist/source/latex/harvard/INSTALL b/Master/texmf-dist/source/latex/harvard/INSTALL
deleted file mode 100644
index 855d1be88d7..00000000000
--- a/Master/texmf-dist/source/latex/harvard/INSTALL
+++ /dev/null
@@ -1,19 +0,0 @@
-# harvard family of bibliographic styles
-# Copyright 1994 - Peter Williams peterw@archsci.arch.su.edu.au
-
-1. edit 'Makefile' setting 'bstdir', 'stydir', 'htmldir' and 'docdir' to values
- appropriate to your LaTeX installation
-
-2. type 'make install'
-
-3. make sure 'bstdir' is in the paths for BST input (probably environment
- variable BSTINPUTS on the latest web2c installation)
-
-4. make sure 'stydir' is in the paths for TeX input (probably environment
- variable TEXINPUTS on the latest web2c installation)
-
-5. type 'make install_doc' to install documentation
-
-6. cd to $docdir and type 'make' to create postscript version of documentation.
- If necessary edit 'Makefile' in $docdir to produce output other than
- postscript.
diff --git a/Master/texmf-dist/source/latex/harvard/Makefile b/Master/texmf-dist/source/latex/harvard/Makefile
index d24bdf4604f..eae8e4dad50 100644
--- a/Master/texmf-dist/source/latex/harvard/Makefile
+++ b/Master/texmf-dist/source/latex/harvard/Makefile
@@ -1,5 +1,22 @@
# harvard family of bibliographic styles
-# Copyright 1994 - Peter Williams peterw@archsci.arch.su.edu.au
+# Copyright 1994 - Peter Williams pwil3058@bigpond.net.au
+#
+# This work may be distributed and/or modified under the
+# conditions of the LaTeX Project Public License, either version 1.3
+# of this license or (at your option) any later version.
+# The latest version of this license is in
+# http://www.latex-project.org/lppl.txt
+# and version 1.3 or later is part of all distributions of LaTeX
+# version 2005/12/01 or later.
+#
+# This work has the LPPL maintenance status `maintained'.
+#
+# The Current Maintainers of this work are Peter Williams and Thorsten Schnier.
+#
+# This work consists of all files listed in manifest.txt.
+#
+# Licence notice added on behalf of Peter Williams and Thorsten Schnier
+# by Clea F. Rees 2009/01/30.
prefix=/opt/TeX
texlib=$(prefix)/lib/texmf
diff --git a/Master/texmf-dist/source/latex/harvard/README b/Master/texmf-dist/source/latex/harvard/README
deleted file mode 100644
index 38f0b96d1c0..00000000000
--- a/Master/texmf-dist/source/latex/harvard/README
+++ /dev/null
@@ -1,42 +0,0 @@
-# harvard family of bibliographic styles
-# Copyright 1994 - Peter Williams peterw@archsci.arch.su.edu.au
-
-This is version 2.0.5 of the harvard family of bibliographic styles.
-It is a bug fix of 2.0 which was a major rewrite to bring the sty file into
-line with the new latex described in ``The LaTeX Companion''. Due to the
-efforts of Thorsten Schnier (thorsten@archsci.arch.su.edu.au) it incorporates
-support for the LaTeX to html translator by Nikos Drakos
-(nikos@cbl.leeds.ac.uk).
-
-It includes a fixes by Berwin A. Turlach (berwin@alphasun.anu.edu.au) for
-problems with \AtBeginDocument introduced in the latest version of LaTeX2e
-and problems with the \nocite command.
-
-A new style apsr.bst (American Political Science Review) is enclosed
-courtesy of Nathaneil L. Beck (nbeck@weber.ucsd.edu)
-
-NB. The file harvard.sty makes considerable use of features in the new latex
-that were not present in latex version 2.09 and is, therefore, not compatible
-with that version. However, the *.bbl files produced by the various bst files
-should be still useable with latex version 2.09.
-
-The following files are enclosed.
-
- README - This file
- INSTALL - Installation instructions
- Makefile - Makefile for installation
- harvard.ps - Postscript version of the documentation
- harvard.tex - LaTeX source for the documentation
- harvard.bib - BibTeX database file for the documentation
- doc_Makefile - Makefile for documentation
- harvard.sty - LaTeX style file for harvard bibliographic style
- harvard.perl - LaTeX2html style file for harvard bibliographic style
- agsm.bst - harvard BibTeX style file to satisfy the requirements
- of the Australian Government Style Manual
- dcu.bst - harvard BibTeX style file to satisfy the requirements
- of the Design Computing Unit, Sydney University
- <other>.bst - various style files contributed by users
-
-Online documentation is available via the WWW at:
-
-HREF="http://www.arch.su.edu.au/~peterw/latex/harvard/"
diff --git a/Master/texmf-dist/source/latex/harvard/doc_Makefile b/Master/texmf-dist/source/latex/harvard/doc_Makefile
index e41a58dec12..bcf0e496bc1 100644
--- a/Master/texmf-dist/source/latex/harvard/doc_Makefile
+++ b/Master/texmf-dist/source/latex/harvard/doc_Makefile
@@ -1,5 +1,22 @@
# harvard family of bibliographic styles - documentation
-# Copyright - Peter Williams peterw@archsci.arch.su.edu.au
+# Copyright - Peter Williams pwil3058@bigpond.net.au
+#
+# This work may be distributed and/or modified under the
+# conditions of the LaTeX Project Public License, either version 1.3
+# of this license or (at your option) any later version.
+# The latest version of this license is in
+# http://www.latex-project.org/lppl.txt
+# and version 1.3 or later is part of all distributions of LaTeX
+# version 2005/12/01 or later.
+#
+# This work has the LPPL maintenance status `maintained'.
+#
+# The Current Maintainers of this work are Peter Williams and Thorsten Schnier.
+#
+# This work consists of all files listed in manifest.txt.
+#
+# Licence notice added on behalf of Peter Williams and Thorsten Schnier
+# by Clea F. Rees 2009/01/30.
all: harvard.ps
diff --git a/Master/texmf-dist/source/latex/harvard/harvard.perl b/Master/texmf-dist/source/latex/harvard/harvard.perl
deleted file mode 100644
index e4318614232..00000000000
--- a/Master/texmf-dist/source/latex/harvard/harvard.perl
+++ /dev/null
@@ -1,786 +0,0 @@
-# harvard.perl
-# Copyright 1994 - thorsten schnier (thorsten@arch.su.edu.au)
-# key center of design computing, university of sydney
-#
-# Change Log:
-# ===========
-#
-# 07-JUN-94 first attempt
-# 16-JUN-94 changes for harvard 2.0
-# (star and starstar commands)
-
-
-package main;
-
-$cite_mark = '<tex2html_cite_mark>';
-$citefull_mark = '<tex2html_citefull_mark>';
-$citeshort_mark = '<tex2html_citeshort_mark>';
-$citename_mark = '<tex2html_citename_mark>';
-$citenamefull_mark = '<tex2html_citenamefull_mark>';
-$citenameshort_mark = '<tex2html_citenameshort_mark>';
-$citekey_mark = '<tex2html_citekey_mark>';
-$citeyear_mark = '<tex2html_citeyear_mark>';
-
-$harvard_left = '(';
-$harvard_right = ')';
-$harvardyear_left = '(';
-$harvardyear_right = ')';
-$harvard_cite_separator = $harvard_agsm_cite_separator = ', ';
-$harvard_year_separator = $harvard_agsm_year_separator = " ";
-$harvard_agsm_and = '&amp;';
-$harvard_dcu_cite_separator = "; ";
-$harvard_dcu_year_separator = ", ";
-$harvard_dcu_and = 'and';
-$harvard_and = $harvard_agsm_and;
-$harvard_default = 1;
-$harvard_full = 0;
-
-# the citation commands
-# This just creates a link from a label (yet to be determined) to the
-# cite_key in the citation file.
-# use different markers, depending on the style of the citation used
-
-#changes to latex2html-version:
-#insert separating sign, use optional text argument, use brackets
-#according to cite-mode, and reverse order of cites (to correct order)
-
-
-
-sub do_cmd_cite {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first ? $harvard_left : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $cite_mark,
- $harvard_year_separator,
- '##', $cite_key, $citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join ('',
- $result,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-sub do_cmd_citestar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first ? $harvard_left : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $citefull_mark,
- $harvard_year_separator,
- '##', $cite_key, $citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join ('',
- $result,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-sub do_cmd_citestarstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first ? $harvard_left : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $citeshort_mark,
- $harvard_year_separator,
- '##', $cite_key, $citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join ('',
- $result,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-
-sub do_cmd_citeaffixed {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- s/$next_pair_pr_rx//o;
- local($comment) = $2;
- local ($first) = 1;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first? ($harvard_left, $comment, " ")
- : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $cite_mark,
- $harvard_year_separator,
- '##', $cite_key,$citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join('',
- $result,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-sub do_cmd_citeaffixedstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- s/$next_pair_pr_rx//o;
- local($comment) = $2;
- local ($first) = 1;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first? ($harvard_left, $comment, " ")
- : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $citefull_mark,
- $harvard_year_separator,
- '##', $cite_key,$citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join('',
- $result,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-sub do_cmd_citeaffixedstarstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- s/$next_pair_pr_rx//o;
- local($comment) = $2;
- local ($first) = 1;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- $result = join ('', $result,
- $first? ($harvard_left, $comment, " ")
- : $harvard_cite_separator,
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $citeshort_mark,
- $harvard_year_separator,
- '##', $cite_key,$citeyear_mark,
- "<\/A>");
- $first = 0;
- }
- join('',
- $result,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-
-#similar to cite
-#no multiple cites allowed !
-
-sub do_cmd_citeasnoun {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- join ('',
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$cite_mark,
- ' ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-sub do_cmd_citeasnounstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- join ('',
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citefull_mark,
- ' ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-sub do_cmd_citeasnounstarstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- join ('',
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citeshort_mark,
- ' ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text ? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-
-#same as citeasnoun, but add the possessive 's
-#no multiple cites allowed !
-
-sub do_cmd_possessivecite {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- join('', "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$cite_mark,
- '\'s ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-sub do_cmd_possessivecitestar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- join('', "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citefull_mark,
- '\'s ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-sub do_cmd_possessivecitestarstar {
- local($_) = @_;
- local($text, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- join('', "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citeshort_mark,
- '\'s ',
- $harvard_left,
- '##', $cite_key,$citeyear_mark,
- $text? ($harvard_agsm_cite_separator, $text):'',
- $harvard_right,
- "<\/A>",
- $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-#similar to citeasnoun, but only names
-#multiple arguments allowed, no link produced
-#no optional text argument
-
-sub do_cmd_citename {
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- $result = join('', $result,
- ($first? '': $harvard_cite_separator),
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key, $citename_mark,
- "</A>");
- $first = 0;
- }
- join ('', $result, $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-sub do_cmd_citenamestar {
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- $result = join('', $result,
- ($first? '' : $harvard_cite_separator),
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citenamefull_mark,
- "</A>");
- $first = 0;
- }
- join ('', $result, $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-sub do_cmd_citenamestarstar {
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- $result = join('', $result,
- ($first? '' : $harvard_cite_separator),
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citenameshort_mark,
- "</A>");
- $first = 0;
- }
- join ('', $result, $_);
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-#similar to cite, but only year
-#multiple arguments allowed, no link produced
-#no optional text argument
-
-sub do_cmd_citeyear {
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- $result = join ('', $result,
- ($first ? $harvard_left : $harvard_cite_separator),
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citeyear_mark,
- "</A>");
- $first = 0;
- }
- join('',$result, $harvard_right, $_); # closing bracket
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-# citeyear without brackets
-
-sub do_cmd_citeyearstar {
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- local ($first) = 1 ;
- local ($result);
- if ($cite_key) {
- foreach $cite_key (split(/,/,$cite_key)) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # The proper link $citefile#$cite_key will be substituted later
- $result = join ('', $result,
- ($first ? '' : $harvard_cite_separator),
- "<A HREF=#$cite_key>$citekey_mark",
- '##', $cite_key,$citeyear_mark,
- "</A>");
- $first = 0;
- }
- join('',$result, $_); # no brackets
- }
- else {warn "Cannot find citation argument\n";}
-}
-
-
-
-
-# the style commands
-
-sub do_cmd_citationstyle{
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- $2;
- switch: {
- if ($2 =~ /dcu/){
- $harvard_cite_separator = $harvard_dcu_cite_separator;
- $harvard_year_separator = $harvard_dcu_year_separator;
- $harvard_and = $harvard_dcu_and;
- last switch; }
- if ($2 =~ /agsm/) {
- $harvard_cite_separator = $harvard_agsm_cite_separator;
- $harvard_year_separator = $harvard_agsm_year_separator;
- $harvard_and = $harvard_agsm_and;
- last switch;}
- warn 'unknown citation style $2';}
- $_;
-}
-
-
-
-sub do_cmd_citationmode{
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- $2;
- switch: {
- if ($2 =~ /full/){
- $harvard_full = 1;
- $harvard_default = 0;
- last switch; }
- if ($2 =~ /abbr/) {
- $harvard_full = 0;
- $harvard_default = 0;
- last switch;}
- if ($2 =~ /default/) {
- $harvard_full = 0;
- $harvard_default = 1;
- last switch;}
- warn 'unknown citation mode $2';}
- $_;
-}
-
-
-sub do_cmd_harvardparenthesis{
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- switch: {
- if ($2 =~ /round/){
- $harvard_left = '\(';
- $harvard_right = '\)';
- $harvardyear_left = '\(';
- $harvardyear_right = '\)';
- last switch; }
- if ($2 =~ /curly/) {
- $harvard_left = '\{';
- $harvard_right = '\}';
- $harvardyear_left = '\{';
- $harvardyear_right = '\}';
- last switch;}
- if ($2 =~ /square/) {
- $harvard_left = '\[';
- $harvard_right = '\]';
- $harvardyear_left = '\[';
- $harvardyear_right = '\]';
- last switch;}
- if ($2 =~ /angle/) {
- $harvard_left = '&lt;';
- $harvard_right = '&gt;';
- $harvardyear_left = '&lt;';
- $harvardyear_right = '&gt;';
- last switch;}
- warn 'unknown paranthesis type $2';}
- $_
-}
-
-
-sub do_cmd_harvardyearparenthesis{
- local($_) = @_;
- s/$next_pair_pr_rx//o;
- switch: {
- if ($2 =~ /round/){
- $harvardyear_left = '\(';
- $harvardyear_right = '\)';
- last switch; }
- if ($2 =~ /curly/) {
- $harvardyear_left = '\{';
- $harvardyear_right = '\}';
- last switch;}
- if ($2 =~ /square/) {
- $harvardyear_left = '\[';
- $harvardyear_right = '\]';
- last switch;}
- if ($2 =~ /angle/) {
- $harvardyear_left = '&lt;';
- $harvardyear_right = '&gt;';
- last switch;}
- warn 'unknown year paranthesis type $_';}
- $_;
-}
-
-
-# harvard symbols
-
-sub do_cmd_harvardleft {
- join('',$harvard_left,@_[0]);
-}
-
-sub do_cmd_harvardright {
- join('',$harvard_right,@_[0]);
-}
-
-sub do_cmd_harvardyearleft {
- join('',$harvardyear_left,@_[0]);
-}
-
-sub do_cmd_harvardyearright {
- join('',$harvardyear_right,@_[0]);
-}
-
-sub do_cmd_harvardand {
- join('',$harvard_and,@_[0]);
-}
-
-
-
-# This command will only be encountered inside a thebibliography environment.
-# this should not occur in a file using harvard style
-# mainly unchanged, only a warning added
-
-sub do_cmd_bibitem {
- local($_) = @_;
- # The square brackets may contain the label to be printed
- warn "bibitem-command in harvard-style file\n Cannot extract all neccessary information for cites\n";
- local($label, $dummy) = &get_next_optional_argument;
- $label = ++$bibitem_counter unless $label; # Numerical labels
- s/$next_pair_pr_rx//o;
- $cite_key = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # Associate the cite_key with the printed label.
- # The printed label will be substituted back into the document later.
- $cite_info{$cite_key} = $label;
- # Create an anchor around the citation
- join('',"<DT><A NAME=\"$cite_key\"><B>$label</B></A><DD>", $_);
- }
- else {
- warn "Cannot find bibitem labels\n";}
-}
-
-# collect information from item and associate it with the
-# cite-key. Contrary to bibitem, the cite-key argument is not optional,
-# so no numeric cite-key has to be generated
-
-sub do_cmd_harvarditem {
- local($_) = @_;
- # The square brackets may contain the short citation
- local($abbr_cite, $dummy) = &get_next_optional_argument;
- s/$next_pair_pr_rx//o;
- local($full_cite)= $2;
- $abbr_cite= $full_cite unless $abbr_cite;
- s/$next_pair_pr_rx//o;
- local($cite_year) = $2;
- s/$next_pair_pr_rx//o;
- local($cite_key) = $2;
- if ($cite_key) {
- $cite_key =~ s/\W//g; # Remove non alphanumeric characters
- # Associate the citation-infos with the cite-key.
- # The infos will be substituted back into the document later,
- # depending on the citation used
- $cite_info_abbr {$cite_key} = $abbr_cite;
- $cite_info_full {$cite_key} = $full_cite;
- $cite_info_year {$cite_key} = $cite_year;
- $cite_info_first {$cite_key} = 1;
- # Create an anchor around the citation
- join('',"<DT><A NAME=\"$cite_key\">- </A><DD>", $_);
- }
- else {
- warn "Cannot find bibitem labels\n";}
-}
-
-
-##
-## to allow bibcard to produce URL links:
-## same as htmladdnormallink, but only one argument (both link and text)
-
-sub do_cmd_harvardurl{
- local($_) = @_;
- local($url);
- s/$next_pair_pr_rx/$url = $2; ''/eo;
- join('',do {qq/<B>URL:<\/B><A HREF="$url">$url<\/A>/;},$_);
-}
-
-
-
-# this onle has to be extended to search for citename_mark and
-# citeyear_mark as well
-# the appropriate entries should have been produced by do_cmd_harvarditem
-
-sub replace_cite_references {
- s/##(\w+)$cite_mark/&help_replace_cites(\1)/ge;
- s/##(\w+)$citefull_mark/&help_replace_fullcites(\1)/ge;
- s/##(\w+)$citeshort_mark/&help_replace_shortcites(\1)/ge;
- s/##(\w+)$citename_mark/&help_replace_name($1)/ge;
- s/##(\w+)$citenamefull_mark/$cite_info_full{\1}/g;
- s/##(\w+)$citenameshort_mark/$cite_info_short{\1}/g;
- s/##(\w+)$citeyear_mark/$cite_info_year{\1}/g;
- s/#(\w+)>$citekey_mark/$citefile#\1>/g;
- $_
-}
-
-
-#return full or abbreviated cite text
-sub help_replace_cites {
- local ($key)= @_[0];
- $cite_info_first{$key}= 0; # not the first time anymore
- if ($harvard_full || ($cite_info_first{$key} && $harvard_default)) {
- $cite_info_full{$key}; # full citation
- }
- else{
- $cite_info_abbr{$key}; # abbreviated citation
- }
-}
-
-sub help_replace_shortcites {
- local ($key)= @_[0];
- $cite_info_first{$key}= 0; # not the first time anymore
- $cite_info_abbr{$key}; # abbreviated citation
-}
-
-sub help_replace_fullcites {
- local ($key)= @_[0];
- $cite_info_first{$key}= 0; # not the first time anymore
- $cite_info_full{$key}; # full citation
-}
-
-sub help_replace_name {
- local ($key)= @_[0];
- if ($harvard_full || ($cite_info_first{$key} && $harvard_default)) {
- $cite_info_full{$key}; # full citation
- }
- else{
- $cite_info_abbr{$key}; # abbreviated citation
- }
-}
-
-
-#this one has to be changes as well, so that it finds all citemarks
-
-sub remove_general_markers {
- s/$lof_mark/<UL>$figure_captions<\/UL>/o;
- s/$lot_mark/<UL>$table_captions<\/UL>/o;
- s/$bbl_mark/$citations/o;
- &add_toc if (/$toc_mark/);
- &add_idx if (/$idx_mark/);
- &replace_cross_references if /$cross_ref_mark/;
- &replace_external_references if /$external_ref_mark/;
- &replace_cite_references; #just take the if out (not really neccessary)
-}
-
-
-1; # Not really necessary...
-
-
-
-# T.S.: added the starstar option
-# If a normalized command name exists, return it.
-sub normalize {
- local($cmd) = @_;
- local($ncmd);
- if ($ncmd = $normalize{$cmd}) {
- $ncmd}
- elsif ($cmd =~ s/[*]/star/g) {
- $cmd }
- elsif ($cmd =~ s/^@/tex/) {
- $cmd}
- else {$cmd}
-}
-
-
-# does not really belong to harvard.perl, but as a general improvement
-
-
-sub do_cmd_and {
- join('',"<p>", @_[0]); #make a paragraph brake of it
-}
-
-sub do_cmd_newline {
- join('',"<br>", @_[0]);
-}
-