diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi index 0e00fb456b4..93dde6962db 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/scrn-ini.mkvi @@ -177,15 +177,52 @@ %D Identity +% \def\scrn_identity_synchronize +% {\clf_setupidentity +% title {\interactionparameter\c!title}% +% subtitle {\interactionparameter\c!subtitle}% +% author {\interactionparameter\c!author}% +% % creator {ConTeXt - \contextversion}% +% date {\interactionparameter\c!date}% +% keywords {\interactionparameter\c!keyword}% +% \relax} + +\newconditional\c_scrn_identity_preroll + +\installtexdirective + {interaction.identity.preroll} + {\settrue \c_scrn_identity_preroll} + {\setfalse\c_scrn_identity_preroll} + +\def\scrn_identity_prerolled#1% + {\begingroup + \edef\tempstring{\interactionparameter#1}% + \ifx\tempstring\empty + \endgroup + \else + \the\everypreroll + \nodestostring\tempstring{\tempstring}% + \normalexpanded{\endgroup\setexpandedinteractionparameter{#1}{\tempstring}}% + \fi} + \def\scrn_identity_synchronize - {\clf_setupidentity + {\begingroup + \ifconditional\c_scrn_identity_preroll + \scrn_identity_prerolled\c!title + \scrn_identity_prerolled\c!subtitle + \scrn_identity_prerolled\c!author + \scrn_identity_prerolled\c!date + \scrn_identity_prerolled\c!keyword + \fi + \clf_setupidentity title {\interactionparameter\c!title}% subtitle {\interactionparameter\c!subtitle}% author {\interactionparameter\c!author}% - creator {ConTeXt - \contextversion}% + % creator {ConTeXt - \contextversion}% date {\interactionparameter\c!date}% keywords {\interactionparameter\c!keyword}% - \relax} + \relax + \endgroup} \appendtoks \scrn_identity_synchronize @@ -193,11 +230,18 @@ % this comes before starttext +\def\scrn_identity_document#1#2% + {\doifvariable{document}{metadata:#1}{\setupinteraction[#2=\documentvariable{metadata:#1}]}} + \appendtoks % not interfaced i.e. english - \doifvariable{document}{metadata:author} {\setupinteraction [\c!author=\documentvariable{metadata:author}]}% - \doifvariable{document}{metadata:title} {\setupinteraction [\c!title=\documentvariable{metadata:title}]}% - \doifvariable{document}{metadata:subject} {\setupinteraction[\c!subject=\documentvariable{metadata:subject}]}% - \doifvariable{document}{metadata:keywords}{\setupinteraction[\c!keyword=\documentvariable{metadata:keywords}]}% + \scrn_identity_document {title}\c!title + \scrn_identity_document {subject}\c!subtitle + \scrn_identity_document{subtitle}\c!subtitle + \scrn_identity_document {author}\c!author + \scrn_identity_document {authors}\c!author + \scrn_identity_document {keyword}\c!keyword + \scrn_identity_document{keywords}\c!keyword + \scrn_identity_document {date}\c!date \to \everysetupdocument \setupinteraction |