Google Skupine ne podpirajo več novih objav ali naročnin v storitvi Usenet. Zgodovinsko vsebino si je še vedno mogoče ogledati.
Dismiss

Zitate in latex [1,2,3,4] -> [1-4]

3 ogledi
Preskoči na prvo neprebrano sporočilo

Torsten Engers

neprebran,
5. jun. 1994, 05:44:245. 6. 94
do
In einer Nachricht vom 03.06.94 schrieb Erich Steinacker (2:2452/110.1):

ES> Hallo,
ES> weiss jemand wie man es schafft, dass mehrere Zitate in einem
ES> \cite{c1,c2,c3,c4} als [1-4] und nicht als [1,2,3,4] im Text
ES> erscheinen? (bei 4 geht's noch aber bei 10 sieht's komisch aus).

Yep! Folgenden 'REF.STY' musst Du nur miteinbinden in die Options, dann geht's.
Ist aus dem REFTEX-Packet der Phys.Rev. Zeitschriften.
Hat allerdings den Nachteil, dass alle cites in einer Zeile stehen muessen, und
keine Leerzeichen zwischen den Kommas und den Namen - vielleicht kann das mal
jemand fixen ;-)

--------------------------- REF.STY on ----------------------------------
%%\def\filename{Ref.sty}
%%\def\fileversion{1.0}
%%\def\filedate{93/26/03}
%%\def\docdate{-----}
%%
%% This is Ref.STY, Vers. 1.0 26 Mar 1993
%
%% DOCUMENT STYLE OPTION for writing german texts
%% with TeX version 2.x/3.x (Plain TeX) or with LaTeX version 2.09.
%% modified for References like RevTeX.sty by Gerald Jenke
%%
% It can be called via
% \input ref
% or (with LaTeX) via
% \documentstyle[ref]{anystyle}
%
%
%
%
%

%%%%%%%%%%%% Original LaTeX.sty cite %%%%%%%%%%%%%%%
% \penalty\@m added to definition of \@citex to allow a line
% break after the `,' in citations like [Jones80,Smith77]
% (Added 23 Oct 86)
%
% space added after the `,' (21 Nov 87)
%
%% RmS 91/10/25: added \reset@font, suggested by Bernd Raichle.
%% RmS 91/11/06: added code to remove a leading blank
%\def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
% \let\@citea\@empty
% \@cite{\@for\@citeb:=#2\do
% {\@citea\def\@citea{,\penalty\@m\ }%
% \def\@tempa##1##2\@nil{\edef\@citeb{\if##1\space##2\else##1##2\fi}}%
% \expandafter\@tempa\@citeb\@nil
% \@ifundefined{b@\@citeb}{{\reset@font\bf ?}\@warning
% {Citation `\@citeb' on page \thepage \space undefined}}%
% \hbox{\csname b@\@citeb\endcsname}}}{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\let\@citea\@empty
\@cite{\@collapse{#2}}{#1}}

{% grouping to allow use of latex temps
%\sfcode`,=2000\relax
%\dimen0=\the\fontdimen2\textfont0\relax
%\xspaceskip = .6\dimen0 plus.3\dimen0 minus.3\dimen0\relax
\@ifundefined{b@\@citeb}%
{\@temp\@citea{\bf ?}%
\@tempcntb\@MM\def\@citea{,}\let\@temp\relax%
\@warning{Citation `\@citeb ' on page \thepage\space undefined}%
}% end of \@ifundefined #1 arg
{\@tempcnta\@tempcntb \advance\@tempcnta\@ne
\edef\MyTemp{\csname b@\@citeb\endcsname}%
\def\@tempa{\@temptokena=\bgroup}% toss rest (non#) of footmark
\if0A{\fi% hack to match brackets in \@collapse def
\afterassignment\@tempa % non# part of cite goes into temp toks
% NEXT LINE: curly opens in \@tempa, 0 default if non#
\@tempcntb=0\MyTemp\relax}%
\ifnum\@tempcntb=0\relax% non-# cite mark
\@tempcntb=\@MM
\@citea\@stripdollars{\MyTemp}%
\let\@temp = \relax
\def\@citea{,}%
\else % treating cite mark as #
\edef\@tempd{\number\@tempcntb}%
\ifnum\@tempcnta=\@tempcntb%
\ifx\@temp\relax
\edef\@temp{\@citea\@tempd}%
\else%
\edef\@temp{\hbox{--}\@tempd}%
\fi%
\else%
\@temp\@citea\@tempd
\let\@temp\relax
\fi
\def\@citea{,}%
\fi%
}% end of @ifundefined #2 arg
}% end of do loop
}% end of grouping to allow use of latex temps
}% end of \@collapse def

% default, overridden by aux file setting if any

{% scope to protect box0
\if\@ExpandsToRefNumber{#1}%
\setboxz@h{
\rm[\csname b@#1\endcsname]}%
\else
\setboxz@h{
$\scriptstyle\m@th\@stripdollars{\csname b@#1\endcsname}$}%
\fi
\ifdim\wd0>\WidestRefLabelThusFar
\global\WidestRefLabelThusFar=\wd0
\fi
}%
}
\newpage
\section*{Literaturverzeichniss}
\bgroup\relax\linewidth=\textwidth\vskip24pt%%
% \hrule width\textwidth%
\vskip1.6cm%
\ifdim\baselinestretch in>1 in\parsep4pt\else\parsep 0pt\fi%
\ifdim\baselinestretch in>1 in\itemsep4pt\else\itemsep 0pt\fi%
\list%
{{[\arabic{enumi}]\hskip4pt}}%
%4pt is space from label to start of ref.
%the magic 4pt value is also used in \@biblabel
{\settowidth%
\labelwidth{\hbox spread4pt{\hskip\WidestRefLabelThusFar\hfil}}%
\leftmargin\labelwidth%
\labelsep=0pt%
\advance\leftmargin\labelsep%
\usecounter{enumi}}%
\def\newblock{\hskip .11em plus .33em minus -.07em}%
\sloppy%
% \sfcode`\.=1000\relax%
}

\endlist\vskip1sp\egroup
\gdef\@SetMaxRefLabel##1{}%
}

----------------------------- REF.STY off -------------------------------

TORSTEN (sorry dass es ein bischen laenger geworden ist)

0 novih sporočil