Search found 4 matches

by Borgia
Fri Jun 27, 2025 10:53 pm
Forum: Text Formatting
Topic: Using l3keys module for a command
Replies: 0
Views: 3508

Using l3keys module for a command

I'd like to understand how to use the l3keys module.

After defining a set of keys with

\keys_define:nn { mykeys } { ... }

how do I write a command that applies these keys?

For example, I have the following command:

\NewDocumentCommand {\bh} { o }
{
\tl_if_single:nF {#1}
{ \keys_set:nn ...
by Borgia
Mon Nov 06, 2023 2:01 pm
Forum: Document Classes
Topic: Using default values from keys
Replies: 0
Views: 33948

Using default values from keys

In this code, the third level picks up the colour value from level two. But I want the third level to take the default red colour value.

How can I apply a default set of keys at the start of each environment ?

\documentclass[a4paper,10pt]{article}
\usepackage{xcolor}
\usepackage{enumitem ...
by Borgia
Mon Nov 06, 2023 9:54 am
Forum: Document Classes
Topic: Setting initial counter for environment
Replies: 0
Views: 24757

Setting initial counter for environment

How can I have the ability for the user to use an initial item counter, rather than always starting from 1 ?

Thus having the list

<21>1.
<22>1.
<22>2.
<23>1.
<23>2.
<23>3.

\documentclass[a4paper,10pt]{article}

\usepackage{enumitem}

\ExplSyntaxOn

\makeatletter
\setlistdepth{13 ...
by Borgia
Sun Nov 05, 2023 10:55 pm
Forum: Document Classes
Topic: setlistdepth for enumitem
Replies: 0
Views: 23965

setlistdepth for enumitem

Does one really require setting the enumeration list depth (e.g. setlistdepth to `8`) for
`enumitem` to use depth levels ?

\documentclass[a4paper,10pt]{article}
\usepackage{xcolor}
\usepackage{enumitem}

\ExplSyntaxOn

\setlistdepth{8}
\newlist{myenum}{enumerate}{8}
\makeatletter
\setlist[myenum ...