Last active
August 29, 2015 14:10
-
-
Save bjoseru/2474626f727c3c87433b to your computer and use it in GitHub Desktop.
A minimal working example of an alphabetically sorted bibliography (compatible with bibtex) that stops working once the babel package is included.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\ProvidesFile{bib.lco} | |
% | |
% Provide a bibliography for letters that is numbered alphabetically. | |
% This file is in the public domain and it can be included in letters | |
% written in the scrlttr2-class by stating it as an option. See | |
% `letter class options` in the KOMA guide. | |
% | |
% Some of the following is taken from | |
% http://tex.stackexchange.com/questions/18033/using-bibtex-with-letter-class | |
% but see also | |
% http://tex.stackexchange.com/questions/213453/custom-thebibliography-with-alphabetic-numbering-for-scrltt2-not-working-in-pre | |
% and | |
% http://bjoernstechblog.rueffer.info/posts/latex/letters/bibliography/2014/11/23/Alphabetically-numbered-references-in-latex-letters/ | |
% for more discussions. | |
\makeatletter | |
\newenvironment{thebibliography}[1] | |
{\list{\@biblabel{\@Alph\c@enumiv}}% LATIN LETTERS AS REFERENCES | |
{\settowidth\labelwidth{\@biblabel{#1}}% | |
\leftmargin\labelwidth | |
\advance\leftmargin\labelsep | |
\usecounter{enumiv}% | |
\let\p@enumiv\@empty | |
\renewcommand\theenumiv{\@Alph\c@enumiv}}% SAME HERE | |
\sloppy | |
\clubpenalty4000 | |
\@clubpenalty \clubpenalty | |
\widowpenalty4000% | |
\sfcode`\.\@m} | |
{\def\@noitemerr | |
{\@latex@warning{Empty `thebibliography' environment}}% | |
\endlist} | |
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} | |
\let\bibsection\relax | |
\def\section*#1{\relax} | |
\def\@cite@ofmt#1{\def\@safe@activesfalse{}% | |
\hbox{\@Alph{#1}}} | |
\makeatother |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment