diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py index 59019e33e2a0a35c32134412512a82bbae52ab54..70d55ce7c9490d4998b7db595130d0f917bf5576 100755 --- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py +++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py @@ -344,8 +344,8 @@ def GetApplicationExamplePythonSnippet(app,idx,expand = False, inputpath="",outp #app.SetParameterString(param,value) output+= "\t" + appname + ".SetParameterString(" + EncloseString(param) + "," + EncloseString(value) + ")" + linesep if paramtype == otbApplication.ParameterType_Empty: - app.SetParameterString(param,"1") - output+= "\t" + appname + ".SetParameterString("+EncloseString(param)+",\"1\")" + linesep + app.EnableParameter(param) + output+= "\t" + appname + ".EnableParameter("+EncloseString(param)+")" + linesep if paramtype == otbApplication.ParameterType_Int \ or paramtype == otbApplication.ParameterType_Radius \ or paramtype == otbApplication.ParameterType_RAM: diff --git a/Documentation/Latex/listings.sty b/Documentation/Latex/listings.sty deleted file mode 100644 index 08c19ceb95917e0ffdf47549827e3ce27497def4..0000000000000000000000000000000000000000 --- a/Documentation/Latex/listings.sty +++ /dev/null @@ -1,2237 +0,0 @@ -%% -%% This is file `listings.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% listings.dtx (with options: `kernel') -%% -%% Please read the software license in listings-1.3.dtx or listings-1.3.pdf. -%% -%% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed -%% elsewhere in this file. -%% (c) 2006 Brooks Moses -%% -%% Send comments and ideas on the package, error reports and additional -%% programming languages to <bmoses@dpdx.net>. -%% -\def\filedate{2007/02/22} -\def\fileversion{1.4} -\NeedsTeXFormat{LaTeX2e} -\AtEndOfPackage{\ProvidesPackage{listings} - [\filedate\space\fileversion\space(Carsten Heinz)]} -\def\lst@CheckVersion#1{\edef\reserved@a{#1}% - \ifx\lst@version\reserved@a \expandafter\@gobble - \else \expandafter\@firstofone \fi} -\let\lst@version\fileversion -\def\lst@InputCatcodes{% - \makeatletter \catcode`\"12% - \catcode`\^^@\active - \catcode`\^^I9% - \catcode`\^^L9% - \catcode`\^^M9% - \catcode`\%14% - \catcode`\~\active} -\def\lst@RestoreCatcodes#1{% - \ifx\relax#1\else - \noexpand\catcode`\noexpand#1\the\catcode`#1\relax - \expandafter\lst@RestoreCatcodes - \fi} -\edef\lst@RestoreCatcodes{% - \noexpand\lccode`\noexpand\/`\noexpand\/% - \lst@RestoreCatcodes\"\^^I\^^M\~\^^@\relax - \catcode12\active} -\lst@InputCatcodes -\AtEndOfPackage{\lst@RestoreCatcodes} -\def\@lst{lst} -\def\lst@IfSubstring#1#2{% - \def\lst@temp##1#1##2##3\relax{% - \ifx \@empty##2\expandafter\@secondoftwo - \else \expandafter\@firstoftwo \fi}% - \expandafter\lst@temp#2#1\@empty\relax} -\def\lst@IfOneOf#1\relax#2{% - \def\lst@temp##1,#1,##2##3\relax{% - \ifx \@empty##2\expandafter\@secondoftwo - \else \expandafter\@firstoftwo \fi}% - \expandafter\lst@temp\expandafter,#2,#1,\@empty\relax} -\def\lst@DeleteKeysIn#1#2{% - \expandafter\lst@DeleteKeysIn@\expandafter#1#2,\relax,} -\def\lst@DeleteKeysIn@#1#2,{% - \ifx\relax#2\@empty - \expandafter\@firstoftwo\expandafter\lst@RemoveCommas - \else - \ifx\@empty#2\@empty\else - \def\lst@temp##1,#2,##2{% - ##1% - \ifx\@empty##2\@empty\else - \expandafter\lst@temp\expandafter,% - \fi ##2}% - \edef#1{\expandafter\lst@temp\expandafter,#1,#2,\@empty}% - \fi - \fi - \lst@DeleteKeysIn@#1} -\def\lst@RemoveCommas#1{\edef#1{\expandafter\lst@RC@#1\@empty}} -\def\lst@RC@#1{\ifx,#1\expandafter\lst@RC@ \else #1\fi} -\def\lst@ReplaceIn#1#2{% - \expandafter\lst@ReplaceIn@\expandafter#1#2\@empty\@empty} -\def\lst@ReplaceInArg#1#2{\lst@ReplaceIn@#1#2\@empty\@empty} -\def\lst@ReplaceIn@#1#2#3{% - \ifx\@empty#3\relax\else - \def\lst@temp##1#2##2{% - \ifx\@empty##2% - \lst@lAddTo#1{##1}% - \else - \lst@lAddTo#1{##1#3}\expandafter\lst@temp - \fi ##2}% - \let\@tempa#1\let#1\@empty - \expandafter\lst@temp\@tempa#2\@empty - \expandafter\lst@ReplaceIn@\expandafter#1% - \fi} -\providecommand*\@gobblethree[3]{} -\def\lst@GobbleNil#1\@nil{} -\def\lst@Swap#1#2{#2#1} -\def\lst@true{\let\lst@if\iftrue} -\def\lst@false{\let\lst@if\iffalse} -\lst@false -\def\lst@IfNextCharsArg#1{% - \def\lst@tofind{#1}\lst@IfNextChars\lst@tofind} -\def\lst@IfNextChars#1#2#3{% - \let\lst@tofind#1\def\@tempa{#2}\def\@tempb{#3}% - \let\lst@eaten\@empty \lst@IfNextChars@} -\def\lst@IfNextChars@{\expandafter\lst@IfNextChars@@\lst@tofind\relax} -\def\lst@IfNextChars@@#1#2\relax#3{% - \def\lst@tofind{#2}\lst@lAddTo\lst@eaten{#3}% - \ifx#1#3% - \ifx\lst@tofind\@empty - \let\lst@next\@tempa - \else - \let\lst@next\lst@IfNextChars@ - \fi - \expandafter\lst@next - \else - \expandafter\@tempb - \fi} -\def\lst@IfNextCharActive#1#2#3{% - \begingroup \lccode`\~=`#3\lowercase{\endgroup - \ifx~}#3% - \def\lst@next{#1}% - \else - \def\lst@next{#2}% - \fi \lst@next #3} -\def\lst@for#1\do#2{% - \def\lst@forbody##1{#2}% - \def\@tempa{#1}% - \ifx\@tempa\@empty\else\expandafter\lst@f@r#1,\@nil,\fi -} -\def\lst@f@r#1,{% - \def\@tempa{#1}% - \ifx\@tempa\@nnil\else\lst@forbody{#1}\expandafter\lst@f@r\fi -} -\def\lst@MakeActive#1{% - \let\lst@temp\@empty \lst@MakeActive@#1% - \relax\relax\relax\relax\relax\relax\relax\relax\relax} -\begingroup -\catcode`\^^@=\active \catcode`\^^A=\active \catcode`\^^B=\active -\catcode`\^^C=\active \catcode`\^^D=\active \catcode`\^^E=\active -\catcode`\^^F=\active \catcode`\^^G=\active \catcode`\^^H=\active -\gdef\lst@MakeActive@#1#2#3#4#5#6#7#8#9{\let\lst@next\relax - \ifx#1\relax - \else \lccode`\^^@=`#1% - \ifx#2\relax - \lowercase{\lst@lAddTo\lst@temp{^^@}}% - \else \lccode`\^^A=`#2% - \ifx#3\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A}}% - \else \lccode`\^^B=`#3% - \ifx#4\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B}}% - \else \lccode`\^^C=`#4% - \ifx#5\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C}}% - \else \lccode`\^^D=`#5% - \ifx#6\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D}}% - \else \lccode`\^^E=`#6% - \ifx#7\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E}}% - \else \lccode`\^^F=`#7% - \ifx#8\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F}}% - \else \lccode`\^^G=`#8% - \ifx#9\relax - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G}}% - \else \lccode`\^^H=`#9% - \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G^^H}}% - \let\lst@next\lst@MakeActive@ - \fi \fi \fi \fi \fi \fi \fi \fi \fi - \lst@next} -\endgroup -\def\lst@DefActive#1#2{\lst@MakeActive{#2}\let#1\lst@temp} -\def\lst@DefOther#1#2{% - \begingroup \def#1{#2}\escapechar\m@ne \expandafter\endgroup - \expandafter\lst@DefOther@\meaning#1\relax#1} -\def\lst@DefOther@#1>#2\relax#3{\edef#3{\zap@space#2 \@empty}} -\def\lst@InsideConvert#1{% - \lst@ifmathescape - \lst@InsideConvert@e#1$\@nil - \lst@if - \lst@InsideConvert@ey#1\@nil - \else - \lst@InsideConvert@#1 \@empty - \expandafter\@gobbletwo - \fi - \expandafter\lst@next - \else - \lst@InsideConvert@#1 \@empty - \fi} -\begingroup \lccode`\~=`\ \relax \lowercase{% -\gdef\lst@InsideConvert@#1 #2{% - \lst@MakeActive{#1}% - \ifx\@empty#2% - \lst@lExtend\lst@arg{\lst@temp}% - \else - \lst@lExtend\lst@arg{\lst@temp~}% - \expandafter\lst@InsideConvert@ - \fi #2} -}\endgroup -\def\lst@InsideConvert@e#1$#2\@nil{% - \ifx\@empty#2\@empty \lst@false \else \lst@true \fi} -\def\lst@InsideConvert@ey#1$#2$#3\@nil{% - \lst@InsideConvert@#1 \@empty - \lst@lAddTo\lst@arg{% - \lst@ifdropinput\else - \lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken - \setbox\@tempboxa=\hbox\bgroup$\lst@escapebegin - #2% - \lst@escapeend$\egroup \lst@CalcLostSpaceAndOutput - \lst@whitespacefalse - \fi}% - \def\lst@next{\lst@InsideConvert{#3}}% -} -\def\lst@XConvert{\@ifnextchar\bgroup \lst@XConvertArg\lst@XConvert@} -\def\lst@XConvertArg#1{% - {\lst@false \let\lst@arg\@empty - \lst@XConvert#1\@nil - \global\let\@gtempa\lst@arg}% - \lst@lExtend\lst@arg{\expandafter{\@gtempa}}% - \lst@XConvertNext} -\def\lst@XConvert@#1{% - \ifx\@nil#1\else - \begingroup\lccode`\~=`#1\lowercase{\endgroup - \lst@lAddTo\lst@arg~}% - \expandafter\lst@XConvertNext - \fi} -\def\lst@XConvertNext{% - \lst@if \expandafter\lst@XConvertX - \else \expandafter\lst@XConvert \fi} -\def\lst@XConvertX#1{% - \ifx\@nil#1\else - \lst@XConvertX@#1\relax - \expandafter\lst@XConvert - \fi} -\def\lst@XConvertX@#1#2\relax{% - \begingroup\lccode`\~=`#1\lowercase{\endgroup - \lst@XCConvertX@@~}{#2}} -\def\lst@XCConvertX@@#1#2{\lst@lAddTo\lst@arg{{#1#2}}} -\def\lst@Require#1#2#3#4#5{% - \begingroup - \aftergroup\lst@true - \ifx\@empty#3\@empty\else - \def\lst@prefix{#2}\let\lst@require\@empty - \edef\lst@temp{\expandafter\zap@space#3 \@empty}% - \lst@for\lst@temp\do{% - \ifx\@empty##1\@empty\else \lstKV@OptArg[]{##1}{% - #4[####1]{####2}% - \@ifundefined{\@lst\lst@prefix @\lst@malias $\lst@oalias}% - {\edef\lst@require{\lst@require,\lst@malias $\lst@oalias}}% - {}}% - \fi}% - \global\let\lst@loadaspects\@empty - \lst@InputCatcodes - \ifx\lst@require\@empty\else - \lst@for{#5}\do{% - \ifx\lst@require\@empty\else - \InputIfFileExists{##1}{}{}% - \fi}% - \fi - \ifx\lst@require\@empty\else - \PackageError{Listings}{Couldn't load requested #1}% - {The following #1s weren't loadable:^^J\@spaces - \lst@require^^JThis may cause errors in the sequel.}% - \aftergroup\lst@false - \fi - \ifx\lst@loadaspects\@empty\else - \lst@RequireAspects\lst@loadaspects - \fi - \fi - \endgroup} -\def\lst@IfRequired[#1]#2{% - \lst@NormedDef\lst@temp{[#1]#2}% - \expandafter\lst@IfRequired@\lst@temp\relax} -\def\lst@IfRequired@[#1]#2\relax#3{% - \lst@IfOneOf #2$#1\relax\lst@require - {\lst@DeleteKeysIn@\lst@require#2$#1,\relax,% - \global\expandafter\let - \csname\@lst\lst@prefix @#2$#1\endcsname\@empty - #3}} -\let\lst@require\@empty -\def\lst@NoAlias[#1]#2{% - \lst@NormedDef\lst@oalias{#1}\lst@NormedDef\lst@malias{#2}} -\gdef\lst@LAS#1#2#3#4#5#6#7{% - \lst@Require{#1}{#2}{#3}#4#5% - #4#3% - \@ifundefined{lst#2@\lst@malias$\lst@oalias}% - {\PackageError{Listings}% - {#1 \ifx\@empty\lst@oalias\else \lst@oalias\space of \fi - \lst@malias\space undefined}% - {The #1 is not loadable. \@ehc}}% - {#6\csname\@lst#2@\lst@malias $\lst@oalias\endcsname #7}} -\def\lst@RequireAspects#1{% - \lst@Require{aspect}{asp}{#1}\lst@NoAlias\lstaspectfiles} -\let\lstloadaspects\lst@RequireAspects -\@ifundefined{lstaspectfiles} - {\newcommand\lstaspectfiles{lstmisc0.sty,lstmisc.sty}}{} -\gdef\lst@DefDriver#1#2#3#4{% - \@ifnextchar[{\lst@DefDriver@{#1}{#2}#3#4}% - {\lst@DefDriver@{#1}{#2}#3#4[]}} -\gdef\lst@DefDriver@#1#2#3#4[#5]#6{% - \def\lst@name{#1}\let\lst@if#4% - \lst@NormedDef\lst@driver{\@lst#2@#6$#5}% - \lst@IfRequired[#5]{#6}{\begingroup \lst@true}% - {\begingroup}% - \lst@setcatcodes - \@ifnextchar[{\lst@XDefDriver{#1}#3}{\lst@DefDriver@@#3}} -\gdef\lst@DefDriver@@#1#2{% - \lst@if - \global\@namedef{\lst@driver}{#1{#2}}% - \fi - \endgroup - \@ifnextchar[\lst@XXDefDriver\@empty} -\gdef\lst@XXDefDriver[#1]{% - \ifx\@empty#1\@empty\else - \lst@if - \lstloadaspects{#1}% - \else - \@ifundefined{\lst@driver}{}% - {\xdef\lst@loadaspects{\lst@loadaspects,#1}}% - \fi - \fi} -\gdef\lst@XDefDriver#1#2[#3]#4#5{\lst@DefDriver@@#2{also#1=[#3]#4,#5}} -\let\lst@UserCommand\gdef -\newcommand*\lst@BeginAspect[2][]{% - \def\lst@curraspect{#2}% - \ifx \lst@curraspect\@empty - \expandafter\lst@GobbleAspect - \else - \let\lst@next\@empty - \lst@IfRequired[]{#2}% - {\lst@RequireAspects{#1}% - \lst@if\else \let\lst@next\lst@GobbleAspect \fi}% - {\let\lst@next\lst@GobbleAspect}% - \expandafter\lst@next - \fi} -\def\lst@EndAspect{% - \csname\@lst patch@\lst@curraspect\endcsname - \let\lst@curraspect\@empty} -\long\def\lst@GobbleAspect#1\lst@EndAspect{\let\lst@curraspect\@empty} -\def\lst@Key#1#2{% - \@ifnextchar[{\lstKV@def{#1}{#2}}% - {\def\lst@temp{\lst@Key@{#1}{#2}} - \afterassignment\lst@temp - \global\@namedef{KV@\@lst @#1}####1}} -\def\lstKV@def#1#2[#3]{% - \global\@namedef{KV@\@lst @#1@default\expandafter}\expandafter - {\csname KV@\@lst @#1\endcsname{#3}}% - \def\lst@temp{\lst@Key@{#1}{#2}}\afterassignment\lst@temp - \global\@namedef{KV@\@lst @#1}##1} -\def\lst@Key@#1#2{% - \ifx\relax#2\@empty\else - \begingroup \globaldefs\@ne - \csname KV@\@lst @#1\endcsname{#2}% - \endgroup - \fi} -\def\lst@UseHook#1{\csname\@lst hk@#1\endcsname} -\def\lst@AddToHook{\lst@ATH@\iffalse\lst@AddTo} -\def\lst@AddToHookExe{\lst@ATH@\iftrue\lst@AddTo} -\def\lst@AddToHookAtTop{\lst@ATH@\iffalse\lst@AddToAtTop} -\long\def\lst@ATH@#1#2#3#4{% - \@ifundefined{\@lst hk@#3}{% - \expandafter\gdef\csname\@lst hk@#3\endcsname{}}{}% - \expandafter#2\csname\@lst hk@#3\endcsname{#4}% - \def\lst@temp{#4}% - #1% \iftrue|false - \begingroup \globaldefs\@ne \lst@temp \endgroup - \fi} -\long\def\lst@AddTo#1#2{% - \expandafter\gdef\expandafter#1\expandafter{#1#2}} -\def\lst@AddToAtTop#1#2{\def\lst@temp{#2}% - \expandafter\expandafter\expandafter\gdef - \expandafter\expandafter\expandafter#1% - \expandafter\expandafter\expandafter{\expandafter\lst@temp#1}} -\def\lst@lAddTo#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}} -\def\lst@Extend#1#2{% - \expandafter\lst@AddTo\expandafter#1\expandafter{#2}} -\def\lst@lExtend#1#2{% - \expandafter\lst@lAddTo\expandafter#1\expandafter{#2}} -\RequirePackage{keyval}[1997/11/10] -\def\lstKV@TwoArg#1#2{\gdef\@gtempa##1##2{#2}\@gtempa#1{}{}} -\def\lstKV@ThreeArg#1#2{\gdef\@gtempa##1##2##3{#2}\@gtempa#1{}{}{}} -\def\lstKV@FourArg#1#2{\gdef\@gtempa##1##2##3##4{#2}\@gtempa#1{}{}{}{}} -\def\lstKV@OptArg[#1]#2#3{% - \gdef\@gtempa[##1]##2{#3}\lstKV@OptArg@{#1}#2\@} -\def\lstKV@OptArg@#1{\@ifnextchar[\lstKV@OptArg@@{\lstKV@OptArg@@[#1]}} -\def\lstKV@OptArg@@[#1]#2\@{\@gtempa[#1]{#2}} -\def\lstKV@XOptArg[#1]#2#3{% - \global\let\@gtempa#3\lstKV@OptArg@{#1}#2\@} -\def\lstKV@CSTwoArg#1#2{% - \gdef\@gtempa##1,##2,##3\relax{#2}% - \@gtempa#1,,\relax} -\def\lstKV@SetIf#1{\lstKV@SetIf@#1\relax} -\def\lstKV@SetIf@#1#2\relax#3{\lowercase{% - \expandafter\let\expandafter#3% - \csname if\ifx #1t}true\else false\fi\endcsname} -\def\lstKV@SwitchCases#1#2#3{% - \def\lst@temp##1\\#1&##2\\##3##4\@nil{% - \ifx\@empty##3% - #3% - \else - ##2% - \fi - }% - \lst@temp\\#2\\#1&\\\@empty\@nil} -\lst@UserCommand\lstset{\begingroup \lst@setcatcodes \lstset@} -\def\lstset@#1{\endgroup \ifx\@empty#1\@empty\else\setkeys{lst}{#1}\fi} -\def\lst@setcatcodes{\makeatletter \catcode`\==12\relax} -\def\lst@NewMode#1{% - \ifx\@undefined#1% - \lst@mode\lst@newmode\relax \advance\lst@mode\@ne - \xdef\lst@newmode{\the\lst@mode}% - \global\chardef#1=\lst@mode - \lst@mode\lst@nomode - \fi} -\newcount\lst@mode -\def\lst@newmode{\m@ne}% init -\lst@NewMode\lst@nomode % init (of \lst@mode :-) -\def\lst@UseDynamicMode{% - \@tempcnta\lst@dynamicmode\relax \advance\@tempcnta\@ne - \edef\lst@dynamicmode{\the\@tempcnta}% - \expandafter\lst@Swap\expandafter{\expandafter{\lst@dynamicmode}}} -\lst@AddToHook{InitVars}{\let\lst@dynamicmode\lst@newmode} -\def\lst@EnterMode#1#2{% - \bgroup \lst@mode=#1\relax #2% - \lst@FontAdjust - \lst@lAddTo\lst@entermodes{\lst@EnterMode{#1}{#2}}} -\lst@AddToHook{InitVars}{\let\lst@entermodes\@empty} -\let\lst@entermodes\@empty % init -\def\lst@LeaveMode{% - \ifnum\lst@mode=\lst@nomode\else - \egroup \expandafter\lsthk@EndGroup - \fi} -\lst@AddToHook{EndGroup}{}% init -\def\lst@InterruptModes{% - \lst@Extend\lst@modestack{\expandafter{\lst@entermodes}}% - \lst@LeaveAllModes} -\lst@AddToHook{InitVars}{\global\let\lst@modestack\@empty} -\def\lst@ReenterModes{% - \ifx\lst@modestack\@empty\else - \lst@LeaveAllModes - \global\let\@gtempa\lst@modestack - \global\let\lst@modestack\@empty - \expandafter\lst@ReenterModes@\@gtempa\relax - \fi} -\def\lst@ReenterModes@#1#2{% - \ifx\relax#2\@empty - \gdef\@gtempa##1{#1}% - \expandafter\@gtempa - \else - \lst@AddTo\lst@modestack{{#1}}% - \expandafter\lst@ReenterModes@ - \fi - {#2}} -\def\lst@LeaveAllModes{% - \ifnum\lst@mode=\lst@nomode - \expandafter\lsthk@EndGroup - \else - \expandafter\egroup\expandafter\lst@LeaveAllModes - \fi} -\lst@AddToHook{ExitVars}{\lst@LeaveAllModes} -\lst@NewMode\lst@Pmode -\lst@NewMode\lst@GPmode -\def\lst@modetrue{\let\lst@ifmode\iftrue \lsthk@ModeTrue} -\let\lst@ifmode\iffalse % init -\lst@AddToHook{ModeTrue}{}% init -\def\lst@Lmodetrue{\let\lst@ifLmode\iftrue} -\let\lst@ifLmode\iffalse % init -\lst@AddToHook{EOL}{\@whilesw \lst@ifLmode\fi \lst@LeaveMode} -\def\lst@NormedDef#1#2{\lowercase{\edef#1{\zap@space#2 \@empty}}} -\def\lst@NormedNameDef#1#2{% - \lowercase{\edef\lst@temp{\zap@space#1 \@empty}% - \expandafter\xdef\csname\lst@temp\endcsname{\zap@space#2 \@empty}}} -\def\lst@GetFreeMacro#1{% - \@tempcnta\z@ \def\lst@freemacro{#1\the\@tempcnta}% - \lst@GFM@} -\def\lst@GFM@{% - \expandafter\ifx \csname\lst@freemacro\endcsname \relax - \edef\lst@freemacro{\csname\lst@freemacro\endcsname}% - \else - \advance\@tempcnta\@ne - \expandafter\lst@GFM@ - \fi} -\newbox\lst@gtempboxa -\newtoks\lst@token \newcount\lst@length -\def\lst@ResetToken{\lst@token{}\lst@length\z@} -\lst@AddToHook{InitVarsBOL}{\lst@ResetToken \let\lst@lastother\@empty} -\lst@AddToHook{EndGroup}{\lst@ResetToken \let\lst@lastother\@empty} -\def\lst@lettertrue{\let\lst@ifletter\iftrue} -\def\lst@letterfalse{\let\lst@ifletter\iffalse} -\lst@AddToHook{InitVars}{\lst@letterfalse} -\def\lst@Append#1{\advance\lst@length\@ne - \lst@token=\expandafter{\the\lst@token#1}} -\def\lst@AppendOther{% - \lst@ifletter \lst@Output\lst@letterfalse \fi - \futurelet\lst@lastother\lst@Append} -\def\lst@AppendLetter{% - \lst@ifletter\else \lst@OutputOther\lst@lettertrue \fi - \lst@Append} -\def\lst@SaveToken{% - \global\let\lst@gthestyle\lst@thestyle - \global\let\lst@glastother\lst@lastother - \xdef\lst@RestoreToken{\noexpand\lst@token{\the\lst@token}% - \noexpand\lst@length\the\lst@length\relax - \noexpand\let\noexpand\lst@thestyle - \noexpand\lst@gthestyle - \noexpand\let\noexpand\lst@lastother - \noexpand\lst@glastother}} -\def\lst@IfLastOtherOneOf#1{\lst@IfLastOtherOneOf@ #1\relax} -\def\lst@IfLastOtherOneOf@#1{% - \ifx #1\relax - \expandafter\@secondoftwo - \else - \ifx\lst@lastother#1% - \lst@IfLastOtherOneOf@t - \else - \expandafter\expandafter\expandafter\lst@IfLastOtherOneOf@ - \fi - \fi} -\def\lst@IfLastOtherOneOf@t#1\fi\fi#2\relax{\fi\fi\@firstoftwo} -\newdimen\lst@currlwidth % \global -\newcount\lst@column \newcount\lst@pos % \global -\lst@AddToHook{InitVarsBOL} - {\global\lst@currlwidth\z@ \global\lst@pos\z@ \global\lst@column\z@} -\def\lst@CalcColumn{% - \@tempcnta\lst@column - \advance\@tempcnta\lst@length - \advance\@tempcnta-\lst@pos} -\newdimen\lst@lostspace % \global -\lst@AddToHook{InitVarsBOL}{\global\lst@lostspace\z@} -\def\lst@UseLostSpace{\ifdim\lst@lostspace>\z@ \lst@InsertLostSpace \fi} -\def\lst@InsertLostSpace{% - \lst@Kern\lst@lostspace \global\lst@lostspace\z@} -\def\lst@InsertHalfLostSpace{% - \global\lst@lostspace.5\lst@lostspace \lst@Kern\lst@lostspace} -\newdimen\lst@width -\lst@Key{basewidth}{0.6em,0.45em}{\lstKV@CSTwoArg{#1}% - {\def\lst@widthfixed{##1}\def\lst@widthflexible{##2}% - \ifx\lst@widthflexible\@empty - \let\lst@widthflexible\lst@widthfixed - \fi - \def\lst@temp{\PackageError{Listings}% - {Negative value(s) treated as zero}% - \@ehc}% - \let\lst@error\@empty - \ifdim \lst@widthfixed<\z@ - \let\lst@error\lst@temp \let\lst@widthfixed\z@ - \fi - \ifdim \lst@widthflexible<\z@ - \let\lst@error\lst@temp \let\lst@widthflexible\z@ - \fi - \lst@error}} -\lst@AddToHook{FontAdjust} - {\lst@width=\lst@ifflexible\lst@widthflexible - \else\lst@widthfixed\fi \relax} -\lst@Key{fontadjust}{false}[t]{\lstKV@SetIf{#1}\lst@iffontadjust} -\def\lst@FontAdjust{\lst@iffontadjust \lsthk@FontAdjust \fi} -\lst@AddToHook{InitVars}{\lsthk@FontAdjust} -\def\lst@OutputBox#1{\lst@alloverstyle{\box#1}} -\def\lst@alloverstyle#1{#1}% init -\def\lst@Kern#1{% - \setbox\z@\hbox{{\lst@currstyle{\kern#1}}}% - \global\advance\lst@currlwidth \wd\z@ - \lst@OutputBox\z@} -\def\lst@CalcLostSpaceAndOutput{% - \global\advance\lst@lostspace \lst@length\lst@width - \global\advance\lst@lostspace-\wd\@tempboxa - \global\advance\lst@currlwidth \wd\@tempboxa - \global\advance\lst@pos -\lst@length - \setbox\@tempboxa\hbox{\let\lst@OutputBox\box - \ifdim\lst@lostspace>\z@ \lst@leftinsert \fi - \box\@tempboxa - \ifdim\lst@lostspace>\z@ \lst@rightinsert \fi}% - \lst@OutputBox\@tempboxa \lsthk@PostOutput} -\lst@AddToHook{PostOutput}{}% init -\def\lst@OutputToken{% - \lst@TrackNewLines \lst@OutputLostSpace - \lst@ifgobbledws - \lst@gobbledwhitespacefalse - \lst@@discretionary - \fi - \lst@CheckMerge - {\lst@thestyle{\lst@FontAdjust - \setbox\@tempboxa\lst@hbox - {\lsthk@OutputBox - \lst@lefthss - \expandafter\lst@FillOutputBox\the\lst@token\@empty - \lst@righthss}% - \lst@CalcLostSpaceAndOutput}}% - \lst@ResetToken} -\lst@AddToHook{OutputBox}{}% init -\def\lst@gobbledwhitespacetrue{\global\let\lst@ifgobbledws\iftrue} -\def\lst@gobbledwhitespacefalse{\global\let\lst@ifgobbledws\iffalse} -\lst@AddToHookExe{InitBOL}{\lst@gobbledwhitespacefalse}% init -\def\lst@Delay#1{% - \lst@CheckDelay - #1% - \lst@GetOutputMacro\lst@delayedoutput - \edef\lst@delayed{\the\lst@token}% - \edef\lst@delayedlength{\the\lst@length}% - \lst@ResetToken} -\def\lst@Merge#1{% - \lst@CheckMerge - #1% - \edef\lst@merged{\the\lst@token}% - \edef\lst@mergedlength{\the\lst@length}% - \lst@ResetToken} -\def\lst@MergeToken#1#2{% - \advance\lst@length#2% - \lst@lExtend#1{\the\lst@token}% - \expandafter\lst@token\expandafter{#1}% - \let#1\@empty} -\def\lst@CheckDelay{% - \ifx\lst@delayed\@empty\else - \lst@GetOutputMacro\@gtempa - \ifx\lst@delayedoutput\@gtempa - \lst@MergeToken\lst@delayed\lst@delayedlength - \else - {\lst@ResetToken - \lst@MergeToken\lst@delayed\lst@delayedlength - \lst@delayedoutput}% - \let\lst@delayed\@empty - \fi - \fi} -\def\lst@CheckMerge{% - \ifx\lst@merged\@empty\else - \lst@MergeToken\lst@merged\lst@mergedlength - \fi} -\let\lst@delayed\@empty % init -\let\lst@merged\@empty % init -\def\lst@column@fixed{% - \lst@flexiblefalse - \lst@width\lst@widthfixed\relax - \let\lst@OutputLostSpace\lst@UseLostSpace - \let\lst@FillOutputBox\lst@FillFixed - \let\lst@hss\hss - \def\lst@hbox{\hbox to\lst@length\lst@width}} -\def\lst@FillFixed#1{#1\lst@FillFixed@} -\def\lst@FillFixed@#1{% - \ifx\@empty#1\else \lst@hss#1\expandafter\lst@FillFixed@ \fi} -\def\lst@column@flexible{% - \lst@flexibletrue - \lst@width\lst@widthflexible\relax - \let\lst@OutputLostSpace\lst@UseLostSpace - \let\lst@FillOutputBox\@empty - \let\lst@hss\@empty - \let\lst@hbox\hbox} -\def\lst@column@fullflexible{% - \lst@column@flexible - \def\lst@OutputLostSpace{\lst@ifnewline \lst@UseLostSpace\fi}% - \let\lst@leftinsert\@empty - \let\lst@rightinsert\@empty} -\def\lst@column@spaceflexible{% - \lst@column@flexible - \def\lst@OutputLostSpace{% - \lst@ifwhitespace - \ifx\lst@outputspace\lst@visiblespace - \else - \lst@UseLostSpace - \fi - \else - \lst@ifnewline \lst@UseLostSpace\fi - \fi}% - \let\lst@leftinsert\@empty - \let\lst@rightinsert\@empty} -\def\lst@outputpos#1#2\relax{% - \def\lst@lefthss{\lst@hss}\let\lst@righthss\lst@lefthss - \let\lst@rightinsert\lst@InsertLostSpace - \ifx #1c% - \let\lst@leftinsert\lst@InsertHalfLostSpace - \else\ifx #1r% - \let\lst@righthss\@empty - \let\lst@leftinsert\lst@InsertLostSpace - \let\lst@rightinsert\@empty - \else - \let\lst@lefthss\@empty - \let\lst@leftinsert\@empty - \ifx #1l\else \PackageWarning{Listings}% - {Unknown positioning for output boxes}% - \fi - \fi\fi} -\def\lst@flexibletrue{\let\lst@ifflexible\iftrue} -\def\lst@flexiblefalse{\let\lst@ifflexible\iffalse} -\lst@Key{columns}{[c]fixed}{\lstKV@OptArg[]{#1}{% - \ifx\@empty##1\@empty\else \lst@outputpos##1\relax\relax \fi - \expandafter\let\expandafter\lst@arg - \csname\@lst @column@##2\endcsname - \lst@arg - \ifx\lst@arg\relax - \PackageWarning{Listings}{Unknown column format `##2'}% - \else - \lst@ifflexible - \let\lst@columnsflexible\lst@arg - \else - \let\lst@columnsfixed\lst@arg - \fi - \fi}} -\let\lst@columnsfixed\lst@column@fixed % init -\let\lst@columnsflexible\lst@column@flexible % init -\lst@Key{flexiblecolumns}\relax[t]{% - \lstKV@SetIf{#1}\lst@ifflexible - \lst@ifflexible \lst@columnsflexible - \else \lst@columnsfixed \fi} -\newcount\lst@newlines -\lst@AddToHook{InitVars}{\global\lst@newlines\z@} -\lst@AddToHook{InitVarsBOL}{\global\advance\lst@newlines\@ne} -\def\lst@NewLine{% - \ifx\lst@OutputBox\@gobble\else - \par\noindent \hbox{}% - \fi - \global\advance\lst@newlines\m@ne - \lst@newlinetrue} -\def\lst@newlinetrue{\global\let\lst@ifnewline\iftrue} -\lst@AddToHookExe{PostOutput}{\global\let\lst@ifnewline\iffalse}% init -\def\lst@TrackNewLines{% - \ifnum\lst@newlines>\z@ - \lsthk@OnNewLine - \lst@DoNewLines - \fi} -\lst@AddToHook{OnNewLine}{}% init -\lst@Key{emptylines}\maxdimen{% - \@ifstar{\lst@true\@tempcnta\@gobble#1\relax\lst@GobbleNil}% - {\lst@false\@tempcnta#1\relax\lst@GobbleNil}#1\@nil - \advance\@tempcnta\@ne - \edef\lst@maxempty{\the\@tempcnta\relax}% - \let\lst@ifpreservenumber\lst@if} -\def\lst@DoNewLines{ - \@whilenum\lst@newlines>\lst@maxempty \do - {\lst@ifpreservenumber - \lsthk@OnEmptyLine - \global\advance\c@lstnumber\lst@advancelstnum - \fi - \global\advance\lst@newlines\m@ne}% - \@whilenum \lst@newlines>\@ne \do - {\lsthk@OnEmptyLine \lst@NewLine}% - \ifnum\lst@newlines>\z@ \lst@NewLine \fi} -\lst@AddToHook{OnEmptyLine}{}% init -\lst@Key{identifierstyle}{}{\def\lst@identifierstyle{#1}} -\lst@AddToHook{EmptyStyle}{\let\lst@identifierstyle\@empty} -\def\lst@GotoTabStop{% - \ifnum\lst@newlines=\z@ - \setbox\@tempboxa\hbox{\lst@outputspace}% - \setbox\@tempboxa\hbox to\wd\@tempboxa{{\lst@currstyle{\hss}}}% - \lst@CalcLostSpaceAndOutput - \else - \global\advance\lst@lostspace \lst@length\lst@width - \global\advance\lst@column\lst@length \lst@length\z@ - \fi} -\def\lst@OutputOther{% - \lst@CheckDelay - \ifnum\lst@length=\z@\else - \let\lst@thestyle\lst@currstyle - \lsthk@OutputOther - \lst@OutputToken - \fi} -\lst@AddToHook{OutputOther}{}% init -\let\lst@currstyle\relax % init -\def\lst@Output{% - \lst@CheckDelay - \ifnum\lst@length=\z@\else - \ifx\lst@currstyle\relax - \let\lst@thestyle\lst@identifierstyle - \else - \let\lst@thestyle\lst@currstyle - \fi - \lsthk@Output - \lst@OutputToken - \fi - \let\lst@lastother\relax} -\lst@AddToHook{Output}{}% init -\def\lst@GetOutputMacro#1{% - \lst@ifletter \global\let#1\lst@Output - \else \global\let#1\lst@OutputOther\fi} -\def\lst@PrintToken{% - \lst@ifletter \lst@Output \lst@letterfalse - \else \lst@OutputOther \let\lst@lastother\@empty \fi} -\def\lst@XPrintToken{% - \lst@PrintToken \lst@CheckMerge - \ifnum\lst@length=\z@\else \lst@PrintToken \fi} -\def\lst@BeginDropOutput#1{% - \xdef\lst@BDOnewlines{\the\lst@newlines}% - \global\let\lst@BDOifnewline\lst@ifnewline - \lst@EnterMode{#1}% - {\lst@modetrue - \let\lst@OutputBox\@gobble - \aftergroup\lst@BDORestore}} -\def\lst@BDORestore{% - \global\lst@newlines\lst@BDOnewlines - \global\let\lst@ifnewline\lst@BDOifnewline} -\let\lst@EndDropOutput\lst@LeaveMode -\def\lst@ProcessLetter{\lst@whitespacefalse \lst@AppendLetter} -\def\lst@ProcessOther{\lst@whitespacefalse \lst@AppendOther} -\def\lst@ProcessDigit{% - \lst@whitespacefalse - \lst@ifletter \expandafter\lst@AppendLetter - \else \expandafter\lst@AppendOther\fi} -\def\lst@whitespacetrue{\global\let\lst@ifwhitespace\iftrue} -\def\lst@whitespacefalse{\global\let\lst@ifwhitespace\iffalse} -\lst@AddToHook{InitVarsBOL}{\lst@whitespacetrue} -\lst@Key{tabsize}{8} - {\ifnum#1>\z@ \def\lst@tabsize{#1}\else - \PackageError{Listings}{Strict positive integer expected}% - {You can't use `#1' as tabsize. \@ehc}% - \fi} -\lst@Key{showtabs}f[t]{\lstKV@SetIf{#1}\lst@ifshowtabs} -\lst@Key{tab}{\kern.06em\hbox{\vrule\@height.3ex}% - \hrulefill\hbox{\vrule\@height.3ex}} - {\def\lst@tab{#1}} -\def\lst@ProcessTabulator{% - \lst@XPrintToken \lst@whitespacetrue - \global\advance\lst@column -\lst@pos - \@whilenum \lst@pos<\@ne \do - {\global\advance\lst@pos\lst@tabsize}% - \lst@length\lst@pos - \lst@PreGotoTabStop} -\def\lst@PreGotoTabStop{% - \lst@ifshowtabs - \lst@TrackNewLines - \setbox\@tempboxa\hbox to\lst@length\lst@width - {{\lst@currstyle{\hss\lst@tab}}}% - \lst@CalcLostSpaceAndOutput - \else - \lst@ifkeepspaces - \@tempcnta\lst@length \lst@length\z@ - \@whilenum \@tempcnta>\z@ \do - {\lst@AppendOther\lst@outputspace - \advance\@tempcnta\m@ne}% - \lst@OutputOther - \else - \lst@GotoTabStop - \fi - \fi - \lst@length\z@ \global\lst@pos\z@} -\def\lst@outputspace{\ } -\def\lst@visiblespace{\lst@ttfamily{\char32}\textvisiblespace} -\lst@Key{showspaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifshowspaces} -\lst@Key{keepspaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifkeepspaces} -\lst@AddToHook{Init} - {\lst@ifshowspaces - \let\lst@outputspace\lst@visiblespace - \lst@keepspacestrue - \fi} -\def\lst@keepspacestrue{\let\lst@ifkeepspaces\iftrue} -\def\lst@ProcessSpace{% - \lst@ifkeepspaces - \lst@PrintToken - \lst@whitespacetrue - \lst@AppendOther\lst@outputspace - \lst@PrintToken - \else \ifnum\lst@newlines=\z@ - \lst@AppendSpecialSpace - \else \ifnum\lst@length=\z@ - \global\advance\lst@lostspace\lst@width - \global\advance\lst@pos\m@ne - \lst@whitespacetrue - \else - \lst@AppendSpecialSpace - \fi - \fi \fi} -\def\lst@AppendSpecialSpace{% - \lst@ifwhitespace - \lst@PrintToken - \global\advance\lst@lostspace\lst@width - \global\advance\lst@pos\m@ne - \lst@gobbledwhitespacetrue - \else - \lst@PrintToken - \lst@whitespacetrue - \lst@AppendOther\lst@outputspace - \lst@PrintToken - \fi} -\lst@Key{formfeed}{\bigbreak}{\def\lst@formfeed{#1}} -\def\lst@ProcessFormFeed{% - \lst@XPrintToken - \ifnum\lst@newlines=\z@ - \lst@EOLUpdate \lsthk@InitVarsBOL - \fi - \lst@formfeed - \lst@whitespacetrue} -\def\lst@Def#1{\lccode`\~=#1\lowercase{\def~}} -\def\lst@Let#1{\lccode`\~=#1\lowercase{\let~}} -\lst@AddToAtTop{\try@load@fontshape}{\def\space{ }} -\def\lst@SelectStdCharTable{% - \lst@Def{9}{\lst@ProcessTabulator}% - \lst@Def{12}{\lst@ProcessFormFeed}% - \lst@Def{32}{\lst@ProcessSpace}} -\def\lst@CCPut#1#2{% - \ifnum#2=\z@ - \expandafter\@gobbletwo - \else - \lccode`\~=#2\lccode`\/=#2\lowercase{\lst@CCPut@~{#1/}}% - \fi - \lst@CCPut#1} -\def\lst@CCPut@#1#2{\lst@lAddTo\lst@SelectStdCharTable{\def#1{#2}}} -\lst@CCPut \lst@ProcessOther - {"21}{"22}{"28}{"29}{"2B}{"2C}{"2E}{"2F} - {"3A}{"3B}{"3D}{"3F}{"5B}{"5D} - \z@ -\lst@CCPut \lst@ProcessDigit - {"30}{"31}{"32}{"33}{"34}{"35}{"36}{"37}{"38}{"39} - \z@ -\lst@CCPut \lst@ProcessLetter - {"40}{"41}{"42}{"43}{"44}{"45}{"46}{"47} - {"48}{"49}{"4A}{"4B}{"4C}{"4D}{"4E}{"4F} - {"50}{"51}{"52}{"53}{"54}{"55}{"56}{"57} - {"58}{"59}{"5A} - {"61}{"62}{"63}{"64}{"65}{"66}{"67} - {"68}{"69}{"6A}{"6B}{"6C}{"6D}{"6E}{"6F} - {"70}{"71}{"72}{"73}{"74}{"75}{"76}{"77} - {"78}{"79}{"7A} - \z@ -\def\lst@CCPutMacro#1#2#3{% - \ifnum#2=\z@ \else - \begingroup\lccode`\~=#2\relax \lccode`\/=#2\relax - \lowercase{\endgroup\expandafter\lst@CCPutMacro@ - \csname\@lst @um/\expandafter\endcsname - \csname\@lst @um/@\endcsname /~}#1{#3}% - \expandafter\lst@CCPutMacro - \fi} -\def\lst@CCPutMacro@#1#2#3#4#5#6{% - \lst@lAddTo\lst@SelectStdCharTable{\def#4{#5#1}}% - \def#1{\lst@UM#3}% - \def#2{#6}} -\def\lst@UM#1{\csname\@lst @um#1@\endcsname} -\lst@CCPutMacro - \lst@ProcessOther {"23}\# - \lst@ProcessLetter{"24}\textdollar - \lst@ProcessOther {"25}\% - \lst@ProcessOther {"26}\& - \lst@ProcessOther {"27}{\lst@ifupquote \textquotesingle - \else \char39\relax \fi} - \lst@ProcessOther {"2A}{\lst@ttfamily*\textasteriskcentered} - \lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{$-$}} - \lst@ProcessOther {"3C}{\lst@ttfamily<\textless} - \lst@ProcessOther {"3E}{\lst@ttfamily>\textgreater} - \lst@ProcessOther {"5C}{\lst@ttfamily{\char92}\textbackslash} - \lst@ProcessOther {"5E}\textasciicircum - \lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}\textunderscore} - \lst@ProcessOther {"60}{\lst@ifupquote \textasciigrave - \else \char96\relax \fi} - \lst@ProcessOther {"7B}{\lst@ttfamily{\char123}\textbraceleft} - \lst@ProcessOther {"7C}{\lst@ttfamily|\textbar} - \lst@ProcessOther {"7D}{\lst@ttfamily{\char125}\textbraceright} - \lst@ProcessOther {"7E}\textasciitilde - \lst@ProcessOther {"7F}- - \@empty\z@\@empty -\def\lst@ttfamily#1#2{\ifx\f@family\ttdefault#1\relax\else#2\fi} -\lst@AddToHook{Init}{\edef\ttdefault{\ttdefault}} -\lst@Key{upquote}{false}[t]{\lstKV@SetIf{#1}\lst@ifupquote - \lst@ifupquote - \@ifundefined{textasciigrave}% - {\let\KV@lst@upquote\@gobble - \lstKV@SetIf f\lst@ifupquote \@gobble\fi - \PackageError{Listings}{Option `upquote' requires `textcomp' - package.\MessageBreak The option has been disabled}% - {Add \string\usepackage{textcomp} to your preamble.}}% - {}% - \fi} -\AtBeginDocument{% - \@ifpackageloaded{upquote}{\RequirePackage{textcomp}% - \lstset{upquote}}{}% - \@ifpackageloaded{upquote2}{\lstset{upquote}}{}} -\def\lst@activecharstrue{\let\lst@ifactivechars\iftrue} -\def\lst@activecharsfalse{\let\lst@ifactivechars\iffalse} -\lst@activecharstrue -\def\lst@SelectCharTable{% - \lst@SelectStdCharTable - \lst@ifactivechars - \catcode9\active \catcode12\active \catcode13\active - \@tempcnta=32\relax - \@whilenum\@tempcnta<128\do - {\catcode\@tempcnta\active\advance\@tempcnta\@ne}% - \fi - \lst@ifec \lst@DefEC \fi - \let\do\lst@do@noligs \verbatim@nolig@list - \lsthk@SelectCharTable - \lst@DeveloperSCT -\lst@DefRange - \ifx\lst@Backslash\relax\else - \lst@LetSaveDef{"5C}\lsts@backslash\lst@Backslash - \fi} -\lst@Key{SelectCharTable}{}{\def\lst@DeveloperSCT{#1}} -\lst@Key{MoreSelectCharTable}\relax{\lst@lAddTo\lst@DeveloperSCT{#1}} -\lst@AddToHook{SetLanguage}{\let\lst@DeveloperSCT\@empty} -\def\lst@do@noligs#1{% - \begingroup \lccode`\~=`#1\lowercase{\endgroup - \lst@do@noligs@~}} -\def\lst@do@noligs@#1{% - \expandafter\expandafter\expandafter\def - \expandafter\expandafter\expandafter#1% - \expandafter\expandafter\expandafter{\expandafter\lst@NoLig#1}} -\def\lst@NoLig{\advance\lst@length\m@ne \lst@Append\lst@nolig} -\def\lst@nolig{\lst@UM\@empty}% -\@namedef{\@lst @um@}{\leavevmode\kern\z@} -\def\lst@SaveOutputDef#1#2{% - \begingroup \lccode`\~=#1\relax \lowercase{\endgroup - \def\lst@temp##1\def~##2##3\relax}{% - \global\expandafter\let\expandafter#2\@gobble##2\relax}% - \expandafter\lst@temp\lst@SelectStdCharTable\relax} -\lst@SaveOutputDef{"5C}\lstum@backslash -\lst@Key{extendedchars}{true}[t]{\lstKV@SetIf{#1}\lst@ifec} -\def\lst@DefEC{% - \lst@CCECUse \lst@ProcessLetter - ^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f% - ^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f% - ^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af% - ^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf% - ^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf% - ^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df% - ^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef% - ^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff% - ^^00} -\def\lst@CCECUse#1#2{% - \ifnum`#2=\z@ - \expandafter\@gobbletwo - \else - \ifnum\catcode`#2=\active - \lccode`\~=`#2\lccode`\/=`#2\lowercase{\lst@CCECUse@#1~/}% - \else - \lst@ifactivechars \catcode`#2=\active \fi - \lccode`\~=`#2\lccode`\/=`#2\lowercase{\def~{#1/}}% - \fi - \fi - \lst@CCECUse#1} -\def\lst@CCECUse@#1#2#3{% - \expandafter\def\csname\@lst @EC#3\endcsname{\lst@UM#3}% - \expandafter\let\csname\@lst @um#3@\endcsname #2% - \edef#2{\noexpand#1% - \expandafter\noexpand\csname\@lst @EC#3\endcsname}} -\lst@AddToHook{Init} - {\let\lsts@nfss@catcodes\nfss@catcodes - \let\nfss@catcodes\lst@nfss@catcodes} -\def\lst@nfss@catcodes{% - \lst@makeletter - ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\relax - \@makeother (\@makeother )\@makeother ,\@makeother :\@makeother\&% - \@makeother 0\@makeother 1\@makeother 2\@makeother 3\@makeother 4% - \@makeother 5\@makeother 6\@makeother 7\@makeother 8\@makeother 9% - \@makeother =\lsts@nfss@catcodes} -\def\lst@makeletter#1{% - \ifx\relax#1\else\catcode`#111\relax \expandafter\lst@makeletter\fi} -\lst@Key{useoutput}{2}{\edef\lst@useoutput{\ifcase0#1 0\or 1\else 2\fi}} -\lst@AddToHook{Init} -{\edef\lst@OrgOutput{\the\output}% -\ifcase\lst@useoutput\relax -\or - \output{\global\setbox\lst@gtempboxa\box\@cclv - \expandafter\egroup - \lst@SaveToken - \lst@InterruptModes - \setbox\@cclv\box\lst@gtempboxa - \bgroup\lst@OrgOutput\egroup - \bgroup - \aftergroup\pagegoal\aftergroup\vsize - \aftergroup\lst@ReenterModes\aftergroup\lst@RestoreToken}% -\else - \output{\lst@RestoreOrigCatcodes - \lst@ifec \lst@RestoreOrigExtendedCatcodes \fi - \lst@OrgOutput}% -\fi} -\def\lst@GetChars#1#2#3{% - \let#1\@empty - \@tempcnta#2\relax \@tempcntb#3\relax - \loop \ifnum\@tempcnta<\@tempcntb\relax - \lst@lExtend#1{\expandafter\catcode\the\@tempcnta=}% - \lst@lExtend#1{\the\catcode\@tempcnta\relax}% - \ifnum\the\catcode\@tempcnta=\active - \begingroup\lccode`\~=\@tempcnta - \lowercase{\endgroup - \lst@lExtend#1{\expandafter\let\expandafter~\csname - lstecs@\the\@tempcnta\endcsname}% - \expandafter\let\csname lstecs@\the\@tempcnta\endcsname~}% - \fi - \advance\@tempcnta\@ne - \repeat} -\begingroup \catcode12=\active\let^^L\@empty -\gdef\lst@ScanChars{% - \let\lsts@ssL^^L% - \def^^L{\par}% - \lst@GetChars\lst@RestoreOrigCatcodes\@ne {128}% - \let^^L\lsts@ssL - \lst@GetChars\lst@RestoreOrigExtendedCatcodes{128}{256}} -\endgroup -\lst@Key{rescanchars}\relax{\lst@ScanChars} -\AtBeginDocument{\lst@ScanChars} -\lst@Key{alsoletter}\relax{% - \lst@DoAlso{#1}\lst@alsoletter\lst@ProcessLetter} -\lst@Key{alsodigit}\relax{% - \lst@DoAlso{#1}\lst@alsodigit\lst@ProcessDigit} -\lst@Key{alsoother}\relax{% - \lst@DoAlso{#1}\lst@alsoother\lst@ProcessOther} -\lst@AddToHook{SelectCharTable} - {\lst@alsoother \lst@alsodigit \lst@alsoletter} -\lst@AddToHookExe{SetLanguage}% init - {\let\lst@alsoletter\@empty - \let\lst@alsodigit\@empty - \let\lst@alsoother\@empty} -\def\lst@DoAlso#1#2#3{% - \lst@DefOther\lst@arg{#1}\let#2\@empty - \expandafter\lst@DoAlso@\expandafter#2\expandafter#3\lst@arg\relax} -\def\lst@DoAlso@#1#2#3{% - \ifx\relax#3\expandafter\@gobblethree \else - \begingroup \lccode`\~=`#3\relax \lowercase{\endgroup - \def\lst@temp##1\def~##2##3\relax{% - \edef\lst@arg{\def\noexpand~{\noexpand#2\expandafter - \noexpand\@gobble##2}}}}% - \expandafter\lst@temp\lst@SelectStdCharTable\relax - \lst@lExtend#1{\lst@arg}% - \fi - \lst@DoAlso@#1#2} -\def\lst@SaveDef#1#2{% - \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~}} -\def\lst@DefSaveDef#1#2{% - \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\def~}} -\def\lst@LetSaveDef#1#2{% - \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\let~}} -\def\lst@CDef#1{\lst@CDef@#1} -\def\lst@CDef@#1#2#3#4{\lst@CDefIt#1{#2}{#3}{#4#2#3}#4} -\def\lst@CDefX#1{\lst@CDefX@#1} -\def\lst@CDefX@#1#2#3{\lst@CDefIt#1{#2}{#3}{}} -\def\lst@CDefIt#1#2#3#4#5#6#7#8{% - \ifx\@empty#2\@empty - \def#1{#6\def\lst@next{#7#4#8}\lst@next}% - \else \ifx\@empty#3\@empty - \def#1##1{% - #6% - \ifx##1#2\def\lst@next{#7#4#8}\else - \def\lst@next{#5##1}\fi - \lst@next}% - \else - \def#1{% - #6% - \lst@IfNextCharsArg{#2#3}{#7#4#8}% - {\expandafter#5\lst@eaten}}% - \fi \fi} -\def\lst@CArgX#1#2\relax{% - \lst@DefActive\lst@arg{#1#2}% - \expandafter\lst@CArg\lst@arg\relax} -\def\lst@CArg#1#2\relax{% - \lccode`\/=`#1\lowercase{\def\lst@temp{/}}% - \lst@GetFreeMacro{lst@c\lst@temp}% - \expandafter\lst@CArg@\lst@freemacro#1#2\@empty\@empty\relax} -\def\lst@CArg@#1#2#3#4\@empty#5\relax#6{% - \let#1#2% - \ifx\@empty#3\@empty - \def\lst@next{#6{#2{}{}}}% - \else - \def\lst@next{#6{#2#3{#4}}}% - \fi - \lst@next #1} -\def\lst@CArgEmpty#1\@empty{#1} -\lst@Key{excludedelims}\relax - {\lsthk@ExcludeDelims \lst@NormedDef\lst@temp{#1}% - \expandafter\lst@for\lst@temp\do - {\expandafter\let\csname\@lst @ifex##1\endcsname\iftrue}} -\def\lst@DelimPrint#1#2{% - #1% - \begingroup - \lst@mode\lst@nomode \lst@modetrue - #2\lst@XPrintToken - \endgroup - \lst@ResetToken - \fi} -\def\lst@DelimOpen#1#2#3#4#5#6\@empty{% - \lst@TrackNewLines \lst@XPrintToken - \lst@DelimPrint#1{#6}% - \lst@EnterMode{#4}{\def\lst@currstyle#5}% - \lst@DelimPrint{#1#2}{#6}% - #3} -\def\lst@DelimClose#1#2#3\@empty{% - \lst@TrackNewLines \lst@XPrintToken - \lst@DelimPrint{#1#2}{#3}% - \lst@LeaveMode - \lst@DelimPrint{#1}{#3}} -\def\lst@BeginDelim{\lst@DelimOpen\iffalse\else{}} -\def\lst@EndDelim{\lst@DelimClose\iffalse\else} -\def\lst@BeginIDelim{\lst@DelimOpen\iffalse{}{}} -\def\lst@EndIDelim{\lst@DelimClose\iffalse{}} -\lst@AddToHook{SelectCharTable}{\lst@DefDelims} -\lst@AddToHookExe{SetLanguage}{\let\lst@DefDelims\@empty} -\def\lst@Delim#1{% - \lst@false \let\lst@cumulative\@empty \let\lst@arg\@empty - \@ifstar{\@ifstar{\lst@Delim@{#1}}% - {\let\lst@cumulative\relax - \lst@Delim@{#1}}}% - {\lst@true\lst@Delim@{#1}}} -\def\lst@Delim@#1[#2]{% - \gdef\lst@delimtype{#2}% - \@ifnextchar[\lst@Delim@sty - {\lst@Delim@sty[#1]}} -\def\lst@Delim@sty[#1]{% - \def\lst@delimstyle{#1}% - \ifx\@empty#1\@empty\else - \lst@Delim@sty@ #1\@nil - \fi - \@ifnextchar[\lst@Delim@option - \lst@Delim@delim} -\def\lst@Delim@option[#1]{\def\lst@arg{[#1]}\lst@Delim@delim} -\def\lst@Delim@sty@#1#2\@nil{% - \if\relax\noexpand#1\else - \edef\lst@delimstyle{\expandafter\noexpand - \csname\@lst @\lst@delimstyle\endcsname}% - \fi} -\def\lst@Delim@delim#1\relax#2#3#4#5#6#7#8{% - \ifx #4\@empty \lst@Delim@delall{#2}\fi - \ifx\@empty#1\@empty - \ifx #4\@nil - \@ifundefined{\@lst @#2DM@\lst@delimtype}% - {\lst@Delim@delall{#2@\lst@delimtype}}% - {\lst@Delim@delall{#2DM@\lst@delimtype}}% - \fi - \else - \expandafter\lst@Delim@args\expandafter - {\lst@delimtype}{#1}{#5}#6{#7}{#8}#4% - \let\lst@delim\@empty - \expandafter\lst@IfOneOf\lst@delimtype\relax#3% - {\@ifundefined{\@lst @#2DM@\lst@delimtype}% - {\lst@lExtend\lst@delim{\csname\@lst @#2@\lst@delimtype - \expandafter\endcsname\lst@arg}}% - {\lst@lExtend\lst@delim{\expandafter\lst@UseDynamicMode - \csname\@lst @#2DM@\lst@delimtype - \expandafter\endcsname\lst@arg}}% - \ifx #4\@nil - \let\lst@temp\lst@DefDelims \let\lst@DefDelims\@empty - \expandafter\lst@Delim@del\lst@temp\@empty\@nil\@nil\@nil - \else - \lst@lExtend\lst@DefDelims\lst@delim - \fi}% - {\PackageError{Listings}{Illegal type `\lst@delimtype'}% - {#2 types are #3.}}% - \fi} -\def\lst@Delim@args#1#2#3#4#5#6#7{% - \begingroup - \lst@false \let\lst@next\lst@XConvert - \@ifnextchar #4{\xdef\lst@delimtype{\expandafter\@gobble - \lst@delimtype}% - #5\lst@next#2\@nil - \lst@lAddTo\lst@arg{\@empty#6}% - \lst@GobbleNil}% - {\lst@next#2\@nil - \lst@lAddTo\lst@arg{\@empty#3}% - \lst@GobbleNil}% - #1\@nil - \global\let\@gtempa\lst@arg - \endgroup - \let\lst@arg\@gtempa - \ifx #7\@nil\else - \expandafter\lst@Delim@args@\expandafter{\lst@delimstyle}% - \fi} -\def\lst@Delim@args@#1{% - \lst@if - \lst@lAddTo\lst@arg{{{#1}\lst@modetrue}}% - \else - \ifx\lst@cumulative\@empty - \lst@lAddTo\lst@arg{{{}#1}}% - \else - \lst@lAddTo\lst@arg{{{#1}}}% - \fi - \fi} -\def\lst@Delim@del#1\@empty#2#3#4{% - \ifx #2\@nil\else - \def\lst@temp{#1\@empty#2#3}% - \ifx\lst@temp\lst@delim\else - \lst@lAddTo\lst@DefDelims{#1\@empty#2#3{#4}}% - \fi - \expandafter\lst@Delim@del - \fi} -\def\lst@Delim@delall#1{% - \begingroup - \edef\lst@delim{\expandafter\string\csname\@lst @#1\endcsname}% - \lst@false \global\let\@gtempa\@empty - \expandafter\lst@Delim@delall@\lst@DefDelims\@empty - \endgroup - \let\lst@DefDelims\@gtempa} -\def\lst@Delim@delall@#1{% - \ifx #1\@empty\else - \ifx #1\lst@UseDynamicMode - \lst@true - \let\lst@next\lst@Delim@delall@do - \else - \def\lst@next{\lst@Delim@delall@do#1}% - \fi - \expandafter\lst@next - \fi} -\def\lst@Delim@delall@do#1#2\@empty#3#4#5{% - \expandafter\lst@IfSubstring\expandafter{\lst@delim}{\string#1}% - {}% - {\lst@if \lst@AddTo\@gtempa\lst@UseDynamicMode \fi - \lst@AddTo\@gtempa{#1#2\@empty#3#4{#5}}}% - \lst@false \lst@Delim@delall@} -\gdef\lst@DefDelimB#1#2#3#4#5#6#7#8{% - \lst@CDef{#1}#2% - {#3}% - {\let\lst@bnext\lst@CArgEmpty - \lst@ifmode #4\else - #5% - \def\lst@bnext{#6{#7}{#8}}% - \fi - \lst@bnext}% - \@empty} -\gdef\lst@DefDelimE#1#2#3#4#5#6#7{% - \lst@CDef{#1}#2% - {#3}% - {\let\lst@enext\lst@CArgEmpty - \ifnum #7=\lst@mode% - #4% - \let\lst@enext#6% - \else - #5% - \fi - \lst@enext}% - \@empty} -\lst@AddToHook{Init}{\let\lst@bnext\relax \let\lst@enext\relax} -\gdef\lst@DefDelimBE#1#2#3#4#5#6#7#8#9{% - \lst@CDef{#1}#2% - {#3}% - {\let\lst@bnext\lst@CArgEmpty - \ifnum #7=\lst@mode - #4% - \let\lst@bnext#9% - \else - \lst@ifmode\else - #5% - \def\lst@bnext{#6{#7}{#8}}% - \fi - \fi - \lst@bnext}% - \@empty} -\gdef\lst@delimtypes{s,l} -\gdef\lst@DelimKey#1#2{% - \lst@Delim{}#2\relax - {Delim}\lst@delimtypes #1% - {\lst@BeginDelim\lst@EndDelim} - i\@empty{\lst@BeginIDelim\lst@EndIDelim}} -\lst@Key{delim}\relax{\lst@DelimKey\@empty{#1}} -\lst@Key{moredelim}\relax{\lst@DelimKey\relax{#1}} -\lst@Key{deletedelim}\relax{\lst@DelimKey\@nil{#1}} -\gdef\lst@DelimDM@l#1#2\@empty#3#4#5{% - \lst@CArg #2\relax\lst@DefDelimB{}{}{}#3{#1}{#5\lst@Lmodetrue}} -\gdef\lst@DelimDM@s#1#2#3\@empty#4#5#6{% - \lst@CArg #2\relax\lst@DefDelimB{}{}{}#4{#1}{#6}% - \lst@CArg #3\relax\lst@DefDelimE{}{}{}#5{#1}} -\def\lst@ReplaceInput#1{\lst@CArgX #1\relax\lst@CDefX{}{}} -\def\lst@Literatekey#1\@nil@{\let\lst@ifxliterate\lst@if - \def\lst@literate{#1}} -\lst@Key{literate}{}{\@ifstar{\lst@true \lst@Literatekey} - {\lst@false\lst@Literatekey}#1\@nil@} -\lst@AddToHook{SelectCharTable} - {\ifx\lst@literate\@empty\else - \expandafter\lst@Literate\lst@literate{}\relax\z@ - \fi} -\def\lst@Literate#1#2#3{% - \ifx\relax#2\@empty\else - \lst@CArgX #1\relax\lst@CDef - {} - {\let\lst@next\@empty - \lst@ifxliterate - \lst@ifmode \let\lst@next\lst@CArgEmpty \fi - \fi - \ifx\lst@next\@empty - \ifx\lst@OutputBox\@gobble\else - \lst@XPrintToken \let\lst@scanmode\lst@scan@m - \lst@token{#2}\lst@length#3\relax - \lst@XPrintToken - \fi - \let\lst@next\lst@CArgEmptyGobble - \fi - \lst@next}% - \@empty - \expandafter\lst@Literate - \fi} -\def\lst@CArgEmptyGobble#1\@empty{} -\def\lst@BeginDropInput#1{% - \lst@EnterMode{#1}% - {\lst@modetrue - \let\lst@OutputBox\@gobble - \let\lst@ifdropinput\iftrue - \let\lst@ProcessLetter\@gobble - \let\lst@ProcessDigit\@gobble - \let\lst@ProcessOther\@gobble - \let\lst@ProcessSpace\@empty - \let\lst@ProcessTabulator\@empty - \let\lst@ProcessFormFeed\@empty}} -\let\lst@ifdropinput\iffalse % init -\lst@Key{basicstyle}\relax{\def\lst@basicstyle{#1}} -\lst@Key{inputencoding}\relax{\def\lst@inputenc{#1}} -\lst@AddToHook{Init} - {\lst@basicstyle - \ifx\lst@inputenc\@empty\else - \@ifundefined{inputencoding}{}% - {\inputencoding\lst@inputenc}% - \fi} -\lst@AddToHookExe{EmptyStyle} - {\let\lst@basicstyle\@empty - \let\lst@inputenc\@empty} -\lst@Key{multicols}{}{\@tempcnta=0#1\relax\def\lst@multicols{#1}} -\def\lst@parshape{\parshape\@ne \z@ \linewidth} -\lst@AddToHookAtTop{EveryLine}{\lst@parshape} -\lst@AddToHookAtTop{EndGroup}{\lst@parshape} -\newcount\lst@lineno % \global -\lst@AddToHook{InitVars}{\global\lst@lineno\@ne} -\lst@Key{print}{true}[t]{\lstKV@SetIf{#1}\lst@ifprint} -\lst@Key{firstline}\relax{\def\lst@firstline{#1\relax}} -\lst@Key{lastline}\relax{\def\lst@lastline{#1\relax}} -\lst@AddToHook{PreSet} - {\let\lst@firstline\@ne \def\lst@lastline{9999999\relax}} -\lst@Key{linerange}\relax{\lstKV@OptArg[]{#1}{% - \def\lst@interrange{##1}\def\lst@linerange{##2,}}} -\lst@Key{rangeprefix}\relax{\def\lst@rangebeginprefix{#1}% - \def\lst@rangeendprefix{#1}} -\lst@Key{rangesuffix}\relax{\def\lst@rangebeginsuffix{#1}% - \def\lst@rangeendsuffix{#1}} -\lst@Key{rangebeginprefix}{}{\def\lst@rangebeginprefix{#1}} -\lst@Key{rangebeginsuffix}{}{\def\lst@rangebeginsuffix{#1}} -\lst@Key{rangeendprefix}{}{\def\lst@rangeendprefix{#1}} -\lst@Key{rangeendsuffix}{}{\def\lst@rangeendsuffix{#1}} -\lst@Key{includerangemarker}{true}[t]{\lstKV@SetIf{#1}\lst@ifincluderangemarker} -\lst@AddToHook{PreSet}{\def\lst@firstline{1\relax}% - \let\lst@linerange\@empty} -\lst@AddToHook{Init} -{\ifx\lst@linerange\@empty - \edef\lst@linerange{{\lst@firstline}-{\lst@lastline},}% - \fi - \lst@GetLineInterval}% -\def\lst@GetLineInterval{\expandafter\lst@GLI\lst@linerange\@nil} -\def\lst@GLI#1,#2\@nil{\def\lst@linerange{#2}\lst@GLI@#1--\@nil} -\def\lst@GLI@#1-#2-#3\@nil{% - \lst@IfNumber{#1}% - {\ifx\@empty#1\@empty - \let\lst@firstline\@ne - \else - \def\lst@firstline{#1\relax}% - \fi - \ifx\@empty#3\@empty - \def\lst@lastline{9999999\relax}% - \else - \ifx\@empty#2\@empty - \let\lst@lastline\lst@firstline - \else - \def\lst@lastline{#2\relax}% - \fi - \fi}% - {\def\lst@firstline{9999999\relax}% - \let\lst@lastline\lst@firstline - \let\lst@rangebegin\lst@rangebeginprefix - \lst@AddTo\lst@rangebegin{#1}\lst@Extend\lst@rangebegin\lst@rangebeginsuffix - \ifx\@empty#3\@empty - \let\lst@rangeend\lst@rangeendprefix - \lst@AddTo\lst@rangeend{#1}\lst@Extend\lst@rangeend\lst@rangeendsuffix - \else - \ifx\@empty#2\@empty - \let\lst@rangeend\@empty - \else - \let\lst@rangeend\lst@rangeendprefix - \lst@AddTo\lst@rangeend{#2}\lst@Extend\lst@rangeend\lst@rangeendsuffix - \fi - \fi - \global\def\lst@DefRange{\expandafter\lst@CArgX\lst@rangebegin\relax\lst@DefRangeB}% - \ifnum\lst@mode=\lst@Pmode \expandafter\lst@DefRange \fi}} -\lst@AddToHookExe{DeInit}{\global\let\lst@DefRange\@empty} -\def\lst@DefRangeB#1#2{\lst@DefRangeB@#1#2} -\def\lst@DefRangeB@#1#2#3#4{% - \lst@CDef{#1{#2}{#3}}#4{}% - {\lst@ifincluderangemarker - \lst@LeaveMode - \let#1#4% - \lst@DefRangeEnd - \lst@InitLstNumber - \else - \@tempcnta\lst@lineno \advance\@tempcnta\@ne - \edef\lst@firstline{\the\@tempcnta\relax}% - \gdef\lst@OnceAtEOL{\let#1#4\lst@DefRangeEnd}% - \lst@InitLstNumber - \fi - \global\let\lst@DefRange\lst@DefRangeEnd - \lst@CArgEmpty}% - \@empty} -\def\lstpatch@labels{% -\gdef\lst@SetFirstNumber{% - \ifx\lst@firstnumber\@undefined - \@tempcnta 0\csname\@lst no@\lst@intname\endcsname\relax - \ifnum\@tempcnta=\z@ \else - \lst@nololtrue - \advance\@tempcnta\lst@advancenumber - \edef\lst@firstnumber{\the\@tempcnta\relax}% - \fi - \fi}% -} -\def\lst@InitLstNumber{% - \global\c@lstnumber\lst@firstnumber - \global\advance\c@lstnumber\lst@advancenumber - \global\advance\c@lstnumber-\lst@advancelstnum - \ifx \lst@firstnumber\c@lstnumber - \global\advance\c@lstnumber-\lst@advancelstnum - \fi} -\def\lst@DefRangeEnd{% - \ifx\lst@rangeend\@empty\else - \expandafter\lst@CArgX\lst@rangeend\relax\lst@DefRangeE - \fi} -\def\lst@DefRangeE#1#2{\lst@DefRangeE@#1#2} -\def\lst@DefRangeE@#1#2#3#4{% - \lst@CDef{#1#2{#3}}#4{}% - {\let#1#4% - \edef\lst@lastline{\the\lst@lineno\relax}% - \lst@DefRangeE@@}% - \@empty} -\def\lst@DefRangeE@@#1\@empty{% - \lst@ifincluderangemarker - #1\lst@XPrintToken - \fi - \lst@LeaveModeToPmode - \lst@BeginDropInput{\lst@Pmode}} -\def\lst@LeaveModeToPmode{% - \ifnum\lst@mode=\lst@Pmode - \expandafter\lsthk@EndGroup - \else - \expandafter\egroup\expandafter\lst@LeaveModeToPmode - \fi} -\lst@AddToHook{EOL}{\lst@OnceAtEOL\global\let\lst@OnceAtEOL\@empty} -\gdef\lst@OnceAtEOL{}% Init -\def\lst@MSkipToFirst{% - \global\advance\lst@lineno\@ne - \ifnum \lst@lineno=\lst@firstline - \def\lst@next{\lst@LeaveMode \global\lst@newlines\z@ - \lst@OnceAtEOL \global\let\lst@OnceAtEOL\@empty - \lst@InitLstNumber % Added to work with modified \lsthk@PreInit. - \lsthk@InitVarsBOL - \lst@BOLGobble}% - \expandafter\lst@next - \fi} -\def\lst@SkipToFirst{% - \ifnum \lst@lineno<\lst@firstline - \def\lst@next{\lst@BeginDropInput\lst@Pmode - \lst@Let{13}\lst@MSkipToFirst - \lst@Let{10}\lst@MSkipToFirst}% - \expandafter\lst@next - \else - \expandafter\lst@BOLGobble - \fi} -\def\lst@IfNumber#1{% - \ifx\@empty#1\@empty - \let\lst@next\@firstoftwo - \else - \lst@IfNumber@#1\@nil - \fi - \lst@next} -\def\lst@IfNumber@#1#2\@nil{% - \let\lst@next\@secondoftwo - \ifnum`#1>47\relax \ifnum`#1>57\relax\else - \let\lst@next\@firstoftwo - \fi\fi} -\lst@Key{nolol}{false}[t]{\lstKV@SetIf{#1}\lst@ifnolol} -\def\lst@nololtrue{\let\lst@ifnolol\iftrue} -\let\lst@ifnolol\iffalse % init -\lst@Key{captionpos}{t}{\def\lst@captionpos{#1}} -\lst@Key{abovecaptionskip}\smallskipamount{\def\lst@abovecaption{#1}} -\lst@Key{belowcaptionskip}\smallskipamount{\def\lst@belowcaption{#1}} -\lst@Key{label}\relax{\def\lst@label{#1}} -\lst@Key{title}\relax{\def\lst@title{#1}\let\lst@caption\relax} -\lst@Key{caption}\relax{\lstKV@OptArg[{#1}]{#1}% - {\def\lst@caption{##2}\def\lst@@caption{##1}}% - \let\lst@title\@empty} -\lst@AddToHookExe{TextStyle} - {\let\lst@caption\@empty \let\lst@@caption\@empty - \let\lst@title\@empty \let\lst@label\@empty} -\AtBeginDocument{ - \@ifundefined{thechapter}{\let\lst@ifnumberbychapter\iffalse}{} - \lst@ifnumberbychapter - \newcounter{lstlisting}[chapter] - \gdef\thelstlisting% - {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@lstlisting} - \else - \newcounter{lstlisting} - \gdef\thelstlisting{\@arabic\c@lstlisting} - \fi} -\lst@UserCommand\lstlistingname{Listing} -\lst@Key{numberbychapter}{true}[t]{\lstKV@SetIf{#1}\lst@ifnumberbychapter} -\@ifundefined{abovecaptionskip} -{\newskip\abovecaptionskip - \newskip\belowcaptionskip}{} -\@ifundefined{@makecaption} -{\long\def\@makecaption#1#2{% - \vskip\abovecaptionskip - \sbox\@tempboxa{#1: #2}% - \ifdim \wd\@tempboxa >\hsize - #1: #2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip}% -}{} -\def\fnum@lstlisting{% - \lstlistingname - \ifx\lst@@caption\@empty\else~\thelstlisting\fi}% -\def\lst@MakeCaption#1{% - \lst@ifdisplaystyle - \ifx #1t% - \ifx\lst@@caption\@empty\expandafter\lst@HRefStepCounter \else - \expandafter\refstepcounter - \fi {lstlisting}% - \ifx\lst@label\@empty\else \label{\lst@label}\fi - \let\lst@arg\lst@intname \lst@ReplaceIn\lst@arg\lst@filenamerpl - \global\let\lst@name\lst@arg \global\let\lstname\lst@name - \lst@ifnolol\else - \ifx\lst@@caption\@empty - \ifx\lst@caption\@empty - \ifx\lst@intname\@empty \else \def\lst@temp{ }% - \ifx\lst@intname\lst@temp \else - \addcontentsline{lol}{lstlisting}\lst@name - \fi\fi - \fi - \else - \addcontentsline{lol}{lstlisting}% - {\protect\numberline{\thelstlisting}\lst@@caption}% - \fi - \fi - \fi - \ifx\lst@caption\@empty\else - \lst@IfSubstring #1\lst@captionpos - {\begingroup \let\@@vskip\vskip - \def\vskip{\afterassignment\lst@vskip \@tempskipa}% - \def\lst@vskip{\nobreak\@@vskip\@tempskipa\nobreak}% - \par\@parboxrestore\normalsize\normalfont % \noindent (AS) - \ifx #1t\allowbreak \fi - \ifx\lst@title\@empty - \lst@makecaption\fnum@lstlisting{\ignorespaces \lst@caption} - \else - \lst@maketitle\lst@title % (AS) - \fi - \ifx #1b\allowbreak \fi - \endgroup}{}% - \fi - \fi} -\def\lst@makecaption{\@makecaption} -\def\lst@maketitle{\@makecaption\lst@title@dropdelim} -\def\lst@title@dropdelim#1{\ignorespaces} -\AtBeginDocument{% -\@ifundefined{captionlabelfalse}{}{% - \def\lst@maketitle{\captionlabelfalse\@makecaption\@empty}}% -\@ifundefined{caption@startrue}{}{% - \def\lst@maketitle{\caption@startrue\@makecaption\@empty}}% -} -\def\lst@HRefStepCounter#1{% - \begingroup - \c@lstlisting\lst@neglisting - \advance\c@lstlisting\m@ne \xdef\lst@neglisting{\the\c@lstlisting}% - \ifx\hyper@refstepcounter\@undefined\else - \hyper@refstepcounter{#1}% - \fi - \endgroup} -\gdef\lst@neglisting{\z@}% init -\lst@Key{boxpos}{c}{\def\lst@boxpos{#1}} -\def\lst@boxtrue{\let\lst@ifbox\iftrue} -\let\lst@ifbox\iffalse -\lst@Key{float}\relax[\lst@floatplacement]{% - \lstKV@SwitchCases{#1}% - {true&\let\lst@floatdefault\lst@floatplacement - \let\lst@float\lst@floatdefault\\% - false&\let\lst@floatdefault\relax - \let\lst@float\lst@floatdefault - }{\def\lst@next{\@ifstar{\let\lst@beginfloat\@dblfloat - \let\lst@endfloat\end@dblfloat - \lst@KFloat}% - {\let\lst@beginfloat\@float - \let\lst@endfloat\end@float - \lst@KFloat}} - \edef\lst@float{#1}% - \expandafter\lst@next\lst@float\relax}} -\def\lst@KFloat#1\relax{% - \ifx\@empty#1\@empty - \let\lst@float\lst@floatplacement - \else - \def\lst@float{#1}% - \fi} -\lst@Key{floatplacement}{tbp}{\def\lst@floatplacement{#1}} -\lst@AddToHook{PreSet}{\let\lst@float\lst@floatdefault} -\lst@AddToHook{TextStyle}{\let\lst@float\relax} -\let\lst@floatdefault\relax % init -\lst@AddToHook{DeInit}{% - \ifx\lst@float\relax - \global\let\lst@doendpe\@doendpe - \else - \global\let\lst@doendpe\@empty - \fi} -\AtBeginDocument{% -\@ifundefined{c@float@type}% - {\edef\ftype@lstlisting{\ifx\c@figure\@undefined 1\else 4\fi}} - {\edef\ftype@lstlisting{\the\c@float@type}% - \addtocounter{float@type}{\value{float@type}}}% -} -\lst@Key{aboveskip}\medskipamount{\def\lst@aboveskip{#1}} -\lst@Key{belowskip}\medskipamount{\def\lst@belowskip{#1}} -\lst@AddToHook{TextStyle} - {\let\lst@aboveskip\z@ \let\lst@belowskip\z@} -\lst@Key{everydisplay}{}{\def\lst@EveryDisplay{#1}} -\lst@AddToHook{TextStyle}{\let\lst@ifdisplaystyle\iffalse} -\lst@AddToHook{DisplayStyle}{\let\lst@ifdisplaystyle\iftrue} -\let\lst@ifdisplaystyle\iffalse -\def\lst@Init#1{% - \begingroup - \ifx\lst@float\relax\else - \edef\@tempa{\noexpand\lst@beginfloat{lstlisting}[\lst@float]}% - \expandafter\@tempa - \fi - \ifx\lst@multicols\@empty\else - \edef\lst@next{\noexpand\multicols{\lst@multicols}} - \expandafter\lst@next - \fi - \ifhmode\ifinner \lst@boxtrue \fi\fi - \lst@ifbox - \lsthk@BoxUnsafe - \hbox to\z@\bgroup - $\if t\lst@boxpos \vtop - \else \if b\lst@boxpos \vbox - \else \vcenter \fi\fi - \bgroup \par\noindent - \else - \lst@ifdisplaystyle - \lst@EveryDisplay - \par\penalty-50\relax - \vspace\lst@aboveskip - \fi - \fi - \normalbaselines - \abovecaptionskip\lst@abovecaption\relax - \belowcaptionskip\lst@belowcaption\relax - \lst@MakeCaption t% - \lsthk@PreInit \lsthk@Init - \lst@ifdisplaystyle - \global\let\lst@ltxlabel\@empty - \if@inlabel - \lst@ifresetmargins - \leavevmode - \else - \xdef\lst@ltxlabel{\the\everypar}% - \lst@AddTo\lst@ltxlabel{% - \global\let\lst@ltxlabel\@empty - \everypar{\lsthk@EveryLine\lsthk@EveryPar}}% - \fi - \fi - \everypar\expandafter{\lst@ltxlabel - \lsthk@EveryLine\lsthk@EveryPar}% - \else - \everypar{}\let\lst@NewLine\@empty - \fi - \lsthk@InitVars \lsthk@InitVarsBOL - \lst@Let{13}\lst@MProcessListing - \let\lst@Backslash#1% - \lst@EnterMode{\lst@Pmode}{\lst@SelectCharTable}% - \lst@InitFinalize} -\let\lst@InitFinalize\@empty % init -\lst@AddToHook{PreInit} - {\rightskip\z@ \leftskip\z@ \parfillskip=\z@ plus 1fil - \let\par\@@par} -\lst@AddToHook{EveryLine}{}% init -\lst@AddToHook{EveryPar}{}% init -\lst@Key{showlines}f[t]{\lstKV@SetIf{#1}\lst@ifshowlines} -\def\lst@DeInit{% - \lst@XPrintToken \lst@EOLUpdate - \global\advance\lst@newlines\m@ne - \lst@ifshowlines - \lst@DoNewLines - \else - \setbox\@tempboxa\vbox{\lst@DoNewLines}% - \fi - \lst@ifdisplaystyle \par\removelastskip \fi - \lsthk@ExitVars\everypar{}\lsthk@DeInit\normalbaselines\normalcolor - \lst@MakeCaption b% - \lst@ifbox - \egroup $\hss \egroup - \vrule\@width\lst@maxwidth\@height\z@\@depth\z@ - \else - \lst@ifdisplaystyle - \par\penalty-50\vspace\lst@belowskip - \fi - \fi - \ifx\lst@multicols\@empty\else - \def\lst@next{\global\let\@checkend\@gobble - \endmulticols - \global\let\@checkend\lst@@checkend} - \expandafter\lst@next - \fi - \ifx\lst@float\relax\else - \expandafter\lst@endfloat - \fi - \endgroup} -\let\lst@@checkend\@checkend -\newdimen\lst@maxwidth % \global -\lst@AddToHook{InitVars}{\global\lst@maxwidth\z@} -\lst@AddToHook{InitVarsEOL} - {\ifdim\lst@currlwidth>\lst@maxwidth - \global\lst@maxwidth\lst@currlwidth - \fi} -\def\lst@EOLUpdate{\lsthk@EOL \lsthk@InitVarsEOL} -\def\lst@MProcessListing{% - \lst@XPrintToken \lst@EOLUpdate \lsthk@InitVarsBOL - \global\advance\lst@lineno\@ne - \ifnum \lst@lineno>\lst@lastline - \lst@ifdropinput \lst@LeaveMode \fi - \ifx\lst@linerange\@empty - \expandafter\expandafter\expandafter\lst@EndProcessListing - \else - \lst@interrange - \lst@GetLineInterval - \expandafter\expandafter\expandafter\lst@SkipToFirst - \fi - \else - \expandafter\lst@BOLGobble - \fi} -\let\lst@EndProcessListing\endinput -\lst@Key{gobble}{0}{\def\lst@gobble{#1}} -\def\lst@BOLGobble{% - \ifnum\lst@gobble>\z@ - \@tempcnta\lst@gobble\relax - \expandafter\lst@BOLGobble@ -\fi} -\def\lst@BOLGobble@@{% - \ifnum\@tempcnta>\z@ - \expandafter\lst@BOLGobble@ - \fi} -\def\lstenv@BOLGobble@@{% - \lst@IfNextChars\lstenv@endstring{\lstenv@End}% - {\advance\@tempcnta\m@ne \expandafter\lst@BOLGobble@@\lst@eaten}} -\def\lst@BOLGobble@#1{% - \let\lst@next#1% - \ifx \lst@next\relax\else - \ifx \lst@next\lst@MProcessListing\else - \ifx \lst@next\lst@processformfeed\else - \ifx \lst@next\lstenv@backslash - \let\lst@next\lstenv@BOLGobble@@ - \else - \let\lst@next\lst@BOLGobble@@ - \ifx #1\lst@processtabulator - \advance\@tempcnta-\lst@tabsize\relax - \ifnum\@tempcnta<\z@ - \lst@length-\@tempcnta \lst@PreGotoTabStop - \fi - \else - \advance\@tempcnta\m@ne - \fi - \fi \fi \fi \fi - \lst@next} -\def\lst@processformfeed{\lst@ProcessFormFeed} -\def\lst@processtabulator{\lst@ProcessTabulator} -\lst@Key{name}\relax{\def\lst@intname{#1}} -\lst@AddToHookExe{PreSet}{\global\let\lst@intname\@empty} -\lst@AddToHook{PreInit}{% - \let\lst@arg\lst@intname \lst@ReplaceIn\lst@arg\lst@filenamerpl - \global\let\lst@name\lst@arg \global\let\lstname\lst@name} -\def\lst@filenamerpl{_\textunderscore $\textdollar -\textendash} -\def\l@lstlisting#1#2{\@dottedtocline{1}{1.5em}{2.3em}{#1}{#2}} -\lst@UserCommand\lstlistlistingname{Listings} -\lst@UserCommand\lstlistoflistings{\bgroup - \let\contentsname\lstlistlistingname - \let\lst@temp\@starttoc \def\@starttoc##1{\lst@temp{lol}}% - \tableofcontents \egroup} -\@ifundefined{float@listhead}{}{% - \renewcommand*{\lstlistoflistings}{% - \begingroup - \@ifundefined{@restonecoltrue}{}{% - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse - \fi - }% - \float@listhead{\lstlistlistingname}% - \parskip\z@\parindent\z@\parfillskip \z@ \@plus 1fil% - \@starttoc{lol}% - \@ifundefined{@restonecoltrue}{}{% - \if@restonecol\twocolumn\fi - }% - \endgroup - }% -} -\AtBeginDocument{% - \@ifundefined{float@addtolists}% - {\gdef\float@addtolists#1{\addtocontents{lol}{#1}}}% - {\let\orig@float@addtolists\float@addtolists - \gdef\float@addtolists#1{% - \addtocontents{lol}{#1}% - \orig@float@addtolists{#1}}}% -}% -\newcommand\lstinline[1][]{% - \leavevmode\bgroup % \hbox\bgroup --> \bgroup - \def\lst@boxpos{b}% - \lsthk@PreSet\lstset{flexiblecolumns,#1}% - \lsthk@TextStyle - \@ifnextchar\bgroup{\afterassignment\lst@InlineG \let\@let@token}% - \lstinline@} -\def\lstinline@#1{% - \lst@Init\relax - \lst@IfNextCharActive{\lst@InlineM#1}{\lst@InlineJ#1}} -\lst@AddToHook{TextStyle}{}% init -\lst@AddToHook{SelectCharTable}{\lst@inlinechars} -\global\let\lst@inlinechars\@empty -\def\lst@InlineM#1{\gdef\lst@inlinechars{% - \lst@Def{`#1}{\lst@DeInit\egroup\global\let\lst@inlinechars\@empty}% - \lst@Def{13}{\lst@DeInit\egroup \global\let\lst@inlinechars\@empty - \PackageError{Listings}{lstinline ended by EOL}\@ehc}}% - \lst@inlinechars} -\def\lst@InlineJ#1{% - \def\lst@temp##1#1{% - \let\lst@arg\@empty \lst@InsideConvert{##1}\lst@arg - \lst@DeInit\egroup}% - \lst@temp} -\def\lst@InlineG{% - \lst@Init\relax - \lst@IfNextCharActive{\lst@InlineM\}}% - {\let\lst@arg\@empty \lst@InlineGJ}} -\def\lst@InlineGJ{\futurelet\@let@token\lst@InlineGJTest} -\def\lst@InlineGJTest{% - \ifx\@let@token\egroup - \afterassignment\lst@InlineGJEnd - \expandafter\let\expandafter\@let@token - \else - \ifx\@let@token\@sptoken - \let\lst@next\lst@InlineGJReadSp - \else - \let\lst@next\lst@InlineGJRead - \fi - \expandafter\lst@next - \fi} -\def\lst@InlineGJEnd{\lst@arg\lst@DeInit\egroup} -\def\lst@InlineGJRead#1{% - \lccode`\~=`#1\lowercase{\lst@lAddTo\lst@arg~}% - \lst@InlineGJ} -\def\lst@InlineGJReadSp#1{% - \lccode`\~=`\ \lowercase{\lst@lAddTo\lst@arg~}% - \lst@InlineGJ#1} -\newcommand\lstMakeShortInline[1][]{% - \def\lst@shortinlinedef{\lstinline[#1]}% - \lstMakeShortInline@}% -\def\lstMakeShortInline@#1{% - \expandafter\ifx\csname lst@ShortInlineOldCatcode\string#1\endcsname\relax - \lst@shortlstinlineinfo{Made }{#1}% - \lst@add@special{#1}% - \expandafter - \xdef\csname lst@ShortInlineOldCatcode\string#1\endcsname{\the\catcode`#1}% - \begingroup - \catcode`\~\active \lccode`\~`#1% - \lowercase{% - \global\expandafter\let - \csname lst@ShortInlineOldMeaning\string#1\endcsname~% - \expandafter\gdef\expandafter~\expandafter{\lst@shortinlinedef#1}}% - \endgroup - \global\catcode`#1\active - \else - \PackageError{Listings}% - {\string\lstMakeShorterInline\ definitions cannot be nested}% - {Use \string\lstDeleteShortInline first.}% - {}% - \fi} -\def\lstDeleteShortInline#1{% - \expandafter\ifx\csname lst@ShortInlineOldCatcode\string#1\endcsname\relax - \PackageError{Listings}% - {#1 is not a short reference for \string\lstinline}% - {Use \string\lstMakeShortInline first.}% - {}% - \else - \lst@shortlstinlineinfo{Deleted }{#1 as}% - \lst@rem@special{#1}% - \global\catcode`#1\csname lst@ShortInlineOldCatcode\string#1\endcsname - \global \expandafter\let% - \csname lst@ShortInlineOldCatcode\string#1\endcsname \relax - \ifnum\catcode`#1=\active - \begingroup - \catcode`\~\active \lccode`\~`#1% - \lowercase{% - \global\expandafter\let\expandafter~% - \csname lst@ShortInlineOldMeaning\string#1\endcsname}% - \endgroup - \fi - \fi} -\def\lst@shortlstinlineinfo#1#2{% - \PackageInfo{Listings}{% - #1\string#2 a short reference for \string\lstinline}} -\def\lst@add@special#1{% - \lst@rem@special{#1}% - \expandafter\gdef\expandafter\dospecials\expandafter - {\dospecials \do #1}% - \expandafter\gdef\expandafter\@sanitize\expandafter - {\@sanitize \@makeother #1}} -\def\lst@rem@special#1{% - \def\do##1{% - \ifnum`#1=`##1 \else \noexpand\do\noexpand##1\fi}% - \xdef\dospecials{\dospecials}% - \begingroup - \def\@makeother##1{% - \ifnum`#1=`##1 \else \noexpand\@makeother\noexpand##1\fi}% - \xdef\@sanitize{\@sanitize}% - \endgroup} -\def\lst@MakePath#1{\ifx\@empty#1\@empty\else\lst@MakePath@#1/\@nil/\fi} -\def\lst@MakePath@#1/{#1/\lst@MakePath@@} -\def\lst@MakePath@@#1/{% - \ifx\@nil#1\expandafter\@gobble - \else \ifx\@empty#1\else #1/\fi \fi - \lst@MakePath@@} -\lst@Key{inputpath}{}{\edef\lst@inputpath{\lst@MakePath{#1}}} -\def\lstinputlisting{% - \begingroup \lst@setcatcodes \lst@inputlisting} -\newcommand\lst@inputlisting[2][]{% - \endgroup - \def\lst@set{#1}% - \IfFileExists{\lst@inputpath#2}% - {\expandafter\lst@InputListing\expandafter{\lst@inputpath#2}}% - {\filename@parse{\lst@inputpath#2}% - \edef\reserved@a{\noexpand\lst@MissingFileError - {\filename@area\filename@base}% - {\ifx\filename@ext\relax tex\else\filename@ext\fi}}% - \reserved@a}% - \lst@doendpe \@newlistfalse \ignorespaces} -\def\lst@MissingFileError#1#2{% - \typeout{^^J! Package Listings Error: File `#1(.#2)' not found.^^J% - ^^JType X to quit or <RETURN> to proceed,^^J% - or enter new name. (Default extension: #2)^^J}% - \message{Enter file name: }% - {\endlinechar\m@ne \global\read\m@ne to\@gtempa}% - \ifx\@gtempa\@empty \else - \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi - \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi - \filename@parse\@gtempa - \edef\filename@ext{% - \ifx\filename@ext\relax#2\else\filename@ext\fi}% - \edef\reserved@a{\noexpand\IfFileExists % - {\filename@area\filename@base.\filename@ext}% - {\noexpand\lst@InputListing % - {\filename@area\filename@base.\filename@ext}}% - {\noexpand\lst@MissingFileError - {\filename@area\filename@base}{\filename@ext}}}% - \expandafter\reserved@a % - \fi} -\let\lst@ifdraft\iffalse -\DeclareOption{draft}{\let\lst@ifdraft\iftrue} -\DeclareOption{final}{\let\lst@ifdraft\iffalse} -\lst@AddToHook{PreSet} - {\lst@ifdraft - \let\lst@ifprint\iffalse - \@gobbletwo\fi\fi - \fi} -\def\lst@InputListing#1{% - \begingroup - \lsthk@PreSet \gdef\lst@intname{#1}% - \expandafter\lstset\expandafter{\lst@set}% - \lsthk@DisplayStyle - \catcode\active=\active - \lst@Init\relax \let\lst@gobble\z@ - \lst@SkipToFirst - \lst@ifprint \def\lst@next{\input{#1}}% - \else \let\lst@next\@empty \fi - \lst@next - \lst@DeInit - \endgroup} -\def\lst@SkipToFirst{% - \ifnum \lst@lineno<\lst@firstline - \lst@BeginDropInput\lst@Pmode - \lst@Let{13}\lst@MSkipToFirst - \lst@Let{10}\lst@MSkipToFirst - \else - \expandafter\lst@BOLGobble - \fi} -\def\lst@MSkipToFirst{% - \global\advance\lst@lineno\@ne - \ifnum \lst@lineno=\lst@firstline - \lst@LeaveMode \global\lst@newlines\z@ - \lsthk@InitVarsBOL - \expandafter\lst@BOLGobble - \fi} -\def\lstenv@DroppedWarning{% - \ifx\lst@dropped\@undefined\else - \PackageWarning{Listings}{Text dropped after begin of listing}% - \fi} -\let\lst@dropped\@undefined % init -\begingroup \lccode`\~=`\^^M\lowercase{% -\gdef\lstenv@Process#1{% - \ifx~#1% - \lstenv@DroppedWarning \let\lst@next\lst@SkipToFirst - \else\ifx^^J#1% - \lstenv@DroppedWarning \let\lst@next\lstenv@ProcessJ - \else - \let\lst@dropped#1\let\lst@next\lstenv@Process - \fi \fi - \lst@next} -}\endgroup -\def\lstenv@ProcessJ{% - \let\lst@arg\@empty - \ifx\@currenvir\lstenv@name - \expandafter\lstenv@ProcessJEnv - \else - \expandafter\def\expandafter\lst@temp\expandafter##1% - \csname end\lstenv@name\endcsname - {\lst@InsideConvert{##1}\lstenv@ProcessJ@}% - \expandafter\lst@temp - \fi} -\begingroup \lccode`\~=`\\\lowercase{% -\gdef\lstenv@ProcessJ@{% - \lst@lExtend\lst@arg - {\expandafter\ \expandafter~\lstenv@endstring}% - \catcode10=\active \lst@Let{10}\lst@MProcessListing - \lst@SkipToFirst \lst@arg} -}\endgroup -\def\lstenv@ProcessJEnv#1\end#2{\def\lst@temp{#2}% - \ifx\lstenv@name\lst@temp - \lst@InsideConvert{#1}% - \expandafter\lstenv@ProcessJ@ - \else - \lst@InsideConvert{#1\\end\{#2\}}% - \expandafter\lstenv@ProcessJEnv - \fi} -\def\lstenv@backslash{% - \lst@IfNextChars\lstenv@endstring - {\lstenv@End}% - {\expandafter\lsts@backslash \lst@eaten}}% -\def\lstenv@End{% - \ifx\@currenvir\lstenv@name - \edef\lst@next{\noexpand\end{\lstenv@name}}% - \else - \def\lst@next{\csname end\lstenv@name\endcsname}% - \fi - \lst@next} -\lst@UserCommand\lstnewenvironment#1#2#{% - \@ifundefined{#1}% - {\let\lst@arg\@empty - \lst@XConvert{#1}\@nil - \expandafter\lstnewenvironment@\lst@arg{#1}{#2}}% - {\PackageError{Listings}{Environment `#1' already defined}\@eha - \@gobbletwo}} -\def\@tempa#1#2#3{% -\gdef\lstnewenvironment@##1##2##3##4##5{% - \begingroup - \global\@namedef{end##2}{\lstenv@Error{##2}}% - \global\@namedef{##2}{\def\lstenv@name{##2}% - \begingroup \lst@setcatcodes \catcode\active=\active - \csname##2@\endcsname}% - \let\l@ngrel@x\global - \let\@xargdef\lstenv@xargdef - \expandafter\new@command\csname##2@\endcsname##3% - {\lsthk@PreSet ##4% - \ifx\@currenvir\lstenv@name - \def\lstenv@endstring{#1#2##1#3}% - \else - \def\lstenv@endstring{#1##1}% - \fi - \@namedef{end##2}{\lst@DeInit ##5\endgroup - \lst@doendpe \@ignoretrue}% - \lsthk@DisplayStyle - \let\lst@EndProcessListing\lstenv@SkipToEnd - \lst@Init\lstenv@backslash - \lst@ifprint - \expandafter\expandafter\expandafter\lstenv@Process - \else - \expandafter\lstenv@SkipToEnd - \fi - \lst@insertargs}% - \endgroup}% -} -\let\lst@arg\@empty \lst@XConvert{end}\{\}\@nil -\expandafter\@tempa\lst@arg -\let\lst@insertargs\@empty -\def\lstenv@xargdef#1{ - \expandafter\lstenv@xargdef@\csname\string#1\endcsname#1} -\def\lstenv@xargdef@#1#2[#3][#4]#5{% - \@ifdefinable#2{% - \gdef#2{% - \ifx\protect\@typeset@protect - \expandafter\lstenv@testopt - \else - \@x@protect#2% - \fi - #1% - {#4}}% - \@yargdef - #1% - \tw@ - {#3}% - {#5}}} -\long\def\lstenv@testopt#1#2{% - \@ifnextchar[{\catcode\active5\relax \lstenv@testopt@#1}% - {#1[{#2}]}} -\def\lstenv@testopt@#1[#2]{% - \catcode\active\active - #1[#2]} -\begingroup \lccode`\~=`\\\lowercase{% -\gdef\lstenv@SkipToEnd{% - \long\expandafter\def\expandafter\lst@temp\expandafter##\expandafter - 1\expandafter~\lstenv@endstring{\lstenv@End}% - \lst@temp} -}\endgroup -\def\lstenv@Error#1{\PackageError{Listings}{Extra \string\end#1}% - {I'm ignoring this, since I wasn't doing a \csname#1\endcsname.}} -\begingroup \lccode`\~=`\^^M\lowercase{% -\gdef\lst@TestEOLChar#1{% - \def\lst@insertargs{#1}% - \ifx ~#1\@empty \else - \ifx^^J#1\@empty \else - \global\let\lst@intname\lst@insertargs - \let\lst@insertargs\@empty - \fi \fi} -}\endgroup -\lstnewenvironment{lstlisting}[2][] - {\lst@TestEOLChar{#2}% - \lstset{#1}% - \csname\@lst @SetFirstNumber\endcsname} - {\csname\@lst @SaveFirstNumber\endcsname} -\lst@Key{fancyvrb}\relax[t]{% - \lstKV@SetIf{#1}\lst@iffancyvrb - \lstFV@fancyvrb} -\ifx\lstFV@fancyvrb\@undefined - \gdef\lstFV@fancyvrb{\lst@RequireAspects{fancyvrb}\lstFV@fancyvrb} -\fi -\@ifundefined{ocp}{} - {\lst@AddToHook{OutputBox}% - {\let\lst@ProcessLetter\@firstofone - \let\lst@ProcessDigit\@firstofone - \let\lst@ProcessOther\@firstofone}} -\DeclareOption*{\expandafter\lst@ProcessOption\CurrentOption\relax} -\def\lst@ProcessOption#1#2\relax{% - \ifx #1!% - \lst@DeleteKeysIn\lst@loadaspects{#2}% - \else - \lst@lAddTo\lst@loadaspects{,#1#2}% - \fi} -\@ifundefined{lst@loadaspects} - {\def\lst@loadaspects{strings,comments,escape,style,language,% - keywords,labels,lineshape,frames,emph,index}% - }{} -\InputIfFileExists{lstpatch.sty}{}{} -\let\lst@ifsavemem\iffalse -\DeclareOption{savemem}{\let\lst@ifsavemem\iftrue} -\DeclareOption{noaspects}{\let\lst@loadaspects\@empty} -\ProcessOptions -\lst@RequireAspects\lst@loadaspects -\let\lst@loadaspects\@empty -\lst@UseHook{SetStyle}\lst@UseHook{EmptyStyle} -\lst@UseHook{SetLanguage}\lst@UseHook{EmptyLanguage} -\InputIfFileExists{listings.cfg}{}{} -\InputIfFileExists{lstlocal.cfg}{}{} -\endinput -%% -%% End of file `listings.sty'. diff --git a/Documentation/SoftwareGuide/LaTeXWrapper.sh.in b/Documentation/SoftwareGuide/LaTeXWrapper.sh.in index f6b0104cd94def7e3b997d772623c4d66ec1930c..9abe22e71a086e0eea6e84b4f8c7c89e647fea83 100644 --- a/Documentation/SoftwareGuide/LaTeXWrapper.sh.in +++ b/Documentation/SoftwareGuide/LaTeXWrapper.sh.in @@ -3,4 +3,4 @@ TEXINPUTS=$TEXINPUTS:${ITK_TEXINPUTS} export TEXINPUTS -${LATEX_COMPILER} -file-line-error -halt-on-error "$@" +${LATEX_COMPILER} -file-line-error -halt-on-error -shell-escape "$@" diff --git a/Documentation/SoftwareGuide/Latex/CMakeLists.txt b/Documentation/SoftwareGuide/Latex/CMakeLists.txt index 3999ce795c20b579574e7ba49f80ff212ac025a1..5b04644722c4da5fa9b35047d32813fecc19db2d 100644 --- a/Documentation/SoftwareGuide/Latex/CMakeLists.txt +++ b/Documentation/SoftwareGuide/Latex/CMakeLists.txt @@ -89,7 +89,7 @@ SET(DVIPS_CONVERTER_OPTIONS -D600) # Option for html generation -SET(TEX4HT_OPTIONS html,2,sections+) +SET(TEX4HT_OPTIONS "html,2,sections+ \"\" \"\" -shell-escape") SET (HTML_OUTPUT "SoftwareGuide-${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}") # Copy RELEASE_NOTES.txt from OTB source tree to Software Guide build directory diff --git a/Documentation/SoftwareGuide/Latex/Persistent.tex b/Documentation/SoftwareGuide/Latex/Persistent.tex index 240725fcdf71e9c88a9c00f2f7eed68eb55e2049..5474815669d596f2c934908274a8d6d1b5dab4a5 100644 --- a/Documentation/SoftwareGuide/Latex/Persistent.tex +++ b/Documentation/SoftwareGuide/Latex/Persistent.tex @@ -112,17 +112,17 @@ section~\ref{chapter:WriteAFilter}, page~\pageref{chapter:WriteAFilter}. The first step is to write a persistent mean image filter. We need to include the appropriate header : -\begin{lstlisting} +\begin{cppcode} #include "otbPersistentImageFilter.h" -\end{lstlisting} +\end{cppcode} Then, we declare the class prototype as follows: -\begin{lstlisting} +\begin{cppcode} template<class TInputImage > class ITK_EXPORT PersistentMeanImageFilter : public PersistentImageFilter<TInputImage, TInputImage> -\end{lstlisting} +\end{cppcode} Since the output image will only be used for streaming purpose, we do not need to declare different input and output template types. @@ -131,14 +131,14 @@ In the \emph{private} section of the class, we will declare a member which will be used to store temporary results, and a member which will be used to store the final result. -\begin{lstlisting} +\begin{cppcode} private: // Temporary results container std::vector<PixelType> m_TemporarySums; // Final result member double m_Mean; -\end{lstlisting} +\end{cppcode} Next, we will write the \verb?Reset()? method implementation in the \emph{protected} section of the class. Proper allocation of the @@ -146,7 +146,7 @@ temporary results container with respect to the number of threads is handled here. -\begin{lstlisting} +\begin{cppcode} protected: virtual void Reset() { @@ -160,13 +160,13 @@ protected: // Reset the final result m_Mean = 0.; } -\end{lstlisting} +\end{cppcode} Now, we need to write the \verb?ThreadedGenerateData()? methods (also in the \emph{protected} section), were temporary results will be computed for each piece of stream. -\begin{lstlisting} +\begin{cppcode} virtual void ThreadedGenerateData(const RegionType& outputRegionForThread, itk::ThreadIdType threadId) { @@ -190,12 +190,12 @@ for (it.GoToBegin(); !it.IsAtEnd(); ++it, progress.CompletedPixel()) m_TemporarySums[threadId]+= value; } -\end{lstlisting} +\end{cppcode} Last, we need to define the \verb?Synthetize()? method (still in the \emph{protected} section), which will yield the final results: -\begin{lstlisting} +\begin{cppcode} virtual void Synthetize() { // For each thread @@ -214,7 +214,7 @@ if(nbPixels!=0) m_Mean/=nbPixels; } } -\end{lstlisting} +\end{cppcode} \subsection{Second step: Decorating the filter and using it} @@ -222,41 +222,41 @@ Now, to use the filter, one only has to decorate it with the \doxygen{otb}{PersistentFilterStreamingDecorator}. First step is to include the appropriate header: -\begin{lstlisting} +\begin{cppcode} #include "otbPersistentMeanImageFilter.h" #include "otbPersistentFilterStreamingDecorator.h" -\end{lstlisting} +\end{cppcode} Then, we decorate the filter with some typedefs: -\begin{lstlisting} +\begin{cppcode} typedef otb::PersistentMeanImageFilter<ImageType> PersitentMeanFilterType; typedef otb::PersistentFilterStreamingDecorator < PersitentMeanFilterType> StreamingMeanFilterType; -\end{lstlisting} +\end{cppcode} Now, the decorated filter can be used like any standard filter: -\begin{lstlisting} +\begin{cppcode} StreamingMeanFilterType::Pointer filter = StreamingMeanFilterType::New(); filter->SetInput(reader->GetOutput()); filter->Update(); -\end{lstlisting} +\end{cppcode} \subsection{Third step: one class to rule them all} It is often convenient to avoid the few typedefs of the previous section by deriving a new class from the decorated filter: -\begin{lstlisting} +\begin{cppcode} template<class TInputImage > class ITK_EXPORT StreamingMeanImageFilter : public PersistentFilterStreamingDecorator< PersistentImageFilter<TInputImage, TInputImage> > -\end{lstlisting} +\end{cppcode} This also allows to redefine setters and getters for parameters, avoiding to call the \verb?GetFilter()? method to set them. diff --git a/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex b/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex index dee1a21317409da5cdf59dc1b945e6b680d7bf41..c5bd1dff8218ca02c31995c44a83913874e97c27 100644 --- a/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex +++ b/Documentation/SoftwareGuide/Latex/SoftwareGuide.tex @@ -32,40 +32,14 @@ \definecolor{listlightgray}{gray}{0.955} \definecolor{listwhite}{gray}{1.0} -\usepackage{listings} -\newcommand{\lstsetcpp} -{ -\lstset{frame = tb, - framerule = 0.25pt, - float, - fontadjust, - backgroundcolor={\color{listlightgray}}, - basicstyle = {\ttfamily\footnotesize}, - keywordstyle = {\ttfamily\color{listkeyword}\textbf}, - identifierstyle = {\ttfamily}, - commentstyle = {\ttfamily\color{listcomment}\textit}, - stringstyle = {\ttfamily}, - showstringspaces = false, - showtabs = false, - numbers = none, - numbersep = 6pt, - numberstyle={\ttfamily\color{listnumbers}}, - tabsize = 2, - language=[ANSI]C++, - floatplacement=!h - } -} -\newcommand{\lstsetpython} -{ -\lstset{language=Python - } -} -\newcommand{\lstsetjava} -{ -\lstset{language=Java - } -} +\usepackage{minted} +\newminted{cpp}{fontsize=\small} +\newminted{cmake}{fontsize=\small} +\newminted{bat}{fontsize=\small} +\usepackage{mdframed} +\BeforeBeginEnvironment{cppcode}{\begin{mdframed}[leftline=false,rightline=false,backgroundcolor=listlightgray]} +\AfterEndEnvironment{cppcode}{\end{mdframed}} \newif\ifitkFullVersion \itkFullVersiontrue @@ -170,8 +144,6 @@ colorlinks,linkcolor={blue},citecolor={blue},urlcolor={blue}, \hyperbaseurl{http://www.orfeo-toolbox.org} -\lstsetcpp - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % diff --git a/Documentation/SoftwareGuide/Latex/Tutorial.tex b/Documentation/SoftwareGuide/Latex/Tutorial.tex index ba304a541b6614212a2f07a9cdc47e1d43000e00..be8cd232fc53ecfb8dfe51e5fbae91cb0424fca6 100644 --- a/Documentation/SoftwareGuide/Latex/Tutorial.tex +++ b/Documentation/SoftwareGuide/Latex/Tutorial.tex @@ -36,9 +36,7 @@ directory. The \code{CMakeLists.txt} will be very similar between your projects. Open the \code{CMakeLists.txt} file and write in the few lines: - -\begin{small} -\begin{verbatim} +\begin{cmakecode} PROJECT(Tutorials) cmake_minimum_required(VERSION 2.6) @@ -53,8 +51,7 @@ ENDIF(OTB_FOUND) ADD_EXECUTABLE(HelloWorldOTB HelloWorldOTB.cxx ) TARGET_LINK_LIBRARIES(HelloWorldOTB ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} The first line defines the name of your project as it appears in Visual Studio @@ -102,8 +99,7 @@ Follow the following steps: \item Create a CMakeLists.txt into the src repository with the following lines: -\begin{verbatim} - +\begin{cmakecode} project(MyFirstProcessing) cmake_minimum_required(VERSION 2.8) @@ -114,10 +110,11 @@ include(${OTB_USE_FILE}) add_executable(MyFirstProcessing MyFirstProcessing.cxx ) target_link_libraries(MyFirstProcessing ${OTB_LIBRARIES} ) -\end{verbatim} +\end{cmakecode} \item Create a MyFirstProcessing.cxx into the src repository with the following lines: -\begin{verbatim} + +\begin{cppcode} #include "otbImage.h" #include "otbVectorImage.h" #include "otbImageFileReader.h" @@ -151,9 +148,9 @@ int main(int argc, char* argv[]) return EXIT_SUCCESS; } -\end{verbatim} +\end{cppcode} \item create a file named BuildMyFirstProcessing.bat into the MyFirstCode directory with the following lines: -\begin{verbatim} +\begin{batcode} @echo off set /A ARGS_COUNT=0 @@ -193,7 +190,7 @@ echo You need to run this script from an OSGeo4W shell GOTO :END :END -\end{verbatim} +\end{batcode} \item into a OSGEo4W shell, run the configure.bat with the right arguments: full path to your src directory, full path to your build directory, full path to the place where find OTBConfig.cmake file (should be C:\textbackslash path\textbackslash to\textbackslash MyOTBDir\textbackslash install\textbackslash lib\textbackslash otb). \item into the OSGeo4W shell, open the MyFirstProcessing.sln \item build the solution @@ -212,12 +209,10 @@ write images and the basics of the pipeline system. First, let's add the following lines at the end of the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(Pipeline Pipeline.cxx ) TARGET_LINK_LIBRARIES(Pipeline ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} Now, create a \code{Pipeline.cxx} file. @@ -264,12 +259,10 @@ reader and the writer. Let's first add the 2 following lines to the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(FilteringPipeline FilteringPipeline.cxx ) TARGET_LINK_LIBRARIES(FilteringPipeline ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} \input{FilteringPipeline.tex} @@ -303,12 +296,10 @@ To realize this conversion, we will use the Add the two lines to the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(ScalingPipeline ScalingPipeline.cxx ) TARGET_LINK_LIBRARIES(ScalingPipeline ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} \input{ScalingPipeline} @@ -331,12 +322,10 @@ process multispectral images. Add the following lines in the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(Multispectral Multispectral.cxx ) TARGET_LINK_LIBRARIES(Multispectral ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} \input{Multispectral} @@ -355,12 +344,10 @@ try it! Add the following lines in the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(SmarterFilteringPipeline SmarterFilteringPipeline.cxx ) TARGET_LINK_LIBRARIES(SmarterFilteringPipeline ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} \input{SmarterFilteringPipeline} @@ -410,12 +397,10 @@ To get the best of the image processing algorithms, you want to combine these da First you need to add the following lines in the \code{CMakeLists.txt} file: -\begin{small} -\begin{verbatim} +\begin{cmakecode} ADD_EXECUTABLE(OrthoFusion OrthoFusion.cxx) TARGET_LINK_LIBRARIES(OrthoFusion ${OTB_LIBRARIES}) -\end{verbatim} -\end{small} +\end{cmakecode} \input{OrthoFusion} diff --git a/Documentation/SoftwareGuide/Latex/WriteAnApplication.tex b/Documentation/SoftwareGuide/Latex/WriteAnApplication.tex index b4029d13e7dce361ba0a43fb1e5c4306fd3d3cf0..0408cedb434f7fbebf2b916dfa5b07b2cfe9aa60 100644 --- a/Documentation/SoftwareGuide/Latex/WriteAnApplication.tex +++ b/Documentation/SoftwareGuide/Latex/WriteAnApplication.tex @@ -248,14 +248,12 @@ in order to launch each internal application. The order should be compatible wit image parameter connexions. If you want to do "in-memory" connexions, you can do it between two calls to \code{ExecuteInternal()}, for instance : -\small -\begin{lstlisting} +\begin{cppcode} ExecuteInternal("a"); GetInternalApplication("b")->SetParameterInputImage("in", GetInternalApplication("a")->GetParameterOutputImage("out")); ExecuteInternal("b"); -\end{lstlisting} -\normalsize +\end{cppcode} The application BundleToPerfectSensor is a simple example of composite applications. For a more complex example, you can check the application TrainImagesClassifier. diff --git a/Documentation/SoftwareGuide/ParseCxxExamples.pl b/Documentation/SoftwareGuide/ParseCxxExamples.pl index b483b746d57415758580f98720295b531288d1a1..ae880834033fd30504324bbbaf4a13d5045db2e7 100644 --- a/Documentation/SoftwareGuide/ParseCxxExamples.pl +++ b/Documentation/SoftwareGuide/ParseCxxExamples.pl @@ -92,8 +92,7 @@ sub ParseCxxFile { $tagfound = 1; $dumpinglatex = 0; $dumpingcode = 1; - print OUTFILE "\\small\n"; - print OUTFILE "\\begin{lstlisting}\n"; + print OUTFILE "\\begin{cppcode}\n"; } elsif( /$endlatextag/ ) { $tagfound = 1; @@ -102,8 +101,7 @@ sub ParseCxxFile { elsif( /$endcodesnippettag/ ) { $tagfound = 1; $dumpingcode = 0; - print OUTFILE "\\end{lstlisting}\n"; - print OUTFILE "\\normalsize\n"; + print OUTFILE "\\end{cppcode}\n"; } if( !$tagfound ) { if( $dumpinglatex ) { diff --git a/Documentation/SoftwareGuide/Tex4htWrapper.sh.in b/Documentation/SoftwareGuide/Tex4htWrapper.sh.in index a9cb522fdbd7efe91b1ae5244ac583cd15bb42ec..9fec6e8a781c4fd9bcac87f9e3c4e19ef1cc2e0f 100644 --- a/Documentation/SoftwareGuide/Tex4htWrapper.sh.in +++ b/Documentation/SoftwareGuide/Tex4htWrapper.sh.in @@ -4,7 +4,7 @@ TEXINPUTS=$TEXINPUTS:${ITK_TEXINPUTS} export TEXINPUTS -mkdir ${HTML_OUTPUT} +mkdir -p ${HTML_OUTPUT} cd ${HTML_OUTPUT} ${TEX4HT_COMPILER} "$@" ${TEX4HT_OPTIONS} diff --git a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui index 300d4072f3c8cc439ba7bcb92f0403d416bb7901..c715d1eb560445763ca9cf4fd63fc23860e596d3 100644 --- a/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui +++ b/Modules/Visualization/Monteverdi/src/mvdPreferencesDialog.ui @@ -120,6 +120,9 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="toolTip"> + <string>When the image width or height is lower than this minimum, overview generation is not proposed</string> + </property> <property name="text"> <string>Minimum size:</string> </property> @@ -127,6 +130,9 @@ </item> <item row="1" column="2"> <widget class="QSpinBox" name="overviewsSpinBox"> + <property name="toolTip"> + <string>When the image width or height is lower than this minimum, overview generation is not proposed</string> + </property> <property name="maximum"> <number>999999999</number> </property> diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 120365d510b1fd70784ebba3baa9939de06f4635..47c4e85d5fef4371e1454c0c65f35166ffea32a9 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -250,6 +250,10 @@ void Application::SetParameterString(std::string parameter, std::string value, b if ( !paramDown->SetFileName(value) ) otbAppLogCRITICAL( <<"Invalid XML parameter filename " << value <<"."); } + else + { + otbAppLogWARNING( <<"This parameter can't be set using SetParameterString()."); + } this->SetParameterUserValue(parameter, hasUserValueFlag); } diff --git a/Packaging/post_install.cmake b/Packaging/post_install.cmake index 29c937e02fcafbfbf7799a00502f3aa1fedf412a..25837facd80d94bb2f1b8ee26f693b6a03dc498f 100644 --- a/Packaging/post_install.cmake +++ b/Packaging/post_install.cmake @@ -18,6 +18,55 @@ # limitations under the License. # +function(sanitize_system_paths input_file) + # does not support Windows ... + if(APPLE) + set(SHARED_EXT "\\.dylib") + elseif(UNIX) + set(SHARED_EXT "\\.so") + endif() + set(filtered_content) + + file(STRINGS "${input_file}" source_file_content NEWLINE_CONSUME) + string(REGEX REPLACE "\n" "\n;" source_file_content "${source_file_content}") + set(SEARCH_REGEX "(^[^#\"]+(LIBRARIES|INCLUDE_DIR[A-Z]*) +\")(.+)(\"[^\"]*)") + + foreach(line ${source_file_content}) + set(filtered_line "${line}") + if(line MATCHES "${SEARCH_REGEX}") + string(REGEX REPLACE "${SEARCH_REGEX}" "\\3" extract_str "${line}" ) + string(REGEX REPLACE ";;" ";" extract_str "${extract_str}") + set(_to_be_removed) + set(_to_be_added) + foreach(path ${extract_str}) + if(IS_ABSOLUTE ${path}) + list(APPEND _to_be_removed "${path}") + if(NOT IS_DIRECTORY ${path}) + if(path MATCHES "^.*/lib[^\\.]+${SHARED_EXT}.*") + string(REGEX REPLACE "^.*/lib([^\\.]+)${SHARED_EXT}.*" "\\1" _lib_name "${path}") + list(APPEND _to_be_added "${_lib_name}") + endif() + endif() + endif() + endforeach() + if(_to_be_removed) + list(REMOVE_ITEM extract_str ${_to_be_removed}) + endif() + if(_to_be_added) + list(INSERT extract_str 0 ${_to_be_added}) + endif() + if(extract_str) + list(REMOVE_DUPLICATES extract_str) + endif() + string(REGEX REPLACE "${SEARCH_REGEX}" "\\1${extract_str}\\4" filtered_line "${line}" ) + endif() + list(APPEND filtered_content "${filtered_line}") + endforeach() + + string(REGEX REPLACE "\n;" "\n" filtered_content "${filtered_content}") + file(WRITE "${input_file}" "${filtered_content}") +endfunction() + #check variables are set foreach(var P_DIRS P_MATCH P_REPLACE) if(NOT ${var}) @@ -42,5 +91,8 @@ foreach( p_dir ${P_DIRS} ) file(WRITE "${cmake_file}" "# This file is modified by OTB after installation. \n${cmake_file_CONTENTS}") endif() + if(UNIX) + sanitize_system_paths(${cmake_file}) + endif() endforeach() # foreach( cmake_file endforeach() # foreach( p_dir diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt index e91f39a99174ee07731daf7e07774e5dc84474f6..1f7046b54e1b88e5a70ab7d4afe033b84f40a0bf 100644 --- a/RELEASE_NOTES.txt +++ b/RELEASE_NOTES.txt @@ -1,4 +1,4 @@ -OTB-v.6.2.0 - Changes since version 6.0.0 (October 4th, 2017) +OTB-v.6.2.0 - Changes since version 6.0.0 (October 26th, 2017) ---------------------------------------------------------- * Request for Changes (http://wiki.orfeo-toolbox.org/index.php/Requests_for_Changes): @@ -31,6 +31,7 @@ OTB-v.6.2.0 - Changes since version 6.0.0 (October 4th, 2017) * Documentation * 0001434: Bibliography references are not set in the Software Guide (PDF version) * 0001400: Training applications reference documentation do not include shark parameters + * 0001471: Issue with Boolean parameter in the Python application API documentation * Monteverdi * 0001431: RGE Alti files inverted on Monteverdi @@ -41,6 +42,8 @@ OTB-v.6.2.0 - Changes since version 6.0.0 (October 4th, 2017) * 0001449: Issues with OTB 6.1 standalone packages (Linux) * 0001404: OTB xdk 5.10.1 is not able to compile a simple program on a Ubuntu 16.04 VM * 0001430: building 6.0.0 fails at otbSFSTextureExtraction.cxx.o + * 0001474: OTB XDK is not working on Linux + * 0001460: Unable to compile OTB 6.2.0 RC1 with superbuild (CURL issue) * Orfeo Toolbox (OTB) * 0001453: Applications crash with inxml paramter (GUI mode) @@ -70,11 +73,16 @@ OTB-v.6.2.0 - Changes since version 6.0.0 (October 4th, 2017) * 0001426: GUI TrainimagesClassifier resets "field name" parameter when another parameter is set * 0001421: otbenv.bash has windows endline * 0001402: 404 link on otb-users + * 0001469: Superbuild with Visual Studio 15 2017 + * 0001464: otb_module_impl() called twice in ExternalModuleTemplate + * 0001459: Patch to fix spelling errors * OTB-applications * 0001441: Error in param in template otbTrainLibSVM.txx * 0001411: Training applications needs field name of type integer * 0001410: BundleToPerfectSensor composite application does not expose parameters of internal applications + * 0001467: Convert application memory allocation issue + * 0001463: BandMathX not accepting global statistics OTB-v.6.0.0 - Changes since version 5.10.1 (May 2th, 2017) diff --git a/i18n/fr_FR.ts b/i18n/fr_FR.ts index 609badacb61426b67601582ef3f6023bc1306aa1..e9ea1fe258c00eb93564b84ab05b5827bdb86122 100644 --- a/i18n/fr_FR.ts +++ b/i18n/fr_FR.ts @@ -4611,6 +4611,10 @@ Merci d'en sélectionner un autre.</translation> <source>pixel(s)</source> <translation>pixel(s)</translation> </message> + <message> + <source>When the image width or height is lower than this minimum, overview generation is not proposed</source> + <translation>Lorsque la hauteur ou la largeur d'une image est inférieure à ce minimum, la génération des aperçus n'est pas proposée</translation> + </message> </context> <context> <name>mvd::ProcessObjectObserver</name>