From 3b05d8fdd6f0ca1814c8cd3f265e084a2e2fbbf7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 31 Jan 2009 14:49:41 +0000 Subject: harvard update (30jan09) git-svn-id: svn://tug.org/texlive/trunk@12028 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/harvard/INSTALL | 37 ++ Master/texmf-dist/doc/latex/harvard/README | 59 ++ Master/texmf-dist/doc/latex/harvard/harvard.dvi | Bin 20176 -> 0 bytes Master/texmf-dist/doc/latex/harvard/harvard.pdf | Bin 0 -> 87073 bytes Master/texmf-dist/doc/latex/harvard/harvard.perl | 803 +++++++++++++++++++++++ Master/texmf-dist/doc/latex/harvard/harvard.tex | 20 +- Master/texmf-dist/doc/latex/harvard/manifest.txt | 19 + 7 files changed, 937 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/harvard/INSTALL create mode 100644 Master/texmf-dist/doc/latex/harvard/README delete mode 100644 Master/texmf-dist/doc/latex/harvard/harvard.dvi create mode 100644 Master/texmf-dist/doc/latex/harvard/harvard.pdf create mode 100644 Master/texmf-dist/doc/latex/harvard/harvard.perl create mode 100644 Master/texmf-dist/doc/latex/harvard/manifest.txt (limited to 'Master/texmf-dist/doc/latex/harvard') diff --git a/Master/texmf-dist/doc/latex/harvard/INSTALL b/Master/texmf-dist/doc/latex/harvard/INSTALL new file mode 100644 index 00000000000..53ebcd2b1d1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/harvard/INSTALL @@ -0,0 +1,37 @@ +# harvard family of bibliographic styles +# 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. + + +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/doc/latex/harvard/README b/Master/texmf-dist/doc/latex/harvard/README new file mode 100644 index 00000000000..b8253843840 --- /dev/null +++ b/Master/texmf-dist/doc/latex/harvard/README @@ -0,0 +1,59 @@ +# harvard family of bibliographic styles +# 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. + +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 + .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/doc/latex/harvard/harvard.dvi b/Master/texmf-dist/doc/latex/harvard/harvard.dvi deleted file mode 100644 index c51200992fd..00000000000 Binary files a/Master/texmf-dist/doc/latex/harvard/harvard.dvi and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/harvard/harvard.pdf b/Master/texmf-dist/doc/latex/harvard/harvard.pdf new file mode 100644 index 00000000000..e0fc4e833f9 Binary files /dev/null and b/Master/texmf-dist/doc/latex/harvard/harvard.pdf differ diff --git a/Master/texmf-dist/doc/latex/harvard/harvard.perl b/Master/texmf-dist/doc/latex/harvard/harvard.perl new file mode 100644 index 00000000000..db4a2e96e59 --- /dev/null +++ b/Master/texmf-dist/doc/latex/harvard/harvard.perl @@ -0,0 +1,803 @@ +# harvard.perl +# Copyright 1994 - thorsten schnier (thorsten@arch.su.edu.au) +# key center of design computing, university of sydney +# +# 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. +# +# Change Log: +# =========== +# +# 07-JUN-94 first attempt +# 16-JUN-94 changes for harvard 2.0 +# (star and starstar commands) + + +package main; + +$cite_mark = ''; +$citefull_mark = ''; +$citeshort_mark = ''; +$citename_mark = ''; +$citenamefull_mark = ''; +$citenameshort_mark = ''; +$citekey_mark = ''; +$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 = '&'; +$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, + "$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, + "$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, + "$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, + "$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, + "$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, + "$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 ('', + "$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 ('', + "$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 ('', + "$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('', "$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('', "$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('', "$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), + "$citekey_mark", + '##', $cite_key, $citename_mark, + ""); + $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), + "$citekey_mark", + '##', $cite_key,$citenamefull_mark, + ""); + $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), + "$citekey_mark", + '##', $cite_key,$citenameshort_mark, + ""); + $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), + "$citekey_mark", + '##', $cite_key,$citeyear_mark, + ""); + $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), + "$citekey_mark", + '##', $cite_key,$citeyear_mark, + ""); + $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 = '<'; + $harvard_right = '>'; + $harvardyear_left = '<'; + $harvardyear_right = '>'; + 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 = '<'; + $harvardyear_right = '>'; + 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('',"
$label
", $_); + } + 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('',"
-
", $_); + } + 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/URL:<\/B>$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/
    $figure_captions<\/UL>/o; + s/$lot_mark/
      $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('',"

      ", @_[0]); #make a paragraph brake of it +} + +sub do_cmd_newline { + join('',"
      ", @_[0]); +} + diff --git a/Master/texmf-dist/doc/latex/harvard/harvard.tex b/Master/texmf-dist/doc/latex/harvard/harvard.tex index 6d21f3007b9..a4c0a04d4dd 100644 --- a/Master/texmf-dist/doc/latex/harvard/harvard.tex +++ b/Master/texmf-dist/doc/latex/harvard/harvard.tex @@ -1,3 +1,21 @@ +% Copyright 1994 Peter Williams. +% +% 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 and copyright notice added on behalf of Peter Williams and Thorsten Schnier +% by Clea F. Rees 2009/01/30. \begin{filecontents}{bibtexlogo.sty} \def\lowBibTeX{{\reset@font\rmfamily B\kern-.05em% \raise.0ex\hbox{\scshape i\kern-.025em b}\kern-.08em% @@ -15,7 +33,7 @@ \newcommand{\Harvard}{{\sf Harvard}} \title{The \Harvard\ Family of Bibliography Styles} -\author{Peter Williams \\ (peterw@archsci.arch.su.edu.au) \and +\author{Peter Williams \\ (pwil3058@bigpond.net.au) \and Thorsten Schnier \\ (thorsten@archsci.arch.su.edu.au)} \hyphenation{cite-as-noun poss-ess-ive-cite cit-at-ion-mode cite-year diff --git a/Master/texmf-dist/doc/latex/harvard/manifest.txt b/Master/texmf-dist/doc/latex/harvard/manifest.txt new file mode 100644 index 00000000000..f7c03bd985c --- /dev/null +++ b/Master/texmf-dist/doc/latex/harvard/manifest.txt @@ -0,0 +1,19 @@ +The following files are copyright 1994 Peter Williams and released +under the LPPL as explained in the comments beginning each file: +INSTALL +Makefile +README +doc_Makefile +harvard.bib +harvard.sty +harvard.tex +and the derived file harvard.pdf. + +The following files are copyright Thorsten Schnier and released +under the LPPL as explained in the comments beginning each file: +harvard.perl + +For details of copyrights and licensing for other files, see +the comments included in each. + +This file added by Clea F. Rees 2009/01/30. -- cgit v1.2.3