Menu

#306 Big bug with \pgfkeysedef (expanded definition)

v1.0 (example)
closed-fixed
pgfkeys bug (1)
9
2018-12-24
2014-04-06
mirandole
No

Example :
% ------------------------------------------
\documentclass {minimal}
\usepackage [utf8]{inputenc}
\usepackage {etex}
\usepackage {pgfkeys}

\loggingall

\pgfkeysedef {/cle}{\noexpand \macro }
\pgfkeys {/cle/.append code=\MACRO }

\expandafter \show \csname pgfk@/cle/.@cmd\endcsname

% \pgfk@/cle/.@cmd is "\noexpand \macro \MACRO "

confer pgfkeys.code.tex line 608 :
\long\def\pgfkeysedef#1#2{%
\long\edef\pgfkeys@temp##1\pgfeov{#2}%
\pgfkeyslet{#1/.@cmd}{\pgfkeys@temp}%
\pgfkeyssetvalue{#1/.@body}{#2}%
}

/.@body is NOT expanded in the definition !!

Discussion

  • Paul Gaborit

    Paul Gaborit - 2017-01-05

    Here is my proposed patch on pgfkeys.code.tex (from v3.0.1a).

    I add the \pgfkeyssetevalue macro and modify the \pgfkeysedef and \pgfkeysedefargs macros to use it.

    PS: you may thank wipet on stackexchange that finds the way to define \pgfkeyssetevalue (http://tex.stackexchange.com/q/346779/14500).

     
  • Paul Gaborit

    Paul Gaborit - 2017-01-08

    Here is a better patch.

    PS: with a test document.

     

    Last edit: Paul Gaborit 2017-01-08
  • Paul Gaborit

    Paul Gaborit - 2017-01-09

    Here is my last proposition for pgfkeys.code.tex. I provide the entire file.

     
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-24
    • status: open --> closed-fixed
     
  • Stefan Pinnow

    Stefan Pinnow - 2018-12-24

    Thank you for reporting and providing the patch. It is included now.

     
MongoDB Logo MongoDB