From 3d97b842f77d38b6981e4218a5adc108fc3bb960 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 2 Aug 2013 23:22:03 +0000 Subject: pgfmolbio (31jul13) git-svn-id: svn://tug.org/texlive/trunk@31334 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/lualatex/pgfmolbio/pgfmolbio.dtx | 26 ++++++++++++---------- .../source/lualatex/pgfmolbio/pgfmolbio.ins | 6 ++--- 2 files changed, 17 insertions(+), 15 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx b/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx index 95c27940ce2..eb4fc315258 100644 --- a/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx +++ b/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2012 by Wolfgang Skala +% Copyright (C) 2013 by Wolfgang Skala % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -13,14 +13,14 @@ % \fi % % \iffalse -%\ProvidesPackage{pgfmolbio}[2012/10/01 v0.2 Molecular biology graphs with TikZ] +%\ProvidesPackage{pgfmolbio}[2013/08/01 v0.21 Molecular biology graphs with TikZ] %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %module("pgfmolbio", package.seeall) -%\ProvidesFile{pgfmolbio.chromatogram.tex}[2012/10/01 v0.2 SCF chromatograms] +%\ProvidesFile{pgfmolbio.chromatogram.tex}[2013/08/01 v0.21 SCF chromatograms] %module("pgfmolbio.chromatogram", package.seeall) -%\ProvidesFile{pgfmolbio.domains.tex}[2012/10/01 v0.2 Protein domains] +%\ProvidesFile{pgfmolbio.domains.tex}[2013/08/01 v0.21 Protein domains] %module("pgfmolbio.domains", package.seeall) -%\ProvidesFile{pgfmolbio.convert.tex}[2012/10/01 v0.2 pgfmolbio graph conversion] +%\ProvidesFile{pgfmolbio.convert.tex}[2013/08/01 v0.21 pgfmolbio graph conversion] % %<*driver> \documentclass[captions=tableheading,cleardoublepage=empty,titlepage=false]{scrreprt} @@ -1791,8 +1791,8 @@ % You can change the format of the coordinates by the following keys: % % \DescribeOption{}{coordinate unit}{mm} -% \DescribeOption{}{coordinate format string}{\%s\%s}\relax -% \pkg{pgfmolbio} internally calculates dimensions in scaled points, but usually converts them before returning them to \TeX. To this end, it selects the \meta{unit} stored in \opt{coordinate unit} (any of the standard \TeX\ units of measurement: \texttt{bp}, \texttt{cc}, \texttt{cm}, \texttt{dd}, \texttt{in}, \texttt{mm}, \texttt{pc}, \texttt{pt} or \texttt{sp}). In addition, the package formats the dimension according to the \meta{format string} given by \opt{coordinate format string}. This string basically follows the syntax of C's \texttt{printf} function, as described in the Lua reference manual. +% \DescribeOption{}{coordinate format string}{\letterpercent s\letterpercent s}\relax +% \pkg{pgfmolbio} internally calculates dimensions in scaled points, but usually converts them before returning them to \TeX. To this end, it selects the \meta{unit} stored in \opt{coordinate unit} (any of the standard \TeX\ units of measurement: \texttt{bp}, \texttt{cc}, \texttt{cm}, \texttt{dd}, \texttt{in}, \texttt{mm}, \texttt{pc}, \texttt{pt} or \texttt{sp}). In addition, the package formats the dimension according to the \meta{format string} given by \opt{coordinate format string}. This string basically follows the syntax of C's \texttt{printf} function, as described in the Lua reference manual. (Note: Use |\letterpercent| instead of \texttt{\%}, since \TeX\ treats anything following a percent character as comment.) % % Depending on the values of \opt{coordinate unit} and \opt{coordinate format string}, dimensions will be printed in different ways (Table~\ref{tab:CoordFormat}). % @@ -2067,7 +2067,7 @@ % We introduce two package-wide keys. % \begin{macrocode} \pgfkeyssetvalue{/pgfmolbio/coordinate unit}{mm} -\pgfkeyssetvalue{/pgfmolbio/coordinate format string}{\%s\%s} +\pgfkeyssetvalue{/pgfmolbio/coordinate format string}{\letterpercent s\letterpercent s} % \end{macrocode} % Furthermore, we define two scratch token registers. Strictly speaking, the two conditionals belong to the \module{convert} module, but all modules need to know them. @@ -2149,14 +2149,16 @@ function dimToString(x) end % \end{macrocode} -% §getRange§ extracts a variable number of strings from §rangeInput§ by applying the regular expressions in its §arg§ table. §rangeInput§ contains the values of any of the \opt{... range} keys. +% §getRange§ extracts a variable number of strings from §rangeInput§ by applying the regular expressions in the table §matchStrings§, which derives from the varargs. §rangeInput§ contains the values of any of the \opt{... range} keys. % \begin{macrocode} function getRange(rangeInput, ...) if type(rangeInput) ~= "string" then return end local result = {} - for _, v in ipairs(arg) do - if type(v) ~= "string" then return end - table.insert(result, rangeInput:match(v)) + local matchStrings = table.pack(...) + for i = 1, matchStrings.n do + if type(matchStrings[i]) == "string" then + table.insert(result, rangeInput:match(matchStrings[i])) + end end return unpack(result) end diff --git a/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.ins b/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.ins index 5729ed29b2a..94e88bfb815 100644 --- a/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.ins +++ b/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.ins @@ -1,6 +1,6 @@ % pgfmolbio.ins %% -%% Copyright (C) 2012 by Wolfgang Skala +%% Copyright (C) 2013 by Wolfgang Skala %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -25,7 +25,7 @@ \preamble -Copyright (C) 2012 by Wolfgang Skala +Copyright (C) 2013 by Wolfgang Skala This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 @@ -43,7 +43,7 @@ version 2005/12/01 or later. -- generated with the docstrip utility.^^J% \ReferenceLines% --^^J% --- Copyright (C) 2012 by Wolfgang Skala^^J% +-- Copyright (C) 2013 by Wolfgang Skala^^J% --^^J% -- This work may be distributed and/or modified under the^^J% -- conditions of the LaTeX Project Public License, either version 1.3^^J% -- cgit v1.2.3