summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/skeldoc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-26 03:00:54 +0000
committerNorbert Preining <norbert@preining.info>2021-02-26 03:00:54 +0000
commit8b1159ba65d4003e969141fb034abbdc19e27c4b (patch)
tree30195bada4bbba4a9977fcf65d7ddeb807b740db /macros/latex/contrib/skeldoc
parent4004125ab2ced5a0714227aeb2c5f45970ee94b9 (diff)
CTAN sync 202102260300
Diffstat (limited to 'macros/latex/contrib/skeldoc')
-rw-r--r--macros/latex/contrib/skeldoc/LICENSE2
-rw-r--r--macros/latex/contrib/skeldoc/skeldoc.pdfbin217555 -> 219556 bytes
-rw-r--r--macros/latex/contrib/skeldoc/skeldoc.sty74
-rw-r--r--macros/latex/contrib/skeldoc/skeldoc.tex19
4 files changed, 86 insertions, 9 deletions
diff --git a/macros/latex/contrib/skeldoc/LICENSE b/macros/latex/contrib/skeldoc/LICENSE
index eb75fde0e7..23dcd5c2ee 100644
--- a/macros/latex/contrib/skeldoc/LICENSE
+++ b/macros/latex/contrib/skeldoc/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2020 Magnus Lie Hetland
+Copyright (c) 2021 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
diff --git a/macros/latex/contrib/skeldoc/skeldoc.pdf b/macros/latex/contrib/skeldoc/skeldoc.pdf
index 102bda1f88..163d053f1e 100644
--- a/macros/latex/contrib/skeldoc/skeldoc.pdf
+++ b/macros/latex/contrib/skeldoc/skeldoc.pdf
Binary files differ
diff --git a/macros/latex/contrib/skeldoc/skeldoc.sty b/macros/latex/contrib/skeldoc/skeldoc.sty
index 2938b545b7..4754716d02 100644
--- a/macros/latex/contrib/skeldoc/skeldoc.sty
+++ b/macros/latex/contrib/skeldoc/skeldoc.sty
@@ -1,4 +1,4 @@
-% Copyright (c) 2020 Magnus Lie Hetland
+% Copyright (c) 2021 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.1}
-\def \skeldate {2021-01-03}
+\def \skelversion {0.1.2}
+\def \skeldate {2021-02-25}
\RequirePackage{expl3}
@@ -131,6 +131,22 @@
line-width .tl_set:N = \l_skel_line_width_default_tl ,
line-width .initial:n = \l_skel_short_width_tl ,
+ %% Defaults for \skelref
+
+ ref-width .tl_set:N = \l_skel_ref_width_default_tl ,
+ ref-width .initial:n = 1em ,
+
+ %% Defaults for \skelcite
+
+ cite-width .tl_set:N = \l_skel_cite_width_default_tl ,
+ cite-width .initial:n = .75em ,
+
+ cite-left .tl_set:N = \l_skel_cite_left_default_tl ,
+ cite-left .initial:n = [\kern1pt,
+
+ cite-right .tl_set:N = \l_skel_cite_right_default_tl ,
+ cite-right .initial:n = \kern1pt],
+
%% Defaults for \skelpar
par-lines .int_set:N = \l_skel_par_lines_default_int ,
@@ -277,6 +293,58 @@
}
+%% skelref %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\skel_defaults:nnn { skelref } { \l_skel_ref_width_tl } {
+
+ width .tl_set:N = \l_skel_ref_width_tl ,
+ width .initial:n = \l_skel_ref_width_default_tl ,
+
+}
+\NewDocumentCommand \skelref { +O{} +g } {
+
+ \group_begin:
+
+ \skel_args:nn { skelref } { #1 }
+
+ \IfValueT { #2 } { \skelnote { #2 } }
+
+ \skel_line:n { \l_skel_ref_width_tl }
+
+ \group_end:
+
+}
+
+%% skelcite %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\skel_defaults:nnn { skelcite } { \l_skel_cite_width_tl } {
+
+ width .tl_set:N = \l_skel_cite_width_tl ,
+ width .initial:n = \l_skel_cite_width_default_tl ,
+
+ left .tl_set:N = \l_skel_cite_left_tl ,
+ left .initial:n = \l_skel_cite_left_default_tl ,
+
+ right .tl_set:N = \l_skel_cite_right_tl ,
+ right .initial:n = \l_skel_cite_right_default_tl ,
+
+}
+\NewDocumentCommand \skelcite { +O{} +g } {
+
+ \group_begin:
+
+ \skel_args:nn { skelcite } { #1 }
+
+ \IfValueT { #2 } { \skelnote { #2 } }
+
+ \l_skel_cite_left_tl
+ \skel_line:n { \l_skel_cite_width_tl }
+ \l_skel_cite_right_tl
+
+ \group_end:
+
+}
+
%% skelpar %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\int_new:N \l_skel_par_lines_int
diff --git a/macros/latex/contrib/skeldoc/skeldoc.tex b/macros/latex/contrib/skeldoc/skeldoc.tex
index ec9ad5c435..196627486c 100644
--- a/macros/latex/contrib/skeldoc/skeldoc.tex
+++ b/macros/latex/contrib/skeldoc/skeldoc.tex
@@ -1,4 +1,4 @@
-% Copyright (c) 2020 Magnus Lie Hetland
+% Copyright (c) 2021 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
@@ -124,13 +124,22 @@ configuration keys, please consult the source file, \texttt{skeldoc.sty}.}
\skelnote{It is possible to add notes in arbitrary parts of a document with
the \cs{skelnote} command. This could also be used as a simple to-do or
-annotation mechanism.}
+annotation mechanism. Note that \cs{skelnote} is designed so you can place it
+before a paragraph or the like, and get the number positioned correctly. This
+means it gobbles up any space that follows it. To avoid this, simply follow it
+by an escaped space, for example, as in \texttt{\cs{skelnote}\braces{My
+note}\cs{\char32}}.}
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
-eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
-voluptua.
+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.
\skelpar[2]
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
-gubergren, no sea takimata sanctus est.
+gubergren, no sea takimata sanctus est~\skelcite{And here is a missing
+bibliographic reference, with \cs{skelcite}, whose implicit key is
+\texttt{width}. You can also control the left and right braces (or whatever text
+you wish to surround the citation with) using the \texttt{left} and
+\texttt{right} keys.}.
\skelpar
\skelitems{The \cs{skelenum} and \cs{skelitems} commands produce skeleton