Commits

ssiebert committed 8604c2c

updated hardcoded R and knitr version and added sessionInfo at timepoint of analysis

Comments (0)

Files changed (5)

Additional_directory_13_knitr_source/Example_Analyses.Rnw

+\documentclass[11pt]{article}
+
+%% This document source is based on the excellent:
+%% http://www.math.smith.edu/~nhorton/sleuth/
+%%
+%% Specifically, 
+%% http://www.math.smith.edu/~nhorton/sleuth/chapter02.Rnw
+
+
+\usepackage[margin=1in,bottom=.5in,includehead,includefoot]{geometry}
+\usepackage{hyperref}
+\usepackage{language}
+\usepackage{alltt}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\fancyhf{}
+
+%% Now begin customising things. See the fancyhdr docs for more info.
+
+\chead{}
+\lhead[\sf \thepage]{\sf \leftmark}
+\rhead[\sf \leftmark]{\sf \thepage}
+\lfoot{}
+\cfoot{\emph{Nematostella vectensis} developmental transcriptome}
+\rfoot{}
+
+\newcounter{myenumi}
+\newcommand{\saveenumi}{\setcounter{myenumi}{\value{enumi}}}
+\newcommand{\reuseenumi}{\setcounter{enumi}{\value{myenumi}}}
+
+\pagestyle{fancy}
+
+\def\R{{\sf R}}
+\def\Rstudio{{\sf RStudio}}
+\def\RStudio{{\sf RStudio}}
+\def\term#1{\textbf{#1}}
+\def\tab#1{{\sf #1}}
+
+
+\usepackage{relsize}
+
+\newlength{\tempfmlength}
+\newsavebox{\fmbox}
+\newenvironment{fmpage}[1]
+     {
+   \medskip
+   \setlength{\tempfmlength}{#1}
+   \begin{lrbox}{\fmbox}
+     \begin{minipage}{#1}
+     \vspace*{.02\tempfmlength}
+		 \hfill
+	   \begin{minipage}{.95 \tempfmlength}}
+		 {\end{minipage}\hfill
+		 \vspace*{.015\tempfmlength}
+		 \end{minipage}\end{lrbox}\fbox{\usebox{\fmbox}}
+	 \medskip
+	 }
+
+
+\newenvironment{boxedText}[1][.98\textwidth]%
+{%
+\begin{center}
+\begin{fmpage}{#1}
+}%
+{%
+\end{fmpage}
+\end{center}
+}
+
+\newenvironment{boxedTable}[2][tbp]%
+{%
+\begin{table}[#1]
+  \refstepcounter{table}
+  \begin{center}
+\begin{fmpage}{.98\textwidth}
+  \begin{center}
+	\sf \large Box~\expandafter\thetable. #2
+\end{center}
+\medskip
+}%
+{%
+\end{fmpage}
+\end{center}
+\end{table}		% need to do something about exercises that follow boxedTable
+}
+
+
+\newcommand{\cran}{\href{http://www.R-project.org/}{CRAN}}
+
+\title{Exploratory Analyses of Additional Data Files}
+
+\author{
+Helm \emph{et al.}}
+
+\date{\today}
+
+<<echo=FALSE>>=
+options(width=70)
+@
+
+
+
+\begin{document}
+
+
+\maketitle
+\tableofcontents
+
+%\parindent=0pt
+
+
+%\SweaveOpts{
+%  	dev="pdf",
+%	fig.path="figures/",
+%	prompt=FALSE,   
+%	comment="#"    # turn off commenting of ouput (but perhaps we should not do this either
+%	}
+
+<<setup,echo=FALSE,message=FALSE>>=
+showOriginal=FALSE
+showNew=TRUE
+@ 
+
+\section{Introduction}
+
+This document presents a series of sample analyses of the other additional data 
+files. This pdf has been computed from the data in the Additional files with 
+the source code in Additional file 13, using 
+knitr, R, and TeXShop, as described in the final section of this document.
+
+While some of these analyses are drawn directly from results presented in the 
+paper, most are examples of specific follow-up questions that are likely to be 
+of interest.
+
+\section{Getting set up}
+
+The first thing we need to do is load the matrix and other data files. Open R
+and execute the following commands (substitute the relative paths shown here 
+with the paths to the Additional files you have downloaded):
+<<>>=
+m <- read.table("../Additional_file_2_Data_matrix.txt", header = TRUE)
+go <- read.table("../Additional_file_12_GO-transcript_annotations.txt", header=TRUE)
+@
+
+In the matrix, now loaded as m, each transcript is a row and each column has 
+transcript-specific data and analysis results. The following shows the names of 
+the matrix columns:
+
+<<>>=
+names(m)
+@
+
+There is a more detailed description of each of these columns at the beginning 
+of the matrix file itself, which you can view by opening it directly in a text 
+editor.
+
+\section{Visualizing the data}
+One of the most informative visualizations of differential expression data is 
+to plot the log fold change against the log of the concentration, as in Figure 
+2B-F in the main text.
+
+Here is a function that draws such a plot for the second interval 
+(7 HPF-12 HPF), with genes that have significant differences in red:
+
+<<>>=
+plotInterval2 <- function( D ){
+	plot(D$logCPM_7h_12h, D$logFC_7h_12h, pch=16, xlim=c(-1,13), ylim = c(-13,13),  col=rgb(0,0,0,40,maxColorValue=255), ylab = "log2FC", xlab = "log2CPM")
+	points(D[D$P_adjust_7h_12h < .05,]$logCPM_7h_12h, D[D$P_adjust_7h_12h <  .05,]$logFC_7h_12h, pch=16, col=rgb(255,0,0,70,maxColorValue=255))
+	abline(h=c(-1,1), col="grey")
+}
+@
+
+
+
+To make a plot of differential expression for the full matrix with this 
+function, you would do the following:
+
+<<>>=
+plotInterval2( m )
+@
+
+The position along the x axis gives an indication of mean abundance of the 
+transcript. Its position along the y axis gives an indication of the degree of 
+differential expression. Note that genes with no detectable counts at either of 
+the adjacent time points (7 HPF or 12 HPF, in this case) are excluded from the 
+figure. This is because their log fold change is infinite.
+
+
+You can make similar functions for other intervals by changing the column names 
+in the function above.
+
+\section{Significance of differential expression}
+
+The significance of differential expression over each interval, as corrected 
+for multiple independent tests, is in the columns that begin with ``P\_adjust\_''.
+For example, the significance of differential expression over the interval from 
+2 HPF to 7 HPF is in the column labeled ``m\$P\_adjust\_2h\_7h''
+
+The following isolates the subset of genes with significant differential 
+expression over the first interval and stores this reduced dataset in the 
+new data frame dif2\_7:
+
+<<>>=
+dif2_7 <- subset( m, m$P_adjust_2h_7h < 0.05 )
+nrow(dif2_7)
+@
+
+The number of rows indicates how many transcripts made it to the subset.
+
+Often you don't just want to know which genes have significant changes, you 
+want to find the genes with significant changes in a particular direction. The 
+direction of change, irrespective of significance, is indicated by the sign of 
+the columns whose names begin with ``logFC\_''. For each transcript, this is the 
+log of expression (ie, normalized counts) at the later interval divided by 
+expression at the earlier interval. This log fold change is positive expression 
+increases over the interval, negative if expression decreases over the 
+interval, and the absolute value indicates the magnitude of the relative change 
+in expression.
+
+To find the genes that not only have a significant change in abundance over the 
+first interval, but are also decreasing, you would use the following:
+
+<<>>=
+decreasing2_7 <- subset( m, m$P_adjust_2h_7h < 0.05 & m$logFC_2h_7h < 0 )
+nrow(decreasing2_7)
+@
+
+This is still quite a few genes. You can quickly view the most significant 
+genes in this subset by sorting by P\_adjust:
+
+<<>>=
+# Sort by adjusted P-value
+decreasing2_7 <- decreasing2_7[ order( decreasing2_7$P_adjust_2h_7h ), ]
+
+# Give a synopsis of the top 10 most significant genes
+cols <- c(1, 36) # The indeces of the columns to display
+decreasing2_7[1:10, cols]
+@
+
+There are a few ways to get more information about these genes. One would be to 
+download the reference from 
+\url{ftp://ftp.jgi-psf.org/pub/JGI_data/Nematostella_vectensis/v1.0/annotation/transcripts.Nemve1FilteredModels1.fasta.gz}, 
+search for the corresponding entry with the transcript name, and then take a 
+look at the sequence. There are also names of blast hits right in the matrix, 
+if you would like to get a quick sense of what you have. 
+
+
+
+
+
+\section{STEM profiles}
+
+Additional file 3 presents the STEM profiles. Each is a particular pattern in 
+the change of transcript abundance through time. STEM profile assignments are 
+included in the main matrix file (Additional file 7) and can be used to 
+filter genes.
+
+As an example, we will consider STEM profile 31. It indicates genes that have 
+peak abundance at the third time point (12 HPF). You could apply the same 
+procedure to other profiles of particular interest. 
+
+The following creates a new data frame with only the genes that were assigned 
+to this profile:
+
+<<>>=
+stem31 <- subset( m, m$STEM_profile == 31 )
+nrow(stem31)
+@
+
+Not all of the genes that are assigned to this profile will have significant 
+changes. To subset these further to only those that have a significant change 
+before and after the peak, one could use:
+
+<<>>=
+stem31sig <- subset( stem31, stem31$P_adjust_7h_12h < 0.05 & 
+	stem31$P_adjust_12h_24h < 0.05 )
+nrow(stem31sig)
+@
+
+\section{Gene Ontology Annotations}
+
+Since many genes can be assigned to each GO term and each GO term can be 
+assigned to many genes, they aren't stored in the main matrix. Instead, they 
+are in Additional file 10, which was already loaded into the dataframe go.
+
+To find all transcripts in a particular category, you will first need to look 
+up the corresponding GO ID. You can search for these IDs at 
+\url{http://www.geneontology.org}. In this example, we will explore 
+genes that have a molecular function of "sequence-specific DNA binding 
+transcription factor activity", which have an ID of "GO:0003700".
+
+The first step is to get a vector if the transcript IDs that have an annotation 
+for this category. Next, this vector is used as a filter to create a subset of 
+the original matrix that only has rows for the transcripts that have an 
+annotation in this category.
+
+<<>>=
+tf <- go[ go$GO_ID == "GO:0003700", ]$transcript
+mTF <- m[ m$transcript %in% tf, ]
+@
+
+Now, make a plot of the differential expression of transcription factors over 
+the second interval:
+
+<<>>=
+plotInterval2( mTF )
+@
+
+Most of the transcription factors with a significant change in abundance over 
+the second interval (7 HPF - 12 HPF) are increasing in 
+abundance. If you wanted to isolate only the transcription factors with 
+significant increases in abundance over this interval, you could use:
+
+<<>>=
+passFilter <- (mTF$logFC_7h_12h > 0) & (mTF$P_adjust_7h_12h < 0.05)
+passFilter [ is.na( passFilter ) ] <- FALSE
+mTF2sig <- mTF[ passFilter,  ]
+nrow( mTF2sig )
+@
+
+
+\section{How this document was made}
+This document is a computable data report compiled directly from the Additional 
+files. To recreate this file from the data, you will need to install:
+
+\begin{itemize}
+  \item R (\url{http://www.r-project.org}). This document was generated with 
+  version 2.15.2.
+  \item The R package knitr (\url{http://yihui.name/knitr/}), which can be 
+  installed from within R. This document was generated with version 1.0.5
+  \item pdflatex, which comes with LaTeX distributions 
+  (\url{http://www.latex-project.org/ftp.html}). This document was generated 
+  with version 3.1415926-2.5-1.40.14.
+\end{itemize}
+
+In addition, the following packages were used in the published analysis.
+
+<<>>=
+sessionInfo()
+@
+
+Download the Additional files to a single directory. Unzip Additional file 13, 
+open a terminal window, and cd to the expanded directory. Then launch R, and 
+run the following:
+
+<<eval=FALSE>>=
+library(knitr)
+knit("Example_Analyses.Rnw")
+quit()
+@
+
+This will generate a new tex file. To compile this tex file into a pdf 
+file, run the following at the shell command line:
+
+<<eval=FALSE, prompt=FALSE, engine='bash'>>=
+pdflatex Example_Analyses.tex
+@
+
+In addition to recreating this document as-is, you can directly edit and add to 
+the analyses in the .Rnw source file. You can also copy the R source code from 
+the .Rnw file.
+
+\end{document}

Additional_directory_13_knitr_source/language.sty

+\ProvidesPackage{language}
+
+\RequirePackage{xstring}
+\RequirePackage{xcolor}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Looking for a consistent typography for language elements.
+
+\newcommand{\R}{\mbox{\sf{R}}}
+\newcommand{\Rstudio}{\mbox{\sf{R}Studio}}
+\newcommand{\RStudio}{\mbox{\sf{R}Studio}}
+\newcommand{\Sage}{\mbox{\sf{Sage}}}
+
+\newcommand{\variable}[1]{{\color{green!50!black}\texttt{#1}}}
+\newcommand{\dataframe}[1]{{\color{blue!80!black}\texttt{#1}}}
+\newcommand{\function}[1]{{\color{purple!75!blue}\texttt{\StrSubstitute{#1}{()}{}()}}}
+\newcommand{\option}[1]{{\color{brown!80!black}\texttt{#1}}}
+\newcommand{\pkg}[1]{{\color{red!80!black}\texttt{#1}}}
+\providecommand{\code}[1]{}
+\renewcommand{\code}[1]{{\color{blue!80!black}\texttt{#1}}}
+
+\newcommand{\file}[1]{{\tt #1}}
+
+% This looks really hokey.  Probably need to redefine this.
+\providecommand{\model}[2]{}
+\renewcommand{\model}[2]{{$\,$\hbox{#1}\ \ensuremath{\sim}\ \hbox{#2}}}
+
+% These should be considered deprecated -- cease and disist
+\providecommand{\VN}[1]{}
+\renewcommand{\VN}[1]{{\color{green!50!black}\texttt{#1}}}
+\newcommand{\vn}[1]{{\color{green!50!black}\texttt{#1}}}
+\newcommand{\DFN}[1]{{\color{blue!80!black}\texttt{#1}}}
+\newcommand{\dfn}[1]{{\color{blue!80!black}\texttt{#1}}}
+

Additional_directory_13_knitr_source/xcolor.sty

+%%
+%% This is file `xcolor.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xcolor.dtx  (with options: `package')
+%% 
+%% IMPORTANT NOTICE:
+%% 
+%% For the copyright see the source file.
+%% 
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from xcolor.sty.
+%% 
+%% For distribution of the original source see the terms
+%% for copying and modification in the file xcolor.dtx.
+%% 
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%%
+%% ---------------------------------------------------------
+%% Copyright (C) 2003-2004 by Dr. Uwe Kern <xcolor@ukern.de>
+%% ---------------------------------------------------------
+%%
+%% Please send error reports and suggestions for
+%% improvements to the above email address.
+%%
+%% This package contains code copied from
+%%
+%% color.dtx [1999/02/16 v1.0i Standard LaTeX Color (DPC)]
+%% Copyright (C) 1994--1999 David Carlisle
+%%
+%% which is part of the Standard LaTeX `Graphics Bundle'.
+%%
+\def\XCfilesource{xcolor.dtx}%
+\def\XCfileversion{v2.00}%
+\def\XCfiledate{2004/07/04}%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{xcolor}[\XCfiledate\space\XCfileversion\space
+                         LaTeX color extensions (UK)]
+\edef\XC@catcodes
+ {\catcode`\noexpand\!\the\catcode`\!\relax
+  \catcode`\noexpand\:\the\catcode`\:\relax
+  \catcode`\noexpand\-\the\catcode`\-\relax
+  \catcode`\noexpand\+\the\catcode`\+\relax
+  \catcode`\noexpand\;\the\catcode`\;\relax
+  \catcode`\noexpand\"\the\catcode`\"\relax
+  \catcode`\noexpand\^^A\the\catcode`\^^A\relax}
+\catcode`\!=12
+\catcode`\:=12
+\catcode`\-=12
+\catcode`\+=12
+\catcode`\;=12
+\catcode`\"=12
+\catcode`\^^A=\catcode`\%
+\newif\ifcolors@ \colors@true
+\newif\ifcolorerrors@
+\newif\ifglobalcolors \globalcolorsfalse
+\newif\ifconvertcolorsD
+\newif\ifconvertcolorsU
+\newif\ifblendcolors
+\newif\ifmaskcolors
+\newif\ifXC@@tst
+\def\c@lor@error#1%
+ {\ifcolorerrors@\PackageError{xcolor}{Undefined color #1}\@ehc
+  \else\PackageWarning{xcolor}{Undefined color #1}\fi}
+\def\XC@append#1#2%
+ {\ifx#1\@undefined\def#1{#2}\else\ifx#1\relax\def#1{#2}\else
+  \toks@\expandafter{#1#2}\edef#1{\the\toks@}\fi\fi}
+\def\selectcolormodel#1%
+ {\@ifundefined{XC@mod@#1}%
+   {\c@lor@error{model `#1'}}%
+   {\expandafter\ifx\csname XC@mod@#1\endcsname\XC@mod@natural
+      \def\XC@tgt@mod##1{##1}\convertcolorsDfalse\convertcolorsUfalse
+    \else
+      \edef\XC@tgt@mod##1{#1}\convertcolorsDtrue\convertcolorsUtrue
+    \fi}}
+\def\XC@mod@named{named}
+\@tfor\@@tmp:={natural}{rgb}{cmy}{cmyk}{hsb}{gray}{RGB}{HTML}{HSB}{Gray}\do
+ {\expandafter\let\csname XC@mod@\@@tmp\endcsname\@@tmp
+  \edef\@@tmp
+   {\noexpand\DeclareOption{\@@tmp}{\noexpand\selectcolormodel{\@@tmp}}}%
+  \@@tmp}
+\DeclareOption{monochrome}
+ {\ExecuteOptions{hideerrors}%
+  \AtEndOfPackage
+   {\colors@false
+    \def\set@color{\c@lor@special\m@ne
+      {color push \current@color}\aftergroup\reset@color}%
+    \def\reset@color{\c@lor@special\m@ne{color pop}}%
+    \def\set@page@color{\c@lor@special\m@ne{background \current@color}}}}
+\let\XC@colornames\relax
+\DeclareOption{dvipsnames}{\XC@append\XC@colornames{\input{dvipsnam.def}}}
+\DeclareOption{svgnames}{\XC@append\XC@colornames{\input{svgnam.def}}}
+\DeclareOption{pst}{\def\XC@pst{\RequirePackage{pstcol}}}
+\DeclareOption{table}{\def\XC@table{\RequirePackage{colortbl}}}
+\DeclareOption{hyperref}
+ {\@tfor\@@tmp:={cite}{file}{link}{menu}{page}{run}{url}\do
+   {\expandafter\edef\csname KV@Hyp@x\@@tmp bordercolor\endcsname #1%
+     {\noexpand\XC@bordercolor{\@@tmp}{#1}}}%
+  \AtEndOfPackage
+   {\GetGinDriver\def\KV@Hyp@xpdfborder#1{\edef\@pdfborder{#1}}%
+    \@tfor\@@tmp:={dvips}\do
+     {\ifx\GinDriver\@@tmp
+       \def\KV@Hyp@xpdfborder#1%
+        {\edef\@pdfborder{#1}\expandafter\XC@pdfborder\@pdfborder\relax}%
+      \@break@tfor\fi}}}
+\providecommand\Gin@driver{}
+\@tfor\@@tmp:={dvipdf}{dvipdfm}{dvips}{dvipsone}{dviwin}{emtex}%
+              {pctex32}{pctexhp}{pctexps}{pctexwin}{pdftex}{tcidvi}%
+              {textures}{truetex}{vtex}\do
+ {\edef\@@tmp{\noexpand\DeclareOption{\@@tmp}%
+    {\noexpand\def\noexpand\Gin@driver{\@@tmp.def}}}%
+  \@@tmp}
+\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}
+\DeclareOption{oztex}{\ExecuteOptions{dvips}}
+\DeclareOption{xdvi}{\ExecuteOptions{dvips,monochrome}}
+\DeclareOption{showerrors}{\colorerrors@true}
+\DeclareOption{hideerrors}{\colorerrors@false}
+\DeclareOption{debugshow}{\catcode`\^^A=9 \let\GDebug\typeout}
+\DeclareOption*%
+ {\PackageInfo{xcolor}{Package option `\CurrentOption' ignored}}
+\ExecuteOptions{natural,showerrors}
+\InputIfFileExists{color.cfg}{}{}
+\ProcessOptions\relax
+\if!\Gin@driver!
+  \PackageError{xcolor}
+    {No driver specified}
+    {You should make a default driver option in a file \MessageBreak
+     color.cfg\MessageBreak
+     eg: \protect\ExecuteOptions{dvips}}
+\else
+  \PackageInfo{xcolor}{Driver file: \Gin@driver}
+  \@ifundefined{ver@\Gin@driver}{\input{\Gin@driver}}{}
+\fi
+\@nameuse{XC@pst}
+\@namedef{ver@color.sty}{1999/02/16}
+\@nameuse{XC@table}
+\long\def\@secondoffive#1#2#3#4#5{#2}
+\def\@namelet#1#2%
+ {\expandafter\let\csname#1\expandafter\endcsname\csname#2\endcsname}
+\def\@namexdef#1{\expandafter\xdef\csname #1\endcsname}
+\def\aftergroupdef#1#2%
+ {\edef\@@tmp{\noexpand\def\noexpand#1{#2}}%
+  \expandafter\endgroup\@@tmp}
+\begingroup
+\catcode`\!=13 \catcode`\:=13 \catcode`\-=13 \catcode`\+=13
+\catcode`\;=13 \catcode`\"=13
+\gdef\XC@edef#1#2%
+ {\begingroup
+  \ifnum\catcode`\!=13 \edef!{\string!}\fi
+  \ifnum\catcode`\:=13 \edef:{\string:}\fi
+  \ifnum\catcode`\-=13 \edef-{\string-}\fi
+  \ifnum\catcode`\+=13 \edef+{\string+}\fi
+  \ifnum\catcode`\;=13 \edef;{\string;}\fi
+  \ifnum\catcode`\"=13 \edef"{\string"}\fi
+  \edef\@@tmp{#2}\@onelevel@sanitize\@@tmp
+  \aftergroupdef#1\@@tmp}
+\endgroup
+\def\@ifxempty#1{\@@ifxempty#1\@@ifxempty\XC@@}
+\def\@@ifxempty#1#2\XC@@
+ {\ifx#1\@@ifxempty
+    \expandafter\@firstoftwo
+  \else
+    \expandafter\@secondoftwo
+  \fi}
+\def\xglobal{\xglobal@stop\begingroup\futurelet\@@tok\xglobal@test}
+\def\xglobal@test
+ {\expandafter\@tfor\expandafter\@@tmp
+   \expandafter:\expandafter=\xglobal@list\do
+    {\expandafter\ifx\@@tmp\@@tok
+       \aftergroup\let\aftergroup\xglobal@\@break@tfor\fi}%
+  \endgroup\global}
+\def\xglobal@stop{\let\xglobal@\@empty}
+\xglobal@stop
+\def\xglobal@list
+ {\definecolor\providecolor\colorlet\definecolorset\providecolorset
+  \blendcolors\maskcolors}
+\def\xglobalize@#1{\ifx\xglobal@\global\global\let#1#1\fi}
+\def\GetGinDriver{\expandafter\GetGinDriver@\Gin@driver.:}
+\def\GetGinDriver@#1.#2:%
+ {\def\GinDriver{#1}\@tempswatrue
+  \@tfor\@@tmp:={dvips}{pdftex}{dvipdf}{dvipdfm}{dvipsone}{vtex}{textures}%
+  \do{\ifx\GinDriver\@@tmp\@tempswafalse\@break@tfor\fi}%
+  \if@tempswa\def\GinDriver{hypertex}\fi}
+\def\@hex@Hex#1{\ifx#1\relax\else\expandafter\@hex@@Hex\expandafter#1\fi}
+\def\@hex@@Hex#1%
+ {\if#1aA\else \if#1bB\else \if#1cC\else \if#1dD\else \if#1eE\else
+  \if#1fF\else #1\fi\fi\fi\fi\fi\fi \@hex@Hex}
+\def\rdivide#1#2%
+ {\begingroup\toks@{#1}\edef\@@tmp{\noexpand\@tempdima\the#1}%
+  \@defaultunits\@tempdimb=#2pt\relax\@nnil \@@tmp\relax
+  \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
+    \def\@sign{}\fi
+  \ifdim\@tempdimb<\z@ \@tempdimb-\@tempdimb\edef\@sign{\@sign-}\fi
+  \ifdim\@tempdima<.1\maxdimen \ifdim\@tempdimb<.01\maxdimen
+    \lshift\@tempdima \lshift\@tempdimb \fi\fi
+  \@tempcnta=\@tempdima \@tempcntb=\@tempdimb
+  \count@=\@tempcnta \divide\count@\@tempcntb
+  \edef\@@tmp{\number\count@.}%
+  \@tempswatrue  \@rdivide \@rdivide \@rdivide \@rdivide \@rdivide
+  \@tempswafalse \@rdivide
+  \dimen@\@@tmp\p@ \ifnum\count@>4\advance\dimen@.00001\p@\fi
+  \dimen@\@sign\dimen@
+  \edef\@@tmp{\the\toks@\the\dimen@}%
+  \expandafter\endgroup\@@tmp}
+\def\@rdivide
+ {\multiply\count@\@tempcntb \advance\@tempcnta-\count@
+  \multiply\@tempcnta10 \count@=\@tempcnta \divide\count@\@tempcntb
+  \if@tempswa\edef\@@tmp{\@@tmp\number\count@}\fi}
+\def\rmultiply#1#2%
+ {\begingroup
+  \edef\@@mul{#2}\@tempdima\the#1\relax
+  \afterassignment\@tempdimb\@tempcntb=\@@mul\p@
+  \ifdim\@tempdima<\z@ \@tempdima-\@tempdima\def\@sign{-}\else
+    \def\@sign{}\fi
+  \ifnum\@tempcntb<\z@ \@tempcntb-\@tempcntb\edef\@sign{\@sign-}\fi
+  \lshift\@tempdima \dimen@\z@
+  \expandafter\@rmultiply\@@mul.0.\@nil
+  \advance\dimen@\@tempcntb\@tempdima \rshift\dimen@
+  \dimen@\@sign\dimen@
+  \edef\@@tmp{#1\the\dimen@}%
+  \expandafter\endgroup\@@tmp}
+\def\@rmultiply#1.#2.#3\@nil
+ {\def\@@tmp{}%
+  \@tfor\@@mul:=#2\do
+   {\edef\@@tmp
+     {\advance\dimen@\@@mul\@tempdima \divide\dimen@10 \@@tmp}}%
+  \@@tmp}
+\def\lshift#1{#1\expandafter\lshift@\the#1}
+\def\llshift#1{\lshift#1\lshift#1}
+\def\lshiftnum#1{\expandafter\lshiftnum@#1.00.:}
+\def\lshiftnum@#1.#2#3.#4:{#1#2\ifnum0#3>\z@.#3\fi}
+\def\llshiftnum#1{\expandafter\llshiftnum@#1\@empty.00.:}
+\def\llshiftnum@#1.#2#3#4.#5:%
+ {#1#2\ifnum0#3>\z@#3\else0\fi\ifnum0#4>\z@.#4\fi}
+\def\lshiftset#1#2{\edef\@@XC{\noexpand\lshiftnum{#2}}#1\@@XC\p@}
+\def\llshiftset#1#2{\edef\@@XC{\noexpand\llshiftnum{#2}}#1\@@XC\p@}
+\def\rshift#1{#1\expandafter\rshift@\the#1}
+\def\rrshift#1{\rshift#1\rshift#1}
+\begingroup
+\catcode`P=12
+\catcode`T=12
+\lowercase
+ {\def\@@tmp{\def\lshift@##1.##2##3PT{##1##2\ifnum0##3>\z@.##3\fi\p@}
+             \def\rshift@##1.##2PT{\rshift@@##1\relax##2\p@}}}
+\expandafter\endgroup\@@tmp
+\def\rshift@@#1#2%
+ {\ifx#2\relax.#1\else#1\expandafter\rshift@@\expandafter#2\fi}
+\def\XC@inflate#1#2#3#4%
+ {\edef#4{#2,\ifx#1\XC@mod@cmyk #3\else
+             \ifx#1\XC@mod@gray ,,,#3,,,\else ,#3,\fi\fi}}
+\def\XC@vec#1,#2,#3,#4,#5,#6,#7,#8,#9%
+ {\def\@@tmp{}%
+  \XC@vec@{#1}{#5}%
+  \@ifxempty{#2}{}%
+   {\XC@vec@{#2}{#6}\XC@vec@{#3}{#7}\@ifxempty{#4}{}{\XC@vec@{#4}{#8}}}%
+  \aftergroupdef#9\@@tmp}
+\def\XC@add{\begingroup \let\XC@vec@\XC@add@ \XC@vec}
+\def\XC@add@#1#2%
+ {\llshiftset\dimen@{#1}\llshiftset\@tempdima{#2}%
+  \advance\dimen@\@tempdima \rrshift\dimen@
+  \edef\@@tmp{\ifx\@@tmp\@empty\else\@@tmp,\fi\strip@pt\dimen@}}
+\def\XC@sub{\begingroup \let\XC@vec@\XC@sub@ \XC@vec}
+\def\XC@sub@#1#2{\XC@add@{#1}{-#2}}
+\def\XC@mul{\begingroup \let\XC@vec@\XC@mul@ \XC@vec}
+\def\XC@mul@#1#2%
+ {\llshiftset\dimen@{#1}\rmultiply\dimen@{#2}\rrshift\dimen@
+  \edef\@@tmp{\ifx\@@tmp\@empty\else\@@tmp,\fi\strip@pt\dimen@}}
+\def\XC@mix%
+ {\begingroup
+  \@tempdima\dimen@ \@tempdimb100\p@ \advance\@tempdimb-\@tempdima
+  \let\XC@vec@\XC@mix@ \XC@vec}
+\def\XC@mix@#1#2%
+ {\dimen@#1\@tempdima \advance\dimen@#2\@tempdimb \rrshift\dimen@
+  \edef\@@tmp{\ifx\@@tmp\@empty\else\@@tmp,\fi\strip@pt\dimen@}}
+\def\XC@calc@#1,#2,#3,#4,#5:#6%
+ {\toks@\expandafter{\csname XC@calc#6\endcsname}%
+  \the\toks@{#1}\@@tmp
+  \@ifxempty{#2}{}%
+   {\the\toks@{#2}\@tempa \the\toks@{#3}\@tempb
+    \@ifxempty{#4}%
+     {\edef\@@tmp{\@@tmp,\@tempa,\@tempb}}%
+     {\the\toks@{#4}\@tempc \edef\@@tmp{\@@tmp,\@tempa,\@tempb,\@tempc}}}}
+\def\XC@calcC#1#2%
+ {\lshiftset\dimen@{-#1}\advance\dimen@10\p@ \rshift\dimen@
+  \edef#2{\strip@pt\dimen@}}
+\def\XC@calcD#1#2%
+ {\dimen@#1\p@ \rdivide\dimen@\@@scl \edef#2{\strip@pt\dimen@}}
+\def\XC@calcH#1#2%
+ {\count@#1 \divide\count@\sixt@@n \edef\XC@@tmp{\hexnumber@\count@}%
+  \multiply\count@-\sixt@@n \advance\count@#1
+  \edef#2{\XC@@tmp\hexnumber@\count@}}
+\def\XC@calcM#1#2%
+ {\dimen@#1\p@ \dimen@\@@scl\dimen@ \advance\dimen@.5\p@
+  \afterassignment\dimen@\count@=\the\dimen@ \edef#2{\number\count@}}
+\def\XC@calcN#1#2%
+ {\edef#2{#1}%
+  \edef#2{\ifdim#2\p@<\z@0\else \ifdim#2\p@<\p@
+          0\expandafter\XC@@calcN#2.0.:\else 1\fi\fi}}
+\def\XC@@calcN#1.#2.#3:%
+ {\ifnum0#2=0 \else.\XC@@@calcN#2:\fi}
+\def\XC@@@calcN#1#2:%
+ {\ifnum0#1#2=0 \else #1\ifnum0#2=0 \else \XC@@@calcN#2:\fi\fi}
+\def\XC@calcS#1#2%
+ {\lshiftset\dimen@{#1}\dimen@\lshiftnum\@@scl\dimen@ \rrshift\dimen@
+  \edef#2{\strip@pt\dimen@}}
+\def\XC@calcT#1#2%
+ {\lshiftset\dimen@{#1}\advance\dimen@\lshiftnum\@@arg\p@ \rshift\dimen@
+  \edef#2%
+   {\ifdim\dimen@>\p@1\else\ifdim\dimen@<\z@0\else\strip@pt\dimen@\fi\fi}}
+\def\XC@calcU#1#2%
+ {\dimen@#1\p@
+  \ifdim\dimen@=\p@\else
+    \afterassignment\dimen@\count@=\the\dimen@
+    \ifnum\count@<\z@
+      \lshift\dimen@ \dimen@-\dimen@ \advance\dimen@10\p@ \rshift\dimen@
+    \fi
+  \fi
+  \edef#2{\strip@pt\dimen@}}
+\ifx\rangeRGB\@undefined\def\rangeRGB{255}\fi
+\ifx\rangeHSB\@undefined\def\rangeHSB{240}\fi
+\ifx\rangeGray\@undefined\def\rangeGray{15}\fi
+\ifx\adjustUCRBG\@undefined\def\adjustUCRBG{1,1,1,1}\fi
+\ifx\colorseriescycle\@undefined\def\colorseriescycle{16}\fi
+\def\XC@clr@rgb@white{,,}
+\def\XC@clr@cmy@white{0,0,0}
+\def\XC@clr@cmyk@white{0,0,0,0}
+\def\XC@clr@hsb@white{\@@hue,0,}
+\def\XC@clr@hsb@gray{\@@hue,0,.5}
+\def\XC@clr@hsb@black{\@@hue,0,0}
+\def\XC@clr@gray@white{}
+\@tfor\@@tmp:={grad}{last}{step}\do
+ {\@namelet{XC@met@\@@tmp}{@@tmp}}
+\def\definecolor{\@testopt{\XC@definecolor}{}}
+\def\XC@definecolor[#1]#2#3#4%
+ {\@ifundefined{XC@mod@#3}%
+   {\c@lor@error{model `#3'}}%
+   {\begingroup
+    \edef\@@cls{#1}\XC@edef\@@nam{#2}\edef\@@mod{#3}\XC@edef\@@clr{#4}%
+    \XC@logdef\@@nam
+    \ifx\@@mod\XC@mod@named
+      \XC@@colorlet\@@nam\@@clr
+    \else
+      \ifconvertcolorsD
+        \edef\@@mod{\XC@tgt@mod{#3}}\convertcolorspec{#3}\@@clr\@@mod\@@clr
+      \fi
+      \XC@coremodel\@@mod\@@clr
+      \csname color@\@@mod\expandafter\endcsname
+        \expandafter\@@drv\expandafter{\@@clr}%
+      \ifx\@@cls\@empty
+        \@temptokena{}%
+      \else
+        \@nameuse{define@color@\@@cls}{\@@nam}\@@drv
+        \@temptokena\expandafter{\@@col}%
+        \csname color@\@@cls\expandafter\endcsname
+          \expandafter\@@drv\expandafter{\@@nam}%
+      \fi
+      \toks@\expandafter{\@@drv}%
+      \edef\@@tmp
+       {\ifglobalcolors\global\else\xglobal@\fi
+        \noexpand\@namedef{\string\color@\@@nam}%
+         {\noexpand\xcolor@{\the\@temptokena}{\the\toks@}{\@@mod}{\@@clr}}}%
+    \fi
+    \expandafter\endgroup\@@tmp\xglobal@stop}}
+\let\xdefinecolor\definecolor
+\def\providecolor{\@testopt{\XC@providecolor}{}}
+\def\XC@providecolor[#1]#2#3#4%
+ {\XC@edef\XC@@tmp{#2}%
+  \@ifundefined{\string\color@\XC@@tmp}{\definecolor[#1]{#2}{#3}{#4}}%
+   {\ifnum\XC@tracing>0
+      \PackageInfo{xcolor}{Ignoring color definition `\XC@@tmp'}\fi}}
+\def\xcolor@#1#2#3#4{#2}
+\def\colorlet#1{\@testopt{\XC@colorlet{#1}}{}}
+\def\XC@colorlet#1[#2]#3%
+ {\begingroup
+  \XC@edef\@@nam{#1}\edef\@@mod{#2}\XC@edef\@@tmp{#3}\XC@@tsttrue
+  \@ifundefined{\string\color@\@@tmp}%
+    {}{\ifx\@@mod\@empty\XC@@tstfalse\fi}%
+  \ifXC@@tst
+    \extractcolorspec\@@tmp\@@tmp
+    \ifx\@@mod\@empty\else
+      \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
+      \edef\@@tmp{{\@@mod}{\@@tmp}}\fi
+    \edef\@@tmp{\noexpand\XC@definecolor[]{\@@nam}\@@tmp}%
+  \else
+    \XC@logdef\@@nam\XC@@colorlet\@@nam\@@tmp
+  \fi
+  \expandafter\endgroup\@@tmp\xglobal@stop}
+\def\XC@@colorlet#1#2%
+ {\@ifundefined{\string\color@#2}%
+   {\c@lor@error{`#2'}\let\@@tmp\@empty}%
+   {\edef\@@tmp
+     {\ifglobalcolors\global\else\xglobal@\fi
+      \noexpand\@namelet{\string\color@#1}{\string\color@#2}}}}
+\def\DefineNamedColor#1{\XC@definecolor[#1]}
+\def\definecolorset
+ {\let\XC@defclr\definecolor\@testopt{\XC@definecolorset}{}}
+\def\XC@definecolorset[#1]#2#3#4#5%
+ {\XC@edef\XC@@tmp{#5}\let\XC@@glb\xglobal@
+  \def\XC@@definecolorset##1,##2;%
+   {\@ifxempty{##1}{}%
+     {\let\xglobal@\XC@@glb
+      \XC@defclr[#1]{#3##1#4}{#2}{##2}\XC@@definecolorset}}%
+  \expandafter\XC@@definecolorset\XC@@tmp;,;}
+\def\providecolorset
+ {\let\XC@defclr\providecolor\@testopt{\XC@definecolorset}{}}
+\def\definecolorseries#1#2#3%
+ {\@testopt{\XC@definecolorseries{#1}{#2}{#3}}{}}
+\def\XC@definecolorseries#1#2#3[#4]#5%
+ {\@testopt{\XC@@definecolorseries{#1}{#2}{#3}[#4]{#5}}{}}
+\def\XC@@definecolorseries#1#2#3[#4]#5[#6]#7%
+ {\begingroup
+  \edef\@@mod{#2}%
+  \@ifxempty{#4}{\extractcolorspec{#5}\@@clr}{\edef\@@clr{{#4}{#5}}}%
+  \expandafter\convertcolorspec\@@clr\@@mod\@@clr
+  \@namexdef{\string\colorB@#1}{{\@@mod}{\@@clr}}%
+  \edef\@@met{#3}%
+  \ifx\@@met\XC@met@last
+    \@ifxempty{#6}{\extractcolorspec{#7}\@@tmp}{\edef\@@tmp{{#6}{#7}}}%
+    \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
+    \XC@inflate\@@mod\@@tmp\@@clr\@@tmp
+    \expandafter\XC@sub\@@tmp,\@@tmp
+  \else
+    \edef\@@tmp{#7}%
+  \fi
+  \@namexdef{\string\colorD@#1}{{\@@met}{\@@tmp}}%
+  \endgroup}
+\def\resetcolorseries{\@testopt{\XC@resetcolorseries}{}}
+\def\XC@resetcolorseries[#1]#2%
+ {\begingroup
+  \@namexdef
+   {\string\color@#2}{\noexpand\xcolor@{}{}\@nameuse{\string\colorB@#2}}%
+  \@namelet{@@tmp}{\string\colorD@#2}%
+  \edef\@@met{\expandafter\@firstoftwo\@@tmp}%
+  \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
+  \ifx\@@met\XC@met@step\else
+    \edef\@@scl{\@ifxempty{#1}\colorseriescycle{#1}}%
+    \expandafter\XC@calc@\@@tmp,,,,:D%
+  \fi
+  \@namexdef{\string\colorS@#2}{\@@tmp}%
+  \endgroup}
+\def\XC@step#1%
+ {\let\xcolor@\@gobbletwo\edef\@@tmp{\@nameuse{\string\color@#1}}%
+  \expandafter\XC@@step\@@tmp{#1}%
+  \@namexdef{\string\color@#1}{\noexpand\xcolor@{}{}{\@@mod}{\@@tmp}}}
+\def\XC@@step#1#2#3%
+ {\def\@@mod{#1}\def\@@tmp{#2}\edef\@@vec{\@nameuse{\string\colorS@#3}}%
+  \@whilenum\@tempcnta>\z@\do
+   {\XC@inflate\@@mod\@@tmp\@@vec\@@tmp
+    \expandafter\XC@add\@@tmp,\@@tmp \expandafter\XC@calc@\@@tmp,,,,:U%
+    \advance\@tempcnta\m@ne}}
+\def\XC@stepabs#1%
+ {\edef\@@tmp{\@nameuse{\string\colorB@#1}}%
+  \expandafter\XC@@step\@@tmp{#1}%
+  \edef\@@tmp
+   {\noexpand\def\noexpand\@@mod{\@@mod}%
+    \noexpand\def\noexpand\@@clr{\@@tmp}}}
+\def\blendcolors{\@ifstar{\XC@blendcolors\colorblend}{\XC@blendcolors{}}}
+\def\XC@blendcolors#1#2%
+ {\edef\colorblend{#1}\XC@edef\XC@@tmp{#2}%
+  \ifx\XC@@tmp\@empty
+    \xglobal@\blendcolorsfalse
+  \else
+    \xglobal@\blendcolorstrue
+    \expandafter\XC@@blendcolors\XC@@tmp!!\@nil
+  \fi
+  \xglobalize@\colorblend \xglobal@stop}
+\def\XC@@blendcolors!#1!#2!#3\@nil
+ {\@ifxempty{#1}{}%
+   {\@ifxempty{#2}%
+    {\edef\colorblend{\colorblend!#1!white}}%
+    {\edef\colorblend{\colorblend!#1!#2}\XC@@blendcolors!#3!\@nil}}}
+\blendcolors{}
+\def\maskcolors{\@testopt{\XC@maskcolors}{}}
+\def\XC@maskcolors[#1]#2%
+ {\XC@edef\colormask{#2}%
+  \ifx\colormask\@empty
+    \xglobal@\maskcolorsfalse \def\XC@mmod{}\def\XC@mclr{}%
+  \else
+    \xglobal@\maskcolorstrue \extractcolorspec\colormask\XC@mclr
+    \edef\XC@mmod{\expandafter\@firstoftwo\XC@mclr}%
+    \edef\XC@mclr{\expandafter\@secondoftwo\XC@mclr}%
+    \@ifxempty{#1}{}%
+     {\convertcolorspec\XC@mmod\XC@mclr{#1}\XC@mclr \edef\XC@mmod{#1}}%
+    \XC@coremodel\XC@mmod\XC@mclr
+  \fi
+  \xglobalize@\colormask \xglobalize@\XC@mmod \xglobalize@\XC@mclr
+  \xglobal@stop}
+\maskcolors{}
+\DeclareRobustCommand\color
+ {\@ifnextchar[\@undeclaredcolor\@declaredcolor}
+\def\@undeclaredcolor[#1]#2%
+ {\begingroup
+  \edef\@@mod{#1}\XC@edef\@@clr{#2}%
+  \ifblendcolors
+    \ifx\colorblend\@empty\else
+      \edef\@@mix{\expandafter\@gobble\colorblend}\@tempswafalse
+      \XC@coremodel\@@mod\@@clr\@xcolor@{}{}\@@mod\@@clr
+    \fi
+  \fi
+  \ifconvertcolorsU
+    \edef\@@tmp{\XC@tgt@mod{\@@mod}}%
+    \convertcolorspec\@@mod\@@clr\@@tmp\@@clr \let\@@mod\@@tmp
+  \fi
+  \ifmaskcolors
+    \convertcolorspec\@@mod\@@clr\XC@mmod\@@clr
+    \let\@@mod\XC@mmod
+    \XC@inflate\@@mod\XC@mclr\@@clr\@@tmp
+    \expandafter\XC@mul\@@tmp,\@@clr
+  \fi
+  \edef\@@tmp{\noexpand\XC@undeclaredcolor{\@@mod}{\@@clr}}%
+  \expandafter\endgroup\@@tmp}
+\def\XC@undeclaredcolor#1#2%
+ {\@ifundefined{color@#1}%
+   {\c@lor@error{model `#1'}}%
+   {\@nameuse{color@#1}\current@color{#2}%
+    \edef\XC@current@color{\noexpand\xcolor@{}{\current@color}{#1}{#2}}%
+    \XC@display}}
+\def\@declaredcolor#1%
+ {\XC@edef\XC@@tmp{#1}\XC@@tstfalse
+  \ifcase\XC@type{\XC@@tmp}\relax \XC@@tsttrue\or \relax\else
+    \ifblendcolors\XC@@tsttrue\fi \ifmaskcolors\XC@@tsttrue\fi
+    \ifconvertcolorsU\XC@@tsttrue\fi
+  \fi
+  \ifXC@@tst
+    \expandafter\XC@declaredcolor
+  \else
+    \expandafter\XC@@declaredcolor
+  \fi}
+\def\XC@declaredcolor
+ {\XC@split\XC@@tmp
+  \edef\@@tmp{\noexpand\@undeclaredcolor[\@@mod]{\@@clr}}%
+  \expandafter\endgroup\@@tmp}
+\def\XC@@declaredcolor
+ {\@namelet{XC@current@color}{\string\color@\XC@@tmp}%
+  \edef\current@color{\XC@current@color}%
+  \XC@display}
+\def\@xcolor@#1#2#3#4%
+ {\edef\@@mod{#3}\edef\@@clr{#4}%
+  \ifx\@@mix\@empty\else\expandafter\@xcolor@@\@@mix!!!!\@nil\fi
+  \if@tempswa
+    \@namelet{@@tmp}{XC@cnv@\@@mod @compl}%
+    \ifx\@@tmp\relax \expandafter\XC@calc@\@@clr,,,,:C\else
+                     \expandafter\@@tmp\@@clr,\fi
+    \let\@@clr\@@tmp
+  \fi}
+\def\@xcolor@@#1!#2!#3!#4!#5\@nil
+ {\dimen@\@ifxempty{#1}{100}{#1}\p@
+  \edef\@@mix{\@ifxempty{#2}{white}{#2}}%
+  \ifdim\dimen@=100\p@
+    \expandafter\XC@postfix\@@mix]\relax
+  \else\ifdim\dimen@=\z@
+    \extractcolorspec\@@mix\@@tmp
+    \edef\@@mod{\expandafter\@firstoftwo\@@tmp}%
+    \edef\@@clr{\expandafter\@secondoftwo\@@tmp}%
+  \else
+    \@namelet{@@tmp}{XC@clr@\@@mod @\@@mix}%
+    \ifx\@@tmp\relax
+      \extractcolorspec\@@mix\@@tmp
+      \ifx\@@mod\XC@mod@gray
+        \edef\@@mod{\expandafter\@firstoftwo\@@tmp}%
+          \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
+          \convertcolorspec\XC@mod@gray\@@clr\@@mod\@@clr
+      \else
+        \expandafter\convertcolorspec\@@tmp\@@mod\@@tmp
+      \fi
+    \else
+      \ifx\@@mod\XC@mod@hsb\expandafter\XC@extract@hue\@@clr:\@@hue\fi
+    \fi
+    \XC@inflate\@@mod\@@clr\@@tmp\@@tmp
+    \expandafter\XC@mix\@@tmp,\@@clr
+  \fi\fi
+  \@ifxempty{#3}%
+   {\@ifxempty{#4}{}{\@xcolor@@!#4!#5\@nil}}%
+   {\@xcolor@@#3!#4!#5\@nil}}
+\def\XC@split#1%
+ {\begingroup\XC@edef\@@tmp{#1}\expandafter\XC@split@i\@@tmp:\@nil}
+\def\XC@split@i#1:#2\@nil
+ {\@ifxempty{#2}{\XC@split@v}{\XC@split@ii#1,,:#2}}
+\def\XC@split@ii#1,#2,#3:#4:%
+ {\edef\XC@@mod{\@nameuse{XC@mod@#1}}\let\@tempa\@empty
+  \@ifxempty{#2}{\XC@@tsttrue\@tempdima\z@}{\XC@@tstfalse\@tempdima#2\p@}%
+  \XC@split@iii#4;,;}
+\def\XC@split@iii#1,#2;%
+ {\@ifxempty{#1}%
+   {\let\XC@@clr\@empty \@tempa \expandafter\XC@calc@\XC@@clr,,,,:U%
+    \let\@@mod\XC@@mod \let\@@clr\@@tmp}
+   {\XC@append\@tempa{\XC@split@iv{#1}{#2}}%
+    \ifXC@@tst\advance\@tempdima#2\p@\fi
+    \XC@split@iii}}
+\def\XC@split@iv#1#2%
+ {\def\@@tmp{#1}\XC@split@v
+  \ifx\@@mod\XC@@mod\else
+    \convertcolorspec\@@mod\@@clr\XC@@mod\@@clr
+  \fi
+  \dimen@#2\p@ \rdivide\dimen@\@tempdima
+  \edef\@@scl{\strip@pt\dimen@}%
+  \expandafter\XC@calc@\@@clr,,,,:S%
+  \ifx\XC@@clr\@empty\let\XC@@clr\@@tmp\else
+    \XC@inflate\XC@@mod\XC@@clr\@@tmp\@@tmp
+    \expandafter\XC@add\@@tmp,\XC@@clr
+  \fi}
+\def\XC@split@v{\count@\z@ \expandafter\XC@split@vi\@@tmp!\@nil}
+\def\XC@split@vi#1%
+ {\ifx#1-\advance\count@\@ne\expandafter\XC@split@vi
+  \else\expandafter\XC@split@vii\expandafter#1\fi}
+\def\XC@split@vii#1!#2\@nil
+ {\edef\@@nam{#1}\edef\@@mix{#2}%
+  \ifodd\count@\@tempswatrue\else\@tempswafalse\fi
+  \@ifundefined{\string\color@\@@nam}%
+   {\c@lor@error{`\@@nam'}\def\@@nam{black}}{}%
+  \let\xcolor@\@xcolor@\@nameuse{\string\color@\@@nam}}
+\def\XC@postfix#1#2]#3\relax
+ {\begingroup
+  \if#1[\@tempcnta#2\relax\XC@stepabs\@@nam
+  \else\@tempcnta\z@
+    \@tfor\@@tok:=#1#2\do
+     {\if\@@tok+\advance\@tempcnta\@ne
+      \else\if\@@tok-\advance\@tempcnta\m@ne
+      \else\@tempcnta\z@\expandafter\@break@tfor\fi\fi}%
+    \ifnum\@tempcnta=\z@\relax\else\XC@step\@@nam\fi
+    \let\@@tmp\@empty
+  \fi\expandafter\endgroup\@@tmp}
+\def\XC@display
+ {\XC@bcolor\@namelet{\string\color@.}{XC@current@color}%
+  \ifnum\XC@type{.}=1
+    \PackageWarning{xcolor}{Incompatible color definition}%
+  \else
+    \ifnum\XC@tracing>2
+      \begingroup \let\xcolor@\@empty \def\@nil{\string\@nil}%
+      \PackageInfo{xcolor}{Setting color `\XC@current@color'}%
+      \endgroup
+    \fi
+  \fi
+  \XC@mcolor\set@color\XC@ecolor\ignorespaces}
+\let\XC@bcolor\relax
+\let\XC@mcolor\relax
+\let\XC@ecolor\relax
+\def\textcolor#1#{\@textcolor{#1}}
+\def\@textcolor#1#2#3{\protect\leavevmode{\color#1{#2}#3}}
+\def\color@block#1#2#3{%
+ {\set@color\rlap{\ifcolors@\vrule\@width#1\@height#2\@depth#3\fi}}}
+\def\colorbox#1#{\color@box{#1}}
+\def\color@box#1#2{\color@b@x\relax{\color#1{#2}}}
+\def\fcolorbox#1#{\color@fbox{#1}}
+\def\color@fbox#1#2#3{%
+  \color@b@x{\fboxsep\z@\color#1{#2}\fbox}{\color#1{#3}}}
+\long\def\color@b@x#1#2#3{%
+ \leavevmode
+ \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}%
+ \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@
+ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@
+ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}%
+      \box\z@}}}
+\def\pagecolor
+ {\begingroup
+  \let\ignorespaces\endgroup \let\set@color\set@page@color
+  \color}
+\def\XC@bordercolor#1#2%
+ {\extractcolorspec{#2}\XC@@tmp
+  \expandafter\convertcolorspec\XC@@tmp\XC@mod@rgb\XC@@tmp
+  \expandafter\edef\csname @#1bordercolor\endcsname
+   {\expandafter\XC@@bordercolor\XC@@tmp,}}
+\def\XC@@bordercolor#1,#2,#3,{#1 #2 #3}
+\def\XC@pdfborder#1 #2 #3\relax
+ {\def\@@scl{80}\XC@calc@#1,#2,#3,,:S%
+  \edef\@pdfborder{\expandafter\XC@@bordercolor\@@tmp,}}
+\AtBeginDocument{\@ifundefined{ver@colortbl.sty}{}{%
+ \def\rowcolors{\@ifstar{\@rowcmdfalse\rowc@lors}{\@rowcmdtrue\rowc@lors}}%
+ \def\rowc@lors{\@testopt{\rowc@l@rs}{}}%
+ \def\rowc@l@rs[#1]#2#3#4%
+  {\global\rownum=\z@
+   \global\@rowcolorstrue
+   \@ifxempty{#3}%
+     {\def\@oddrowcolor{\@norowcolor}}%
+     {\def\@oddrowcolor{\gdef\CT@row@color{\CT@color{#3}}}}%
+   \@ifxempty{#4}%
+     {\def\@evenrowcolor{\@norowcolor}}%
+     {\def\@evenrowcolor{\gdef\CT@row@color{\CT@color{#4}}}}%
+   \if@rowcmd
+     \def\@rowcolors
+      {#1\if@rowcolors
+         \noalign{\relax\ifnum\rownum<#2\@norowcolor\else
+                  \ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi\fi}%
+       \fi}%
+   \else
+     \def\@rowcolors
+      {\if@rowcolors
+         \ifnum\rownum<#2\noalign{\@norowcolor}\else
+         #1\noalign{\ifodd\rownum\@oddrowcolor\else\@evenrowcolor\fi}\fi
+       \fi}%
+   \fi
+   \CT@everycr{\noalign{\rownum@step}\@rowcolors\the\everycr}%
+   \ignorespaces}%
+ \def\showrowcolors{\noalign{\global\@rowcolorstrue}\@rowcolors}%
+ \def\hiderowcolors{\noalign{\global\@rowcolorsfalse\@norowcolor}}%
+ \def\@norowcolor{\global\let\CT@row@color\relax}%
+ \newif\if@rowcolors
+ \newif\if@rowcmd
+ \ifx\rownum\@undefined\newcount\rownum\fi
+ \def\rownum@step{\global\advance\rownum\@ne}%
+ \def\CT@extract#1\columncolor#2#3\@nil{%
+   \if!#2%
+     \let\CT@column@color\@empty
+   \else
+     \if[#2%
+       \CT@extractb{#1}#3\@nil
+     \else
+       \XC@edef\XC@@tmp{#2}%
+       \edef\CT@column@color{\noexpand\CT@color{\XC@@tmp}}%
+       \CT@extractd{#1}#3\@nil
+     \fi
+   \fi}%
+ }}
+\def\extractcolorspec#1#2%
+ {\XC@split{#1}\aftergroupdef#2{{\@@mod}{\@@clr}}}
+\def\XC@extract@hue#1,#2:#3{\edef#3{#1}}
+\def\XC@type#1%
+ {\expandafter\expandafter\expandafter\XC@@type
+  \csname\string\color@#1\endcsname\@empty\@empty\@empty\XC@@}
+\def\XC@@type#1#2#3#4\XC@@
+ {\ifx#1\relax 0\else
+    \ifx#1\xcolor@
+      \ifx$#2$%
+        \ifx$#3$4\else3\fi\@gobbletwo
+      \else2\fi\@gobbletwo
+    \else1\fi
+  \fi}
+\def\tracingcolors{\begingroup\afterassignment\XC@tracingcolors\count@}
+\def\XC@tracingcolors{\aftergroupdef\XC@tracing{\the\count@}}
+\tracingcolors=0
+\def\XC@logdef#1%
+ {\ifnum\XC@tracing>1
+    \@ifundefined{\string\color@#1}%
+     {\ifnum\XC@tracing>2
+        \PackageInfo{xcolor}{Defining color `#1'}%
+      \fi}%
+     {\PackageInfo{xcolor}{Redefining color `#1'}}%
+  \fi}
+\def\color@setgroup{\begingroup\set@color}
+\let\color@begingroup\begingroup
+\def\color@endgroup{\endgraf\endgroup}
+\def\color@hbox{\hbox\bgroup\color@begingroup}
+\def\color@vbox{\vbox\bgroup\color@begingroup}
+\def\color@endbox{\color@endgroup\egroup}
+\def\convertcolorspec#1#2#3#4%
+ {\begingroup
+  \edef\sm{#1}\edef\tm{#3}\edef\@@tmp{#2}%
+  \ifx\sm\XC@mod@named
+    \extractcolorspec\@@tmp\@@tmp
+    \edef\sm{\expandafter\@firstoftwo\@@tmp}%
+    \edef\@@tmp{\expandafter\@secondoftwo\@@tmp}%
+  \fi
+  \ifx\sm\tm\else\csname XC@cnv@\sm\expandafter\endcsname\@@tmp,\fi
+  \aftergroupdef#4\@@tmp}
+\def\XC@coremodel#1#2%
+ {\ifx#1\XC@mod@RGB
+    \convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb\else
+  \ifx#1\XC@mod@HTML
+    \convertcolorspec#1#2\XC@mod@rgb#2\let#1\XC@mod@rgb\else
+  \ifx#1\XC@mod@HSB
+    \convertcolorspec#1#2\XC@mod@hsb#2\let#1\XC@mod@hsb\else
+  \ifx#1\XC@mod@Gray
+    \convertcolorspec#1#2\XC@mod@gray#2\let#1\XC@mod@gray\else
+  \ifx#1\XC@mod@named\else
+  \expandafter\XC@calc@#2,,,,:N\let#2\@@tmp
+  \fi\fi\fi\fi\fi}
+\def\XC@cnv@rgb#1,#2,#3,%
+ {\ifx\tm\XC@mod@cmy
+    \XC@calc@#1,#2,#3,,:C%
+  \else\ifx\tm\XC@mod@cmyk
+    \XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@cmy@cmyk\@@tmp,%
+  \else\ifx\tm\XC@mod@hsb
+    \XC@cnv@rgb@hsb#1,#2,#3,%
+  \else\ifx\tm\XC@mod@gray
+    \XC@cnv@rgb@gray#1,#2,#3,%
+  \else\ifx\tm\XC@mod@RGB
+    \edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:M%
+  \else\ifx\tm\XC@mod@HTML
+    \edef\@@scl{\@cclv}\XC@calc@#1,#2,#3,,:M%
+    \expandafter\XC@calc@\@@tmp,,:H%
+    \expandafter\XC@cnv@rgb@HTML\@@tmp,%
+  \else\ifx\tm\XC@mod@HSB
+    \XC@cnv@rgb@hsb#1,#2,#3,%
+    \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M%
+  \else\ifx\tm\XC@mod@Gray
+    \XC@cnv@rgb@gray#1,#2,#3,%
+    \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp
+  \else
+    \XC@calc@#1,#2,#3,,:N%
+  \fi\fi\fi\fi\fi\fi\fi\fi}
+\def\XC@cnv@rgb@hsb#1,#2,#3,%
+ {\count@\z@
+  \ifdim#2\p@>#1\p@ \else\advance\count@4 \fi
+  \ifdim#3\p@>#2\p@ \else\advance\count@2 \fi
+  \ifdim#1\p@>#3\p@ \else\advance\count@1 \fi
+  \ifcase\count@\or
+  \XC@@cnv@rgb@hsb{#3}{#2}{#1}3{}\or
+  \XC@@cnv@rgb@hsb{#2}{#1}{#3}1{}\or
+  \XC@@cnv@rgb@hsb{#2}{#3}{#1}3-\or
+  \XC@@cnv@rgb@hsb{#1}{#3}{#2}5{}\or
+  \XC@@cnv@rgb@hsb{#3}{#1}{#2}5-\or
+  \XC@@cnv@rgb@hsb{#1}{#2}{#3}1-\or
+  \def\@tempa{0}\def\@tempb{0}\XC@calcN{#3}\@tempc
+  \fi
+  \edef\@@tmp{\@tempa,\@tempb,\@tempc}}
+\def\XC@@cnv@rgb@hsb#1#2#3#4#5%
+ {\XC@calcN{#1}\@tempc \llshiftset\dimen@{#1}%
+  \llshiftset\@tempdimb{-#3}\advance\@tempdimb\dimen@
+  \llshiftset\@tempdima{-#5#2}\advance\@tempdima#5\dimen@
+  \advance\@tempdima#4\@tempdimb \rdivide\@tempdima{6\@tempdimb}%
+  \edef\@tempa{\ifdim\@tempdima>\p@1\else\strip@pt\@tempdima\fi}%
+  \rdivide\@tempdimb\dimen@
+  \edef\@tempb{\strip@pt\@tempdimb}}
+\def\XC@cnv@rgb@gray#1,#2,#3,%
+ {\llshiftset\dimen@{#1}\@tempdima30\dimen@
+  \llshiftset\dimen@{#2}\advance\@tempdima59\dimen@
+  \llshiftset\dimen@{#3}\advance\@tempdima11\dimen@
+  \rrshift\@tempdima \rdivide\@tempdima{100}%
+  \edef\@@tmp{\strip@pt\@tempdima}}
+\def\XC@cnv@rgb@HTML#1,#2,#3,%
+ {\edef\@@tmp{#1#2#3}}
+\def\XC@cnv@cmy#1,#2,#3,%
+ {\ifx\tm\XC@mod@rgb
+    \XC@calc@#1,#2,#3,,:C%
+  \else\ifx\tm\XC@mod@cmyk
+    \XC@cnv@cmy@cmyk#1,#2,#3,%
+  \else\ifx\tm\XC@mod@hsb
+    \XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb@hsb\@@tmp,%
+  \else\ifx\tm\XC@mod@gray
+    \XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp
+  \else\ifx\tm\XC@mod@RGB
+    \XC@calc@#1,#2,#3,,:C%
+    \edef\@@scl{\rangeRGB}\expandafter\XC@calc@\@@tmp,,:M%
+  \else\ifx\tm\XC@mod@HTML
+    \XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb\@@tmp,%
+  \else\ifx\tm\XC@mod@HSB
+    \XC@calc@#1,#2,#3,,:C\expandafter\XC@cnv@rgb@hsb\@@tmp,%
+    \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M%
+  \else\ifx\tm\XC@mod@Gray
+    \XC@cnv@rgb@gray#1,#2,#3,\XC@calcC\@@tmp\@@tmp
+    \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp
+  \else
+    \XC@calc@#1,#2,#3,,:N%
+  \fi\fi\fi\fi\fi\fi\fi\fi}
+\def\XC@cnv@cmy@cmyk#1,#2,#3,%
+ {\edef\@@scl
+   {\ifdim#1\p@<#2\p@
+    \ifdim#1\p@<#3\p@ #1\else #3\fi \else
+    \ifdim#2\p@<#3\p@ #2\else #3\fi \fi}%
+  \expandafter\XC@calc@\adjustUCRBG,:S%
+  \expandafter\XC@@cnv@cmy@cmyk\@@tmp,#1,#2,#3,}
+\def\XC@@cnv@cmy@cmyk#1,#2,#3,#4,#5,#6,#7,%
+ {\XC@add#5,#6,#7,,-#1,-#2,-#3,,\@@tmp \edef\@@tmp{\@@tmp,#4}%
+  \expandafter\XC@calc@\@@tmp,:N}
+\def\XC@cnv@cmyk#1,#2,#3,#4,%
+ {\ifx\tm\XC@mod@rgb
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
+  \else\ifx\tm\XC@mod@cmy
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,%
+  \else\ifx\tm\XC@mod@hsb
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
+    \expandafter\XC@cnv@rgb@hsb\@@tmp,%
+  \else\ifx\tm\XC@mod@gray
+    \XC@cnv@rgb@gray#1,#2,#3,%
+    \edef\@@arg{#4}\XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp
+  \else\ifx\tm\XC@mod@RGB
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
+    \edef\@@scl{\rangeRGB}\expandafter\XC@calc@\@@tmp,,:M%
+  \else\ifx\tm\XC@mod@HTML
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@cnv@cmy\@@tmp,%
+  \else\ifx\tm\XC@mod@HSB
+    \XC@cnv@cmyk@cmy#1,#2,#3,#4,\expandafter\XC@calc@\@@tmp,,:C%
+    \expandafter\XC@cnv@rgb@hsb\@@tmp,%
+    \edef\@@scl{\rangeHSB}\expandafter\XC@calc@\@@tmp,,:M%
+  \else\ifx\tm\XC@mod@Gray
+    \XC@cnv@rgb@gray#1,#2,#3,%
+    \edef\@@arg{#4}\XC@calcT\@@tmp\@@tmp \XC@calcC\@@tmp\@@tmp
+    \edef\@@scl{\rangeGray}\XC@calcM\@@tmp\@@tmp
+  \else
+    \XC@calc@#1,#2,#3,#4,:N%
+  \fi\fi\fi\fi\fi\fi\fi\fi}
+\def\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
+ {\edef\@@arg{#4}\XC@calc@#1,#2,#3,,:T}
+\def\XC@cnv@hsb#1,#2,#3,%
+ {\ifx\tm\XC@mod@HSB
+    \edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:M%
+  \else
+    \XC@cnv@hsb@rgb#1,#2,#3,%
+    \ifx\tm\XC@mod@rgb\else\expandafter\XC@cnv@rgb\@@tmp,\fi
+  \fi}
+\def\XC@cnv@hsb@rgb#1,#2,#3,%
+ {\llshiftset\dimen@{#1}\dimen@6\dimen@ \rrshift\dimen@
+  \afterassignment\dimen@\count@=\the\dimen@
+  \edef\@@tmp{\strip@pt\dimen@}%
+  \ifodd\count@\else\XC@calcC\@@tmp\@@tmp\fi
+  \edef\@@tmp
+   {\ifcase\count@ 0,\@@tmp,1\or \@@tmp,0,1\or 1,0,\@@tmp\or
+    1,\@@tmp,0\or \@@tmp,1,0\or 0,1,\@@tmp\or 0,\@@tmp,1\fi}%
+  \edef\@@scl{#2}\expandafter\XC@calc@\@@tmp,,:S%
+  \expandafter\XC@calc@\@@tmp,,:C%
+  \edef\@@scl{#3}\expandafter\XC@calc@\@@tmp,,:S}
+\def\XC@cnv@gray#1,%
+ {\ifx\tm\XC@mod@rgb
+    \XC@calcN{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+  \else\ifx\tm\XC@mod@cmy
+    \XC@calcC{#1}\@@tmp \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+  \else\ifx\tm\XC@mod@cmyk
+    \XC@calcC{#1}\@@tmp \edef\@@tmp{0,0,0,\@@tmp}%
+  \else\ifx\tm\XC@mod@hsb
+    \XC@calcN{#1}\@@tmp \edef\@@tmp{0,0,\@@tmp}%
+  \else\ifx\tm\XC@mod@RGB
+    \edef\@@scl{\rangeRGB}\XC@calcM{#1}\@@tmp
+    \edef\@@tmp{\@@tmp,\@@tmp,\@@tmp}%
+  \else\ifx\tm\XC@mod@HTML
+    \edef\@@scl{\@cclv}\XC@calcM{#1}\@@tmp \XC@calcH\@@tmp\@@tmp
+    \edef\@@tmp{\@@tmp\@@tmp\@@tmp}%
+  \else\ifx\tm\XC@mod@HSB
+    \edef\@@scl{\rangeHSB}\XC@calcM{#1}\@@tmp
+    \edef\@@tmp{0,0,\@@tmp}%
+  \else\ifx\tm\XC@mod@Gray
+    \edef\@@scl{\rangeGray}\XC@calcM{#1}\@@tmp
+  \else
+    \XC@calcN{#1}\@@tmp
+  \fi\fi\fi\fi\fi\fi\fi\fi}
+\def\XC@cnv@RGB#1,#2,#3,%
+ {\edef\@@scl{\rangeRGB}\XC@calc@#1,#2,#3,,:D\expandafter\XC@cnv@rgb\@@tmp,}
+\def\XC@cnv@HTML#1,%
+ {\edef\@@tmp{\expandafter\@hex@Hex#1\relax}\expandafter\XC@cnv@HTML@\@@tmp
+  \edef\@@scl{\@cclv}\expandafter\XC@calc@\@@tmp,,:D%
+  \expandafter\XC@cnv@rgb\@@tmp,}
+\def\XC@cnv@HTML@#1#2#3#4#5#6%
+ {\edef\@@tmp{\number"#1#2,\number"#3#4,\number"#5#6}}
+\def\XC@cnv@HSB#1,#2,#3,%
+ {\edef\@@scl{\rangeHSB}\XC@calc@#1,#2,#3,,:D\expandafter\XC@cnv@hsb\@@tmp,}
+\def\XC@cnv@Gray#1,%
+ {\edef\@@scl{\rangeGray}\XC@calcD{#1}\@@tmp \XC@cnv@gray\@@tmp,}
+\def\XC@cnv@cmyk@compl#1,#2,#3,#4,%
+ {\XC@cnv@cmyk@cmy#1,#2,#3,#4,%
+  \expandafter\XC@calc@\@@tmp,,:C%
+  \expandafter\XC@cnv@cmy@cmyk\@@tmp,}
+\def\XC@cnv@hsb@compl#1,#2,#3,%
+ {\lshiftset\dimen@{#1}\advance\dimen@\ifdim\dimen@<5\p@-\fi-5\p@
+  \rshift\dimen@
+  \edef\@@tmp{\strip@pt\dimen@}%
+  \lshiftset\dimen@{#3}%
+  \@tempdima#2\dimen@
+  \@tempdimb\@tempdima \advance\@tempdimb10\p@ \advance\@tempdimb-\dimen@
+  \ifdim\@tempdimb=\z@
+    \edef\@@tmp{\@@tmp,0,0}%
+  \else
+    \rdivide\@tempdima\@tempdimb \rshift\@tempdimb
+    \edef\@@tmp{\@@tmp,\strip@pt\@tempdima,\strip@pt\@tempdimb}%
+  \fi}
+\ifx\color@rgb\@undefined
+  \PackageInfo{xcolor}{Color model `rgb' added}
+  \def\color@rgb#1#2%
+   {\convertcolorspec\XC@mod@rgb{#2}\XC@mod@cmyk\XC@@tmp
+    \expandafter\color@cmyk\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@cmyk\@undefined
+  \PackageInfo{xcolor}{Color model `cmyk' added}
+  \def\color@cmyk#1#2%
+   {\convertcolorspec\XC@mod@cmyk{#2}\XC@mod@rgb\XC@@tmp
+    \expandafter\color@rgb\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@cmy\@undefined
+  \PackageInfo{xcolor}{Color model `cmy' added}
+  \def\color@cmy#1#2{\color@cmyk#1{#2,0}}
+\fi
+\ifx\color@hsb\@undefined\@tempswatrue
+\else\def\@@tmp{dvipdfm.def}\ifx\@@tmp\Gin@driver\@tempswatrue
+\else\def\@@tmp{textures.def}\ifx\@@tmp\Gin@driver\@tempswatrue
+\else\@tempswafalse\fi\fi\fi
+\if@tempswa
+  \PackageInfo{xcolor}{Color model `hsb' added}
+  \def\color@hsb#1#2%
+   {\convertcolorspec\XC@mod@hsb{#2}\XC@mod@rgb\XC@@tmp
+    \expandafter\color@rgb\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@gray\@undefined
+  \PackageInfo{xcolor}{Color model `gray' added}
+  \def\color@gray#1#2{\color@rgb#1{#2,#2,#2}}
+\fi
+\ifx\color@RGB\@undefined\@tempswatrue
+\else\ifnum\rangeRGB<255 \@tempswatrue
+\else\ifnum\rangeRGB>255 \@tempswatrue
+\else\@tempswafalse\fi\fi\fi
+\if@tempswa
+  \PackageInfo{xcolor}{Color model `RGB' added}
+  \def\color@RGB#1#2%
+   {\convertcolorspec\XC@mod@RGB{#2}\XC@mod@rgb\XC@@tmp
+    \expandafter\color@rgb\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@HTML\@undefined
+  \PackageInfo{xcolor}{Color model `HTML' added}
+  \def\color@HTML#1#2%
+   {\convertcolorspec\XC@mod@HTML{#2}\XC@mod@rgb\XC@@tmp
+    \expandafter\color@rgb\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@HSB\@undefined
+  \PackageInfo{xcolor}{Color model `HSB' added}
+  \def\color@HSB#1#2%
+   {\convertcolorspec\XC@mod@HSB{#2}\XC@mod@hsb\XC@@tmp
+    \expandafter\color@hsb\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\ifx\color@Gray\@undefined
+  \PackageInfo{xcolor}{Color model `Gray' added}
+  \def\color@Gray#1#2%
+   {\convertcolorspec\XC@mod@Gray{#2}\XC@mod@gray\XC@@tmp
+    \expandafter\color@gray\expandafter#1\expandafter{\XC@@tmp}}
+\fi
+\@ifundefined{XC@pst}{%
+\def\XC@getcolor#1#2%
+ {\begingroup
+  \XC@@getcolor#1\XC@@
+  \toks@\expandafter{\@@tmp}\aftergroupdef#2{\the\toks@}}
+\def\XC@@getcolor#1#2\XC@@
+ {\@ifxempty{#2}%
+   {\expandafter\XC@@@getcolor#1\XC@@}%
+   {\color{#1#2}\let\@@tmp\XC@current@color}}
+\def\XC@@@getcolor#1#2\XC@@
+ {\ifx#1\xcolor@
+    \def\@@tmp{\xcolor@#2}%
+  \else
+    \color{#1#2}\let\@@tmp\XC@current@color
+  \fi}
+}{% compatibility code begin
+\def\XC@getcolor#1#2%
+ {\@ifundefined{\string\color@#1}%
+   {\begingroup\color{#1}%
+    \edef\@@tmp
+     {\noexpand\edef\noexpand#2{\noexpand\expandafter\noexpand\c@lor@to@ps
+      \current@color\noexpand\@@}}%
+    \expandafter\endgroup\@@tmp}%
+   {\edef#2{\XC@usecolor{#1}}}}
+}% compatibility code end
+\def\XC@usecolor#1{\expandafter\XC@@usecolor#1\XC@@}
+\def\XC@@usecolor#1#2\XC@@
+ {\ifx#1\xcolor@
+    \expandafter\expandafter\expandafter\c@lor@to@ps#1#2\@@
+  \else
+    \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
+    \expandafter\c@lor@to@ps\csname\string\color@#1#2\endcsname\@@
+  \fi
+  \space}
+\let\XC@c@lor@to@ps\XC@usecolor
+\let\pst@getcolor\XC@getcolor
+\@ifundefined{XC@pst}{%
+  \let\pst@usecolor\XC@usecolor
+}{}
+\def\c@lor@special#1#2{\edef\@tempa{\write#1{#2}}\@tempa}
+\def\normalcolor{\let\current@color\default@color\set@color}
+\AtBeginDocument{\let\default@color\current@color}
+\@tfor\@@tmp:={dvipdf}{dvipdfm}{dvips}{pctex32}\do
+ {\edef\@@tmp{\@@tmp.def}%
+  \ifx\Gin@driver\@@tmp
+    \def\c@lor@@named#1,#2,#3\@@#4{\edef#4{ #1}}
+    \def\define@color@named#1#2{\let\@@col\@nnil}
+  \@break@tfor\fi}
+\@tfor\@@tmp:={dvipsone}{pctexps}{pdftex}{tcidvi}{truetex}{vtex}\do
+ {\edef\@@tmp{\@@tmp.def}%
+  \ifx\Gin@driver\@@tmp
+    \def\c@lor@@named#1,#2,#3\@@#4%
+     {\edef#4{\expandafter\expandafter\expandafter\@secondoffive
+               \csname\string\color@#1\endcsname}}
+    \def\define@color@named#1#2%
+     {\edef\@@col{#2}\@namedef{\string\color@#1}{{}{#2}{}{}{}}}
+  \@break@tfor\fi}
+\@tfor\@@tmp:={textures}\do
+ {\edef\@@tmp{\@@tmp.def}%
+  \ifx\Gin@driver\@@tmp
+    \def\c@lor@@named#1,#2,#3\@@#4%
+     {\edef\@tempa{\color@P@custom{#1}{\if!#2!1\else#2\fi}}%
+      \expandafter\def\expandafter#4\@tempa}
+    \def\define@color@named#1#2%
+     {\edef\@tempa{{#1}{#2}}\expandafter\AddCustomColor\@tempa
+      \edef\@@col{#2}}
+  \@break@tfor\fi}
+\definecolorset{rgb}{}{}{red,1,0,0;green,0,1,0;blue,0,0,1}
+\definecolorset{cmyk}{}{}{cyan,1,0,0,0;magenta,0,1,0,0;yellow,0,0,1,0}
+\definecolorset{gray}{}{}{black,0;darkgray,.25;gray,.5;lightgray,.75;white,1}
+\colorlet{orange}{red!50!yellow}
+\colorlet{violet}{blue!50!red}
+\colorlet{purple}{violet!50!red}
+\colorlet{brown}{violet!50!yellow}
+\XC@colornames
+\XC@catcodes
+\let\XC@catcodes\relax
+\@nameuse{xcolorcmd}
+\color{black}
+\endinput
+%%
+%% End of file `xcolor.sty'.

Additional_directory_13_knitr_source/xstring.sty

+\input xstring.tex
+\ProvidesPackage{xstring}[\xstringdate\space\space v\xstringversion\space\space String manipulations (C Tellechea)]
+\endinput

Additional_directory_13_knitr_source/xstring.tex

+%  __________________________________________________
+% |                                                  |
+% |                                                  |
+% |                  xstring v1.5d                   |
+% |                                                  |
+% |                  March 28 2010                   |
+% |                                                  |
+% |__________________________________________________|
+%
+% This is xtring.tex
+%
+% "xstring" package consists of the 7 following files:
+%   xstring.tex (this file)
+%   xstring.sty
+%   README
+%   xstring_doc_fr.tex, xstring_doc_fr.pdf (manual in french)
+%   xstring_doc_en.tex, xstring_doc_en.pdf (manual in english)
+%
+% Christian Tellechea 2008-2010
+% email : unbonpetit@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 Christian Tellechea
+% -------------------------------------------------------------------
+\def\xstringversion     {1.5d}
+\def\xstringdate        {2010/03/28}
+\def\xstringfrenchdate  {28 mars 2010}
+\def\xstringenglishdate {March $28^{\mathrm{th}}$ 2010}
+\edef\CurrentAtCatcode  {\the\catcode`\@}
+\catcode`\@=11
+\newwrite\@xs@message% canal pour les messages
+\newcount\integerpart\newcount\decimalpart% compteurs utilis\'es par xstring
+\newif\if@xs@empty
+
+\expandafter\ifx\csname @latexerr\endcsname\relax% on n'utilise pas LaTeX ?
+	\immediate\write\m@ne{Package: xstring \xstringdate\space\space v\xstringversion\space\space String manipulations (C Tellechea)}%
+	\long\def\@firstoftwo#1#2{#1}
+	\long\def\@secondoftwo#1#2{#2}
+	\long\def\@gobble#1{}
+	\long\def\@ifnextchar#1#2#3{%
+		\let\reserved@d=#1%
+		\def\reserved@a{#2}%
+		\def\reserved@b{#3}%
+		\futurelet\@let@arg\@ifnch}
+	\def\@ifnch{%
+		\ifx\@let@arg\@sptoken
+			\let\reserved@c\@xifnch
+		\else
+			\ifx\@let@arg\reserved@d
+				\let\reserved@c\reserved@a
+			\else
+				\let\reserved@c\reserved@b
+			\fi
+		\fi
+		\reserved@c}
+	\def\:{\let\@sptoken= } \:
+	\def\:{\@xifnch} \expandafter\def\: {\futurelet\@let@arg\@ifnch}
+	\def\@ifstar#1{\@ifnextchar *{\@firstoftwo{#1}}}
+	\long\def\@testopt#1#2{\@ifnextchar[{#1}{#1[{#2}]}}
+	\def\@empty{}
+\fi% fin des d\'efinitions LaTeX
+
+\def\@xs@testempty#1{%
+	\expandafter\ifx\expandafter\@empty\detokenize{#1}\@empty\@xs@emptytrue\else\@xs@emptyfalse\fi}
+
+% Ouvre un groupe o\`u les catcodes sont \`a 12 et \`a 10 pour les espaces
+% ensuite, appelle \@xs@ReadVerb qui lit un argument entre d\'elimiteurs verb
+\def\@xs@MakeVerb{% lit 1 argument et le transforme en verb
+	\begingroup% groupe o\`u les catcodes sont \`a 12 pour la lecture suivante
+		\def\do##1{\catcode`##112\relax}%
+		\dospecials% on entre dans le mode verb
+		\obeyspaces% et on tient compte des espaces
+		\@xs@ReadVerb}% et on va lire l'argument
+
+% D\'efinit \@xs@ReadVerb qui lit un argument entre d\'elimiteurs verb
+\def\setverbdelim#1{% d\'efinit quel est le d\'elimiteur de verb
+	\expandafter\@xs@testempty\expandafter{\@gobble#1}%
+	\if@xs@empty
+	\else
+		\begingroup
+			\newlinechar`\^^J%
+			\immediate\write\@xs@message
+			{Package xstring Warning: verb delimiter is not a single token on input line \the\inputlineno^^J}%
+		\endgroup
+	\fi
+	\def\@xs@ReadVerb##1#1##2#1{% lit ##2 qui est entre les d\'elimiteurs de verb
+		\endgroup% on ferme le groupe
+		\@xs@afterreadverb{##2}}}% on appelle l'ex\'ecution de fin
+
+% Assigne l'argument entre d\'elimiteur verb dans la sc #1' +
+\def\verbtocs#1{%
+	\def\@xs@afterreadverb##1{\def#1{##1}}%
+	\@xs@MakeVerb}
+
+% Cette macro d\'eveloppe \'eventuellement #2
+% puis le transforme en token et l'assigne \`a #1
+\begingroup% on ouvre un groupe o\`u...
+\catcode\z@12\relax% ...le caract\`ere 0 a 12 pour catcode
+\gdef\tokenize#1#2{%
+	\begingroup
+		\@xs@def\@xs@reserved@A{#2}% on d\'eveloppe en accord avec \fullexpandarg ou \noexpandarg
+		\def\@xs@AssignResult^^00##1^^00\@xs@nil{\gdef#1{##1}}% on assigne en tenant compte du \@xs@nil qui vient de la fin du fichier virtuel
+		\everyeof{\@xs@nil}% met un \@xs@nil \`a la fin du fichier virtuel
+		\endlinechar\m@ne
+		\catcode\z@12\relax
+		\expandafter\@xs@AssignResult\scantokens\expandafter{\expandafter^^00\@xs@reserved@A^^00}% on fait l'assignation
+	\endgroup}%
+\endgroup
+
+% Macro tr\`es simple qui assigne ou affiche le r\'esultat, selon la pr\'esence
+% ou non de #2 qui est l'argument optionnel venant en derni\`ere position des macros
+\def\@xs@ReturnResult#1#2{%
+	\def\@xs@argument@A{#1}%
+	\@xs@testempty{#2}%
+	\if@xs@empty
+		\@xs@argument@A
+	\else
+		\let#2\@xs@argument@A
+	\fi}
+
+% Pas d'expansion des arguments
+\def\normalexpandarg{%
+	\let\@xs@def\def% on d\'efinit \@xs@call avec \def
+	\def\@xs@expand##1{\unexpanded\expandafter{##1}}}
+\let\noexpandarg\normalexpandarg% synonyme
+
+% 1-d\'eveloppement du premier token des arguments
+\def\expandarg{%
+	\let\@xs@def\def% on d\'efinit \@xs@call avec \def
+	\def\@xs@expand##1{\unexpanded\expandafter\expandafter\expandafter{##1}}}
+
+% D\'eveloppement maximum des arguments
+\def\fullexpandarg{%
+	\let\@xs@def\edef% on d\'efinit\@xs@call avec \edef
+	\def\@xs@expand##1{##1}}% et on neutralise \@xs@expand
+
+\def\saveexpandmode{\let\@xs@saved@def\@xs@defarg\let\@xs@saved@expand\@xs@expand}
+\def\restoreexpandmode{\let\@xs@defarg\@xs@saved@def\let\@xs@expand\@xs@saved@expand}
+
+% Macro interne renvoyant #2 si son argument commence par une accolade ouvrante "{"
+% et #3 sinon (Ulrich Diez sur comp.text.tex)
+\def\@xs@ifbeginwithbrace#1{%
+	\csname @%
+		\expandafter\@gobble\string{% ne sert à rien si ce n'est \'equilibrer les accolades dans la d\'efinition
+		\expandafter\@gobble\expandafter{\expandafter{\string#1}%
+		\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\@firstoftwo
+		\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\@gobble
+		\expandafter\expandafter\expandafter\@gobble
+		\expandafter\expandafter\expandafter{\expandafter\string\expandafter}\string}%
+		\expandafter\@gobble\string}%
+		\@secondoftwo{first}{second}oftwo%
+	\endcsname}
+
+% Cette macro interne prend la 1ere unit\'e syntaxique de #1 et assigne le r\'esultat \`a #2
+\def\@xs@returnfirstsyntaxunit#1#2{%
+	\def\@xs@groupfound{\expandafter\def\expandafter#2\expandafter{\expandafter{#2}}\@xs@gobbleall}% on met #2 dans des accolades et on finit
+	\def\@xs@assignfirsttok##1##2\@xs@nil{\let\@xs@toks0\def#2{##1}}%
+	\def\@xs@testfirsttok{%
+		\let\@xs@next\@xs@assignfirsttok
+		\ifx\@xs@toks\bgroup
+			\expandafter\@xs@ifbeginwithbrace\expandafter{\@xs@argument}{\def\@xs@next{\afterassignment\@xs@groupfound\def#2}}{}%
+		\fi
+		\@xs@next}%
+	\def\@xs@argument{#1}%
+	\edef\@xs@next{\expandafter\@xs@beforespace\detokenize{#1} \@xs@nil}% #1 commence par un espace ?
+	%\expandafter\expandafter\expandafter\@xs@testempty\expandafter\expandafter\expandafter{\expandafter\@xs@beforespace\detokenize{#1} \@xs@nil}
+	\ifx\@xs@next\@empty
+		\def\@xs@next{\expandafter\ifx\expandafter\@empty\detokenize\expandafter{\@xs@argument}\@empty\let#2\@empty\else\def#2{ }\let\@xs@toks0\fi}%
+	\else
+		\def\@xs@next{\expandafter\futurelet\expandafter\@xs@toks\expandafter\@xs@testfirsttok\@xs@argument\@xs@nil}%
+	\fi
+	\@xs@next}
+
+% Cette macro interne enl\`eve la 1ere unit\'e syntaxique de #1 et assigne le r\'esultat \`a #2
+\def\@xs@testsecondtoken#1\@xs@nil{\@xs@ifbeginwithbrace{#1}}
+\def\@xs@gobblespacebeforebrace#1#{}% supprime tout ce qui est avant la 1ere accolade ouvrante
+\def\@xs@removefirstsyntaxunit#1#2{%
+	\def\@xs@argument{#1}%
+	\expandafter\expandafter\expandafter\ifx\expandafter\expandafter\expandafter\@empty\expandafter\@xs@beforespace\detokenize\expandafter{\@xs@argument} \@xs@nil\@empty% #1 commence par un espace ?
+		\expandafter\@xs@testempty\expandafter{\@xs@argument}%
+		\if@xs@empty
+			\let#2\@empty
+		\else
+			\afterassignment\@xs@testsecondtoken% après avoir mangé le 1er token, on va tester si la suite commence par «{»
+			\expandafter\let\expandafter\@xs@secontoken\expandafter=\expandafter\@sptoken\@xs@argument\@xs@@nil\@xs@nil% on mange le 1er token et on rajoute \@xs@@nil à la fin pour éviter de perdre les accolades du groupe
+				{\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#2%
+				 \expandafter\expandafter\expandafter{\expandafter\@xs@gobblespacebeforebrace\@xs@argument}}%
+				{\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#2%
+				 \expandafter\expandafter\expandafter{\expandafter\@xs@behindspace\@xs@argument\@xs@nil}}%
+		\fi
+	\else
+		\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter#2%
+		\expandafter\expandafter\expandafter{\expandafter\@gobble\@xs@argument}%
+	\fi}
+
+% Macros \`a arguments d\'elimit\'es pour les macros ci dessus
+\def\@xs@beforespace#1 #2\@xs@nil{#1}
+\def\@xs@behindspace#1 #2\@xs@nil{#2}
+\def\@xs@returnfirstsyntaxunit@ii#1#2\@xs@nil{#1}
+\def\@xs@gobbleall#1\@xs@nil{}
+
+% Cette macro interne est utilis\'ee dans les macros \'etoil\'ees pour :
+% 1) d\'evelopper l'argument selon qu'on a choisit \fullexpandarg
+%    ou \normalexpandarg, et ceci \`a l'aide de la macro \@xs@def
+% 2) Ensuite, on d\'etokenize ce d\'eveloppement de façon n'avoir plus que
+%    des catcodes de 10 pour les espaces et 12 pour le reste.
+\def\@xs@expand@and@detokenize#1#2{%
+	\def#1{#2}%
+	\expandafter\edef\expandafter#1\expandafter{\@xs@expand#1}% on d\'eveloppe #2 selon le mode de d\'eveloppement
+	\edef#1{\detokenize\expandafter{#1}}}% puis on d\'etokenize et on assigne \`a #1
+
+\def\@xs@expand@and@assign#1#2{\@xs@def#1{#2}}% on d\'eveloppe #2 selon \fullexpandarg ou \normalexpandarg
+
+\def\@xs@edefaddtomacro#1#2{\edef#1{\unexpanded\expandafter{#1}#2}}
+\def\@xs@addtomacro#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+
+\def\@xs@argstring{0########1########2########3########4########5########6########7########8########9}
+% \@xs@DefArg{3} met dans la sc \@xs@myarg les tokens "####1####2####3"
+\def\@xs@DefArg#1{\def\@xs@defarg0##1#1##2\@xs@nil{\def\@xs@myarg{##1#1}}\expandafter\@xs@defarg\@xs@argstring\@xs@nil}
+% \@xs@DefArg@{3} met dans la sc \@xs@myarg les tokens "[####1]####2####3####4"
+\def\@xs@DefArg@#1{\expandafter\@xs@defarg@\expandafter{\number\numexpr#1+1}}
+\def\@xs@defarg@#1{\def\@xs@defarg0##11##2#1##3\@xs@nil{\def\@xs@myarg{[##11]##2#1}}\expandafter\@xs@defarg\@xs@argstring\@xs@nil}
+% \@xs@OneArg{3} met dans la sc \@xs@myarg les tokens "####3"
+\def\@xs@OneArg#1{\expandafter\@xs@onearg\expandafter{\number\numexpr#1-1}{#1}}
+\def\@xs@onearg#1#2{\def\@xs@defarg##1#1##2#2##3\@xs@nil{\def\@xs@myarg{##2#2}}\expandafter\@xs@defarg\@xs@argstring\@xs@nil}
+
+% #1 : num\'ero du 1er argument; #2 : nombre de lignes; #3 argument optionnel; #4 : dernier num\'ero de l'argument devant être d\'etokenis\'e si \'etoile
+\def\@xs@BuildLines#1#2#3#4{%
+	\let\@xs@newlines\@empty
+	\let\@xs@newargs\@empty
+	\def\@xs@buildlines##1{%
+		\expandafter\@xs@OneArg\expandafter{\number\numexpr##1+#1-1}%
+		\edef\@xs@reserved@B{\noexpand\@xs@expand\csname @xs@arg@\romannumeral\numexpr##1\endcsname}%
+		\ifnum##1=\@ne% si c'est le premier argument
+			\@xs@testempty{#3}%
+			\if@xs@empty
+				\expandafter\@xs@addtomacro\expandafter\@xs@newargs\expandafter{\expandafter{\@xs@reserved@B}}%
+				\edef\@xs@reserved@B{\ifnum##1>#4 @xs@def\else @xs@assign\fi}%
+			\else% et s'il y a un argument optionnel alors, on met des crochets
+				\expandafter\@xs@addtomacro\expandafter\@xs@newargs\expandafter{\expandafter[\@xs@reserved@B]}%
+				\def\@xs@reserved@B{@xs@def}% ne pas d\'etok\'eniser l'argument optionnel grace au \@xs@def
+			\fi
+		\else
+			\expandafter\@xs@addtomacro\expandafter\@xs@newargs\expandafter{\expandafter{\@xs@reserved@B}}%
+			\edef\@xs@reserved@B{\ifnum##1>#4 @xs@def\else @xs@assign\fi}%
+		\fi
+		\edef\@xs@newlines{\unexpanded\expandafter{\@xs@newlines}\expandafter\noexpand\csname\@xs@reserved@B\endcsname\expandafter\noexpand\csname @xs@arg@\romannumeral\numexpr##1\endcsname{\@xs@myarg}}%
+		\ifnum##1<#2\relax
+			\def\@xs@next{\expandafter\@xs@buildlines\expandafter{\number\numexpr##1+1}}%
+			\expandafter\@xs@next
+		\fi}%
+	\@xs@buildlines\@ne}
+
+\def\@xs@newmacro{\@ifstar{\let\@xs@reserved@D\@empty\@xs@newmacro@}{\let\@xs@reserved@D\relax\@xs@newmacro@0}}
+% #1 : dernier num\'ero de l'argument devant être d\'etokenis\'e
+% #2 : nom de la macro publique
+% #3 : argument optionnel (vide si pas d'arg optionnel)
+% #4 : nombre d'arguments obligatoires
+% #5 : utilisation de testopt (1 si oui, 0 si non)
+% #6 : code de la macro
+\def\@xs@newmacro@#1#2#3#4#5{%
+	\edef\@xs@reserved@A{@xs@\expandafter\@gobble\string#2}%
+	\edef\@xs@reserved@C{\expandafter\noexpand\csname\@xs@reserved@A @\ifx\@empty#3\@empty @\fi\endcsname}%
+	\edef\@xs@reserved@B{%
+		\ifx\@empty\@xs@reserved@D
+			\def\noexpand#2{\noexpand\@ifstar
+				{\let\noexpand\@xs@assign\noexpand\@xs@expand@and@detokenize\expandafter\noexpand\@xs@reserved@C}%
+				{\let\noexpand\@xs@assign\noexpand\@xs@expand@and@assign\expandafter\noexpand\@xs@reserved@C}}%
+		\else
+			\def\noexpand#2{\let\noexpand\@xs@assign\noexpand\@xs@expand@and@assign\expandafter\noexpand\@xs@reserved@C}%
+		\fi
+		\ifx\@empty#3\@empty
+		\else
+			\def\expandafter\noexpand\@xs@reserved@C{%
+				\noexpand\@testopt{\expandafter\noexpand\csname\@xs@reserved@A @@\endcsname}{\ifx\@xs@def\edef#3\else\unexpanded{#3}\fi}}%
+		\fi}%
+	% Que fait \@xs@reserved@B ? Il d\'efinit :
+	% si #3 est vide : \NOM{\@ifstar{\let\@xs@assign\@xs@expand@and@detokenize\@xs@NOM@@}{\let\@xs@assign\@xs@expand@and@assign\@xs@NOM@@}}
+	% si #3 existe   : \NOM{\@ifstar{\let\@xs@assign\@xs@expand@and@detokenize\@xs@NOM@}{\let\@xs@assign\@xs@expand@and@assign\@xs@NOM@}}
+	%                  \@xs@NOM@{\@testopt{\@xs@NOM@@}{#3}}}
+	\@xs@reserved@B
+	\ifx\@empty#3\@empty
+		\@xs@BuildLines1{#4}{#3}{#1}%
+		\@xs@DefArg{#4}%
+	\else
+		\expandafter\@xs@BuildLines\expandafter1\expandafter{\number\numexpr#4+1}{#3}{#1}%
+		\@xs@DefArg@{#4}%
+	\fi
+	\edef\@xs@reserved@B{\def\expandafter\noexpand\csname\@xs@reserved@A @@\endcsname\@xs@myarg}%
+	\edef\@xs@reserved@C{\unexpanded\expandafter{\@xs@newlines}\edef\noexpand\@xs@call}%
+	\edef\@xs@reserved@D{\noexpand\noexpand\expandafter\noexpand\csname\@xs@reserved@A\endcsname\unexpanded\expandafter{\@xs@newargs}}%
+	\ifnum#5=\@ne\edef\@xs@reserved@D{\noexpand\noexpand\noexpand\@testopt{\unexpanded\expandafter{\@xs@reserved@D}}{}}\fi
+	\@xs@edefaddtomacro\@xs@reserved@C{{\unexpanded\expandafter{\@xs@reserved@D}}\noexpand\@xs@call}%
+	\@xs@edefaddtomacro\@xs@reserved@B{{\unexpanded\expandafter{\@xs@reserved@C}}}%
+	% Que fait \@xs@reserved@B ? Il d\'efinit par exemple pour 3 arguments obligatoires et 1 facultatif :
+	%    \def\@xs@NOM@@[##2]##3##4##5{%
+	%          \@xs@def\@xs@arg@i{##2}\@xs@assign\@xs@arg@ii{##3}\@xs@assign\@xs@arg@iii{##4}\@xs@asign\@xs@arg@iv{##5}%
+	% si #5=0: \edef\@xs@call{\noexpand\@xs@NOM[\@xs@expand\@xs@arg@i]{\@xs@expand\@xs@arg@ii}{\@xs@expand\@xs@arg@iii}{\@xs@expand\@xs@arg@iv}}%
+	% si #5=1: \edef\@xs@call{\noexpand\@testopt{\noexpand\@xs@NOM[\@xs@expand\@xs@arg@i]{\@xs@expand\@xs@arg@i}{\@xs@expand\@xs@arg@ii}{\@xs@expand\@xs@arg@iii}{\@xs@expand\@xs@arg@iv}}{}}%
+	%          \@xs@call}
+	\@xs@reserved@B
+	\edef\@xs@reserved@B{\def\expandafter\noexpand\csname\@xs@reserved@A\endcsname\@xs@myarg\ifnum#5=\@ne[\unexpanded{##}\number\numexpr\ifx\@empty#3\@empty#4+1\else#4+2\fi]\fi}%
+	% Que fait \@xs@reserved@B ? Il d\'efinit par exemple pour 3 arguments obligatoires et 1 facultatif :
+	%    \def \@xs@NOM[##2]##3##4##5[##6]{#6}
+	\@xs@reserved@B}
+
+% macro g\'en\'erique qui lit \@xs@reserved@C us par us
+% 3 sous-routines sont appel\'ees \`a des moments cl\'e :
+% \@xs@atendofgroup      (un groupe se finit, appel r\'ecursif)
+% \@xs@atbegingroup      (un groupe vient d'être ouvert)
+% \@xs@atnextsyntaxunit  (la future US n'est pas un groupe)
+\def\@xs@read@reserved@C{%
+	\expandafter\@xs@testempty\expandafter{\@xs@reserved@C}%
+	\if@xs@empty
+		\ifnum\@xs@nestlevel=\z@
+			\let\@xs@next\relax
+		\else
+			\let\@xs@next\@xs@atendofgroup
+		\fi
+	\else
+		\expandafter\@xs@returnfirstsyntaxunit\expandafter{\@xs@reserved@C}\@xs@reserved@A
+		\expandafter\@xs@removefirstsyntaxunit\expandafter{\@xs@reserved@C}\@xs@reserved@C
+		\let\@xs@next\@xs@read@reserved@C
+		\@xs@exploregroups
+		\ifx\bgroup\@xs@toks
+			\advance\integerpart\@ne
+			\begingroup
+				\expandafter\def\expandafter\@xs@reserved@C\@xs@reserved@A
+				\@xs@manage@groupID
+				\let\@xs@nestlevel\@ne
+				\integerpart\z@
+				\@xs@atbegingroup
+		\else
+			\global\advance\decimalpart\@ne
+			\@xs@atnextsyntaxunit
+		\fi
+	\fi
+	\@xs@next}
+
+% macro g\'en\'erique qui lit \@xs@reserved@D en proc\'edant \`a des tests avec \IfBeginWith
+% 2 sous-routines sont appel\'ees \`a des moments cl\'e :
+% \@xs@atendofgroup      (un groupe se finit, appel r\'ecursif)
+% \@xs@atoccurfound      (une occurrence a \'et\'e trouv\'ee)
+\def\@xs@read@reserved@D{%
+	\expandafter\@xs@testempty\expandafter{\@xs@reserved@D}%
+	\if@xs@empty
+		\ifnum\@xs@nestlevel=\z@
+			\let\@xs@next\relax
+		\else
+			\let\@xs@next\@xs@atendofgroup
+		\fi
+	\else
+		\expandafter\expandafter\expandafter\@xs@IfBeginWith@i\expandafter\expandafter\expandafter{\expandafter\@xs@reserved@D\expandafter}\expandafter{\@xs@reserved@E}%
+		{\global\advance\decimalpart\@ne
+		 \let\@xs@reserved@D\@xs@reserved@A
+		 \@xs@atoccurfound}%
+		{\expandafter\@xs@returnfirstsyntaxunit\expandafter{\@xs@reserved@D}\@xs@reserved@A
+		 \expandafter\@xs@removefirstsyntaxunit\expandafter{\@xs@reserved@D}\@xs@reserved@D
+		 \let\@xs@next\@xs@read@reserved@D
+		 \@xs@exploregroups
+		 \ifx\bgroup\@xs@toks
+		 	\advance\integerpart\@ne
+		 	\begingroup
+		 		\expandafter\def\expandafter\@xs@reserved@D\@xs@reserved@A
+				\@xs@manage@groupID
+		 		\let\@xs@reserved@C\@empty
+		 		\let\@xs@nestlevel\@ne
+		 		\integerpart\z@
+		 \else
+		 	\expandafter\@xs@addtomacro\expandafter\@xs@reserved@C\expandafter{\@xs@reserved@A}%
+		 \fi}%
+	\fi
+	\@xs@next}
+
+\@xs@newmacro\StrRemoveBraces{}{1}{1}{%
+	\def\@xs@reserved@C{#1}%
+	\let\@xs@reserved@B\@empty
+	\let\@xs@nestlevel\z@
+	\@xs@StrRemoveBraces@i
+	\expandafter\@xs@ReturnResult\expandafter{\@xs@reserved@B}{#2}}
+
+\def\@xs@StrRemoveBraces@i{%
+	\expandafter\@xs@testempty\expandafter{\@xs@reserved@C}%
+	\if@xs@empty
+		\ifnum\@xs@nestlevel=\z@
+			\let\@xs@next\relax
+		\else
+			\expandafter\endgroup