texlive[43746] Master: ltb2bib

commits+karl at tug.org commits+karl at tug.org
Tue Apr 11 00:07:52 CEST 2017


Revision: 43746
          http://tug.org/svn/texlive?view=revision&revision=43746
Author:   karl
Date:     2017-04-11 00:07:52 +0200 (Tue, 11 Apr 2017)
Log Message:
-----------
ltb2bib

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/ltb2bib/
    trunk/Master/texmf-dist/doc/latex/ltb2bib/README
    trunk/Master/texmf-dist/doc/latex/ltb2bib/bibdest.bib
    trunk/Master/texmf-dist/doc/latex/ltb2bib/doltb2bib.tex
    trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf
    trunk/Master/texmf-dist/doc/latex/ltb2bib/ltbsource.ltb
    trunk/Master/texmf-dist/source/latex/ltb2bib/
    trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.dtx
    trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.ins
    trunk/Master/texmf-dist/tex/latex/ltb2bib/
    trunk/Master/texmf-dist/tex/latex/ltb2bib/ltb2bib.sty
    trunk/Master/tlpkg/tlpsrc/ltb2bib.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/ltb2bib/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ltb2bib/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ltb2bib/README	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,58 @@
+              +---------------------------------------+
+              |                ltb2bib                |
+              |                                       |
+              |  Convert a .ltb bibliography to .bib  |
+              |                                       |
+              | By Laurent Bartholdi,                 |
+              |           laurent.bartholdi at gmail.com |
+              +---------------------------------------+
+
+Description
+===========
+
+This package implements a LaTeX command that converts an amsrefs
+bibliographical database (.ltb) to a BibTeX bibliographical database
+(.bib).
+
+The typical usage is to run LaTeX on a document such as
+
+\documentclass{article}
+\usepackage{ltb2bib}
+\begin{document}
+\writebib{bblsource}{bibdest}
+\end{document}
+
+This will convert the bibliographical entries in bblsource.ltb to
+BibTeX format, and write them to bibdest.bib.
+
+ltb2bib is the reverse of the "amsxport" option in amsrefs. Typical uses are:
+
+* produce bib entries for some publishers which don't accept amsrefs
+  (Taylor & Francis, for example);
+
+* import an ltb database in a database management program, e.g. for sorting;
+
+* access one's ltb database within emacs's RefTeX mode.
+
+
+Change log (reverse chronological order)
+=====================
+
+2017-04-03 ltb2bib 0.01
+	First release in the wild
+
+
+Copyright and License
+=====================
+
+Copyright (C) 2017 Laurent Bartholdi
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3c of this license
+or (at your option) any later version.  The latest version of this
+license is in
+
+                http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of LaTeX version
+2008/05/04 or later.


