From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aHkiH7pww2FVBwAAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 19:38:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oLr9Grpww2EtWAAA1q6Kng (envelope-from ) for ; Wed, 22 Dec 2021 18:38:50 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 17AC15F75 for ; Wed, 22 Dec 2021 19:38:50 +0100 (CET) Received: from localhost ([::1]:35042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n06Vl-0001vW-5W for larch@yhetil.org; Wed, 22 Dec 2021 13:38:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n06Uj-0001vK-7K for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 13:37:45 -0500 Received: from [2607:f8b0:4864:20::102b] (port=43855 helo=mail-pj1-x102b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n06Uh-0005Sq-DT for emacs-orgmode@gnu.org; Wed, 22 Dec 2021 13:37:44 -0500 Received: by mail-pj1-x102b.google.com with SMTP id a11-20020a17090a854b00b001b11aae38d6so3417121pjw.2 for ; Wed, 22 Dec 2021 10:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=xPcwCceVEda3O8httd8SWm4hwSbEY30bhLfym5VVqGA=; b=AFHzOx45je3Jeu4qsKdTLuBNBWmmKFmrh+rDUe9r2qlYxS8e9NOIRiiHcGuK0u4Zfw jLtnfwDJBDONQsfMZ69X9IJVR6+7RERMpOb6pZXqM/TKaQSxqr/wLd3JR2CT7SVQ3H1j tgayco0EpreY3QNMu0exU/oBz3QrTqvk0PCrtHqHdm6sv75uVFIlCxWNUgT5MM+UkJCN 1I/AU8icB6g8fcjcu07lo5UOSguD842OEn8tpOzyKUu0JFaZAvihFY8eb/IpOUi6jGZX zu+VM6SIU6cGHaFJHsIlQhEdLQkfHVn5qdU3UEBZOSaT6aYZ7pHrRiVdcQISaOD88/dC SWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xPcwCceVEda3O8httd8SWm4hwSbEY30bhLfym5VVqGA=; b=hgptUwlBOrsX0iqO0Amh6sJuNlynlKyfDEpiRppxrCjoQHp7S9PvJXx5evuLsQNs8M lnP+V7W4X5d/cU3pGrYd2cddThe7X37Wi8YCIMVlBJm/Nkm1+lC7eArhhtgeN7NOhlS+ HowFFh13NfFpaBg5cMj9yvfnSioeSY/RqcgfLe/N8P6sHjdNpCNlsy/4wOsUl7Av4iYa E8m+92JTHa08TUNu3S0NSv6s3Te3wlBlOJ4wLMY4DMIWtqqwvPQi+mfTtEBH9DJ1K++5 pgqqGqhn7YIZjmPcROcZEWrI7QBeHRzMf/B+kDH6zMeVNT2E3Eb2P42s8ewdPUf8HG5v k67Q== X-Gm-Message-State: AOAM533d7XZsdU4KLSaV8hgm97EQEz5CrRcCUmJExEpRZdpmiEWkEiuQ NHf/B9VyHH5FCTjVcnjQbgAtQHkCcD0= X-Google-Smtp-Source: ABdhPJyoDDocVJajSx+itfg6MvOD+tosd97hef5DGa3FETIHU0LdRsAGTe2xmD7Q3fGcEb1nlHuECA== X-Received: by 2002:a17:90a:fe93:: with SMTP id co19mr2715201pjb.17.1640198260999; Wed, 22 Dec 2021 10:37:40 -0800 (PST) Received: from [192.168.1.124] (c-71-59-145-34.hsd1.or.comcast.net. [71.59.145.34]) by smtp.gmail.com with ESMTPSA id s25sm3316686pfg.208.2021.12.22.10.37.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Dec 2021 10:37:40 -0800 (PST) Subject: Re: Configuring ox-context To: juh , emacs-orgmode@gnu.org References: <8cde8270-704d-d515-dca4-0a65d910f9cd@gmail.com> <80b1375a-bb79-c401-3f23-e662f2035795@mailbox.org> <08bc53958783811414afe8588cb25cc373c71589.camel@mailbox.org> <735dec68-d319-172c-32ad-49804a8569bb@gmail.com> <55f6016624f755bed17a0895c1b49799ef2d62b7.camel@mailbox.org> From: Jason Ross Message-ID: <10f190b3-ec80-3305-6ec7-506bc596244d@gmail.com> Date: Wed, 22 Dec 2021 10:37:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <55f6016624f755bed17a0895c1b49799ef2d62b7.camel@mailbox.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::102b (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=jasonross1024@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.694, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640198330; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=xPcwCceVEda3O8httd8SWm4hwSbEY30bhLfym5VVqGA=; b=qv+ZYEJBr+HMiDEwP8ke50hmnoV3L6rVLpIxzilpO0Yd2zD1zkmSV653/KI43yaUtXJ1Qf WuMK71X2jQi16ZgAW2CAvXeCZVh73bmyJDpLMNiVH2eLUZQVnvNLCmdG81vYABJChIdT/3 VPccPZSkJR+/eolIDfAbFBI133cQx9nB+niCtR1i9KYnOPyaIF0T0oYuci4wINem3oRydQ n0QrZaaH5eJnmZAy/rCZy/tRTCMCcjzxyAB07HCnHIhNlUi7x1wIJCr2/qbg9hxWhJ2kIL fOjnzFoW/QMHNPwAht/o+Nyx6cIv14pWW11/blT9KgcuDFSotLGmaAKRPUIrKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640198330; a=rsa-sha256; cv=none; b=aGPmKjVeGhJdzeTTk/Areq1YhzBUifBG/xQgUuVSBDGV2At3aNx33rZgzBuQnZoU/lGubc Hs7LNdYWvR/PHyeA1bG8q/1ETqHue/vVcIBYzfMgCrejjWL3NlIO64LokYzg/Qx/nWaf0o 1qiUvKSkNo4h1zlyU1yK5nRfqdW1pWg2R45AAYvOypgJm9/3zbBvSA5fqx7BLUB4oeEe1g FBLgEDh0bBkMlTl2Ap9uf1AQ9XHgyAcPmaKfMa21mN208VOSDPCt0XQaiKAuZyTYdE75kC 9FNEMy9zrlxZro0hjVjVNM3sis7du6FF+XBbWXQbgL3ObMBEQfBM+I6dAHe9gw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AFHzOx45; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=AFHzOx45; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 17AC15F75 X-Spam-Score: -4.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: kw6mfoMaME6b On 12/22/21 3:24 AM, juh wrote: > In the meantime I debugged my context styles and discovered that ox- > context starts with section not with chapters. My styles are always > book styles starting at chapter level. *feeling a little dumb* > > I browsed through the code and found no hint for a book-like preset or > a switch to start at chapter level. I made a feature request about > this. Thank you for bringing this up. I'd like to discuss this a bit with you before implementing such a feature. I'm not sure how an implementation of this would look to the end user. ConTeXt has the following system: https://wiki.contextgarden.net/Command/_section \part highest level of sectioning \chapter level 2 \section level 3 \subsection level 4 \subsubsection level 5 \subsubsubsection level 6 \subsubsubsubsection level 7 \title level 2, unnumbered \subject level 3, unnumbered \subsubject level 4, unnumbered \subsubsubject level 5, unnumbered \subsubsubsubject level 6, unnumbered \subsubsubsubsubject level 7, unnumbered So there are a couple of questions that need to be answered: 1. There's no "level 1, unnumbered" sectioning command in ConTeXt. How should this be handled? 2. How does the user specify which sectioning scheme to use? Question (1) implies that the user may need to choose their highest level to be either a part or a chapter in order to have unnumbered level 1 sections. Things start to get complicated if we do that. To avoid these questions, I went with the simplest implementation possible and just concatenated "sub"*n with either "section" or "subject" to create a sectioning command of depth n. My understanding is that the sectioning commands are flexible enough that any desired result in the output pdf can be produced by modifying the sectioning commands in the preamble. However, if you are using existing environments that rely on those specific names you are out of luck. For your purposes, if you need a fix _right now_, consider overriding the definition of `org-context--get-headline-command` to something like this: #+begin_src elisp (defun org-context--get-headline-command (headline info) "Create a headline name with the correct depth. HEADLINE is the headline object. INFO is a plist containing contextual information." (let* ((level (org-export-get-relative-level headline info)) (numberedp (org-export-numbered-headline-p headline info)) (hname (cond ((and (= 1 level) numberedp) "chapter") ((= 1 level) "title") (t (let ((prefix (apply 'concat (make-list (+ level (- 2)) "sub"))) (suffix (if numberedp "section" "subject"))) (concat prefix suffix))))) (notoc (org-export-excluded-from-toc-p headline info))) (if notoc (format "%sNoToc" hname) hname))) #+end_src > One more thing. > > #+begin_quote > > results in the verbatim line > > OrgBlockQuoteEnu­mEmpty 1 > > in the pdf and a very indented quote block. > > In html export I get an normal indented blockquote. This is fixed on the "develop" branch as of today. I missed a comma... Thanks, Jason