From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23082 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: How to turn off hyphenation when writing roff/man pages? Variables nor metadata works Date: Thu, 04 Jul 2019 10:24:46 -0700 Message-ID: <874l41n25d.fsf@johnmacfarlane.net> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="55460"; mail-complaints-to="usenet@blaine.gmane.org" To: Nicolas Hillegeer , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB27M7DUAKGQEBLQOXRI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Jul 04 19:25:02 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pg1-f186.google.com ([209.85.215.186]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hj5Ti-000EBh-5E for gtp-pandoc-discuss@m.gmane.org; Thu, 04 Jul 2019 19:25:02 +0200 Original-Received: by mail-pg1-f186.google.com with SMTP id u4sf4033146pgb.20 for ; Thu, 04 Jul 2019 10:25:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1562261100; cv=pass; d=google.com; s=arc-20160816; b=r0/ZJQVHAtj9AJgijuwZWme0jvR6XPlEvJAWnkRqjisKAjB5uPn9/x4X4GYFpg6tjM IdTn2f5nFSoHJXIUN4SwF0Vcpz62OYIdapgW5CYDTwnIGonyWSj90VeEIRZLuj1433uW dnAIyXXWbH1wSlT+0TyIDvwfKM5N8V19VfUyzXPx3MUTD9NjAuG90F6205yTpBmrZWGz hjvPGYcQhBqC5eBRYnMwo9h5XrgAdefw4010aLDRRdhxPZmurno9iM63I6YgiIuX4Y/o Tytm0UMXuL773pkwzWyDm3LB6PxOiPTOS+a+T3Nmhtt9LvZ6Hpg9/GIVEoVAxhjKiu1E LzYQ== 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:content-transfer-encoding :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=/9wGXvvjUGCiI1lc14niJDtegLTvdg43BMy3qkrRAsI=; b=hjceBz4wDNQcUxiVJsTvggtYW/vTrNIq5J5+8dGanLBwh40UDd9uwyi4cmRb3mOQX5 CXRevYCW3sMtAH5CZvU/7r7aiPe+z8Zf3mWR36S2W5pG+aiMvWyoxGCST//VtJqyQ4S+ pq7dxWb3Mzk6yBdsVWXE7zs0LcerkmwpG8kQrpDCGfCJBN+gynp3j8E+5uGp6jo6QmLX E44Gw2IfSj44RtZY9TyrPSH1JEeyzO++YUI9Vd9/UJLm+9tUi4ntHqqS13RGxdV8CXFk OtMYDMaihc2tJJxHbmmTi7BVblnfrQh+bwD4irAyFeljnoqxt6iXVmurCXoADSiJy+pa MziA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HKxBn0Jb; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding: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=/9wGXvvjUGCiI1lc14niJDtegLTvdg43BMy3qkrRAsI=; b=PmNJTuJwYCL9XFV/3OzJwVB66+awN1i/POsIQncxN4hN8y7oip4A2sDCXEng+qirLX i1EnBYYolkslUl8dBxlw1B4r0aakoKrhc4hEjBTpD7ewcVtPNSXFjvtalhhr83EWAklU 7oGVhAgpNDethqaPdZDfdn2RmgmN5bOeESzZ09ITLd6iS4l1PtwUBf+0nMkXICdAlHbq GggqzbYuHGc3caaPsx/XdK/0aidNZ/eDQGhHK92775muSC3tW76tV4PYm9yTOOJiYes0 KbAVd9sI1PWZd52bm689rqPTiJoMK4TKyMnwQLxfLDJ3NWrgHaq1iaDHPbMrRQjgXSvE gx0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:content-transfer-encoding :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=/9wGXvvjUGCiI1lc14niJDtegLTvdg43BMy3qkrRAsI=; b=IJ9Jej+6SLWlEKbcGLEteEyNIerbg9sPL/pnDp4606fzx0JF99SA6ABoBAsePlm5Ue ow9JT6/lYBkwihkT0i0julV+5pcXn6Ar9MslU1gdGswqV0JXEvkYyF41/pUDZfQF99eL ESDwa2HNbqyYA/vZA4gLyEhhdWC0TbjcYF4PrbE2tJ2cuyaBnTzjMnPOmOgZm9c/8Wi5 7qEuVEe+8McT/lTNk3TXCzY5s2aFZZbwkGqNCVtkeXs2oxF3f3p2cLZqKSlT+5sLesqG jHtnLIWcBEhsCcTyyIGQsT5C5gENmbsjpu9L+p9cVzW8+ipjVyzFbN8mCclnA7+KRvkX Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAW2d7kvj5gbIw1wGabu2O+HtdKtd4Kz/1eoL9I/4rd3MtL9nP4I Py5s2GtqRh+qLTNz0qa6j3U= X-Google-Smtp-Source: APXvYqyT5PmI3bZdnRzyhqlKLACZNkDRgL2rJCp9IcRXFTntcAlu2ZqXe0mH7WeVY6dfXoVnQsOVEQ== X-Received: by 2002:a17:902:ac85:: with SMTP id h5mr51197018plr.198.1562261100248; Thu, 04 Jul 2019 10:25:00 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:902:ab8f:: with SMTP id f15ls1818528plr.15.gmail; Thu, 04 Jul 2019 10:24:58 -0700 (PDT) X-Received: by 2002:a17:90b:d8a:: with SMTP id bg10mr710157pjb.92.1562261098936; Thu, 04 Jul 2019 10:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562261098; cv=none; d=google.com; s=arc-20160816; b=Wivbbbj5mK/V5L7ZhE4Kn/+PVxvveqE8cUPRop/lsIwkmqUBWvq5mdcW2u/rR9ZM5o gqOR5FQkF7s/pCc1w6gRsNDnVWYjJeLmh8Qg+l7dELxJxtyNOcCssHi9Bgf9Q1FXfOIo q5Ilos2Kc7nJKuoxvzD0wrPgSV9OdWE5VY4FdVsZ+EGdlm++5rTHWl13p16Kv0k/I/VT 9bfN4hFy+aNfaf+XXTfppSPW+k4TV/jxpVb2SM7LFPGgKnSQ9Oc3Mp/7Ilj2QDsd26RX dt4GJu8NCgERUXMh+cIzxcyCAvN0HvI0iJZbmp4nkrL4RRmfNA086p5o4+skyQ2CscOq vbKQ== 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:references :in-reply-to:subject:to:from:dkim-signature; bh=HsYqxN2ydjHc6wcVJaof+ZK0dZthrS7vLEIU3oIc+fM=; b=OwHDfpoA0IYbxFVDYZ0SDf1mtE/KBYJZjcyAA4hhT+BystPVteQIbxuFw/LWZnQG1o BtRb5IU50zMjrinEb2jICdaqJpdB1PsozFpn9Vw/p3DmtKwozCDcpR5HXTLQ6kRzCtRx Mms1FIXCgZ8kU9qFjx/e7D55Oygqn0lAK+I1chrnWarkD0jJ2VVtft8ptAJkba4DPMs2 pAXlHn0fnILfXUJRKwiOB52kwP6aJbwoxftoa2QsCowticilRDoGhj01iVIDFnW/wwCw tenyB+fzNNS1pMVpa5b7AKpiZUQhEt274tbuscOBnRQtjT3pmhOdTeY1Ucelum8cCX1p FaSA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HKxBn0Jb; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com. [2607:f8b0:4864:20::62e]) by gmr-mx.google.com with ESMTPS id o30si232495pjb.0.2019.07.04.10.24.58 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jul 2019 10:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) client-ip=2607:f8b0:4864:20::62e; Original-Received: by mail-pl1-x62e.google.com with SMTP id i2so3374352plt.1 for ; Thu, 04 Jul 2019 10:24:58 -0700 (PDT) X-Received: by 2002:a17:902:1004:: with SMTP id b4mr51364928pla.325.1562261098589; Thu, 04 Jul 2019 10:24:58 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id n1sm5191355pgv.15.2019.07.04.10.24.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Jul 2019 10:24:57 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 90F53A231; Thu, 4 Jul 2019 13:24:46 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=HKxBn0Jb; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 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.org gmane.text.pandoc:23082 Archived-At: Try --metadata hyphenate=3Dfalse False should also work. I just tested with both. Don't set --variable too, as this will override the metadata value, and variables are just strings, so you can't get a boolean false value. If this doesn't work, check that you're using the most recent version of pandoc. The comment about "default" in the template is misleading, because the man writer sets the hyphenate variable to true if it's not set. I'll change this. Nicolas Hillegeer writes: > Sorry for posting what appears to be a very basic question, but I've look= ed=20 > for hours and couldn't find it. > > Problem: I want to generate my manpage from a markdown source, but I don'= t=20 > want any hyphenation. By default, hyphenation is enabled: > > $ pandoc --print-default-template=3Dman > ... > $if(hyphenate)$ > .hy > $else$ > .nh \" Turn off hyphenation by default. > $endif$ > ... > > > Both in the documentation and in the ori= ginal=20 > commit=20 > which=20 > enabled hyphenation, it is described as a "default". Which indicates it i= s=20 > somehow overridable: > > Variables for man pages > adjusting > > adjusts text to left (l), right (r), center (c), or both (b) margins > > footer > > footer in man pages > > header > > header in man pages > > hyphenate > > if true (the default), hyphenation will be used > > section > > section number in man pages > > > > With regards to variable setting, I found the following in the docs: > > Templates contain variables, which allow for the inclusion of arbitrary= =20 > information at any point in the file. They may be set at the command line= =20 > using the -V/--variable option. If a variable is not set, pandoc will loo= k=20 > for the key in the document=E2=80=99s metadata =E2=80=93 which can be set= using either YAML=20 > metadata blocks or with the -M/--metadata option. > > And: > > -V KEY[=3DVAL], --variable=3DKEY[:VAL] > > Set the template variable KEY to the value VAL when rendering the documen= t=20 > in standalone mode. This is generally only useful when the --template=20 > option is used to specify a custom template, since pandoc automatically= =20 > sets the variables used in the default templates. If no VAL is specified,= =20 > the key will be given the value true. > > -M KEY[=3DVAL], --metadata=3DKEY[:VAL] > > Set the metadata field KEY to the value VAL. A value specified on the=20 > command line overrides a value specified in the document using YAML=20 > metadata blocks. Values will be parsed as YAML boolean or string values. = If=20 > no value is specified, the value will be treated as Boolean true. Like=20 > --variable, --metadata causes template variables to be set. But unlike=20 > --variable, --metadata affects the metadata of the underlying document=20 > (which is accessible from filters and may be printed in some output=20 > formats) and metadata values will be escaped when inserted into the=20 > template. > > > So, I'm trying thins like: > > $ pandoc --metadata=3Dhyphenate:False --variable=3Dhyphenate:False -s -f= =20 > markdown -t man mycommand.1.md -o mycommand.1=20 > > > However it seems to have no effect. I tried the other metadata routes too= : > > % hyphenate: False > > --- > hyphenate: False > --- > > > (In my document.) > > Nothing works. > > What am I doing wrong? > > --=20 > You received this message because you are subscribed to the Google Groups= "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/fbaf534c-daf9-49fe-8a20-190663a88c33%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/874l41n25d.fsf%40johnmacfarlane.net. For more options, visit https://groups.google.com/d/optout.