Hans, sorry for insisting in this issue. I may be missing consecuences or requirements that make impossible its implementation. I see two inconsistencies in the following output: \def\BookTitle{{\itd A \ConTeXt\ Book}} \def\BookAuthor{{\sc The Author}} \setupinteraction[state=start, title=\BookTitle, author=\BookAuthor] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter,section,subsection] \starttext \chapter{\BookTitle} \section{\BookAuthor} \subsection{\ConTeXt\ is \TeX, but not \LaTeX} \stoptext Would it be possible that PDF info fields can have their contents prerolled as it happens with bookmarks? In the bookmarks, \ConTeXt\ is rendered as ConTEXT. Since “The TeXbook” only mentions \TeX and no \TEX, would it be possible to preroll \TeX, \ConTeXt and \LaTeX as TeX, ConTeXt and LaTeX? Many thanks for your help, Pablo -- http://www.ousia.tk
Try,
\setupdocument
[metadata:title={\documentvariable{title}},
metadata:subtitle={\documentvariable{subtitle}},
metadata:author={\documentvariable{author}},
metadata:address={\documentvariable{address}},
metadata:doi={doi:\documentvariable{doi}},
metadata:keywords={\documentvariable{keywords}}]
\startdocument
[title={Your title},
subtitle={your subtitle},
author={your name},
address={your address},
keywords={your keywords},
abstract={The abstract goes here.\par
The Abstract and the keywords have to fit in this page.},
year={2016},
doi={XXXX}]
...
\stopdocument
On Sun, 17 Jul 2016 21:29:38 +0200
Pablo Rodriguez
Hans,
sorry for insisting in this issue. I may be missing consecuences or requirements that make impossible its implementation.
I see two inconsistencies in the following output:
\def\BookTitle{{\itd A \ConTeXt\ Book}} \def\BookAuthor{{\sc The Author}} \setupinteraction[state=start, title=\BookTitle, author=\BookAuthor] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter,section,subsection]
\starttext \chapter{\BookTitle}
\section{\BookAuthor}
\subsection{\ConTeXt\ is \TeX, but not \LaTeX} \stoptext
Would it be possible that PDF info fields can have their contents prerolled as it happens with bookmarks?
In the bookmarks, \ConTeXt\ is rendered as ConTEXT. Since “The TeXbook” only mentions \TeX and no \TEX, would it be possible to preroll \TeX, \ConTeXt and \LaTeX as TeX, ConTeXt and LaTeX?
Many thanks for your help,
Pablo
-- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS UMR 3680 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.braslau@cea.fr
On 07/17/2016 09:54 PM, Alan BRASLAU wrote:
Try,
\setupdocument [metadata:title={\documentvariable{title}}, metadata:subtitle={\documentvariable{subtitle}}, metadata:author={\documentvariable{author}}, metadata:address={\documentvariable{address}}, metadata:doi={doi:\documentvariable{doi}}, metadata:keywords={\documentvariable{keywords}}]
\startdocument [title={Your title}, subtitle={your subtitle}, author={your name}, address={your address}, keywords={your keywords}, abstract={The abstract goes here.\par The Abstract and the keywords have to fit in this page.}, year={2016}, doi={XXXX}]
...
\stopdocument
Hi Alan, sorry, but this is only a another way of reaching the same result: \setupinteraction[state=start] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter,section,subsection] \setupdocument [metadata:title={\documentvariable{title}}] \startdocument [title={\em Your title}] \documentvariable{title} \section{\documentvariable{title}} \stopdocument I need the expansion (prerolling, or whichever the name is), because the real source is a more complex XML source and I need only the text, no commands. Many thanks for your help, Pablo -- http://www.ousia.tk
On 7/17/2016 9:29 PM, Pablo Rodriguez wrote:
Hans,
sorry for insisting in this issue. I may be missing consecuences or requirements that make impossible its implementation.
I see two inconsistencies in the following output:
\def\BookTitle{{\itd A \ConTeXt\ Book}} \def\BookAuthor{{\sc The Author}} \setupinteraction[state=start, title=\BookTitle, author=\BookAuthor] \enabledirectives[references.bookmarks.preroll] \placebookmarks[chapter,section,subsection]
\starttext \chapter{\BookTitle}
\section{\BookAuthor}
\subsection{\ConTeXt\ is \TeX, but not \LaTeX} \stoptext
Would it be possible that PDF info fields can have their contents prerolled as it happens with bookmarks?
personally i'd never set those fields from macros but directly anyway, I'll add \enabledirectives[interaction.identity.preroll] as yet another example of feature creep
In the bookmarks, \ConTeXt\ is rendered as ConTEXT. Since “The TeXbook” only mentions \TeX and no \TEX, would it be possible to preroll \TeX, \ConTeXt and \LaTeX as TeX, ConTeXt and LaTeX?
well, it mentions \TeX but that renders as TEX so changing the definitions is a bad idea; and you don't want the \ in your case anyway you can of course do \appendtoks\def\TEX{TeX}\to\everypreroll Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
On 07/17/2016 11:42 PM, Hans Hagen wrote:
On 7/17/2016 9:29 PM, Pablo Rodriguez wrote:
[...] Would it be possible that PDF info fields can have their contents prerolled as it happens with bookmarks?
personally i'd never set those fields from macros but directly
anyway, I'll add
\enabledirectives[interaction.identity.preroll]
as yet another example of feature creep
Many thanks for the implementation, Hans.
In the bookmarks, \ConTeXt\ is rendered as ConTEXT. Since “The TeXbook” only mentions \TeX and no \TEX, would it be possible to preroll \TeX, \ConTeXt and \LaTeX as TeX, ConTeXt and LaTeX?
well, it mentions \TeX but that renders as TEX so changing the definitions is a bad idea; and you don't want the \ in your case anyway
you can of course do
\appendtoks\def\TEX{TeX}\to\everypreroll
This is exactly what I needed. Many thanks for your help, Pablo -- http://www.ousia.tk
participants (3)
-
Alan BRASLAU
-
Hans Hagen
-
Pablo Rodriguez