texlive[73465] Master/texmf-dist: skeldoc (15jan25)

commits+karl at tug.org commits+karl at tug.org
Wed Jan 15 21:59:56 CET 2025


Revision: 73465
          https://tug.org/svn/texlive?view=revision&revision=73465
Author:   karl
Date:     2025-01-15 21:59:56 +0100 (Wed, 15 Jan 2025)
Log Message:
-----------
skeldoc (15jan25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/skeldoc/README.md
    trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.pdf
    trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.tex
    trunk/Master/texmf-dist/tex/latex/skeldoc/skeldoc.sty

Modified: trunk/Master/texmf-dist/doc/latex/skeldoc/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/skeldoc/README.md	2025-01-15 20:59:47 UTC (rev 73464)
+++ trunk/Master/texmf-dist/doc/latex/skeldoc/README.md	2025-01-15 20:59:56 UTC (rev 73465)
@@ -3,7 +3,7 @@
 The **skeldoc** package lets you produce placeholder elements for documents
 under development, similar to the skeleton screens used while loading contents
 in many applications and websites. It also has a mechanism for attaching
-explanatory endnotes to these placeholder, or to anything else in your
+explanatory endnotes to these placeholders, or to anything else in your
 document. For an example of use, along with some explanations, see the file
 [skeldoc.pdf](skeldoc.pdf), or [its source](skeldoc.tex).
 

Modified: trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.tex	2025-01-15 20:59:47 UTC (rev 73464)
+++ trunk/Master/texmf-dist/doc/latex/skeldoc/skeldoc.tex	2025-01-15 20:59:56 UTC (rev 73465)
@@ -25,7 +25,11 @@
 \def\ttdefault{cmtl}
 
 \usepackage{skeldoc}
+% \skelset{hide-notes}
+% \skelset{hide-all}
 
+\usepackage{cleveref}
+
 \usepackage{amsthm}
 \newtheorem{thm}{Theorem}
 
@@ -107,13 +111,15 @@
 groups, so such config may also be local, e.g., by wrapping the relevant part
 of the document in braces). For example, one might use
 \cs{skelset\braces{main-color\allowbreak\,=\,black}} to produce a look along
-the lines of the \pkg[https://ctan.org/pkg/censor]{censor} package. Shared
-defaults for the local keys may also be set in this way, generally using the
-local key name with the type of element as a prefix; for example,
-\texttt{par-lines} is used to set the default for the \texttt{lines} key of
-the \cs{skelpar} command. There are also some other general keys, like
-\texttt{main-color} and \texttt{full-width}. For an overview of the
-configuration keys, please consult the source file, \texttt{skeldoc.sty}.}
+the lines of the \pkg[https://ctan.org/pkg/censor]{censor} package. Or one could
+use \cs{skelset\braces{hide-notes}} to hide notes and note numbers (or even use
+\texttt{hide-all} to remove \emph{all} \pkg{skeldoc} elements). Shared defaults
+for the local keys may also be set in this way, generally using the local key
+name with the type of element as a prefix; for example, \texttt{par-lines} is
+used to set the default for the \texttt{lines} key of the \cs{skelpar} command.
+There are also some other general keys, like \texttt{main-color} and
+\texttt{full-width}. For an overview of the configuration keys, please consult
+the source file, \texttt{skeldoc.sty}.}
 \skelenum[3]
 \noindent
 \skelpar[3]
@@ -132,7 +138,7 @@
 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
 eirmod tempor invidunt ut labore et dolore magna aliquyam erat~\skelref{Here I'm
 referring to something non-existent, with \cs{skelref}, whose implicit key is
-\texttt{width}.}, sed diam voluptua.
+\texttt{width}.}, sed diam voluptua~\cref{fig}.
 \skelpar[2]
 At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
 gubergren, no sea takimata sanctus est~\skelcite{And here is a missing
@@ -162,6 +168,7 @@
 The implicit argument of \cs{skelcaption} is \texttt{lines}, and the other
 keys are as for \cs{skelpar}, relying on the same defaults and global
 configuration.}
+\label{fig}
 \end{figure}%
 
 \skelpar

