LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0
Content-Type:
text/plain; charset="UTF-8"
Date:
Mon, 12 Nov 2018 08:06:06 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
Content-Transfer-Encoding:
quoted-printable
Message-ID:
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
From:
Kelly Smith <[log in to unmask]>
Parts/Attachments:
text/plain (98 lines)
Hello Everyone,

While working on my class, I’ve been thinking about the available tools and
where 2e is necessary vs. what can be replaced with L3 methods.

I know that there isn’t a consensus on how boxes should work, so things like
`\parbox` and friends should still be used (unless coffins happen to work
better for a given use case).

However, I think there’d be no harm in providing an L3 interface for dims and
skips. I know that the 2e kernel already provides tools for this, and so an L3
interface would have some redundancies. I think an `xskips` package would still
be useful because:

  1. it would provide more tools than 2e does; and
  2. it would harmonize with the other L3 design-level interfaces.

I know that the team is incredibly busy so I’d like to volunteer to write such
a package—if the team thinks this is a good idea. I would follow the style and
conventions of the existing xpackages and whatever criteria the team requires.

I have attached the raw .sty code which contains what I think are appropriate
tools for the designer level. Of course, this would become a proper .dtx file
with documentation and examples.

There are two things that I know the team is in the process of adding which I
think would make good additions to this package:

  1. user input validation for dims and skips (issue #380); and
  2. skip component extraction (issue #497).

I think there may be some uses for muskips but I’ve noticed that there isn’t a
kernel primitive equivalent to `\tex_mskip:D`, so perhaps the team had other
ideas for math spacing?

When you have time, please let me know what you think.

Warmly,
—Kelly


**Begin attachment, “xskips.sty”**

\RequirePackage{expl3}
\RequirePackage{xparse}
\ProvidesExplPackage{xskips}{2018-11-09}{}
  {L3 Experimental design level lengths and skips}


\NewDocumentCommand \NewLength { m }
  { \dim_zero_new:N #1 }

\NewDocumentCommand \NewConstantLength { m m }
  { \dim_const:Nn #1 { #2 } }

\NewDocumentCommand \SetLength { m m }
  { \dim_set:Nn #1 { #2 } }

\NewDocumentCommand \AddToLength { m m }
  { \dim_add:Nn #1 { #2 } }

\NewDocumentCommand \SubFromLength { m m }
  { \dim_sub:Nn #1 { #2 } }

\NewExpandableDocumentCommand \MaxLength { m m }
  { \dim_max:nn { #1 } { #2 } }

\NewExpandableDocumentCommand \MinLength { m m }
  { \dim_min:nn { #1 } { #2 } }

\NewExpandableDocumentCommand \LengthRatio { m m }
  { \dim_ratio:nn { #1 } { #2 } }


\NewDocumentCommand \NewSkip { m }
  { \skip_zero_new:N #1 }

\NewDocumentCommand \NewConstantSkip { m m }
  { \skip_const:Nn #1 { #2 } }

\NewDocumentCommand \SetSkip { m }
  { \skip_set:Nn #1 { #2 } }

\NewDocumentCommand \AddToSkip { m m }
  { \skip_add:Nn #1 { #2 } }

\NewDocumentCommand \SubFromSkip { m m }
  { \skip_sub:Nn #1 { #2 } }


\NewDocumentCommand \HorizontalSpace { m }
  { \skip_horizontal:n { #1 } }

\NewDocumentCommand \VerticalSpace { m }
  { \skip_vertical:n { #1 } }

**End attachment.**

ATOM RSS1 RSS2