ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: \documentvariable (used in environment)
Date: Sat, 25 Jul 2020 10:40:57 +0200	[thread overview]
Message-ID: <BEF664F8-2F0C-4BB4-BF7D-C9E76102DCFD@fiee.net> (raw)
In-Reply-To: <8f87f348-65c4-0cc7-f9f7-e447cfffc8db@gmail.com>


> Am 25.07.2020 um 10:20 schrieb Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>:
> 
> Alan Braslau schrieb am 25.07.2020 um 00:21:
>> On 22/07/20 22:36, Wolfgang Schuster wrote:
>>> What exactly doesn't work and do you get the same problems when you set the values in the following minimal example (everything has to be in the same file).
>>> 
>>> %%%% begin example
>>> \setupdocument
>>>    [metadata:title={\documentvariable{title}},
>>>     metadata:subtitle={\documentvariable{subtitle}},
>>>     metadata:author={\documentvariable{author}},
>>>     metadata:keywords={\documentvariable{keywords}}]
>>> 
>>> \startdocument [title={My title}]
>>> \input knuth
>>> \stopdocument
>>> %%%% end example
>>> 
>>> Wolfgang
>> 
>> Thank you, Wolfgang.
>> 
>> The above example does work. It fails to set the metadata if one moves the \setupdocument to an environment file. As you write, "everything has to be in the same file".
> The requirement was only necessary for the example to check if the metadata end up in the PDF file. You could have a environment file for \setupdocument but the goal here was to check the resulting metadata in the PDF.
>> This is my question, how to set these using an environment file, thus NOT the same file as the \startdocument in a project structure.
> The problem is something in your environment/style file which causes a problem with the \setupdocument setup. What you should do to find the sulprit is:
> 
> 1. Make a copy of your document
> 2. Remove all text between \startdocument and \stopdocument and add some dummy text (like in my example) to ensure ConTeXt produces a PDF
> 3. Remove setups from your environment (but keep the \setupdocument setup) file until the metadata appears in the PDF

A typical case if something in an environment doesn’t work, but in a single file: Are there modes involved? Maybe your \setupdocument is within a \startmode ... \stopmode that doesn’t get activated.

Best, Hraban

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-07-25  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22 22:21 Alan Braslau
2020-07-23  4:36 ` Wolfgang Schuster
2020-07-24 22:21   ` Alan Braslau
2020-07-25  8:20     ` Wolfgang Schuster
2020-07-25  8:40       ` Henning Hraban Ramm [this message]
2020-07-25 14:37         ` Alan Braslau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BEF664F8-2F0C-4BB4-BF7D-C9E76102DCFD@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).