From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11923 Path: news.gmane.org!not-for-mail From: Tim Lin Newsgroups: gmane.text.pandoc Subject: Re: Add a newline after a LineBreak to writers? Date: Wed, 4 Feb 2015 17:42:59 -0800 (PST) Message-ID: References: <20150204175703.GA25676@localhost.hsd1.ca.comcast.net> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2885_1372762249.1423100579282" X-Trace: ger.gmane.org 1423100587 16075 80.91.229.3 (5 Feb 2015 01:43:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2015 01:43:07 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCY3ZEFMVAOBBJUVZOTAKGQEYVDBE5A-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Feb 05 02:43:06 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ie0-f190.google.com ([209.85.223.190]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJBTD-0003sf-RR for gtp-pandoc-discuss@m.gmane.org; Thu, 05 Feb 2015 02:43:04 +0100 Original-Received: by mail-ie0-f190.google.com with SMTP id tr6sf1005400ieb.7 for ; Wed, 04 Feb 2015 17:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=PmLjp38qhkdLpj6w0OY9z26JEJ9w+ZrLyFBEZmw4HQk=; b=cib+iYrWxkIeqTgiKUteB7OOfL9SdTniUq6nt2r0eV16QVO+jS1mxTjhQgkAlRtHxM uRv7g7pvKZFPpqYUSQKZj8v9bKn/PVwJLqh8ZzVG7Aeq978LlKsdBQPxLDoTOUQaPCTW o+zpSMU7ZKJyXcrk5AL8TPzACH77LRnvuSFaRz2l2v7+13QGoaA1xjDUmUAMtUga2U37 WPNMMgAIClD3fIscweuJRON+nkEof8lZzNRI+CBm7KyH8Npx//Vdw3897kYCMeFK6Cb3 IsJPUpolTtIZHBJEn9a3Ew9la7VYDaYczN4ZyRMIOc0tUnNBm1vhs3vDd+8epdFp23mE SrLA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=PmLjp38qhkdLpj6w0OY9z26JEJ9w+ZrLyFBEZmw4HQk=; b=jA7SGifolGt9IcHx7nVnkwCd4mXb/rdkhNec1dbpETMuBNjcZmGznG6TZv2u9jXJI6 EzBhlO9kuS+IRaHHFGpqQMfwCbiLZoN53ir5KsshRLHR62U4Fx+AK+Yz680j9MLA0ODF un5pfS5hmYwoQwfdhjaR4R7l9Td9nvn+lnp7Ndg4/S3jnt8mDwuZHrF2CbJmkeP+oGPx 2mZRapmp6Nuuakj6wmZVZArUcyAx6HraoOuVKnOeqChETn6Q/JUrfAaQCwVKkNtF3BMZ luOp/5GKJl7lE2JoY6if8iqx8fAAy+qK7o/YMJjf5gBmOiJNYVdLOdkyOIku5jn4M99p isEA== X-Received: by 10.50.47.5 with SMTP id z5mr426751igm.9.1423100583011; Wed, 04 Feb 2015 17:43:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.8.221 with SMTP id h90ls304805ioi.30.gmail; Wed, 04 Feb 2015 17:43:00 -0800 (PST) X-Received: by 10.50.47.5 with SMTP id z5mr426747igm.9.1423100580600; Wed, 04 Feb 2015 17:43:00 -0800 (PST) In-Reply-To: <20150204175703.GA25676-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org> X-Original-Sender: timtylin-Re5JQEeQqe8AvxtiuMwx3w@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:11923 Archived-At: ------=_Part_2885_1372762249.1423100579282 Content-Type: multipart/alternative; boundary="----=_Part_2886_1598299222.1423100579282" ------=_Part_2886_1598299222.1423100579282 Content-Type: text/plain; charset=UTF-8 The no wrap thing sounds sensible, although I really have no idea whether more people expect the whole block to be unwrapped or just the individual lines. Personally I would expect `--no-wrap` output to be useful for editing without needing text reflowing functionality. With that assumption, unwrapping individual lines but breaking at the LineBreaks seems to me to be the most friendly behavior for editing. On Wednesday, 4 February 2015 09:57:18 UTC-8, John MacFarlane wrote: > > 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > >To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@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. > > -- 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/eef791a5-f76f-4e98-a2bc-0e63c79bc7db%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_2886_1598299222.1423100579282 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The no wrap thing sounds sensible, although I really have = no idea whether more people expect the whole block to be unwrapped or just = the individual lines.

Personally I would expect `--no-wr= ap` output to be useful for editing without needing text reflowing function= ality. With that assumption, unwrapping individual lines but breaking at th= e LineBreaks seems to me to be the most friendly behavior for editing.
<= div> 

On Wednesday, 4 February 2015 09:57:18 UTC-8, John MacFa= rlane wrote:
I think this is a= good idea.  (But maybe we should make it sensitive to `--no-wrap`, an= d omit the newline if `--no-wrap`?)

+++ Tim Lin [Feb 03 15 17:46 ]:
>I'm using the line-block construct extensively fro writing pseudoco= de. It
>usually works great, but boy does the rendered output look ugly. He= re'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\\\text= tt{\
>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)\\\textt= t{14.}~~~~check~if~convergence~is~reached\\\texttt{15.}~\textbf{e= nd}~(repeat)
>
>It's serviceable, but really hard to play with for a human. The HTM= L writer
>doesn't far much better. I realize that line-block are a special ca= se where
>the usage of LineBreak can easily get out of control.
>
>I wonder if it's better to add a newline after each LineBreak inlin= e
>element. I'm really just targeting line-blocks, but as they don't h= ave
>their own block-level type the only alternative is to change LineBr= eak
>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 - \sig= ma)$\\
>\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 any= thing.
>
>--=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, s= end an email to pando= c-discus...@googlegroups.com.
>To post to this group, send email to pandoc-...@googlegroups.com.
>To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b25e52ed-107c-4f32-a128-b9b68c149ce4%40goog= legroups.com.
>For more options, visit https://groups.google.com/d/o= ptout.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/eef791a5-f76f-4e98-a2bc-0e63c79bc7db%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_2886_1598299222.1423100579282-- ------=_Part_2885_1372762249.1423100579282--