Zmena bibliography

Jaromir Kuben kuben at scova.vabo.cz
Tue Nov 2 12:51:28 CET 1999


> Dobry den vespolek,
>   potreboval bych zmenit trochu cislovani v prostredi thebibliography a to
> tak, aby jista cast byla oznacena A.1 .. A.xx, dalsi B.1 .. B.yy atd.
> Dival jsem se do archivu konference, nechal jsem se inspirovat odpovedi
> pana Sojky na trochu podobny dotaz a zkusil jsem tohle:
> \newcounter{test}
> \setcounter{test}{1}
> %\renewcommand{\thetest}{\Alpha{test}}
> \makeatletter
> \def\@cite#1#2{[{\thetest}.{#1\if at tempswa , #2\fi}]}
> \def\@biblabel#1{[{\thetest}.#1]}
> \makeatother
>
> To ma dva hacky:
> 1. kdyz odkomentuji vyse uvedeny radek, dostanu chybu. Cili tam neumim
> dostat pismenka.
> 2. takto se to samozrejme cisluje 1.1 .. 1.xx. Jak ale (nejlepe v jistem
> miste v prostredi thebibliography) rici, ze chci zacit od B.1 ? Kdyz v
> danem miste udelam
> \addtocounter{test}{1}
> \setcounter{enumiv}{0}
> tak se zmena counteru test nepropaguje do prikazu \cite.
>
>
> Diky predem za pomoc, zdravi
>
>            Tomas Davidek
>
>  E-mail : davidek at hp01.troja.mff.cuni.cz,
> 	  Tomas.Davidek at cern.ch
>

Dobry den.
Nevim, nakolik je nasledujici reseni optimalni, ale zda se, ze funguje.

\documentclass{report}

\makeatletter

\def\bibitem{\@lbibitem}

\def\@lbibitem#1{\stepcounter{\@listctr}\item[\@biblabel{\znak\the\value{\@listctr}}\hfill]\if at filesw
      {\let\protect\noexpand
       \immediate
       \write\@auxout{\string\bibcite{#1}{\znak\the\value{\@listctr}}}}\fi\ignorespaces}

\def\zmena#1{\def\znak{#1}\setcounter{\@listctr}{0}\relax\ignorespaces }

\makeatother

\def\znak{A.}

\begin{document}
Text \cite{1,4,7}.

\begin{thebibliography}{A.1}

\bibitem{1}
Autor 1.

\bibitem{2}
Autor 2.\zmena{B.}

\bibitem{3}
Autor 3.

\bibitem{4}
Autor 4.

\bibitem{5}
Autor 5.\zmena{C.}

\bibitem{6}
Autor 6.

\bibitem{7}
Autor 7.

\end{thebibliography}

Zdravi
      Jaromir Kuben




More information about the csTeX mailing list