unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* AW: Question about Latex Style files
@ 2023-11-06 16:47 Alois Steindl
  2023-11-07  8:40 ` Heime
  0 siblings, 1 reply; 3+ messages in thread
From: Alois Steindl @ 2023-11-06 16:47 UTC (permalink / raw)
  To: Heime, Heime via Users list for the GNU Emacs text editor

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: HeimeDatum: Mo., 6. Nov. 2023 17:15An: Heime via Users list for the GNU Emacs text editor;Cc: Betreff:Question about Latex Style filesIs there any place where I can ask a question about Latex Style files ?




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AW: Question about Latex Style files
  2023-11-06 16:47 AW: Question about Latex Style files Alois Steindl
@ 2023-11-07  8:40 ` Heime
  2023-11-17 19:23   ` Heime
  0 siblings, 1 reply; 3+ messages in thread
From: Heime @ 2023-11-07  8:40 UTC (permalink / raw)
  To: Alois Steindl; +Cc: Heime via Users list for the GNU Emacs text editor

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 ?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AW: Question about Latex Style files
  2023-11-07  8:40 ` Heime
@ 2023-11-17 19:23   ` Heime
  0 siblings, 0 replies; 3+ messages in thread
From: Heime @ 2023-11-17 19:23 UTC (permalink / raw)
  To: Heime; +Cc: Alois Steindl, Heime via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

On Tuesday, November 7th, 2023 at 8:40 PM, Heime <heimeborgia@protonmail.com> wrote:


> 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

I want to see how I can handle package options using expl3, but have not found useful
information about how to do it.  The Latex Team provide help in Tex Stack Exchange, 
an amazingly terrible place to ask for help. 
 
> > ------ 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 ?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-11-17 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 16:47 AW: Question about Latex Style files Alois Steindl
2023-11-07  8:40 ` Heime
2023-11-17 19:23   ` Heime

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).