From def37d062156f0173eb3c24d480768489927c840 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 20 Sep 2011 23:13:59 +0000 Subject: new tikz+lualatex package pgfmolbio (20sep11) git-svn-id: svn://tug.org/texlive/trunk@24040 c570f23f-e606-0410-a88d-b1316a301751 --- .../lualatex/pgfmolbio/pgfmolbio.chromatogram.lua | 462 +++++++++++++++++++++ .../lualatex/pgfmolbio/pgfmolbio.chromatogram.tex | 185 +++++++++ .../tex/lualatex/pgfmolbio/pgfmolbio.sty | 50 +++ 3 files changed, 697 insertions(+) create mode 100644 Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.lua create mode 100644 Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.tex create mode 100644 Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.sty (limited to 'Master/texmf-dist/tex/lualatex') diff --git a/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.lua b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.lua new file mode 100644 index 00000000000..59d500cc0c0 --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.lua @@ -0,0 +1,462 @@ +-- +-- This is file `pgfmolbio.chromatogram.lua', +-- generated with the docstrip utility. +-- +-- The original source files were: +-- +-- pgfmolbio.dtx (with options: `pmb-chr-lua') +-- +-- Copyright (C) 2011 by Wolfgang Skala +-- +-- 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. +-- +module("pgfmolbio.chromatogram", package.seeall) + +local ALL_BASES = {"A", "C", "G", "T"} +local PGFKEYS_PATH = "/pgfmolbio/chromatogram/" + +local header, samples, + peaks, parms, + selectedPeaks, + lastScfFile + +local function baseToSampleIndex (baseIndex) + local result = tonumber(baseIndex) + if result then + return result + else + result = string.match(baseIndex, "base%s*(%d+)") + if tonumber(result) then + return peaks[tonumber(result)].offset + end + end +end + +local function stdProbStyle (prob) + local color = "" + if prob >= 0 and prob < 10 then + color = "black" + elseif prob >= 10 and prob < 20 then + color = "pmbTraceRed" + elseif prob >= 20 and prob < 30 then + color = "pmbTraceYellow" + else + color = "pmbTraceGreen" + end + return "ultra thick, " .. color +end + +local function findBasesInStr (target) + if not target then return end + local result = {} + for _, v in ipairs(ALL_BASES) do + if string.find(string.upper(target), v) then + table.insert(result, v) + end + end + return result +end + +function getMinMaxProbability () + local minProb = 0 + local maxProb = 0 + for _, currPeak in ipairs(selectedPeaks) do + for __, currProb in pairs(currPeak.prob) do + if currProb > maxProb then maxProb = currProb end + if currProb < minProb then minProb = currProb end + end + end + return minProb, maxProb +end + +local function getRange (rangeInput, regExp) + local lower, upper = string.match(rangeInput, regExp) + local step = string.match(rangeInput, "step%s*(%d*)") + return lower, upper, step +end + +local function readInt (file, n, offset) + if offset then file:seek("set", offset) end + local result = 0 + for i = 1, n do + result = result * 0x100 + string.byte(file:read(1)) + end + return result +end + +local function evaluateScfFile (file) + samples = {A = {}, C = {}, G = {}, T = {}} + peaks = {} + header = { + magicNumber = readInt(file, 4, 0), + samplesNumber = readInt(file, 4), + samplesOffset = readInt(file, 4), + basesNumber = readInt(file, 4), + leftClip = readInt(file, 4), + rightClip = readInt(file, 4), + basesOffset = readInt(file, 4), + comments = readInt(file, 4), + commentsOffset = readInt(file, 4), + version = readInt(file, 4), + sampleSize = readInt(file, 4), + codeSet = readInt(file, 4), + privateSize = readInt(file, 4), + privateOffset = readInt(file, 4) + } + if header.magicNumber ~= 0x2E736366 then + tex.error("Magic number in scf file '" .. lastScfFile .. "' corrupt!") + end + if header.version ~= 0x332E3030 then + tex.error("Scf file '" .. lastScfFile .. "' is not version 3.00!") + end + + file:seek("set", header.samplesOffset) + for baseIndex, baseName in ipairs(ALL_BASES) do + for i = 1, header.samplesNumber do + samples[baseName][i] = readInt(file, header.sampleSize) + end + + for _ = 1, 2 do + local preValue = 0 + for i = 1, header.samplesNumber do + samples[baseName][i] = samples[baseName][i] + preValue + if samples[baseName][i] > 0xFFFF then + samples[baseName][i] = samples[baseName][i] - 0x10000 + end + preValue = samples[baseName][i] + end + end + end + + for i = 1, header.basesNumber do + peaks[i] = { + offset = readInt(file, 4), + prob = {A, C, G, T}, + base + } + end + + for i = 1, header.basesNumber do + peaks[i].prob.A = readInt(file, 1) + end + + for i = 1, header.basesNumber do + peaks[i].prob.C = readInt(file, 1) + end + + for i = 1, header.basesNumber do + peaks[i].prob.G = readInt(file, 1) + end + + for i = 1, header.basesNumber do + peaks[i].prob.T = readInt(file, 1) + end + + for i = 1, header.basesNumber do + peaks[i].base = string.char(readInt(file, 1)) + end +end + +function readScfFile (filename) + if filename ~= lastScfFile then + lastScfFile = filename + local scfFile, errorMsg = io.open(filename, "rb") + if not scfFile then tex.error(errorMsg) end + evaluateScfFile(scfFile) + scfFile:close() + end +end + +function setParameters (newParms) + local sampleRangeMin, sampleRangeMax, sampleRangeStep = + getRange( + newParms.sampleRange or "1 to 500 step 1", + "([base]*%s*%d+)%s*to%s*([base]*%s*%d+)" + ) + local baseNumberRangeMin, baseNumberRangeMax, baseNumberRangeStep = + getRange( + newParms.baseNumberRange or "auto to auto step 10", + "([auto%d]*)%s+to%s+([auto%d]*)" + ) + + parms = { + sampleMin = baseToSampleIndex(sampleRangeMin) or 1, + sampleMax = baseToSampleIndex(sampleRangeMax) or 500, + sampleStep = sampleRangeStep or 1, + xUnit = newParms.xUnit or dimen("0.2mm")[1], + yUnit = newParms.yUnit or dimen("0.01mm")[1], + samplesPerLine = newParms.samplesPerLine or 500, + baselineSkip = newParms.baselineSkip or dimen("3cm")[1], + canvasHeight= newParms.canvasHeight or dimen("2cm")[1], + traceStyle = { + A = PGFKEYS_PATH .. "trace A style@style", + C = PGFKEYS_PATH .. "trace C style@style", + G = PGFKEYS_PATH .. "trace G style@style", + T = PGFKEYS_PATH .. "trace T style@style" + }, + tickStyle = { + A = PGFKEYS_PATH .. "tick A style@style", + C = PGFKEYS_PATH .. "tick C style@style", + G = PGFKEYS_PATH .. "tick G style@style", + T = PGFKEYS_PATH .. "tick T style@style" + }, + tickLength = newParms.tickLength or dimen("1mm")[1], + baseLabelText = { + A = "\\csname pmb@chr@base label A text\\endcsname", + C = "\\csname pmb@chr@base label C text\\endcsname", + G = "\\csname pmb@chr@base label G text\\endcsname", + T = "\\csname pmb@chr@base label T text\\endcsname" + }, + baseLabelStyle = { + A = PGFKEYS_PATH .. "base label A style@style", + C = PGFKEYS_PATH .. "base label C style@style", + G = PGFKEYS_PATH .. "base label G style@style", + T = PGFKEYS_PATH .. "base label T style@style" + }, + showBaseNumbers = newParms.showBaseNumbers, + baseNumberMin = tonumber(baseNumberRangeMin) or -1, + baseNumberMax = tonumber(baseNumberRangeMax) or -1, + baseNumberStep = tonumber(baseNumberRangeStep) or 10, + probDistance = newParms.probDistance or dimen("0.8cm")[1], + probStyle = newParms.probStyle or stdProbStyle, + tracesDrawn = findBasesInStr(newParms.tracesDrawn) or ALL_BASES, + ticksDrawn = newParms.ticksDrawn or "ACGT", + baseLabelsDrawn = newParms.baseLabelsDrawn or "ACGT", + probabilitiesDrawn = newParms.probabilitiesDrawn or "ACGT", + coordUnit = "mm", + coordFmtStr = "%s%s" + } +end + +function printTikzChromatogram () + selectedPeaks = {} + local tIndex = 1 + for rPeakIndex, currPeak in ipairs(peaks) do + if currPeak.offset >= parms.sampleMin + and currPeak.offset <= parms.sampleMax then + selectedPeaks[tIndex] = { + offset = currPeak.offset + 1 - parms.sampleMin, + base = currPeak.base, + prob = currPeak.prob, + baseIndex = rPeakIndex, + probXRight = parms.sampleMax + 1 - parms.sampleMin + } + if tIndex > 1 then + selectedPeaks[tIndex-1].probXRight = + (selectedPeaks[tIndex-1].offset + + selectedPeaks[tIndex].offset) / 2 + end + tIndex = tIndex + 1 + end + end + + if tIndex > 1 then + if parms.baseNumberMin == -1 then + parms.baseNumberMin = selectedPeaks[1].baseIndex + end + if parms.baseNumberMax == -1 then + parms.baseNumberMax = selectedPeaks[tIndex-1].baseIndex + end + end + + local samplesLeft = parms.sampleMax - parms.sampleMin + 1 + local currLine = 0 + while samplesLeft > 0 do + local yLower = -currLine * parms.baselineSkip + local yUpper = -currLine * parms.baselineSkip + parms.canvasHeight + local xRight = + (math.min(parms.samplesPerLine, samplesLeft) - 1) * parms.xUnit + tex.sprint( + "\\draw[" .. PGFKEYS_PATH .. "canvas style@style] (" .. + number.todimen(0, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yLower, parms.coordUnit, parms.coordFmtStr) .. + ") rectangle (" .. + number.todimen(xRight, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yUpper, parms.coordUnit, parms.coordFmtStr) .. + ");\n" + ) + samplesLeft = samplesLeft - parms.samplesPerLine + currLine = currLine + 1 + end + + for _, baseName in ipairs(parms.tracesDrawn) do + tex.sprint("\\draw[" .. parms.traceStyle[baseName] .. "] ") + local currSampleIndex = parms.sampleMin + local sampleX = 1 + local x = 0 + local y = 0 + local currLine = 0 + local firstPointInLine = true + + while currSampleIndex <= parms.sampleMax do + x = ((sampleX - 1) % parms.samplesPerLine) * parms.xUnit + y = samples[baseName][currSampleIndex] * parms.yUnit + - currLine * parms.baselineSkip + if sampleX % parms.sampleStep == 0 then + if not firstPointInLine then + tex.sprint(" -- ") + else + firstPointInLine = false + end + tex.sprint( + "(" .. + number.todimen(x, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(y, parms.coordUnit, parms.coordFmtStr) .. + ")" + ) + end + if sampleX ~= parms.sampleMax + 1 - parms.sampleMin then + if sampleX >= (currLine + 1) * parms.samplesPerLine then + currLine = currLine + 1 + tex.sprint(";\n\\draw[" .. parms.traceStyle[baseName] .. "] ") + firstPointInLine = true + end + else + tex.sprint(";\n") + end + sampleX = sampleX + 1 + currSampleIndex = currSampleIndex + 1 + end + end + + local currLine = 0 + local lastProbX = 1 + local probRemainder = false + + for _, currPeak in ipairs(selectedPeaks) do + while currPeak.offset > (currLine + 1) * parms.samplesPerLine do + currLine = currLine + 1 + end + + local x = ((currPeak.offset - 1) % parms.samplesPerLine) * parms.xUnit + local yUpper = -currLine * parms.baselineSkip + local yLower = -currLine * parms.baselineSkip - parms.tickLength + local tickOperation = "" + if string.find(string.upper(parms.ticksDrawn), currPeak.base) then + tickOperation = "--" + end + + tex.sprint( + "\\draw[" .. + parms.tickStyle[currPeak.base] .. + "] (" .. + number.todimen(x, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yUpper, parms.coordUnit, parms.coordFmtStr) .. + ") " .. + tickOperation .. + " (" .. + number.todimen(x, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yLower, parms.coordUnit, parms.coordFmtStr) .. + ")" + ) + if string.find(string.upper(parms.baseLabelsDrawn), currPeak.base) then + tex.sprint( + " node[" .. + parms.baseLabelStyle[currPeak.base] .. + "] {" .. + parms.baseLabelText[currPeak.base] .. + "}" + ) + end + + if parms.showBaseNumbers + and currPeak.baseIndex >= parms.baseNumberMin + and currPeak.baseIndex <= parms.baseNumberMax + and (currPeak.baseIndex - parms.baseNumberMin) + % parms.baseNumberStep == 0 then + tex.sprint( + " node[" .. PGFKEYS_PATH .. "base number style@style] {\\strut " .. + currPeak.baseIndex .. + "}" + ) + end + tex.sprint(";\n") + + if probRemainder then + tex.sprint(probRemainder) + probRemainder = false + end + local drawCurrProb = string.find( + string.upper(parms.probabilitiesDrawn), + currPeak.base + ) + local xLeft = lastProbX - 1 - currLine * parms.samplesPerLine + if xLeft < 0 then + local xLeftPrev = (parms.samplesPerLine + xLeft) * parms.xUnit + local xRightPrev = (parms.samplesPerLine - 1) * parms.xUnit + local yPrev = -(currLine-1) * parms.baselineSkip - parms.probDistance + if drawCurrProb then + tex.sprint( + "\\draw[" .. + parms.probStyle(currPeak.prob[currPeak.base]) .. + " ] (" .. + number.todimen(xLeftPrev, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yPrev, parms.coordUnit, parms.coordFmtStr) .. + ") -- (" .. + number.todimen(xRightPrev, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yPrev, parms.coordUnit, parms.coordFmtStr) .. + ");\n" + ) + end + xLeft = 0 + else + xLeft = xLeft * parms.xUnit + end + + local xRight = currPeak.probXRight - 1 - currLine * parms.samplesPerLine + if xRight >= parms.samplesPerLine then + if drawCurrProb then + local xRightNext = (xRight - parms.samplesPerLine) * parms.xUnit + local yNext = -(currLine+1) * parms.baselineSkip - parms.probDistance + probRemainder = + "\\draw[" .. + parms.probStyle(currPeak.prob[currPeak.base]) .. + " ] (" .. + number.todimen(0, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yNext, parms.coordUnit, parms.coordFmtStr) .. + ") -- (" .. + number.todimen(xRightNext, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(yNext, parms.coordUnit, parms.coordFmtStr) .. + ");\n" + end + xRight = (parms.samplesPerLine - 1) * parms.xUnit + else + xRight = xRight * parms.xUnit + end + + local y = -currLine * parms.baselineSkip - parms.probDistance + if drawCurrProb then + tex.sprint( + "\\draw[" .. + parms.probStyle(currPeak.prob[currPeak.base]) .. + " ] (" .. + number.todimen(xLeft, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(y, parms.coordUnit, parms.coordFmtStr) .. + ") -- (" .. + number.todimen(xRight, parms.coordUnit, parms.coordFmtStr) .. + ", " .. + number.todimen(y, parms.coordUnit, parms.coordFmtStr) .. + ");\n" + ) + end + lastProbX = currPeak.probXRight + end +end +-- +-- End of file `pgfmolbio.chromatogram.lua'. diff --git a/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.tex b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.tex new file mode 100644 index 00000000000..4aff5ef075c --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.chromatogram.tex @@ -0,0 +1,185 @@ +%% +%% This is file `pgfmolbio.chromatogram.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pgfmolbio.dtx (with options: `pmb-chr') +%% +%% Copyright (C) 2011 by Wolfgang Skala +%% +%% 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. +%% +\ProvidesFile{pgfmolbio.chromatogram.tex}[2011/09/20 v0.1 SCF Chromatograms] + +\RequireLuaModule{pgfmolbio.chromatogram} + +\definecolor{pmbTraceGreen}{RGB}{34,114,46} +\definecolor{pmbTraceBlue}{RGB}{48,37,199} +\definecolor{pmbTraceBlack}{RGB}{0,0,0} +\definecolor{pmbTraceRed}{RGB}{191,27,27} +\definecolor{pmbTraceYellow}{RGB}{233,230,0} + +\def\@pmb@chr@keydef#1{% + \pgfkeysdef{/pgfmolbio/chromatogram/#1}{% + \expandafter\def\csname pmb@chr@#1\endcsname{##1}% + }% +} +\def\@pmb@chr@stylekeydef#1{% + \pgfkeysdef{/pgfmolbio/chromatogram/#1}{% + \pgfkeys{/pgfmolbio/chromatogram/#1@style/.style={##1}}% + }% +} +\def\@pmb@chr@getkey#1{\csname pmb@chr@#1\endcsname} + +\@pmb@chr@keydef{sample range} + +\@pmb@chr@keydef{x unit} +\@pmb@chr@keydef{y unit} +\@pmb@chr@keydef{samples per line} +\@pmb@chr@keydef{baseline skip} +\@pmb@chr@stylekeydef{canvas style} +\@pmb@chr@keydef{canvas height} + +\@pmb@chr@stylekeydef{trace A style} +\@pmb@chr@stylekeydef{trace C style} +\@pmb@chr@stylekeydef{trace G style} +\@pmb@chr@stylekeydef{trace T style} +\pgfkeysdef{/pgfmolbio/chromatogram/trace style}{% + \pgfmolbioset[chromatogram]{ + trace A style={#1}, + trace C style={#1}, + trace G style={#1}, + trace T style={#1} + }% +} +\@pmb@chr@keydef{traces drawn} + +\@pmb@chr@stylekeydef{tick A style} +\@pmb@chr@stylekeydef{tick C style} +\@pmb@chr@stylekeydef{tick G style} +\@pmb@chr@stylekeydef{tick T style} +\pgfkeysdef{/pgfmolbio/chromatogram/tick style}{% + \pgfmolbioset[chromatogram]{ + tick A style={#1}, + tick C style={#1}, + tick G style={#1}, + tick T style={#1} + }% +} +\@pmb@chr@keydef{tick length} +\@pmb@chr@keydef{ticks drawn} + +\@pmb@chr@keydef{base label A text} +\@pmb@chr@keydef{base label C text} +\@pmb@chr@keydef{base label G text} +\@pmb@chr@keydef{base label T text} +\@pmb@chr@stylekeydef{base label A style} +\@pmb@chr@stylekeydef{base label C style} +\@pmb@chr@stylekeydef{base label G style} +\@pmb@chr@stylekeydef{base label T style} +\pgfkeysdef{/pgfmolbio/chromatogram/base label style}{% + \pgfmolbioset[chromatogram]{ + base label A style={#1}, + base label C style={#1}, + base label G style={#1}, + base label T style={#1} + }% +} +\@pmb@chr@keydef{base labels drawn} + +\newif\ifpmb@chr@showbasenumbers +\pgfkeys{/pgfmolbio/chromatogram/show base numbers/% + .is if=pmb@chr@showbasenumbers} +\@pmb@chr@stylekeydef{base number style} +\@pmb@chr@keydef{base number range} + +\@pmb@chr@keydef{probability distance} +\@pmb@chr@keydef{probabilities drawn} +\@pmb@chr@keydef{probability style function} + +\pgfkeysdef{/pgfmolbio/chromatogram/bases drawn}{% + \pgfmolbioset[chromatogram]{ + traces drawn=#1, + ticks drawn=#1, + base labels drawn=#1, + probabilities drawn=#1 + }% +} + +\pgfmolbioset[chromatogram]{% + sample range=1 to 500 step 1, + x unit=0.2mm, + y unit=0.01mm, + samples per line=500, + baseline skip=3cm, + canvas style={draw=none, fill=none}, + canvas height=2cm, + trace A style={pmbTraceGreen}, + trace C style={pmbTraceBlue}, + trace G style={pmbTraceBlack}, + trace T style={pmbTraceRed}, + tick A style={thin, pmbTraceGreen}, + tick C style={thin, pmbTraceBlue}, + tick G style={thin, pmbTraceBlack}, + tick T style={thin, pmbTraceRed}, + tick length=1mm, + base label A text=\strut A, + base label C text=\strut C, + base label G text=\strut G, + base label T text=\strut T, + base label A style=% + {below=4pt, font=\ttfamily\footnotesize, pmbTraceGreen}, + base label C style=% + {below=4pt, font=\ttfamily\footnotesize, pmbTraceBlue}, + base label G style=% + {below=4pt, font=\ttfamily\footnotesize, pmbTraceBlack}, + base label T style=% + {below=4pt, font=\ttfamily\footnotesize, pmbTraceRed}, + show base numbers, + base number style={pmbTraceBlack, below=-3pt, font=\sffamily\tiny}, + base number range=auto to auto step 10, + probability distance=0.8cm, + probability style function=nil, + bases drawn=ACGT +} + +\newif\ifpmb@chr@tikzpicture + +\newcommand\pmbchromatogram[2][]{% + \@ifundefined{useasboundingbox}% + {\pmb@chr@tikzpicturefalse\begin{tikzpicture}}% + {\pmb@chr@tikzpicturetrue\begingroup}% + \pgfmolbioset[chromatogram]{#1}% + \directlua{ + pgfmolbio.chromatogram.readScfFile("#2") + pgfmolbio.chromatogram.setParameters{ + sampleRange = "\@pmb@chr@getkey{sample range}", + xUnit = dimen("\@pmb@chr@getkey{x unit}")[1], + yUnit = dimen("\@pmb@chr@getkey{y unit}")[1], + samplesPerLine = \@pmb@chr@getkey{samples per line}, + baselineSkip = dimen("\@pmb@chr@getkey{baseline skip}")[1], + canvasHeight = dimen("\@pmb@chr@getkey{canvas height}")[1], + tracesDrawn = "\@pmb@chr@getkey{traces drawn}", + tickLength = dimen("\@pmb@chr@getkey{tick length}")[1], + ticksDrawn = "\@pmb@chr@getkey{ticks drawn}", + baseLabelsDrawn = "\@pmb@chr@getkey{base labels drawn}", + showBaseNumbers = \ifpmb@chr@showbasenumbers true\else false\fi, + baseNumberRange = "\@pmb@chr@getkey{base number range}", + probDistance = dimen("\@pmb@chr@getkey{probability distance}")[1], + probabilitiesDrawn = "\@pmb@chr@getkey{probabilities drawn}", + probStyle = \@pmb@chr@getkey{probability style function} + } + pgfmolbio.chromatogram.printTikzChromatogram() + }% + \ifpmb@chr@tikzpicture\endgroup\else\end{tikzpicture}\fi% +} +\endinput +%% +%% End of file `pgfmolbio.chromatogram.tex'. diff --git a/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.sty b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.sty new file mode 100644 index 00000000000..46aa6e10a9d --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/pgfmolbio/pgfmolbio.sty @@ -0,0 +1,50 @@ +%% +%% This is file `pgfmolbio.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% pgfmolbio.dtx (with options: `pgfmolbio') +%% +%% Copyright (C) 2011 by Wolfgang Skala +%% +%% 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. +%% +\ProvidesPackage{pgfmolbio}[2011/09/20 v0.1 Molecular biology graphs with TikZ] +\NeedsTeXFormat{LaTeX2e}[1999/12/01] + +\newif\ifpmb@loadmodule@chromatogram + +\DeclareOption{chromatogram}{ + \pmb@loadmodule@chromatogramtrue +} +\ProcessOptions + +\RequirePackage{luatexbase-modutils} + \RequireLuaModule{lualibs} +\RequirePackage{tikz} + \usetikzlibrary{positioning} + +\RequirePackage{xcolor} + +\newcommand\pgfmolbioset[2][]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty% + \pgfqkeys{/pgfmolbio}{#2}% + \else% + \pgfqkeys{/pgfmolbio/#1}{#2}% + \fi% +} + +\ifpmb@loadmodule@chromatogram + \input{pgfmolbio.chromatogram.tex} +\fi +\endinput +%% +%% End of file `pgfmolbio.sty'. -- cgit v1.2.3