From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 1E9E82B2F7 for ; Thu, 13 Jun 2024 16:34:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id D917B484797 for ; Thu, 13 Jun 2024 16:33:28 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZzHc_d3UwBhm for ; Thu, 13 Jun 2024 16:33:28 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 0A8B44845FE for ; Thu, 13 Jun 2024 16:32:33 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 8D78B4845A7 for ; Thu, 13 Jun 2024 16:32:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id go6TCvdF-R_1 for ; Thu, 13 Jun 2024 16:32:00 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.49; helo=mail-ed1-f49.google.com; envelope-from=wolfgang.schuster.lists@gmail.com; receiver= Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 2B0A04845A5 for ; Thu, 13 Jun 2024 16:32:00 +0200 (CEST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-57c681dd692so1084718a12.3 for ; Thu, 13 Jun 2024 07:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718289120; x=1718893920; darn=ntg.nl; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=d/WT6zhWwHjG8mhCzPLY51K6eSBk7OG34eg3S45Ch/4=; b=KGwdCVjyHSKJiRP9z4HIfRx5qPEfRjfHhOuGGert5+U2U2mMM+IziycHg4zcCaMmW0 DiHL8UnS+/OCwYlUj/bwdgsV5mq0FTA4jxcFG16AdflZHAvxQXcW/6XzL+q+rywZtHQk tZDkRMROP7vJj2lg4cQbZc/2QUDRMBn9GprpqAfZij8TA3aiS4m3p2dBsOiSaJsbkMrg BnAvxLkZKVCH6k6ofxCRb3uU+1YKd4QQps9vZzO9XwRMnYDLpmN5yZgGr0LWHQ9M/MIn /eVnnCRreVsYCPQ6qqvVQajCTBJZg0cSY/eGJ9T/u7blaE/8W/OLVQ/eX0aA4Nv9jZVM hexw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718289120; x=1718893920; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=d/WT6zhWwHjG8mhCzPLY51K6eSBk7OG34eg3S45Ch/4=; b=gNKg/QAAIbXwura8n/2LLrwXs1nLYr5qNsgXWsWf/jxnzHi0izbNBLuGXeoGpLhIH2 791kB4oAajkBuSTQ3xBwNLiC08RXWocwggjFd4yQOOiH+ItY6lJK8sbxa/BgLQGY3CpN SDMfKrvIyBP0pBgfhZPrMihe0GepD3fu0oI95UbHp6OYs4g/BSip9Dg3rrjutNETVdco D7QOsTKwCqqeZmiXAOlsYjns65Bp9ZXCa7LmNw9O4YRXTtQI4+PQ6fZItLgAT9mvuG+h PL6b0ZW9ugbHYfGK1IP9DAZZAwEpN2B5/HqSVvsueo2Xmst/53WKcjnUceu3gF5s91uh 98AA== X-Gm-Message-State: AOJu0YwJjRpRvIjR/qn+kTkI6w6Hjjhr8Ave5s9nV+ZAcHisadLMsHYv cPqzlKkNuvClru0gQBKKMMgfAmCXWy1xCExoLZlCoOJDHcR837ju X-Google-Smtp-Source: AGHT+IGt2kH5A6gpuMZNz8PQZBTiODWNAM5MC9ncj7dmUFOKPpEcHqSwJc/CsKM5nFACQINpRqmXHA== X-Received: by 2002:a50:c34c:0:b0:578:f472:d9d5 with SMTP id 4fb4d7f45d1cf-57caaacd879mr2921801a12.37.1718289119523; Thu, 13 Jun 2024 07:31:59 -0700 (PDT) Received: from ?IPv6:2a02:810d:a8bf:dc10::7141? ([2a02:810d:a8bf:dc10::7141]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb743894fsm971508a12.84.2024.06.13.07.31.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2024 07:31:59 -0700 (PDT) To: mailing list for ConTeXt users , Gerion Entrup References: <2294793.g5d078U9FE@falbala> From: Wolfgang Schuster Message-ID: <43f73bb9-95fe-c44a-2b0d-228ece13c612@gmail.com> Date: Thu, 13 Jun 2024 16:31:58 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 PostboxApp/7.0.60 MIME-Version: 1.0 In-Reply-To: <2294793.g5d078U9FE@falbala> Content-Language: en-US Message-ID-Hash: JWFIYF4JIXIRKJZ2Y3DNFADCN4YYSG4R X-Message-ID-Hash: JWFIYF4JIXIRKJZ2Y3DNFADCN4YYSG4R X-MailFrom: wolfgang.schuster.lists@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: Prefix the text in an enumeration. List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit Gerion Entrup schrieb am 13.06.2024 um 13:41: > Hi, > > is there a way to automatically prefix the text body in an enumeration? > > Consider this example: > ``` > \defineenumeration[question][ > alternative=top, > text=Question, > title=yes, > titleleft=, > titleright=, > right={:}, > headstyle=bold, > ] > > \starttext > > Some text: > > \startquestion[title={How long does a loop last?}] > \bold{Answer:} For a while. > \stopquestion > > \stoptext > ``` > > I'd like to have the `\bold{Answer:}` automatically. So for example something like this: > ``` > \defineenumeration[question][ > alternative=top, > text=Question, > title=yes, > titleleft=, > titleright=, > right={:}, > headstyle=bold, > prefix={\bold{Answer:}}, > ] > > \starttext > > Some text: > > \startquestion[title={How long does a loop last?}] > For a while. > \stopquestion > > \stoptext > ``` > > I tried to misuse `inbetween` for that but `alternative=top` seems to make a (not modifiable space) between the heading and the text body. Use the \setupparagraphintro command to set the text which should appear at the start of the question. %%%% begin example \startsetups[question:intro] \setupparagraphintro[first][\bold{Answer:} ] \blank \stopsetups \defineenumeration[question][ alternative=top, text=Question, title=yes, titleleft=, titleright=, right={:}, headstyle=bold, inbetween=\setup{question:intro}, ] \starttext Some text: \startquestion[title={How long does a loop last?}] For a while. \stopquestion \stoptext %%%% end example Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________