From: Heime <heimeborgia@protonmail.com>
To: Alois Steindl <Alois.Steindl@tuwien.ac.at>
Cc: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Re: AW: Question about Latex Style files
Date: Tue, 07 Nov 2023 08:40:04 +0000 [thread overview]
Message-ID: <oZcdgM-DKNWzJ9qcYdyecF7te9Xuwu6ZmtcF3kLv1ZuGPqpJ4viUzMXUEfRy2q_LYfvcK9b48Uhq-S2-VZewVMhR74ZTqwmLndtH-IuY3EE=@protonmail.com> (raw)
In-Reply-To: <er7bd94q75ku8otgnmdnnnqu.1699289027329@email.lge.com>
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 does one apply a default set of keys at the start of each environment
exactly ? Shouldn't \keys_set:nn {tlapis_keys} {#1} do that ?
\documentclass[a4paper,10pt]{article}
\usepackage{xcolor}
\usepackage{enumitem}
\ExplSyntaxOn
\makeatletter
\setlistdepth{13}
\newlist{wvTlaps}{enumerate}{13}
\setlist[wvTlaps]
{
label=$\langle$\the\enit@depth$\rangle$\arabic*.,
left=0pt, parsep=0pt, itemindent=8pt,
}
\makeatother
\tl_new:N \l_tlapis_kl_tl
\tl_new:N \l_tlapis_lv_tl
\keys_define:nn { tlapis_keys }
%% Define Key-Value Interface within namespace tlapis_keys.
{
kl .tl_set:N = \l_tlapis_kl_tl,
kl .default:n = {red},
kl .initial:n = {red},
lv .tl_set:N = \l_tlapis_lv_tl,
lv .default:n = {},
lv .initial:n = {},
}
\NewDocumentEnvironment {wvTlapis} { O{} }
{
\keys_set:nn {tlapis_keys} {#1}
\tl_if_empty:NTF {\l_tlapis_lv_tl}
{
\begin{wvTlaps}[format=\color{\l_tlapis_kl_tl}]
}
{
\begin{wvTlaps}
[format=\color{\l_tlapis_kl_tl},
label=$\langle$\l_tlapis_lv_tl$\rangle$\arabic*.]
}
}
{ \end{wvTlaps} }
\ExplSyntaxOff
\begin{document}
\begin{wvTlapis}
\item First level
\begin{wvTlapis}[kl=green]
\item Second level
\begin{wvTlapis}
\item Third level
\end{wvTlapis}
\end{wvTlapis}
\end{wvTlapis}
\end{document}
------- Original Message -------
On Tuesday, November 7th, 2023 at 4:47 AM, Alois Steindl <Alois.Steindl@tuwien.ac.at> wrote:
> Hello,
> on https://tug.org/begin.html you could find a lot of useful links.
> Further I would recommend the LaTeX Companion, which should answer quite all possible questions.
> Good luck
> Alois
>
> ------ Originalnachricht------
> Von: Heime
> Datum: Mo., 6. Nov. 2023 17:15
> An: Heime via Users list for the GNU Emacs text editor;
> Cc:
> Betreff:Question about Latex Style files
>
>
> Is there any place where I can ask a question about
> Latex Style files ?
next prev parent reply other threads:[~2023-11-07 8:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 16:47 AW: Question about Latex Style files Alois Steindl
2023-11-07 8:40 ` Heime [this message]
2023-11-17 19:23 ` Heime
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='oZcdgM-DKNWzJ9qcYdyecF7te9Xuwu6ZmtcF3kLv1ZuGPqpJ4viUzMXUEfRy2q_LYfvcK9b48Uhq-S2-VZewVMhR74ZTqwmLndtH-IuY3EE=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=Alois.Steindl@tuwien.ac.at \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).