From a2c69b93923864902448a34553df6db873ca3600 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 11 Dec 2016 22:33:19 +0000 Subject: denisbdoc git-svn-id: svn://tug.org/texlive/trunk@42682 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/denisbdoc/README.md | 2 +- .../doc/latex/denisbdoc/denisbdoc-chng.xdy | 2 +- .../source/latex/denisbdoc/denisbdoc.dtx | 248 ++++++++++++++++----- .../source/latex/denisbdoc/denisbdoc.ins | 2 +- .../texmf-dist/tex/latex/denisbdoc/denisbdoc.sty | 202 ++++++++++++++--- 5 files changed, 365 insertions(+), 91 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/denisbdoc/README.md b/Master/texmf-dist/doc/latex/denisbdoc/README.md index de7bc8d9b96..15674f0e905 100644 --- a/Master/texmf-dist/doc/latex/denisbdoc/README.md +++ b/Master/texmf-dist/doc/latex/denisbdoc/README.md @@ -1,4 +1,4 @@ -denisbdoc - A personal package for documenting classes and packages, v. 0.5 +denisbdoc - A personal package for documenting classes and packages, v. 0.6 =========================================================================== **The (quick 'n dirty) `denisbdoc` package is just for documenting the classes diff --git a/Master/texmf-dist/doc/latex/denisbdoc/denisbdoc-chng.xdy b/Master/texmf-dist/doc/latex/denisbdoc/denisbdoc-chng.xdy index 25cf2a49b62..2613334d041 100644 --- a/Master/texmf-dist/doc/latex/denisbdoc/denisbdoc-chng.xdy +++ b/Master/texmf-dist/doc/latex/denisbdoc/denisbdoc-chng.xdy @@ -5,7 +5,7 @@ (markup-locref :open "\hyperpage{" :close "}") (markup-locref-list :sep ", ") -(markup-locclass-list :open "\hfill\nobreakspace" :close "" ) +(markup-locclass-list :open "\hspace*{\fill}\nobreakspace" :close "" ) (define-attributes (("gobble" "default"))) (markup-locref :open "\makeatletter\@gobble{" :close "}\makeatother" :attr "gobble") diff --git a/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.dtx b/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.dtx index cdea0232bf3..ce7d014cfd3 100644 --- a/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.dtx +++ b/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.dtx @@ -3,7 +3,7 @@ \iffalse % %<*readme> -denisbdoc - A personal package for documenting classes and packages, v. 0.5 +denisbdoc - A personal package for documenting classes and packages, v. 0.6 =========================================================================== **The (quick 'n dirty) `denisbdoc` package is just for documenting the classes @@ -30,7 +30,7 @@ This package is currently not documented. \askforoverwritefalse \preamble ----------------------------------------------------------------------------- -denisbdoc --- A personal dirty package for documenting packages, version 0.5 +denisbdoc --- A personal dirty package for documenting packages, version 0.6 Maintained by Denis Bitouz'e E-mail: denis.bitouze@lmpa.univ-littoral.fr @@ -118,8 +118,9 @@ This work consists of the file denisbdoc.dtx %\changes{v0.1}{2015/03/15}{First CTAN version} %\changes{v0.2}{2016/04/04}{Second CTAN version} %\changes{v0.3}{2016/06/10}{Third CTAN version} -%\changes{v0.5}{2016/10/24}{Fourth CTAN version} +%\changes{v0.4}{2016/10/24}{Fourth CTAN version} %\changes{v0.5}{2016/10/30}{Fifth CTAN version} +%\changes{v0.6}{2016/12/08}{Sixth CTAN version} % %\begin{abstract} % ... @@ -190,7 +191,7 @@ This work consists of the file denisbdoc.dtx % % The usual preliminaries. % \begin{macrocode} -\ProvidesExplPackage {denisbdoc} {2016/10/30} {0.5} +\ProvidesExplPackage {denisbdoc} {2016/12/08} {0.6} {A personal package for documenting packages} % \end{macrocode} % @@ -261,6 +262,7 @@ This work consists of the file denisbdoc.dtx \RequirePackage{siunitx}% % \RequirePackage[a4paper]{geometry}% \RequirePackage{booktabs}% +\RequirePackage{multirow}% \RequirePackage[xr]{zref}% \RequirePackage[multiple]{footmisc}% % \RequirePackage[multiple,bottom]{footmisc}% @@ -560,24 +562,15 @@ This work consists of the file denisbdoc.dtx % update| margin notes provided by \pkg{tcolorbox} are always on the left hand % size and typesetted correctly. % \begin{macrocode} -% \newtcolorbox{tcbdocmarginnote@tmp}[2]{% -% enhanced jigsaw,size=fbox,boxrule=1pt,leftrule=0pt,rightrule=0pt, -% arc=0pt,outer arc=1pt,boxsep=1pt,top=1pt,bottom=1pt, -% nobeforeafter,width=\marginparwidth, -% colframe=red!50!white,colback=red!25!yellow!5!white,fontupper=\scriptsize,before upper=#2, -% doc@marginnote,#1% -% } % \renewcommand{\tcbdocmarginnote}[2][]{% -% \marginnote[ -% \begin{tcbdocmarginnote@tmp}{#1}{\flushright} -% #2 -% \end{tcbdocmarginnote@tmp} -% ]{% -% \begin{tcbdocmarginnote@tmp}{#1}{\flushleft} -% #2 -% \end{tcbdocmarginnote@tmp} -% } -% } +% \marginnote{% +% \begin{tcolorbox}[enhanced jigsaw,size=fbox,boxrule=1pt,leftrule=0pt,rightrule=0pt, +% arc=0pt,outer arc=1pt,boxsep=1pt,top=1pt,bottom=1pt, +% nobeforeafter,width=\marginparwidth, +% colframe=red!50!white,colback=red!25!yellow!5!white,fontupper=\scriptsize, +% if odd page or oneside={flushright upper}{flushright upper}, +% doc@marginnote,#1]#2\end{tcolorbox}}} +\tcbset{doc marginnote={if odd page or oneside={flushright upper}{flushright upper}}} \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{} \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{} \reversemarginpar @@ -586,9 +579,31 @@ This work consists of the file denisbdoc.dtx % \begin{macrocode} \DeclareTotalTCBox{\commandshell}{ v } { commandshell}{#1} -% \newtcblisting{commandshell}[1][]{% -% style=commandshell,#1 -% } +\newtcblisting{listingshell}[1][]{% + % colback=black, + % colupper=white, + colback=white, + colupper=black, + colframe=yellow!75!black, + breakable, + listing only, + listing options={% + style=tcblatex, + language=bash, + escapeinside={(*@}{@*)}, + upquote=true, + showstringspaces=false + }, + every listing line={% + \textcolor{red}{% + \small\ttfamily\bfseries% + \BeginAccSupp{method=plain,ActualText={}} + \$ + \EndAccSupp{}% + } + }, + #1 +} \usetikzlibrary{trees,backgrounds,fit,calc,positioning} % \end{macrocode} % @@ -680,10 +695,6 @@ This work consists of the file denisbdoc.dtx % \end{macrocode} % % \begin{macrocode} -\ExplSyntaxOn -% \end{macrocode} -% -% \begin{macrocode} \DeclareUrlCommand\urldirectory{\urlstyle{tt}} % \end{macrocode} % @@ -703,12 +714,16 @@ This work consists of the file denisbdoc.dtx % \begin{macro}{\c_@@_treetemplate_string_tl} % \begin{macro}{\c_@@_treesample_string_tl} % \begin{macrocode} -\tl_const:Nn \c_@@_template_string_tl {../exemples/canevas} -\tl_const:Nn \c_@@_sample_string_tl {../exemples/specimen} +\tl_const:Nn \c_@@_examples_path_tl {../exemples} +\tl_const:Nn \c_@@_template_string_tl {\c_@@_examples_path_tl/canevas} +\tl_const:Nn \c_@@_sample_string_tl {\c_@@_examples_path_tl/specimen} \tl_const:Nn \c_@@_flattemplate_string_tl {\c_@@_template_string_tl/a-plat} \tl_const:Nn \c_@@_flatsample_string_tl {\c_@@_sample_string_tl/a-plat} \tl_const:Nn \c_@@_treetemplate_string_tl {\c_@@_template_string_tl/en-arborescence} \tl_const:Nn \c_@@_treesample_string_tl {\c_@@_sample_string_tl/en-arborescence} +\tl_const:Nn \c_@@_template_sample_zip_string_tl {canevas-specimen.zip} +\tl_const:Nn \c_@@_these_aux_string_tl {these.aux} +\tl_const:Nn \c_@@_these_snippets_directory_tl {extraits-these} % \end{macrocode} % \end{macro} % \end{macro} @@ -803,7 +818,7 @@ This work consists of the file denisbdoc.dtx @pnumwidth,bookmarksetup,DeclareTextCommand,text,iiint,NewPairedDelimiter,% norm,lnorm,llnorm,lpnorm,supnorm,abs,prt,brk,brc,lrangle,leqgeq,% norm*,lnorm*,llnorm*,lpnorm*,supnorm*,abs*,prt*,brk*,brc*,lrangle*,leqgeq*,% - pdfobjcompresslevel% + pdfobjcompresslevel,chaptermark% },% morekeywords=[1]{% Environments' names tabular,tabulary,math,document,minipage,eqnarray,eqnarray*,align,align*,% @@ -1270,6 +1285,17 @@ This work consists of the file denisbdoc.dtx }% }% % +\tcbset{% + doc~head={% + % boxsep=4pt,arc=4pt,boxrule=0.6pt,% + % frame~style=fill,% + % colframe=red!50!black,% + interior~style={% + fill,% + color=yellow!10!white,% + }% + }% +} \tcbset{% /tcb/doclang/environment~content=contenu~de~l'environnement, /tcb/doclang/color=~(couleur), @@ -1368,6 +1394,50 @@ Nouv.~:}~#1} } % \end{macrocode} % +% Hack of \pkg{imakeidx} in order different indices have different extensions +% that can be taken in account by \pkg{latexmk}'s custom dependencies and +% subroutine (see \url{http://tex.stackexchange.com/q/336653/18401}). The +% extensions of input and output files are specified by new |extin| and |extout| +% options of |\makeindex|. +% \begin{macrocode} +\ExplSyntaxOff +\def\imki@finalmessage#1{}% since you're using latexmk +\def\imki@startidx#1#2{% + \if@filesw + \def\index{\@bsphack + \@ifnextchar [{\@index}{\@index[\imki@jobname]}} + \expandafter\newwrite\csname #1@idxfile\endcsname + \immediate\openout \csname #1@idxfile\endcsname #1.#2\relax + \typeout{Writing index file #1.#2}% + \fi} +\xpatchcmd\imki@makeindex + {\imki@startidx\imki@name} + {\imki@startidx\imki@name\imki@extout} + {}{} +\xpatchcmd\imki@build + {\imki@dokey\imki@title} + {\imki@dokey\imki@title + \imki@dokey\imki@extin + \imki@dokey\imki@extout} + {}{} +\xpatchcmd{\imki@putindex} + {\imki@options} + {\space~ -o~ #1.\imki@extin\imki@options} + {}{} +\xpatchcmd{\imki@putindex} + {.idx} + {.\imki@extout} + {}{} +\xpatchcmd{\imki@putindex} + {.ind} + {.\imki@extin} + {}{} +\def\imki@extout{idx}\def\imki@extin{ind} +\define@key{imki}{extout}{\def\imki@extout{#1}} +\define@key{imki}{extin}{\def\imki@extin{#1}} +\ExplSyntaxOn +% \end{macrocode} +% % \begin{macrocode} \cs_new_protected:Nn \_@@_alert:n { @@ -1380,7 +1450,6 @@ Nouv.~:}~#1} { \_@@_alert:n {#1} }% -\makeindex[name=\jobname-changes,title=Historique~des~changements,options=-L~french~-M~denisbdoc-chng.xdy] \DeclareDocumentCommand \changes { smmm } { \IfBooleanTF {#1} { @@ -1569,6 +1638,31 @@ Nouv.~:}~#1} \IfLanguageName{english}{~directory}{}% }% % +\NewDocumentCommand \ie { s } {% + \IfBooleanTF {#1} + { + \IfLanguageName{french}{% + c'est-\`{a}-dire + }{}% + \IfLanguageName{english}{% + id est + }{}% + } + { + \IfLanguageName{french}{% + c.-à-d + }{}% + \IfLanguageName{english}{% + i.e + }{}% + \@ifnextchar.% + { + }{ + .\xspace + }% + } +} +% \NewDocumentCommand{\program}{ m } { \_@@_file:n {#1}% @@ -1789,45 +1883,72 @@ Nouv.~:}~#1} % incluses les pages du \File{.pdf} externe. % \begin{macrocode} \bool_if:nT {\g_@@_yad_bool} {% + % \zexternaldocument{\c_@@_flatsample_string_tl/these}% - \bool_new:N \g_@@_these_aux_exists - \msg_new:nnn{denisbdoc}{File~these.aux~needed}{% - File ~`these.aux' ~needed ~(otherwise ~this ~document ~will ~be ~incomplete)!\space - ~Please ~go ~to ~`\c_@@_flatsample_string_tl'\space - directory ~and ~run~first:\\\\ + \bool_new:N \g_@@_these_aux_exists% + \msg_new:nnn{denisbdoc}{File~ `\c_@@_these_aux_string_tl'~ needed}{% + File~ `\c_@@_these_aux_string_tl'~ needed~ (otherwise~ this~ document~ will~ + be~ incomplete)!~ Please~ go~ to~ `\c_@@_flatsample_string_tl'~ + directory~ and~ run~ first:\\\\ - \ \ latexmk ~-f ~-pdf ~-jobname=these ~-pdflatex="pdflatex ~\%O ~ \string\ \\ - \ \ '\string\RequirePackage\{etoolbox\} ~ \string\ \\ - \ \ \string\AtEndPreamble\{\string\RequirePackage\{yathesis-demo\}\} ~ \string\ \\ - \ \ \string\input\{\%S\}'"~these.tex + \ \ latexmk~ -g~ -pdf~ -jobname=these~ -pdflatex="pdflatex~ \%O~ \string\ \\ + \ \ '\string\RequirePackage\{etoolbox\}~ \string\ \\ + \ \ \string\AtEndPreamble\{\string\RequirePackage\{yathesis-demo\}\}~ \string\ \\ + \ \ \string\input\{\%S\}'"~ these.tex \\\\ - Afterwards,~recompile~this~document.% + Afterwards,~ recompile~ this~ document.% }% - \file_if_exist:nTF {\c_@@_flatsample_string_tl/these.aux} { - \bool_gset_true:N \g_@@_these_aux_exists - }{ + \file_if_exist:nTF {\c_@@_flatsample_string_tl/\c_@@_these_aux_string_tl} { \bool_gset_true:N + \g_@@_these_aux_exists }{ % \bool_gset_false:N \g_@@_these_aux_exists - \msg_warning:nn{denisbdoc}{File~these.aux~needed} + \msg_warning:nn{denisbdoc}{File~ `\c_@@_these_aux_string_tl'~ needed} \AfterEndPreamble{% \begin{dbwarning}{Documentation~incomplète~!}{documentation-incomplete} - La ~présente ~documentation ~est ~incomplète ~car ~le ~\File{these.aux}\space - ~est ~absent ~du ~\Folder{specimen/a-plat}. ~Pour ~régler ~le ~problème,\space - ~rendez-vous ~dans ~ce ~dossier ~et ~compilez ~le ~\File{these.tex} ~au\space - ~moyen ~de ~la ~commande ~suivante ~(sur ~une ~seule ~ligne) ~:\par\medskip + La~ présente~ documentation~ est~ incomplète~ car~ le~ + \File{\c_@@_these_aux_string_tl}~ est~ absent~ du~ + \Folder{\c_@@_flatsample_string_tl}.~ Pour~ régler~ le~ problème,~ + rendez-vous~ dans~ ce~ dossier~ et~ compilez~ le~ \File{these.tex}~ au~ + moyen~ de~ la~ commande~ suivante\footnote{Sur~ une~ seule~ ligne.}~ : + \par\medskip - \lstinline[language=bash,upquote=true,commentstyle=,stringstyle=,showstringspaces=false]+latexmk~-f~-pdf~-jobname=these~-pdflatex="pdflatex~\%O~'\\RequirePackage\{etoolbox\}\\AtEndPreamble\{\\RequirePackage\{yathesis-demo\}\}\\input\{\%S\}'"~these+ + \lstinline[language=bash,upquote=true,commentstyle=,stringstyle=,showstringspaces=false]+latexmk~-g~ -norc~ -r~ ./latexmkrc~-jobname=these-pdflatex="pdflatex~\%O~'\\RequirePackage\{etoolbox\}\\AtEndPreamble\{\\RequirePackage\{yathesis-demo\}\}\\input\{\%S\}'"~these+ \end{dbwarning} } } + % + \msg_new:nnn{denisbdoc}{File~ `\c_@@_template_sample_zip_string_tl'~ needed}{% + File~ `canevas-specimen.zip'~ needed~ (otherwise~ this~ document~ will~ be~ + incomplete)!~ Please~ get~ this~ file~ from~ the~ orignal~ yathesis'~ + documentation~ and~ save~ it~ in~ `../exemples/'~ folder.~ Afterwards,~ + recompile~ this~ document.% + }% + \file_if_exist:nTF {../\c_@@_template_sample_zip_string_tl} {}{ + \msg_warning:nn{denisbdoc}{File~ `\c_@@_template_sample_zip_string_tl'~ needed} + \AfterEndPreamble{% + \begin{dbwarning}{Documentation~incomplète~!}{} + La~ version~ électronique~ (\pdf{})~ de~ la~ présente~ documentation~ + est~ incomplète~ :~ normalement,~ les~ canevas~ et~ spécimens~ y~ sont~ + intégrés~ par~ le~ biais~ de~ l'archive~ \gls{zip}~ + \file{\c_@@_template_sample_zip_string_tl}~ (alors~ accessible~ par~ + simple~ clic)~ mais~ ce~ n'est~ pas~ le~ cas~ ici,~ ce~ fichier~ étant~ + absent~ du~ dossier~ parent.~ % \Folder{\c_@@_examples_path_tl}.~ + Pour~ régler~ le~ problème,~ accédez~ à~ ce~ fichier~ attaché~ à~ la~ + version~ électronique~ originale~ de~ la~ documentation~ de~ + \yatcl{}\footnote{Disponible~ à~ l'adresse~ + \url{http://ctan.org/pkg/yathesis},~ si~ besoin~ est.}~ et~ placez-le~ + dans~ le~ \Folder{\c_@@_examples_path_tl}. + \end{dbwarning} + } + } + % \cs_new_protected:Nn \_@@_screenshot:nn { \bool_if:NTF {\g_@@_these_aux_exists} { \fbox{\includegraphics[bylabel=#2,width=#1\linewidth-2\fboxsep-2\fboxrule]{\c_@@_flatsample_string_tl/these}}% }{% \begin{dbwarning}{Copie~d'écran~manquante~!}{} - Il ~devrait ~ici ~y ~avoir ~une ~copie\space - ~d'écran. ~Cf. ~\vref{wa-documentation-incomplete} ~pour ~plus ~de\space - ~détails. + Il~ devrait~ ici~ y~ avoir~ une~ copie\space ~ d'écran.~ Cf.~ + \vref{wa-documentation-incomplete}~ pour~ plus~ de~ détails. \end{dbwarning} } } @@ -1872,19 +1993,32 @@ Nouv.~:}~#1} codes,% #1% } -\NewTCBInputListing{\preamblesample}{ O{these.tex} m m }{% +\NewTCBInputListing{\preamblesampleold}{ O{these.tex} m m }{% samples, drop~lifted~shadow, listing~file={\c_@@_treesample_string_tl/#1}, listing~options={rangebeginprefix=\\,rangeendsuffix=\},#2}, #3, }% -\NewTCBInputListing{\bodysample}{ O{these.tex} m m }{% +\NewTCBInputListing{\preamblesample}{ m m m }{% + samples, + drop~lifted~shadow, + listing~file={\c_@@_these_snippets_directory_tl/#1}, + listing~options={#2}, + #3, +}% +\NewTCBInputListing{\bodysampleold}{ O{these.tex} m m }{% samples, listing~file={\c_@@_treesample_string_tl/#1}, listing~options={rangebeginprefix=\\,rangeendsuffix=\},#2}, #3, }% +\NewTCBInputListing{\bodysample}{ m m m }{% + samples, + listing~file={\c_@@_these_snippets_directory_tl/#1}, + listing~options={#2}, + #3, +}% % \newtcbinputlisting{\preamblesample}[3][these.tex]{% % samples, % drop~lifted~shadow, @@ -2229,7 +2363,7 @@ Nouv.~:}~#1} (markup-locref :open "\hyperpage{" :close "}") (markup-locref-list :sep ", ") -(markup-locclass-list :open "\hfill\nobreakspace" :close "" ) +(markup-locclass-list :open "\hspace*{\fill}\nobreakspace" :close "" ) (define-attributes (("gobble" "default"))) (markup-locref :open "\makeatletter\@gobble{" :close "}\makeatother" :attr "gobble") diff --git a/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.ins b/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.ins index 6bfe8c7e372..1c7bee6e380 100644 --- a/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.ins +++ b/Master/texmf-dist/source/latex/denisbdoc/denisbdoc.ins @@ -2,7 +2,7 @@ \askforoverwritefalse \preamble ----------------------------------------------------------------------------- -denisbdoc --- A personal dirty package for documenting packages, version 0.5 +denisbdoc --- A personal dirty package for documenting packages, version 0.6 Maintained by Denis Bitouz'e E-mail: denis.bitouze@lmpa.univ-littoral.fr diff --git a/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty b/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty index b2e0a167616..9a30f786df4 100644 --- a/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty +++ b/Master/texmf-dist/tex/latex/denisbdoc/denisbdoc.sty @@ -6,7 +6,7 @@ %% %% denisbdoc.dtx (with options: `package') %% ----------------------------------------------------------------------------- -%% denisbdoc --- A personal dirty package for documenting packages, version 0.5 +%% denisbdoc --- A personal dirty package for documenting packages, version 0.6 %% %% Maintained by Denis Bitouz'e %% E-mail: denis.bitouze@lmpa.univ-littoral.fr @@ -15,7 +15,7 @@ %% ----------------------------------------------------------------------------- %% \RequirePackage{expl3,l3keys2e,xparse} -\ProvidesExplPackage {denisbdoc} {2016/10/30} {0.5} +\ProvidesExplPackage {denisbdoc} {2016/12/08} {0.6} {A personal package for documenting packages} \@ifpackagelater { expl3 } { 2012/11/21 } { } @@ -55,6 +55,7 @@ \RequirePackage{calc}% \RequirePackage{siunitx}% \RequirePackage{booktabs}% +\RequirePackage{multirow}% \RequirePackage[xr]{zref}% \RequirePackage[multiple]{footmisc}% \RequirePackage{rotating}% @@ -202,11 +203,37 @@ }, } } +\tcbset{doc marginnote={if odd page or oneside={flushright upper}{flushright upper}}} \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{} \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{} \reversemarginpar \DeclareTotalTCBox{\commandshell}{ v } { commandshell}{#1} +\newtcblisting{listingshell}[1][]{% + % colback=black, + % colupper=white, + colback=white, + colupper=black, + colframe=yellow!75!black, + breakable, + listing only, + listing options={% + style=tcblatex, + language=bash, + escapeinside={(*@}{@*)}, + upquote=true, + showstringspaces=false + }, + every listing line={% + \textcolor{red}{% + \small\ttfamily\bfseries% + \BeginAccSupp{method=plain,ActualText={}} + \$ + \EndAccSupp{}% + } + }, + #1 +} \usetikzlibrary{trees,backgrounds,fit,calc,positioning} \attachfilesetup{color=Hyperlink} \newcommand{\indexmark}[1]{\hypertarget{index:#1}{#1}\markboth{#1}{#1}} @@ -246,15 +273,18 @@ \hyperlink{#2:#1}{\textbf{#1}}% }% } -\ExplSyntaxOn \DeclareUrlCommand\urldirectory{\urlstyle{tt}} \ExplSyntaxOn -\tl_const:Nn \c__denisbdoc_template_string_tl {../exemples/canevas} -\tl_const:Nn \c__denisbdoc_sample_string_tl {../exemples/specimen} +\tl_const:Nn \c__denisbdoc_examples_path_tl {../exemples} +\tl_const:Nn \c__denisbdoc_template_string_tl {\c__denisbdoc_examples_path_tl/canevas} +\tl_const:Nn \c__denisbdoc_sample_string_tl {\c__denisbdoc_examples_path_tl/specimen} \tl_const:Nn \c__denisbdoc_flattemplate_string_tl {\c__denisbdoc_template_string_tl/a-plat} \tl_const:Nn \c__denisbdoc_flatsample_string_tl {\c__denisbdoc_sample_string_tl/a-plat} \tl_const:Nn \c__denisbdoc_treetemplate_string_tl {\c__denisbdoc_template_string_tl/en-arborescence} \tl_const:Nn \c__denisbdoc_treesample_string_tl {\c__denisbdoc_sample_string_tl/en-arborescence} +\tl_const:Nn \c__denisbdoc_template_sample_zip_string_tl {canevas-specimen.zip} +\tl_const:Nn \c__denisbdoc_these_aux_string_tl {these.aux} +\tl_const:Nn \c__denisbdoc_these_snippets_directory_tl {extraits-these} \tl_const:Nn \c__denisbdoc_unixtldirectory_string_tl {/usr/local/} \tl_const:Nn \c__denisbdoc_tlversion_string_tl {2016} \tl_const:Nn \c__denisbdoc_wintldirectory_string_tl {c:/} @@ -297,7 +327,7 @@ @pnumwidth,bookmarksetup,DeclareTextCommand,text,iiint,NewPairedDelimiter,% norm,lnorm,llnorm,lpnorm,supnorm,abs,prt,brk,brc,lrangle,leqgeq,% norm*,lnorm*,llnorm*,lpnorm*,supnorm*,abs*,prt*,brk*,brc*,lrangle*,leqgeq*,% - pdfobjcompresslevel% + pdfobjcompresslevel,chaptermark% },% morekeywords=[1]{% Environments' names tabular,tabulary,math,document,minipage,eqnarray,eqnarray*,align,align*,% @@ -687,6 +717,17 @@ label~separator=- }% }% +\tcbset{% + doc~head={% + % boxsep=4pt,arc=4pt,boxrule=0.6pt,% + % frame~style=fill,% + % colframe=red!50!black,% + interior~style={% + fill,% + color=yellow!10!white,% + }% + }% +} \tcbset{% /tcb/doclang/environment~content=contenu~de~l'environnement, /tcb/doclang/color=~(couleur), @@ -752,6 +793,42 @@ Nouv.~:}~#1} \expandafter\AtBeginDocument\expandafter{% \expandafter\def\expandafter\endtheindex\expandafter{\endtheindex}% } +\ExplSyntaxOff +\def\imki@finalmessage#1{}% since you're using latexmk +\def\imki@startidx#1#2{% + \if@filesw + \def\index{\@bsphack + \@ifnextchar [{\@index}{\@index[\imki@jobname]}} + \expandafter\newwrite\csname #1@idxfile\endcsname + \immediate\openout \csname #1@idxfile\endcsname #1.#2\relax + \typeout{Writing index file #1.#2}% + \fi} +\xpatchcmd\imki@makeindex + {\imki@startidx\imki@name} + {\imki@startidx\imki@name\imki@extout} + {}{} +\xpatchcmd\imki@build + {\imki@dokey\imki@title} + {\imki@dokey\imki@title + \imki@dokey\imki@extin + \imki@dokey\imki@extout} + {}{} +\xpatchcmd{\imki@putindex} + {\imki@options} + {\space~ -o~ #1.\imki@extin\imki@options} + {}{} +\xpatchcmd{\imki@putindex} + {.idx} + {.\imki@extout} + {}{} +\xpatchcmd{\imki@putindex} + {.ind} + {.\imki@extin} + {}{} +\def\imki@extout{idx}\def\imki@extin{ind} +\define@key{imki}{extout}{\def\imki@extout{#1}} +\define@key{imki}{extin}{\def\imki@extin{#1}} +\ExplSyntaxOn \cs_new_protected:Nn \__denisbdoc_alert:n { \begingroup @@ -763,7 +840,6 @@ Nouv.~:}~#1} { \__denisbdoc_alert:n {#1} }% -\makeindex[name=\jobname-changes,title=Historique~des~changements,options=-L~french~-M~denisbdoc-chng.xdy] \DeclareDocumentCommand \changes { smmm } { \IfBooleanTF {#1} { @@ -890,6 +966,30 @@ Nouv.~:}~#1} \__denisbdoc_file:n {#1}% \IfLanguageName{english}{~directory}{}% }% +\NewDocumentCommand \ie { s } {% + \IfBooleanTF {#1} + { + \IfLanguageName{french}{% + c'est-\`{a}-dire + }{}% + \IfLanguageName{english}{% + id est + }{}% + } + { + \IfLanguageName{french}{% + c.-^^c3^^a0-d + }{}% + \IfLanguageName{english}{% + i.e + }{}% + \@ifnextchar.% + { + }{ + .\xspace + }% + } +} \NewDocumentCommand{\program}{ m } { \__denisbdoc_file:n {#1}% @@ -1073,45 +1173,72 @@ Nouv.~:}~#1} } } \bool_if:nT {\g__denisbdoc_yad_bool} {% + % \zexternaldocument{\c__denisbdoc_flatsample_string_tl/these}% - \bool_new:N \g__denisbdoc_these_aux_exists - \msg_new:nnn{denisbdoc}{File~these.aux~needed}{% - File ~`these.aux' ~needed ~(otherwise ~this ~document ~will ~be ~incomplete)!\space - ~Please ~go ~to ~`\c__denisbdoc_flatsample_string_tl'\space - directory ~and ~run~first:\\\\ + \bool_new:N \g__denisbdoc_these_aux_exists% + \msg_new:nnn{denisbdoc}{File~ `\c__denisbdoc_these_aux_string_tl'~ needed}{% + File~ `\c__denisbdoc_these_aux_string_tl'~ needed~ (otherwise~ this~ document~ will~ + be~ incomplete)!~ Please~ go~ to~ `\c__denisbdoc_flatsample_string_tl'~ + directory~ and~ run~ first:\\\\ - \ \ latexmk ~-f ~-pdf ~-jobname=these ~-pdflatex="pdflatex ~\%O ~ \string\ \\ - \ \ '\string\RequirePackage\{etoolbox\} ~ \string\ \\ - \ \ \string\AtEndPreamble\{\string\RequirePackage\{yathesis-demo\}\} ~ \string\ \\ - \ \ \string\input\{\%S\}'"~these.tex + \ \ latexmk~ -g~ -pdf~ -jobname=these~ -pdflatex="pdflatex~ \%O~ \string\ \\ + \ \ '\string\RequirePackage\{etoolbox\}~ \string\ \\ + \ \ \string\AtEndPreamble\{\string\RequirePackage\{yathesis-demo\}\}~ \string\ \\ + \ \ \string\input\{\%S\}'"~ these.tex \\\\ - Afterwards,~recompile~this~document.% + Afterwards,~ recompile~ this~ document.% }% - \file_if_exist:nTF {\c__denisbdoc_flatsample_string_tl/these.aux} { - \bool_gset_true:N \g__denisbdoc_these_aux_exists - }{ + \file_if_exist:nTF {\c__denisbdoc_flatsample_string_tl/\c__denisbdoc_these_aux_string_tl} { \bool_gset_true:N + \g__denisbdoc_these_aux_exists }{ % \bool_gset_false:N \g__denisbdoc_these_aux_exists - \msg_warning:nn{denisbdoc}{File~these.aux~needed} + \msg_warning:nn{denisbdoc}{File~ `\c__denisbdoc_these_aux_string_tl'~ needed} \AfterEndPreamble{% \begin{dbwarning}{Documentation~incompl^^c3^^a8te~!}{documentation-incomplete} - La ~pr^^c3^^a9sente ~documentation ~est ~incompl^^c3^^a8te ~car ~le ~\File{these.aux}\space - ~est ~absent ~du ~\Folder{specimen/a-plat}. ~Pour ~r^^c3^^a9gler ~le ~probl^^c3^^a8me,\space - ~rendez-vous ~dans ~ce ~dossier ~et ~compilez ~le ~\File{these.tex} ~au\space - ~moyen ~de ~la ~commande ~suivante ~(sur ~une ~seule ~ligne) ~:\par\medskip + La~ pr^^c3^^a9sente~ documentation~ est~ incompl^^c3^^a8te~ car~ le~ + \File{\c__denisbdoc_these_aux_string_tl}~ est~ absent~ du~ + \Folder{\c__denisbdoc_flatsample_string_tl}.~ Pour~ r^^c3^^a9gler~ le~ probl^^c3^^a8me,~ + rendez-vous~ dans~ ce~ dossier~ et~ compilez~ le~ \File{these.tex}~ au~ + moyen~ de~ la~ commande~ suivante\footnote{Sur~ une~ seule~ ligne.}~ : + \par\medskip - \lstinline[language=bash,upquote=true,commentstyle=,stringstyle=,showstringspaces=false]+latexmk~-f~-pdf~-jobname=these~-pdflatex="pdflatex~\%O~'\\RequirePackage\{etoolbox\}\\AtEndPreamble\{\\RequirePackage\{yathesis-demo\}\}\\input\{\%S\}'"~these+ + \lstinline[language=bash,upquote=true,commentstyle=,stringstyle=,showstringspaces=false]+latexmk~-g~ -norc~ -r~ ./latexmkrc~-jobname=these-pdflatex="pdflatex~\%O~'\\RequirePackage\{etoolbox\}\\AtEndPreamble\{\\RequirePackage\{yathesis-demo\}\}\\input\{\%S\}'"~these+ + \end{dbwarning} + } + } + % + \msg_new:nnn{denisbdoc}{File~ `\c__denisbdoc_template_sample_zip_string_tl'~ needed}{% + File~ `canevas-specimen.zip'~ needed~ (otherwise~ this~ document~ will~ be~ + incomplete)!~ Please~ get~ this~ file~ from~ the~ orignal~ yathesis'~ + documentation~ and~ save~ it~ in~ `../exemples/'~ folder.~ Afterwards,~ + recompile~ this~ document.% + }% + \file_if_exist:nTF {../\c__denisbdoc_template_sample_zip_string_tl} {}{ + \msg_warning:nn{denisbdoc}{File~ `\c__denisbdoc_template_sample_zip_string_tl'~ needed} + \AfterEndPreamble{% + \begin{dbwarning}{Documentation~incompl^^c3^^a8te~!}{} + La~ version~ ^^c3^^a9lectronique~ (\pdf{})~ de~ la~ pr^^c3^^a9sente~ documentation~ + est~ incompl^^c3^^a8te~ :~ normalement,~ les~ canevas~ et~ sp^^c3^^a9cimens~ y~ sont~ + int^^c3^^a9gr^^c3^^a9s~ par~ le~ biais~ de~ l'archive~ \gls{zip}~ + \file{\c__denisbdoc_template_sample_zip_string_tl}~ (alors~ accessible~ par~ + simple~ clic)~ mais~ ce~ n'est~ pas~ le~ cas~ ici,~ ce~ fichier~ ^^c3^^a9tant~ + absent~ du~ dossier~ parent.~ % \Folder{\c__denisbdoc_examples_path_tl}.~ + Pour~ r^^c3^^a9gler~ le~ probl^^c3^^a8me,~ acc^^c3^^a9dez~ ^^c3^^a0~ ce~ fichier~ attach^^c3^^a9~ ^^c3^^a0~ la~ + version~ ^^c3^^a9lectronique~ originale~ de~ la~ documentation~ de~ + \yatcl{}\footnote{Disponible~ ^^c3^^a0~ l'adresse~ + \url{http://ctan.org/pkg/yathesis},~ si~ besoin~ est.}~ et~ placez-le~ + dans~ le~ \Folder{\c__denisbdoc_examples_path_tl}. \end{dbwarning} } } + % \cs_new_protected:Nn \__denisbdoc_screenshot:nn { \bool_if:NTF {\g__denisbdoc_these_aux_exists} { \fbox{\includegraphics[bylabel=#2,width=#1\linewidth-2\fboxsep-2\fboxrule]{\c__denisbdoc_flatsample_string_tl/these}}% }{% \begin{dbwarning}{Copie~d'^^c3^^a9cran~manquante~!}{} - Il ~devrait ~ici ~y ~avoir ~une ~copie\space - ~d'^^c3^^a9cran. ~Cf. ~\vref{wa-documentation-incomplete} ~pour ~plus ~de\space - ~d^^c3^^a9tails. + Il~ devrait~ ici~ y~ avoir~ une~ copie\space ~ d'^^c3^^a9cran.~ Cf.~ + \vref{wa-documentation-incomplete}~ pour~ plus~ de~ d^^c3^^a9tails. \end{dbwarning} } } @@ -1142,19 +1269,32 @@ Nouv.~:}~#1} codes,% #1% } -\NewTCBInputListing{\preamblesample}{ O{these.tex} m m }{% +\NewTCBInputListing{\preamblesampleold}{ O{these.tex} m m }{% samples, drop~lifted~shadow, listing~file={\c__denisbdoc_treesample_string_tl/#1}, listing~options={rangebeginprefix=\\,rangeendsuffix=\},#2}, #3, }% -\NewTCBInputListing{\bodysample}{ O{these.tex} m m }{% +\NewTCBInputListing{\preamblesample}{ m m m }{% + samples, + drop~lifted~shadow, + listing~file={\c__denisbdoc_these_snippets_directory_tl/#1}, + listing~options={#2}, + #3, +}% +\NewTCBInputListing{\bodysampleold}{ O{these.tex} m m }{% samples, listing~file={\c__denisbdoc_treesample_string_tl/#1}, listing~options={rangebeginprefix=\\,rangeendsuffix=\},#2}, #3, }% +\NewTCBInputListing{\bodysample}{ m m m }{% + samples, + listing~file={\c__denisbdoc_these_snippets_directory_tl/#1}, + listing~options={#2}, + #3, +}% \tl_new:N \g__denisbdoc_number_within_tl \tl_set:Nn \g__denisbdoc_number_within_tl {chapter} \@ifclassloaded{gztarticle}{\tl_set:Nn \g__denisbdoc_number_within_tl {section}}{}% -- cgit v1.2.3