Modified: trunk/Master/texmf-dist/tex/latex/skeldoc/skeldoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/skeldoc/skeldoc.sty	2025-01-15 20:59:47 UTC (rev 73464)
+++ trunk/Master/texmf-dist/tex/latex/skeldoc/skeldoc.sty	2025-01-15 20:59:56 UTC (rev 73465)
@@ -1,4 +1,4 @@
-% Copyright (c) 2021 Magnus Lie Hetland
+% Copyright (c) 2020–2025 Magnus Lie Hetland
 %
 % Permission is hereby granted, free of charge, to any person obtaining a copy
 % of this software and associated documentation files (the "Software"), to deal
@@ -18,8 +18,8 @@
 % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 % SOFTWARE.
 
-\def \skelversion {0.1.2}
-\def \skeldate    {2021-02-25}
+\def \skelversion {0.1.3}
+\def \skeldate    {2025-01-15}
 
 \RequirePackage{expl3}
 
@@ -80,6 +80,11 @@
 
 }
 
+\cs_new:Npn \skel_show:n #1 { #1 }
+\cs_new:Npn \skel_hide:n #1 {    }
+
+\cs_set_eq:NN \skel_maybe:n \skel_show:n
+
 %% Configuration %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 % Blue from Solarized (https://ethanschoonover.com/solarized/)
@@ -217,8 +222,18 @@
     pseudo-newlines .tl_set:N       = \l_skel_pseudo_newlines_default_tl    ,
     pseudo-newlines .initial:n      = {
         \\+, \\-, \\+, \\+, \\--, \\+, \\, \\-
-    },
+    }                                                                       ,
 
+    %% Showing/hiding
+
+    hide-notes      .bool_set:N     = \l_skel_hide_notes_bool               ,
+    hide-notes      .initial:n      = false                                 ,
+    hide-notes      .default:n      = true                                  ,
+
+    hide-all        .code:n         = {
+        \cs_set_eq:NN \skel_maybe:n \skel_hide:n
+    }                                                                       ,
+
 }
 
 \NewDocumentCommand \skelset { +m } {
@@ -279,7 +294,7 @@
     width       .initial:n          = \l_skel_line_width_default_tl         ,
 
 }
-\NewDocumentCommand \skelline { +O{} +g } {
+\NewDocumentCommand \skelline { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -291,7 +306,7 @@
 
     \group_end:
 
-}
+} }
 
 %% skelref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -301,7 +316,7 @@
     width       .initial:n          = \l_skel_ref_width_default_tl          ,
 
 }
-\NewDocumentCommand \skelref { +O{} +g } {
+\NewDocumentCommand \skelref { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -313,7 +328,7 @@
 
     \group_end:
 
-}
+} }
 
 %% skelcite %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -329,7 +344,7 @@
     right       .initial:n          = \l_skel_cite_right_default_tl         ,
 
 }
-\NewDocumentCommand \skelcite { +O{} +g } {
+\NewDocumentCommand \skelcite { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -343,7 +358,7 @@
 
     \group_end:
 
-}
+} }
 
 %% skelpar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -364,7 +379,7 @@
     last-width      .initial:n      = \l_skel_par_last_width_default_tl     ,
 
 }
-\NewDocumentCommand \skelpar { +O{} +g } {
+\NewDocumentCommand \skelpar { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -377,7 +392,7 @@
 
     \group_end:
 
-}
+} }
 
 % \skelpar implementation -- also used in \skelcaption
 
@@ -420,7 +435,7 @@
     height          .initial:n      = \l_skel_fig_height_default_tl         ,
 
 }
-\NewDocumentCommand \skelfig { +O{} +g } {
+\NewDocumentCommand \skelfig { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -435,7 +450,7 @@
 
     \group_end:
 
-}
+} }
 
 %% \skelcaption %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -454,9 +469,14 @@
     last-width      .initial:n      = \l_skel_par_last_width_default_tl     ,
 
 }
