~ubuntu-branches/ubuntu/raring/texlive-extra/raring

« back to all changes in this revision

Viewing changes to texmf-dist/source/latex/chscite/chscite.dtx

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-05-16 08:22:07 UTC
  • mfrom: (1.1.12) (3.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20120516082207-41ox35jj1qsu46a7
Tags: 2012.20120516-1
* new upstream snapshot based on TL2012 tlpretest
* switch to xz compression for orig and deb (Closes: #672428)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
% \iffalse meta-comment
2
 
%
3
 
% Copyright (C) 201 by Simon Sigurdhsson <ssimon@student.chalmers.se>
4
 
% -------------------------------------------------------
5
 
6
 
% This file may be distributed and/or modified under the
7
 
% conditions of the LaTeX Project Public License, either version 1.2
8
 
% of this license or (at your option) any later version.
9
 
% The latest version of this license is in:
10
 
%
11
 
%    http://www.latex-project.org/lppl.txt
12
 
%
13
 
% and version 1.2 or later is part of all distributions of LaTeX 
14
 
% version 1999/12/01 or later.
15
 
%
 
2
%%
 
3
%% Copyright (C) 2012 by Simon Sigurdhsson <ssimon@student.chalmers.se>
 
4
%% 
 
5
%% This work may be distributed and/or modified under the
 
6
%% conditions of the LaTeX Project Public License, either version 1.3
 
7
%% of this license or (at your option) any later version.
 
8
%% The latest version of this license is in
 
9
%%   http://www.latex-project.org/lppl.txt
 
10
%% and version 1.3 or later is part of all distributions of LaTeX
 
11
%% version 2005/12/01 or later.
 
12
%% 
 
13
%% This work has the LPPL maintenance status `maintained'.
 
14
%% 
 
15
%% The Current Maintainer of this work is Simon Sigurdhsson.
 
16
%% 
 
17
%% This work consists of the files chscite.dtx and chscite.ins
 
18
%% and the derived filebase chscite.sty.
 
19
%% 
16
20
% \fi
17
21
%
18
22
% \iffalse
22
26
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
23
27
%<package>\ProvidesPackage{chscite}
24
28
%<*package>
25
 
    [2011/09/20 v2.99 Chalmers bibliography style]
 
29
    [2012/05/13 v2.999 Chalmers bibliography style]
26
30
%</package>
27
31
%
28
32
%<*driver>
29
33
\documentclass{ltxdoc}
30
 
\usepackage{chscite}[2011/09/20]
 
34
\usepackage{chscite}[2012/05/13]
31
35
\AtBeginDocument{%
32
36
        \OnlyDescription%
33
37
%       \CodelineIndex%
36
40
}
37
41
\AtEndDocument{%
38
42
        \PrintChanges%
39
 
%       \PrintIndex%
 
43
        \PrintIndex%
40
44
}
41
45
\begin{document}
42
46
  \DocInput{chscite.dtx}
81
85
% \author{Simon Sigurdhsson \\ \texttt{ssimon@student.chalmers.se}}
82
86
%
83
87
% \maketitle
 
88
% \tableofcontents
84
89
%
85
90
% \section{Introduction}
86
91
%
140
145
% The \cs{citeyear}\marg{reference} command simply prints the year
141
146
% of the given reference.
142
147
%
 
148
% \subsection{Using \texttt{@misc} for web sources}
 
149
% In this package, the \texttt{@misc} \textsc{Bib}\TeX{} style has been crafted
 
150
% to typeset web sources correctly as per Chalmers recommendations. Proper use,
 
151
% apart from usual \textsc{Bib}\TeX{} syntax, includes using the \texttt{note}
 
152
% field to specify retreival date and the \texttt{howpublished} field for web
 
153
% page title:
 
154
% \iffalse
 
155
%<*example>
 
156
% \fi
 
157
\begin{verbatim}
 
158
@misc{google,
 
159
        author = {Johnson, S.},
 
160
        year = 2007,
 
161
        title = {Exploiting the mobile channel},
 
162
        howpublished = {m.Net Corporation},
 
163
        url = {http://www.mnetcorporation.com/article-exploiting-the-mobile-channel},
 
164
        note = {2008-04-18}
 
165
}
 
166
\end{verbatim}
 
167
% \iffalse
 
168
%</example>
 
169
% \fi
 
170
%
 
171
% \subsection{Using the \texttt{@patent} entry type}
 
172
% The \texttt{@patent} included in this package is a custom alternative to
 
173
% \texttt{@techreport} especially made for referencing patents. Required fields
 
174
% are \texttt{author}, \texttt{year}, \texttt{title} and \texttt{number} (the
 
175
% patent number). There are no optional fields: 
 
176
% \iffalse
 
177
%<*example>
 
178
% \fi
 
179
\begin{verbatim}
 
180
@patent{volvo,
 
181
        author = {{Volvo Lastvagnar}},
 
182
        year = 2006,
 
183
        title = {Information based controlling of chassis height of a vehicle},
 
184
        number = {SE0403224}
 
185
}
 
186
\end{verbatim}
 
187
% \iffalse
 
188
%</example>
 
189
% \fi
143
190
%
144
191
% \section{Known issues}
145
192
% The |chscite.bst| \textsc{Bib}\TeX{} style does not support cross references
667
714
% \changes{v1.0b}{2011/06/06}{Fixed bug concerning editors in \texttt{.bst} file}
668
715
% \changes{v2.0c}{2011/06/22}{Cleaned up \texttt{.bst} file}
669
716
% \changes{v2.0d}{2011/06/23}{Improved handling of editions}
 
717
% \changes{v2.999}{2012/05/13}{Added \texttt{@patent} and \texttt{@misc} entries}
670
718
%
671
719
% \iffalse
672
720
%<*bibstyle>
804
852
{
805
853
  add.period$
806
854
  write$
807
 
  write.url
 
855
  type$ "misc" =
 
856
    'skip$
 
857
    'write.url
 
858
  if$
808
859
  newline$
809
860
}
810
861
 
1401
1452
}
1402
1453
 
1403
1454
FUNCTION {misc}
1404
 
{ cite$ ": @misc cite style not implemented!" * warning$ }
 
1455
{ output.bibitem
 
1456
  make.list.label "(" tie.or.space.connect list.year * ")" *
 
1457
  author "author" item.check
 
1458
  title missing$
 
1459
    'skip$
 
1460
    { title tie.or.space.connect add.period$ }
 
1461
  if$
 
1462
  howpublished missing$
 
1463
    'skip$
 
1464
    { howpublished emphasize tie.or.space.connect add.period$ }
 
1465
  if$
 
1466
  URL missing$
 
1467
    'skip$
 
1468
    { " \chsurl{" URL "}" * * tie.or.space.connect add.period$ }
 
1469
  if$
 
1470
  note missing$
 
1471
    'skip$
 
1472
    { "(" note ")" * * tie.or.space.connect add.period$ }
 
1473
  if$
 
1474
  write$
 
1475
  fin.entry
 
1476
}
1405
1477
 
1406
1478
FUNCTION {techreport}
1407
1479
{ cite$ ": @techreport cite style not implemented!" * warning$ }
1408
1480
 
 
1481
FUNCTION {patent}
 
1482
{ output.bibitem
 
1483
  make.list.label "(" tie.or.space.connect list.year * ")" *
 
1484
  author "author" item.check
 
1485
    title missing$
 
1486
      'skip$
 
1487
      { title emphasize tie.or.space.connect add.period$ }
 
1488
    if$
 
1489
    number missing$
 
1490
      'skip$
 
1491
      { number tie.or.space.connect add.period$ }
 
1492
    if$
 
1493
  write$
 
1494
  fin.entry
 
1495
}
 
1496
 
1409
1497
FUNCTION {default.type} { misc }
1410
1498
 
1411
1499
MACRO {jan} {"\chsWjanuary{}"}