Debian Codegraph @

texmf-dist/doc/latex/doipubmed/doipubmed.perl

raw
1 #!/usr/bin/perl
2
3 # File : doipub.perl
4 # Author : Nicola Talbot
5 # Date : 9th September 2005
6 # Last Modified : 20 Aug 2007
7 # Version : 1.01
8 #
9 # This is a LaTeX2HTML style implementing the doipubmed package, and
10 # is distributed as part of that package.
11 # Copyright 2007 Nicola L.C. Talbot
12 # This work may be distributed and/or modified under the
13 # conditions of the LaTeX Project Public License, either version 1.3
14 # of this license of (at your option) any later version.
15 # The latest version of this license is in
16 # http://www.latex-project.org/lppl.txt
17 # and version 1.3 or later is part of all distributions of LaTeX
18 # version 2005/12/01 or later.
19 #
20 # This work has the LPPL maintenance status `maintained'.
21 #
22 # The Current Maintainer of this work is Nicola Talbot.
23
24 sub do_cmd_doitext{
25 local($_) = @_;
26 local($doi);
27
28 s/$next_pair_pr_rx/$doi=$2;''/eo;
29 join('', "doi", $_);
30 }
31
32 sub do_cmd_pubmedtext{
33 local($_) = @_;
34 local($pubmed);
35
36 s/$next_pair_pr_rx/$pubmed=$2;''/eo;
37 join('', "PubMed", $_);
38 }
39
40 sub do_cmd_doi{
41 local($_) = @_;
42 local($doi,$doitext,$br_id);
43
44 s/$next_pair_pr_rx/$br_id=$1;$doi=$2;''/eo;
45
46 $doitext = &translate_commands("\\doitext$OP$br_id$CP$doi$OP$br_id$CP");
47
48 $doi=~s/#/${percent_mark}23/g;
49 join('',
50 &make_href("http://dx.doi.org/$doi", $doitext),
51 $_);
52 }
53
54 sub do_cmd_pubmed{
55 local($_) = @_;
56 local($pubmed,$pubmedtext,$br_id);
57
58 s/$next_pair_pr_rx/$br_id=$1;$pubmed=$2;''/eo;
59
60 $pubmedtext = &translate_commands("\\pubmedtext$OP$br_id$CP$pubmed$OP$br_id$CP");
61
62 join('',
63 &make_href("http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=$pubmed&dopt=Abstract",
64 $pubmedtext),
65 $_);
66 }
67
68 sub do_cmd_citeurl{
69 local($_) = @_;
70 local($url);
71
72 s/$next_pair_pr_rx/$url=$2;''/eo;
73
74 join('', '<',
75 &make_href($url, $url), '>',
76 $_);
77 }
78
79 1;