From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25764 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anton Shepelev Newsgroups: gmane.text.pandoc Subject: Verbatim text in headers Date: Wed, 5 Aug 2020 17:00:53 +0300 Message-ID: <20200805170053.048fb8de00100ff64b866bd6@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36564"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCDNP2MAQEGBBHHXVL4QKGQEGFKCTQA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 05 16:01:03 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f57.google.com ([209.85.221.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k3JyY-0009Ly-S5 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 05 Aug 2020 16:01:02 +0200 Original-Received: by mail-wr1-f57.google.com with SMTP id 89sf13610884wrr.15 for ; Wed, 05 Aug 2020 07:01:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1596636062; cv=pass; d=google.com; s=arc-20160816; b=cce/XieFLn7zkXrmb28M/cRUNgRo0YO/1AjLBnS5waYokUS+QeYqBLs4ZAmk5lik1T G3SwqAisswtP9sK3UFFTnsZ65fac0qcAIYwmHW9Y4l1Z1dbSvK3M5v8ANQIG1pQtQ735 DxtpXWjUcm9ypGPy7ilgEhO8lar1KCNurxob4qthZ8T/B6fJUzLa89LX5AuHNa/2Jsmw Dt+N/Xb7oSnCzfczb5xf/MdOD1vhlFfXdzVKKY67hmLKeKVy6uKus4fe9BP4ASS7td7e guhMc0g1g1gcjyr7rzR0HvR/vrZz0wMN4Hq2/HHh5wRbGvU/oOCXWWlfWCUQ/cw+Pk69 FNUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:subject:from:to:sender:dkim-signature; bh=MLxE+AbUcgG5s+OlQTOr+OPohQMNE5oSMxLP0w+XGJE=; b=Lzf/wa7WSQhqEtcA56buuVgm9xP61mUxTi1fedXpmD3srvxDTu0gDwY8gMjhqwLHj4 qKCXc+roubSeywcobFC8FWxuy97C2WbSK/mhxwzMWYtvP2TOfznW0sYFZyRdyCqATPlk VPYCAouSBbJ8lTFv3rE0cYXh+D6uB3y7hQlhnQdR0/YmM3gXuH9ObpYLtNyJtv3AjqS2 WZp78Y5uCkjXKvLli79kvQug3ud5CyLEx/oH7EfJcng3KWOuSi/lJqJD/ZQfuHLSgAoM 3i1Gi83PG7ZgFClxK+YWv3bExQDicCP7s51zM9F9/AvBdn8Rkdv7E0rPAQRkDSRBWxZA +wEQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:to:from:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=MLxE+AbUcgG5s+OlQTOr+OPohQMNE5oSMxLP0w+XGJE=; b=ar21osIu6veiYfw/A2qKG6AlAQmZ+VYtr/+RCX3a8VmtyHjrxShgZNtPtTne9eHeiz CPL1UW5wTJh9dw1cRkpxI7XXJPCk2gPK5cIAZwYocuLROkMcFJt7Q3eHcI0yIrzWzp1D 65tqMp+roakcwrh2DgB5APFgj3MAW/j2V4UBM+j+mupNV3pkQ8DcDOiKysdDsTP5aw7L 52wbd6a4Dgg9D56zSIcwQ+rltjA3hnNcxPmVudErNlOqo0HaAfhM04CDVCUXBqBns3gl AxZhuJTkJcfv5nXLYXffS2cvY52zqu8wPWjGoz4m86gav5N08wFTfFJfwHX3bfZ8+qj/ PGow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:to:from:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=MLxE+AbUcgG5s+OlQTOr+OPohQMNE5oSMxLP0w+XGJE=; b=E6AjrQd660ZfRefX50QhkwmqgGSTnMgtT49rMOuZ3NcYdySnfsICZQAHdn3QoO9fBO wPNHT55ybK7oLqGHr5SjpM6Jb+rMD+0ueWUlTilX3MCqSXWI6mra7j0DyTbilKBEK2/U 6W6qJeSqpurVtBJjls3Ix1qFU6JJ03irtF0JlP52hIu7KKrkSjVEdg2bZBxIMhYIcDIB VLlVyTLTqcIrMGvlyxXj6KRY0ewg73a+cNCpe9DQAUZ1/wckJwU8DZXOLXhHImEWgcpK XLSREOpE6yRgTgPHhGI6p1setjwSrUacA7eoXIs2Qt4YfXboAIdchDGAzHYsKh0R3tHb JaWQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530nXVzvkCdOU/3NlJmysWXnaruYZZrWVwIpSz2yW0nnzQ0QzVM/ tz8X4Dcckpu+Acxe6MlSOM0= X-Google-Smtp-Source: ABdhPJzXV0wqb+Kz8rSoD9nY/+I1dFZxLdNPfUPTMpYtO4TuoJbYRipzsBqJ9kZEEaROtTX4McbbNw== X-Received: by 2002:adf:f151:: with SMTP id y17mr3150828wro.179.1596636062575; Wed, 05 Aug 2020 07:01:02 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:adf:81f4:: with SMTP id 107ls383802wra.2.gmail; Wed, 05 Aug 2020 07:00:59 -0700 (PDT) X-Received: by 2002:a5d:618e:: with SMTP id j14mr3053828wru.374.1596636059785; Wed, 05 Aug 2020 07:00:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596636059; cv=none; d=google.com; s=arc-20160816; b=HxTijig8CXcbTAAg14d0gsHrB55HoTGpgFKiLgCIPn7xPquX3eXI3wJY0dwYl0YfsP kSl52yYqj2zI/zlWA2lPgV4W7KbCmIHGERTKSxGttw8OoGW+3ghB3uDFXU5yyvzfHN4R Sh6lQoC8nfChJ5PJpaIXEklcGaNXiNbnzeJXRX4JVoHZ3sNi4l8QOOFa9G9Bd+fm4eYM qcnzU+tQfdW1s/OmQ3HHU3m4vCvpeT+4tVzSSeY/1jZiZL+9n6T1DiL3z4Z61kLQJNbm CPU17y3qXQ3ROSsFOX2kqFigQaGK5ZmGo7LOYJ0gcjZ8Y3RmOotT+y5dslmnYiDsUN4L x7eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:from :to; bh=JS5ETIAZzynM1660GCcDUu8utWPORyxxDyODhVZPHjE=; b=FaquKowgHhVQbCKftKYsxxM4fJCzjwYINMYQosElcNCHtQnq+cfbQ2xVcc1RUt77M/ TROPgQWgbJiz8nRhi/mFfwxFjHpA0GfM6+d/xiBiWyXveUDiH52x40cqq5H8QTzV3/8X 7W5NQ0UY2gJQpYMht/VPfS/qohsCmjBt3Q9sEe7qjgRP10i3tUub/h01SvU/XHqE8Ekc dKebGPG2UTLnaQzVK+nhWTVWHm2IN4O8XEhBRFT5iqIELfCe5YOvUQ/UBPwFSJXvhtuL rFGVFmvkdg1PBsxefGdcj3dJJIiZgQfapKDL0tNCuWmRJOzTdoyV7aDJtPW2QmMlK8Bt IM5A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from ciao.gmane.io (static.214.254.202.116.clients.your-server.de. [116.202.254.214]) by gmr-mx.google.com with ESMTPS id n129si346624wma.2.2020.08.05.07.00.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2020 07:00:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) client-ip=116.202.254.214; Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1k3JyV-0009HA-AV for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 05 Aug 2020 16:00:59 +0200 X-Injected-Via-Gmane: http://gmane.org/ X-Newsreader: Sylpheed 3.5.0 (GTK+ 2.24.23; i686-pc-mingw32) X-Original-Sender: anton.txt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of gtp-pandoc-discuss@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=gtp-pandoc-discuss@m.gmane-mx.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:25764 Archived-At: Hello, all As distinct from other Markdown processors and other output formats, while rendering DOCX output with Pandoc, inline `verbatim` text in headers does not work so well, because it inherits not only the font, but also the font size from the `Verbatim Char' style. I do realise that it is the right thing to do for running text because most monospace fonts look better at a slightly decreased size (e.g. 12pt Times New Roman and 11pt Courier New), but I still should like to see nice typewriter text in headers: ## The `switch` keyword The only solution that I can now propose without introducing new settings and otherwise compicating the DOCX rendered, is smartly to infer the size for verbatim text for headers from the `Verbatim char' style based on the size of the main header font, using the proportion: verb_hdr = verb_base * hdr_size / base_size where verb_hdr is font size to use for verbatim text in the header, verb_base the base verbatim font size as specified in the `Verbatim char' style, hdr_size the main font size in the header as specified in the `Heading' style of the corresponding level, and base_size the base font size as specified in the `Body text' style. That way, Pandoc will preserve the ratio between the size of the "typewriter" font and of the font of the surrounding text. I use this approach in my GNU Troff macros, and it works well. -- Please, do not forward replies to the list to my e-mail.