summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/denisbdoc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-12-11 22:33:19 +0000
committerKarl Berry <karl@freefriends.org>2016-12-11 22:33:19 +0000
commita2c69b93923864902448a34553df6db873ca3600 (patch)
tree3edc48c14457016a5fcb6fd8287edb319acda9f7 /Master/texmf-dist/source/latex/denisbdoc
parentb61c39de9d5fba4e780315259a21990f6c9b1807 (diff)
denisbdoc
git-svn-id: svn://tug.org/texlive/trunk@42682 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/denisbdoc')
-rw-r--r--Master/texmf-dist/source/latex/denisbdoc/denisbdoc.dtx248
-rw-r--r--Master/texmf-dist/source/latex/denisbdoc/denisbdoc.ins2
2 files changed, 192 insertions, 58 deletions
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
%</internal>
%<*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*,%
@@ -1271,6 +1286,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),
/tcb/doclang/colors=Couleurs,
@@ -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