summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx')
-rw-r--r--Master/texmf-dist/source/lualatex/pgfmolbio/pgfmolbio.dtx26
1 files changed, 14 insertions, 12 deletions
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
-%<pgfmolbio-tex>\ProvidesPackage{pgfmolbio}[2012/10/01 v0.2 Molecular biology graphs with TikZ]
+%<pgfmolbio-tex>\ProvidesPackage{pgfmolbio}[2013/08/01 v0.21 Molecular biology graphs with TikZ]
%<pgfmolbio-tex>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<pgfmolbio-lua>module("pgfmolbio", package.seeall)
-%<pmb-chr-tex>\ProvidesFile{pgfmolbio.chromatogram.tex}[2012/10/01 v0.2 SCF chromatograms]
+%<pmb-chr-tex>\ProvidesFile{pgfmolbio.chromatogram.tex}[2013/08/01 v0.21 SCF chromatograms]
%<pmb-chr-lua>module("pgfmolbio.chromatogram", package.seeall)
-%<pmb-dom-tex>\ProvidesFile{pgfmolbio.domains.tex}[2012/10/01 v0.2 Protein domains]
+%<pmb-dom-tex>\ProvidesFile{pgfmolbio.domains.tex}[2013/08/01 v0.21 Protein domains]
%<pmb-dom-lua>module("pgfmolbio.domains", package.seeall)
-%<pmb-con-tex>\ProvidesFile{pgfmolbio.convert.tex}[2012/10/01 v0.2 pgfmolbio graph conversion]
+%<pmb-con-tex>\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}<unit>
-% \DescribeOption{}{coordinate format string}{\%s\%s}<format string>\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}<format string>\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