-\NewDocumentCommand \skelcaption { +O{} +g } {
+\NewDocumentCommand \skelcaption { +O{} +g } { \skel_maybe:n {
 
-    \group_begin:
+    % Dropping the surrounding group, so \@currentlabel, \cref at currentlabel and
+    % any other similar constructs can "leak out" to a following \label command.
+    % Assuming that the the caption is inside a figure or table, or the like,
+    % which acts as the local environment, this should be safe.
+    %
+    % \group_begin:
 
     \skel_args:nn { skelcaption } { #1 }
     \int_set:Nn \l_skel_par_lines_int \l_skel_caption_lines_tl
@@ -476,9 +496,9 @@
         \skel_par:
     }
 
-    \group_end:
+    % \group_end:
 
-}
+} }
 
 %% \skelpars %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -490,7 +510,7 @@
     pars            .initial:n      = \l_skel_pars_default_int              ,
 
 }
-\NewDocumentCommand \skelpars { +O{} +g } {
+\NewDocumentCommand \skelpars { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -509,7 +529,7 @@
 
     \group_end:
 
-}
+} }
 
 %% Lists: \skelitems and \skelenum %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -523,17 +543,17 @@
 
 }
 
-\NewDocumentCommand \skelitems { +O{} +g } {
+\NewDocumentCommand \skelitems { +O{} +g } { \skel_maybe:n {
 
     \skel_list:nnn { #1 } { #2 } { itemize }
 
-}
+} }
 
-\NewDocumentCommand \skelenum { +O{} +g } {
+\NewDocumentCommand \skelenum { +O{} +g } { \skel_maybe:n {
 
     \skel_list:nnn { #1 } { #2 } { enumerate }
 
-}
+} }
 
 \cs_new:Npn \skel_list:nnn #1 #2 #3 {
 
@@ -587,7 +607,7 @@
     stretch         .initial:n      = \l_skel_tabular_stretch_default_tl    ,
 
 }
-\NewDocumentCommand \skeltabular { +O{} +g } {
+\NewDocumentCommand \skeltabular { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -619,7 +639,7 @@
 
     \group_end:
 
-}
+} }
 
 %% \skelbib %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -632,7 +652,7 @@
     item-lines      .initial:n      = \l_skel_bib_item_lines_default_int    ,
 
 }
-\NewDocumentCommand \skelbib { +O{} +g } {
+\NewDocumentCommand \skelbib { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -653,7 +673,7 @@
 
     \group_end:
 
-}
+} }
 
 %% \skelpseudo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -674,7 +694,7 @@
     newlines        .initial:n      =                                       ,
 
 }
-\NewDocumentCommand \skelpseudo { +O{} +g } {
+\NewDocumentCommand \skelpseudo { +O{} +g } { \skel_maybe:n {
 
     \group_begin:
 
@@ -737,26 +757,28 @@
     % new paragraph.
     \noindent\ignorespaces
 
-}
+} }
 
 %% Notes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \cs_new:Npn \skel_note:n #1 {
-    \leavevmode
-    % Smash to avoid messing with vertical alignment of of surrounding text
-    \smash{\marginnote{
-        \l_skel_note_font_tl
-        \textcolor{skel-note-color}{
-            \endnotemark
-        }
-    }}
-    \endnotetext{\ignorespaces #1 \unskip}
+    \bool_if:NF \l_skel_hide_notes_bool {
+        \leavevmode
+        % Smash to avoid messing with vertical alignment of of surrounding text
+        \smash{\marginnote{
+            \l_skel_note_font_tl
+            \textcolor{skel-note-color}{
+                \endnotemark
+            }
+        }}
+        \endnotetext{\ignorespaces #1 \unskip}
+    }
     \ignorespaces
 }
 
-\NewDocumentCommand \skelnote { +m } {
+\NewDocumentCommand \skelnote { +m } { \skel_maybe:n {
     \skel_note:n { #1 }
-}
+} }
 
 \cs_set_eq:NN \skel_note_orig:n \skel_note:n
 
@@ -840,9 +862,9 @@
     list-type = skel-note-list-type,
 }
 
-\NewDocumentCommand \printskelnotes { } {
+\NewDocumentCommand \printskelnotes { } { \skel_maybe:n {
     \tl_set:Ne \g_skel_widest_note_label_tl \theendnote
     \printendnotes[skel-note-list]
-}
+} }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the tex-live-commits mailing list.