From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11922 Path: news.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Add a newline after a LineBreak to writers? Date: Wed, 4 Feb 2015 09:57:03 -0800 Message-ID: <20150204175703.GA25676@localhost.hsd1.ca.comcast.net> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed X-Trace: ger.gmane.org 1423072640 16929 80.91.229.3 (4 Feb 2015 17:57:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2015 17:57:20 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBB7V2ZGTAKGQEF6OCIZA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Feb 04 18:57:19 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qa0-f62.google.com ([209.85.216.62]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJ4CU-0006jW-Te for gtp-pandoc-discuss@m.gmane.org; Wed, 04 Feb 2015 18:57:19 +0100 Original-Received: by mail-qa0-f62.google.com with SMTP id k15sf660239qaq.7 for ; Wed, 04 Feb 2015 09:57:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=from:date:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=0NfPOaK4ubo3Idc2H4wRId8UVukZvveGlWiTrdrH72k=; b=lg/w2bx/4yd3iLAjpWr0RzmPsA1KnERBrA0aNnnLQAIEjNkQewpbEDIMlkXw9qbgX5 rFDIDiamrxvNLALiBlmN3yT5ZoSrXHNZVoQtGRwzqMn7k5T9lwCS63dCAwKCCFHmD7JR Q69KWdlWF5UsX/5KniBbOUyzc1Fhpqo/slEqJOItHg4qqKBI822VzISOVw0t65/oyg5T ERV9Xv/SpGZ3bg2fbxCvbYJOXUuuZf6oTYS8Scmv4qJ8xumzfmzQLx9O+YEPrw2YnAzv 2N/fBl3ZCM59ZWg5xZmWryVXmZ3Q+se7B7Pi1VAcDnaNUWtVatFDE68KV872gUjBnVaL 60ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe; bh=0NfPOaK4ubo3Idc2H4wRId8UVukZvveGlWiTrdrH72k=; b=VJgE+F7tTO1/OIh7xcxRAMwhSQzbNyr/hET2PS8EU1i5fwvp0j+eeiwNWCmUIb9fGI ar1+BfOcCBgU121sxF3s3SsQk4znnclrLqFYOV8mZkLGSyxM99rFWwHAjQ+B22dLf2Zy QS4t6uTq4emDs9YGPJP0PpaLl1rF5rSCxgDZ+N60Aqq0+SYmjW7VbdxngL+DOJ1LFFmB bHf16KBJp6VPPUYYY0M2MzcR9kPqHy6xWd2nS7PK5SXCAJTAvKy5ux8+AaxDn59V2ZpJ kVyjTwCNnZP4hzRES1h7H2xInSL/BJa+EjW8G1hLHelXk9tHfj+rfFmGpf7aiYHV90bc BX X-Received: by 10.140.89.84 with SMTP id u78mr392828qgd.10.1423072638289; Wed, 04 Feb 2015 09:57:18 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.22.163 with SMTP id 32ls238971qgn.48.gmail; Wed, 04 Feb 2015 09:57:17 -0800 (PST) X-Received: by 10.236.3.106 with SMTP id 70mr27590783yhg.20.1423072637882; Wed, 04 Feb 2015 09:57:17 -0800 (PST) Original-Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com. [209.85.220.53]) by gmr-mx.google.com with ESMTPS id i11si265456pat.2.2015.02.04.09.57.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 09:57:17 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.220.53 as permitted sender) client-ip=209.85.220.53; Original-Received: by mail-pa0-f53.google.com with SMTP id kx10so4081145pab.12 for ; Wed, 04 Feb 2015 09:57:17 -0800 (PST) X-Gm-Message-State: ALoCoQkvtaUuoNNd/O4pWIF+A9HZ9fUv/M6ZmLac+v+k+iqbVa5vomWQmwxChFA9hOmkQqmx8HV6 X-Received: by 10.68.189.167 with SMTP id gj7mr48581627pbc.58.1423072637678; Wed, 04 Feb 2015 09:57:17 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by mx.google.com with ESMTPSA id 9sm2667467pdg.38.2015.02.04.09.57.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 09:57:16 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id EA2B7A27B; Wed, 4 Feb 2015 12:57:03 -0500 (EST) Content-Disposition: inline In-Reply-To: X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.23 (2014-03-12) X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 209.85.220.53 as permitted sender) smtp.mail=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:11922 Archived-At: I think this is a good idea. (But maybe we should make it sensitive to `--no-wrap`, and omit the newline if `--no-wrap`?) +++ Tim Lin [Feb 03 15 17:46 ]: >I'm using the line-block construct extensively fro writing pseudocode. It >usually works great, but boy does the rendered output look ugly. Here's an >example of what one of my typical algorithms can end up looking in LaTeX: > >\texttt{\ 1.}~\textbf{Inputs}:~variables~$A, b$\\\texttt{\ >2.}~\textbf{Output}:~$\phi$~~~~~~~~~~~~~~~~\texttt{//this\ is\ a\ comment}\texttt{\ >3.}~Choose~an~initial~guess~$\phi$~to~the~solution\\\texttt{\ >4.}~~\textbf{repeat}~until~convergence\\\texttt{\ >5.}~~~~\textbf{for}~$i$~\textbf{from}~1~\textbf{until}~$n$~\textbf{do}\\\texttt{\ >6.}~~~~~~~~$\sigma \leftarrow 0$\\\texttt{\ >7.}~~~~~~~~\textbf{for}~$j$~\textbf{from}~1~\textbf{until}~$n$~\textbf{do}\\\texttt{\ >8.}~~~~~~~~~~~~\textbf{if}~$j \ne i$~\textbf{then}\\\texttt{\ >9.}~~~~~~~~~~~~~~~$\sigma \leftarrow \sigma + a_{ij} >\phi_j$\\\texttt{10.}~~~~~~~~~~~~\textbf{end~if}\\\texttt{11.}~~~~~~~~\textbf{end}~($j$-loop)\\\texttt{12.}~~~~~~~~$\phi_i >\leftarrow \frac 1 {a_{ii}} (b_i - >\sigma)$\\\texttt{13.}~~~~\textbf{end}~($i$-loop)\\\texttt{14.}~~~~check~if~convergence~is~reached\\\texttt{15.}~\textbf{end}~(repeat) > >It's serviceable, but really hard to play with for a human. The HTML writer >doesn't far much better. I realize that line-block are a special case where >the usage of LineBreak can easily get out of control. > >I wonder if it's better to add a newline after each LineBreak inline >element. I'm really just targeting line-blocks, but as they don't have >their own block-level type the only alternative is to change LineBreak >behavior. The above example would then look like this: > >\texttt{\ 1.}~\textbf{Inputs}:~variables~$A, b$\\ >\texttt{\ 2.}~\textbf{Output}:~$\phi$~~~~~~~~~~~~~~~~\texttt{//this\ is\ a\ >comment} >\texttt{\ 3.}~Choose~an~initial~guess~$\phi$~to~the~solution\\ >\texttt{\ 4.}~~\textbf{repeat}~until~convergence\\ >\texttt{\ >5.}~~~~\textbf{for}~$i$~\textbf{from}~1~\textbf{until}~$n$~\textbf{do}\\ >\texttt{\ 6.}~~~~~~~~$\sigma \leftarrow 0$\\ >\texttt{\ >7.}~~~~~~~~\textbf{for}~$j$~\textbf{from}~1~\textbf{until}~$n$~\textbf{do}\\ >\texttt{\ 8.}~~~~~~~~~~~~\textbf{if}~$j \ne i$~\textbf{then}\\ >\texttt{\ 9.}~~~~~~~~~~~~~~~$\sigma \leftarrow \sigma + a_{ij} \phi_j$\\ >\texttt{10.}~~~~~~~~~~~~\textbf{end~if}\\ >\texttt{11.}~~~~~~~~\textbf{end}~($j$-loop)\\ >\texttt{12.}~~~~~~~~$\phi_i \leftarrow \frac 1 {a_{ii}} (b_i - \sigma)$\\ >\texttt{13.}~~~~\textbf{end}~($i$-loop)\\ >\texttt{14.}~~~~check~if~convergence~is~reached\\\texttt{15.}~\textbf{end}~(repeat) > >I can't really think of any negative ramification off the top of my head. >I'd appreciate any help thinking about whether this would break anything. > >-- >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/msgid/pandoc-discuss/b25e52ed-107c-4f32-a128-b9b68c149ce4%40googlegroups.com. >For more options, visit https://groups.google.com/d/optout.