Hello,

values of number and title of the current (sub...)section can be received by 
\structurenumber and \structuretitle commands.

Is there a way how to get these values by Lua?

Suppose:

----
\starttext
  \section{Sec 1}
  % Now "\structurenumber" yields "1" and "\structuretitle" gives "Sec 1"

  % How to get "1" and "Sec 1" from Lua?

  \startluacode
    print(0, context["structuretitle"])
    print(1, context["structuretitle"]())
    print(2, context.getvalue("structuretitle"))
    print(3, context.constants("structuretitle"))
    print(4, context.variables("structuretitle"))
  \stopluacode
\stoptext
----

My attempts don't give any useful value (or some of them are even erroneous).

I have no idea how to get the texts "1" and "Sec 1".

Any hints would be appreciated...

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.      [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to