Property changes on: trunk/Master/texmf-dist/doc/latex/ltb2bib/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/ltb2bib/bibdest.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ltb2bib/bibdest.bib	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ltb2bib/bibdest.bib	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,17 @@
+% Converted bibliography from bblsource[.ltb] to bibdest.bib
+ at Article{Jones2004,
+  author={{Jones, David M.}},
+  note={distributed with the \protect \textsf  {amsrefs} code},
+  title={User's Guide to the \protect \textsf  {amsrefs} Package},
+}
+
+ at Book{SOS99,
+  author={{Swanson, Ellen} and {O'Sean, Arlene} and {Schleyer, Antoinette}},
+  year={1999},
+  edition={updated},
+  publisher={American Mathematical Society},
+  title={Mathematics into Type},
+  year={1999},
+}
+
+% End of bibdest.bib


Property changes on: trunk/Master/texmf-dist/doc/latex/ltb2bib/bibdest.bib
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/ltb2bib/doltb2bib.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ltb2bib/doltb2bib.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ltb2bib/doltb2bib.tex	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,5 @@
+\documentclass{article}
+\usepackage{ltb2bib}
+\begin{document}
+\writebib{bblsource}{bibdest}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/ltb2bib/doltb2bib.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf	2017-04-10 22:04:27 UTC (rev 43745)
+++ trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf	2017-04-10 22:07:52 UTC (rev 43746)

Property changes on: trunk/Master/texmf-dist/doc/latex/ltb2bib/ltb2bib.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/ltb2bib/ltbsource.ltb
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ltb2bib/ltbsource.ltb	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/ltb2bib/ltbsource.ltb	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,14 @@
+\bib{Jones2004}{article}{
+  author={Jones, David M.},
+  title={User's Guide to the \textsf{amsrefs} Package},
+  note={distributed with the \textsf{amsrefs} code}
+}
+\bib{SOS99}{book}{
+  author={Swanson, Ellen},
+  author={O'Sean, Arlene},
+  author={Schleyer, Antoinette},
+  title={Mathematics into Type},
+  edition={updated},
+  year={1999},
+  publisher={American Mathematical Society},
+}


Property changes on: trunk/Master/texmf-dist/doc/latex/ltb2bib/ltbsource.ltb
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.dtx	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,359 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2017 by Laurent Bartholdi <laurent.bartholdi at gmail.com>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Laurent Bartholdi.
+%
+% This work consists of the files ltb2bib.dtx and ltb2bib.ins
+% and the derived filebase ltb2bib.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{ltb2bib.dtx}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{ltb2bib}
+%<*package>
+    [2017/04/03 0.01 First release in the wild]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+  \DocInput{ltb2bib.dtx}
+  \PrintChanges
+  \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{452}
+%
+% \CharacterTable
+%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%   Digits        \0\1\2\3\4\5\6\7\8\9
+%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%   Dollar        \$     Percent       \%     Ampersand     \&
+%   Acute accent  \'     Left paren    \(     Right paren   \)
+%   Asterisk      \*     Plus          \+     Comma         \,
+%   Minus         \-     Point         \.     Solidus       \/
+%   Colon         \:     Semicolon     \;     Less than     \<
+%   Equals        \=     Greater than  \>     Question mark \?
+%   Commercial at \@     Left bracket  \[     Backslash     \\
+%   Right bracket \]     Circumflex    \^     Underscore    \_
+%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%   Right brace   \}     Tilde         \~}
+%
+%
+% \changes{0.01}{2017/04/03}{Converted to DTX file}
+%
+% \DoNotIndex{\def,\newwrite,\newskip,\newenvironment,\gdef,\immediate,\let}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{ltb2bib.dtx}
+% \title{The \textsf{ltb2bib} package}
+% \author{Laurent Bartholdi \\ \url{laurent.bartholdi at gmail.com}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The \textsf{amsrefs} package is a wonderful, pure-\LaTeX\
+% implementation of bibliographical databases. In a format close to
+% Bib\TeX's, one writes entries in database files (say
+% \verb+ltbsource.ltb+); \LaTeX\ extracts from these files the entries
+% required for the document (say \verb+myarticle.tex+), writes them to
+% myarticle.bbl and incorporates them in the document's bibliography
+% section. The file \verb+myarticle.bbl+ can be sent to the publisher
+% along with \verb+myarticle.tex+, or can be directly incorporated
+% into it.
+%
+% It happens, sometimes, that one needs the bibliographical entries in
+% Bib\TeX\ format:
+% \begin{itemize}
+% \item Some publishers (Taylor \& Francis, for example) refuse
+% to process \textsf{amsrefs} files, and require the authors to manually
+% retype them;
+% \item \textsf{amsrefs} cannot sort entries, so it may be useful to
+% convert a \textsf{amsrefs} database to Bib\TeX\ format to feed them to
+% bibliography management software;
+% \item \textsf{emacs}'s Ref\TeX\ mode, for example, requires the database
+% in Bib\TeX\ format.
+% \end{itemize}
+%
+% For these purposes, I have written this short \LaTeX\ package that
+% converts an \textsf{amsrefs} bibliography file to Bib\TeX.
+%
+% Note that the inverse operation, namely producing a \textsf{amsrefs}
+% bibliographical database out of a Bib\TeX\ one, is implemented by
+% the \verb+amsxport+ option of \textsf{amsrefs}.
+%
+% \section{Usage}
+%
+% The only command supplied by this package is \verb+\writebib+. It is
+% typically used in a driver-document \verb+doltb2bib.tex+ such as
+% the following:
+% \begin{verbatim}
+% \documentclass{article}
+% \usepackage{ltb2bib}
+% \begin{document}
+% \writebib{ltbsource}{bibdest}
+% \end{document}
+% \end{verbatim}
+% which, when invoked with `\verb+latex doltb2bib+', produces from
+% \verb+ltbsource.ltb+ the file \verb+bibdest.bib+.
+%
+% \DescribeMacro{\writebib}
+%
+% This command takes two arguments: an input and an output
+% filename. If the input filename is given without extension, then the
+% actual filename may have the extension \verb+.ltb+; and similarly
+% the output will be written to a file with the \verb+.bib+ extension
+% added.
+%
+% This command reads all \verb+\bib+ entries from the input file, and
+% writes corresponding Bib\TeX\ entries to the output file. It produces no
+% output.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%    \begin{macrocode}
+\ProvidesPackage{ltb2bib}[2017/04/03 v0.01]
+\@ifundefined{thebibliography}{\newenvironment{thebibliography}{}{}}{}
+\@ifundefined{footnotesize}{\let\footnotesize\relax}{}
+\RequirePackage{amsrefs}
+\RequirePackage{xpatch}
+\newwrite\@bibfile
+%    \end{macrocode}
+% make a copy of protected at iwrite, and patch it to add \verb+\immediate+
+%    \begin{macrocode}
+\let\protected at iwrite\protected at write
+\xpatchcmd{\protected at iwrite}{\write}{\immediate\write}{}{}
+\def\bib at write#1{\protected at iwrite\@bibfile{\let~\relax\def\ndash{--}}{#1}}
+\gdef\space{ }
+\gdef\spsp{\space\space}
+%    \end{macrocode}
+%
+% treat the multiple entries to be coalesced, with \verb+\name+ prepended to names
+% \begin{macro}{\@author}
+%    \begin{macrocode}
+\def\@author#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp author={\the\toks0},}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@editor}
+%    \begin{macrocode}
+\def\@editor#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp editor={\the\toks0},}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@translator}
+%    \begin{macrocode}
+\def\@translator#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp translator={\the\toks0},}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% Keys which may appear multiply, but which we don't coalesce
+%    \begin{macrocode}
+\def\@contribution#1{\bib at write{\spsp contribution=\@charlb#1\@charrb,}}
+\def\@isbn#1{\def\fld at elt##1{\bib at write{\spsp isbn=\@charlb##1\@charrb,}}#1}
+\def\@issn#1{\def\fld at elt##1{\bib at write{\spsp issn=\@charlb##1\@charrb,}}#1}
+\def\@review#1{\def\MR##1{\let\MR\relax\bib at write{\spsp review={\MR{##1}},}}#1}
+\def\@partial#1{\bib at write{\spsp partial=\@charlb#1\@charrb,}}
+%    \end{macrocode}
+%
+% Keys which translate directly to simple keys
+%    \begin{macrocode}
+\def\@accessdate#1{\bib at write{\spsp accessdate=\@charlb#1\@charrb,}}
+\def\@address#1{\bib at write{\spsp address=\@charlb#1\@charrb,}}
+\def\@book#1{\bib at write{\spsp book=\@charlb#1\@charrb,}}
+\def\@booktitle#1{\bib at write{\spsp booktitle=\@charlb#1\@charrb,}}
+\def\@conference#1{\bib at write{\spsp conference=\@charlb#1\@charrb,}}
+\def\@copula#1{\bib at write{\spsp copula=\@charlb#1\@charrb,}}
+\def\@date#1{\bib at write{\spsp year=\@charlb#1\@charrb,}}
+\def\@doi#1{\bib at write{\spsp doi=\@charlb#1\@charrb,}}
+\def\@edition#1{\bib at write{\spsp edition=\@charlb#1\@charrb,}}
+\def\@eprint#1{\bib at write{\spsp eprint=\@charlb#1\@charrb,}}
+\def\@fulljournal#1{\bib at write{\spsp fulljournal=\@charlb#1\@charrb,}}
+\def\@hyphenation#1{\bib at write{\spsp hyphenation=\@charlb#1\@charrb,}}
+\def\@institution#1{\bib at write{\spsp institution=\@charlb#1\@charrb,}}
+\def\@journal#1{\bib at write{\spsp journal=\@charlb#1\@charrb,}}
+\def\@label#1{\bib at write{\spsp label=\@charlb#1\@charrb,}}
+\def\@language#1{\bib at write{\spsp language=\@charlb#1\@charrb,}}
+\def\@name#1{\bib at write{\spsp name=\@charlb#1\@charrb,}}
+\def\@note#1{\bib at write{\spsp note=\@charlb#1\@charrb,}}
+\def\@number#1{\bib at write{\spsp number=\@charlb#1\@charrb,}}
+\def\@organization#1{\bib at write{\spsp organization=\@charlb#1\@charrb,}}
+\def\@pages#1{\bib at write{\spsp pages=\@charlb#1\@charrb,}}
+\def\@part#1{\bib at write{\spsp part=\@charlb#1\@charrb,}}
+\def\@place#1{\bib at write{\spsp place=\@charlb#1\@charrb,}}
+\def\@publisher#1{\bib at write{\spsp publisher=\@charlb#1\@charrb,}}
+\def\@reprint#1{\bib at write{\spsp reprint=\@charlb#1\@charrb,}}
+\def\@school#1{\bib at write{\spsp school=\@charlb#1\@charrb,}}
+\def\@series#1{\bib at write{\spsp series=\@charlb#1\@charrb,}}
+\def\@setup#1{\bib at write{\spsp setup=\@charlb#1\@charrb,}}
+\def\@status#1{\bib at write{\spsp status=\@charlb#1\@charrb,}}
+\def\@subtitle#1{\bib at write{\spsp subtitle=\@charlb#1\@charrb,}}
+\def\@title#1{\bib at write{\spsp title=\@charlb#1\@charrb,}}
+\def\@translation#1{\bib at write{\spsp translation=\@charlb#1\@charrb,}}
+\def\@type#1{\bib at write{\spsp type=\@charlb#1\@charrb,}}
+\def\@url#1{\bib at write{\spsp url=\@charlb#1\@charrb,}}
+\def\@volume#1{\bib at write{\spsp volume=\@charlb#1\@charrb,}}
+\def\@xref#1{\bib at write{\spsp xref=\@charlb#1\@charrb,}}
+\def\@year#1{\bib at write{\spsp year=\@charlb#1\@charrb,}}
+%    \end{macrocode}
+%
+% We create a bib specification to output the data in Bib\TeX\ format,
+% rather than as a formatted bibliography.
+% \begin{macro}{\make at bibspec}
+%    \begin{macrocode}
+\def\make at bibspec#1#2{\BibSpec{#1}{%
+    +{}{\bib at write{@#2\@charlb\current at citekey,}}{transition}
+    +{}{\@author}        {author}
+    +{}{\@editor}        {editor}
+    +{}{\@translator}    {translator}
+    +{}{\@contribution}  {contribution}
+    +{}{\@isbn}          {isbn}
+    +{}{\@issn}          {issn}
+    +{}{\@review}        {review}
+    +{}{\@partial}       {partial}
+    +{}{\@accessdate}    {accessdate}
+    +{}{\@address}       {address}
+    +{}{\@book}          {book}
+    +{}{\@booktitle}     {booktitle}
+    +{}{\@conference}    {conference}
+    +{}{\@copula}        {copula}
+    +{}{\@date}          {date}
+    +{}{\@doi}           {doi}
+    +{}{\@edition}       {edition}
+    +{}{\@eprint}        {eprint}
+    +{}{\@fulljournal}   {fulljournal}
+    +{}{\@hyphenation}   {hyphenation}
+    +{}{\@institution}   {institution}
+    +{}{\@journal}       {journal}
+    +{}{\@label}         {label}
+    +{}{\@language}      {language}
+    +{}{\@name}          {name}
+    +{}{\@note}          {note}
+    +{}{\@number}        {number}
+    +{}{\@organization}  {organization}
+    +{}{\@pages}         {pages}
+    +{}{\@part}          {part}
+    +{}{\@place}         {place}
+    +{}{\@publisher}     {publisher}
+    +{}{\@reprint}       {reprint}
+    +{}{\@school}        {school}
+    +{}{\@series}        {series}
+    +{}{\@setup}         {setup}
+    +{}{\@status}        {status}
+    +{}{\@subtitle}      {subtitle}
+    +{}{\@title}         {title}
+    +{}{\@translation}   {translation}
+    +{}{\@type}          {type}
+    +{}{\@url}           {url}
+    +{}{\@volume}        {volume}
+    +{}{\@xref}          {xref}
+    +{}{\@year}          {year}
+  +{}{\bib at write{\@charrb^^J}}{transition}
+}}
+%    \end{macrocode}
+% \end{macro}
+%
+% amsrefs treats bib entries as items in an enumeration. We'll just make
+% sure nothing is produced in the output, and set the paragraph skips between
+% items to be 0.
+%    \begin{macrocode}
+\newskip\ltb at baselineskip
+\newskip\ltb at parskip
+%    \end{macrocode}
+%
+% The main command: just run \verb+bibselect+ on the input file, after
+% having set up the desired bibspec.
+% \begin{macro}{\writebib}
+%    \begin{macrocode}
+\newcommand\writebib[2]{%
+  \immediate\openout\@bibfile=#2.bib
+  \bib at write{\@percentchar\space Converted bibliography from #1[.ltb] to #2.bib}%
+  \typeout{Writing bibliography to #2.bib...}%
+  \make at bibspec{article}{Article}%
+  \make at bibspec{partial}{InCollection}%
+  \make at bibspec{contribution}{InCollection}%
+  \make at bibspec{book}{Book}%
+  \make at bibspec{collection.article}{InCollection}%
+  \make at bibspec{conference}{Conference}%
+  \make at bibspec{innerbook}{InBook}%
+  \make at bibspec{report}{TechReport}%
+  \make at bibspec{thesis}{PhdThesis}%
+  \make at bibspec{webpage}{Misc}%
+%    \end{macrocode}
+% Set paragraph separation to 0, so that all \verb+\item+s produced by
+% \textsf{amsrefs} appear superimposed in the output:
+%    \begin{macrocode}
+  \ltb at parskip=\parskip
+  \ltb at baselineskip=\baselineskip
+  \let\ltb at item=\item
+  \parskip=0pt
+  \baselineskip=0pt
+  \let\item=\relax
+%    \end{macrocode}
+% \verb+\fld at elt+ is defined to be ``?'' by
+% \textsf{amsrefs}. Sometimes this character gets shipped out; we
+% simply remove it by redefining \verb+\fld at elt+.
+%    \begin{macrocode}
+  \let\fld at elt=\relax
+  \bibselect*{#1}%
+  \bib at write{\@percentchar\space End of #2.bib}%
+  \immediate\closeout\@bibfile
+  \parskip=\ltb at parskip
+  \baselineskip=\ltb at baselineskip
+  \let\item=\ltb at item
+}
+%    \end{macrocode}
+% \end{macro}
+%
+
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+\endinput


Property changes on: trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/ltb2bib/ltb2bib.ins	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,57 @@
+%% Copyright (C) 2017 by Laurent Bartholdi <laurent.bartholdi at gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Laurent Bartholdi.
+%%
+%% This work consists of the files ltb2bib.dtx and ltb2bib.ins
+%% and the derived filebase ltb2bib.sty.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/ltb2bib}
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2017 by Laurent Bartholdi <laurent.bartholdi at gmail.com>
+--------------------------------------------------------------------------
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+  http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+\endpreamble
+
+\generate{\file{ltb2bib.sty}{\from{ltb2bib.dtx}{package}}}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{*                                                           *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX:                    *}
+\Msg{*                                                           *}
+\Msg{*     ltb2bib.sty                                          *}
+\Msg{*                                                           *}
+\Msg{* To produce the documentation run the file ltb2bib.dtx    *}
+\Msg{* through LaTeX.                                            *}
+\Msg{*                                                           *}
+\Msg{* Happy TeXing!                                             *}
+\Msg{*                                                           *}
+\Msg{*************************************************************}
+
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/ltb2bib/ltb2bib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ltb2bib/ltb2bib.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/ltb2bib/ltb2bib.sty	2017-04-10 22:07:52 UTC (rev 43746)
@@ -0,0 +1,174 @@
+%%
+%% This is file `ltb2bib.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltb2bib.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2017 by Laurent Bartholdi <laurent.bartholdi at gmail.com>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%%   http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%% 
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{ltb2bib}
+    [2017/04/03 0.01 First release in the wild]
+\ProvidesPackage{ltb2bib}[2017/04/03 v0.01]
+\@ifundefined{thebibliography}{\newenvironment{thebibliography}{}{}}{}
+\@ifundefined{footnotesize}{\let\footnotesize\relax}{}
+\RequirePackage{amsrefs}
+\RequirePackage{xpatch}
+\newwrite\@bibfile
+\let\protected at iwrite\protected at write
+\xpatchcmd{\protected at iwrite}{\write}{\immediate\write}{}{}
+\def\bib at write#1{\protected at iwrite\@bibfile{\let~\relax\def\ndash{--}}{#1}}
+\gdef\space{ }
+\gdef\spsp{\space\space}
+\def\@author#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp author={\the\toks0},}%
+}
+\def\@editor#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp editor={\the\toks0},}%
+}
+\def\@translator#1{\toks0={}\toks1={}%
+  \def\name##1{\toks0=\expandafter{\the\toks0\the\toks1{##1}}\toks1={\spsp and }}%
+  #1
+  \bib at write{\spsp translator={\the\toks0},}%
+}
+\def\@contribution#1{\bib at write{\spsp contribution=\@charlb#1\@charrb,}}
+\def\@isbn#1{\def\fld at elt##1{\bib at write{\spsp isbn=\@charlb##1\@charrb,}}#1}
+\def\@issn#1{\def\fld at elt##1{\bib at write{\spsp issn=\@charlb##1\@charrb,}}#1}
+\def\@review#1{\def\MR##1{\let\MR\relax\bib at write{\spsp review={\MR{##1}},}}#1}
+\def\@partial#1{\bib at write{\spsp partial=\@charlb#1\@charrb,}}
+\def\@accessdate#1{\bib at write{\spsp accessdate=\@charlb#1\@charrb,}}
+\def\@address#1{\bib at write{\spsp address=\@charlb#1\@charrb,}}
+\def\@book#1{\bib at write{\spsp book=\@charlb#1\@charrb,}}
+\def\@booktitle#1{\bib at write{\spsp booktitle=\@charlb#1\@charrb,}}
+\def\@conference#1{\bib at write{\spsp conference=\@charlb#1\@charrb,}}
+\def\@copula#1{\bib at write{\spsp copula=\@charlb#1\@charrb,}}
+\def\@date#1{\bib at write{\spsp year=\@charlb#1\@charrb,}}
+\def\@doi#1{\bib at write{\spsp doi=\@charlb#1\@charrb,}}
+\def\@edition#1{\bib at write{\spsp edition=\@charlb#1\@charrb,}}
+\def\@eprint#1{\bib at write{\spsp eprint=\@charlb#1\@charrb,}}
+\def\@fulljournal#1{\bib at write{\spsp fulljournal=\@charlb#1\@charrb,}}
+\def\@hyphenation#1{\bib at write{\spsp hyphenation=\@charlb#1\@charrb,}}
+\def\@institution#1{\bib at write{\spsp institution=\@charlb#1\@charrb,}}
+\def\@journal#1{\bib at write{\spsp journal=\@charlb#1\@charrb,}}
+\def\@label#1{\bib at write{\spsp label=\@charlb#1\@charrb,}}
+\def\@language#1{\bib at write{\spsp language=\@charlb#1\@charrb,}}
+\def\@name#1{\bib at write{\spsp name=\@charlb#1\@charrb,}}
+\def\@note#1{\bib at write{\spsp note=\@charlb#1\@charrb,}}
+\def\@number#1{\bib at write{\spsp number=\@charlb#1\@charrb,}}
+\def\@organization#1{\bib at write{\spsp organization=\@charlb#1\@charrb,}}
+\def\@pages#1{\bib at write{\spsp pages=\@charlb#1\@charrb,}}
+\def\@part#1{\bib at write{\spsp part=\@charlb#1\@charrb,}}
+\def\@place#1{\bib at write{\spsp place=\@charlb#1\@charrb,}}
+\def\@publisher#1{\bib at write{\spsp publisher=\@charlb#1\@charrb,}}
+\def\@reprint#1{\bib at write{\spsp reprint=\@charlb#1\@charrb,}}
+\def\@school#1{\bib at write{\spsp school=\@charlb#1\@charrb,}}
+\def\@series#1{\bib at write{\spsp series=\@charlb#1\@charrb,}}
+\def\@setup#1{\bib at write{\spsp setup=\@charlb#1\@charrb,}}
+\def\@status#1{\bib at write{\spsp status=\@charlb#1\@charrb,}}
+\def\@subtitle#1{\bib at write{\spsp subtitle=\@charlb#1\@charrb,}}
+\def\@title#1{\bib at write{\spsp title=\@charlb#1\@charrb,}}
+\def\@translation#1{\bib at write{\spsp translation=\@charlb#1\@charrb,}}
+\def\@type#1{\bib at write{\spsp type=\@charlb#1\@charrb,}}
+\def\@url#1{\bib at write{\spsp url=\@charlb#1\@charrb,}}
+\def\@volume#1{\bib at write{\spsp volume=\@charlb#1\@charrb,}}
+\def\@xref#1{\bib at write{\spsp xref=\@charlb#1\@charrb,}}
+\def\@year#1{\bib at write{\spsp year=\@charlb#1\@charrb,}}
+\def\make at bibspec#1#2{\BibSpec{#1}{%
+    +{}{\bib at write{@#2\@charlb\current at citekey,}}{transition}
+    +{}{\@author}        {author}
+    +{}{\@editor}        {editor}
+    +{}{\@translator}    {translator}
+    +{}{\@contribution}  {contribution}
+    +{}{\@isbn}          {isbn}
+    +{}{\@issn}          {issn}
+    +{}{\@review}        {review}
+    +{}{\@partial}       {partial}
+    +{}{\@accessdate}    {accessdate}
+    +{}{\@address}       {address}
+    +{}{\@book}          {book}
+    +{}{\@booktitle}     {booktitle}
+    +{}{\@conference}    {conference}
+    +{}{\@copula}        {copula}
+    +{}{\@date}          {date}
+    +{}{\@doi}           {doi}
+    +{}{\@edition}       {edition}
+    +{}{\@eprint}        {eprint}
+    +{}{\@fulljournal}   {fulljournal}
+    +{}{\@hyphenation}   {hyphenation}
+    +{}{\@institution}   {institution}
+    +{}{\@journal}       {journal}
+    +{}{\@label}         {label}
+    +{}{\@language}      {language}
+    +{}{\@name}          {name}
+    +{}{\@note}          {note}
+    +{}{\@number}        {number}
+    +{}{\@organization}  {organization}
+    +{}{\@pages}         {pages}
+    +{}{\@part}          {part}
+    +{}{\@place}         {place}
+    +{}{\@publisher}     {publisher}
+    +{}{\@reprint}       {reprint}
+    +{}{\@school}        {school}
+    +{}{\@series}        {series}
+    +{}{\@setup}         {setup}
+    +{}{\@status}        {status}
+    +{}{\@subtitle}      {subtitle}
+    +{}{\@title}         {title}
+    +{}{\@translation}   {translation}
+    +{}{\@type}          {type}
+    +{}{\@url}           {url}
+    +{}{\@volume}        {volume}
+    +{}{\@xref}          {xref}
+    +{}{\@year}          {year}
+  +{}{\bib at write{\@charrb^^J}}{transition}
+}}
+\newskip\ltb at baselineskip
+\newskip\ltb at parskip
+\newcommand\writebib[2]{%
+  \immediate\openout\@bibfile=#2.bib
+  \bib at write{\@percentchar\space Converted bibliography from #1[.ltb] to #2.bib}%
+  \typeout{Writing bibliography to #2.bib...}%
+  \make at bibspec{article}{Article}%
+  \make at bibspec{partial}{InCollection}%
+  \make at bibspec{contribution}{InCollection}%
+  \make at bibspec{book}{Book}%
+  \make at bibspec{collection.article}{InCollection}%
+  \make at bibspec{conference}{Conference}%
+  \make at bibspec{innerbook}{InBook}%
+  \make at bibspec{report}{TechReport}%
+  \make at bibspec{thesis}{PhdThesis}%
+  \make at bibspec{webpage}{Misc}%
+  \ltb at parskip=\parskip
+  \ltb at baselineskip=\baselineskip
+  \let\ltb at item=\item
+  \parskip=0pt
+  \baselineskip=0pt
+  \let\item=\relax
+  \let\fld at elt=\relax
+  \bibselect*{#1}%
+  \bib at write{\@percentchar\space End of #2.bib}%
+  \immediate\closeout\@bibfile
+  \parskip=\ltb at parskip
+  \baselineskip=\ltb at baselineskip
+  \let\item=\ltb at item
+}
+
+\endinput
+%%
+%% End of file `ltb2bib.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex/ltb2bib/ltb2bib.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-04-10 22:04:27 UTC (rev 43745)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-04-10 22:07:52 UTC (rev 43746)
@@ -381,7 +381,7 @@
     lshort-japanese lshort-korean lshort-mongol lshort-persian
     lshort-polish lshort-portuguese lshort-russian lshort-slovak
     lshort-slovenian lshort-spanish lshort-thai lshort-turkish lshort-ukr
-    lshort-vietnamese lstaddons lstbayes lt3graph ltablex ltabptch
+    lshort-vietnamese lstaddons lstbayes lt3graph ltablex ltabptch ltb2bib
     ltxdockit ltxfileinfo ltximg ltxindex ltxkeys ltxmisc ltxnew ltxtools
     lua-alt-getopt lua-check-hyphen lua-visual-debug
     lua2dox luabibentry luabidi luacode luahyphenrules

Modified: trunk/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc	2017-04-10 22:04:27 UTC (rev 43745)
+++ trunk/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc	2017-04-10 22:07:52 UTC (rev 43746)
@@ -102,6 +102,7 @@
 depend jneurosci
 depend jurabib
 depend ksfh_nat
+depend ltb2bib
 depend listbib
 depend logreq
 depend margbib

Added: trunk/Master/tlpkg/tlpsrc/ltb2bib.tlpsrc
===================================================================


More information about the tex-live-commits mailing list