LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Ulrike Fischer <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 2 Jul 2015 15:43:38 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
I had problems with some keys because I hadn't really paid attention
to the order of the declaration. Some tests revealed then that some
key properties (e.g. .code:n) overwrite other (e.g. .groups:n and
.default:n). I don't know if it is a bug but imho at least it should
be mentioned in the documentation.

\documentclass[parskip]{scrartcl}

\usepackage{expl3}
\begin{document}
\ExplSyntaxOn

\keys_define:nn{test}
 {
  key .code:n    = {show~key~(#1)~},
  key .groups:n  = {show},
  key .default:n = {XX},  
  %different order:
  keyb .groups:n  = {show},
  keyb .default:n = {XX},
  keyb .code:n    = {show~keyb~(#1)},  
 }

Key:~\keys_set:nn{test}{key,keyb}~\\
Group:~\keys_set_groups:nnn {test} {show} {key=A,keyb=A}

% a change of the .code:n property
\par    
\keys_define:nn{test}
 {
  key .code:n    = {show~key~(#1)},
 }

Key:~\keys_set:nn{test}{key}~\\
Group:~\keys_set_groups:nnn {test} {show} {key=B}
\ExplSyntaxOff

\end{document}



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

ATOM RSS1 RSS2