From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/11925 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 21:08:39 -0800 (PST) Message-ID: References: <20150204175703.GA25676@localhost.hsd1.ca.comcast.net> <20150205035235.GA27289@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_5192_2048428684.1423112919933" X-Trace: ger.gmane.org 1423112925 30496 80.91.229.3 (5 Feb 2015 05:08:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Feb 2015 05:08:45 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCY3ZEFMVAOBBWPVZOTAKGQEWVCHBVI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Feb 05 06:08:44 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qc0-f188.google.com ([209.85.216.188]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YJEgE-0008Ko-Eb for gtp-pandoc-discuss@m.gmane.org; Thu, 05 Feb 2015 06:08:42 +0100 Original-Received: by mail-qc0-f188.google.com with SMTP id x3sf1167037qcv.5 for ; Wed, 04 Feb 2015 21:08:41 -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=myy+5z/E76kuP8bquNXM0FmIJ79NnaK8vCv2A0WRJYY=; b=GP9/MTMtKJySARll+xiLD42vDNKM6xIaag/DIDpHif2dfDRx8AMf5BHTMfdkZLl8JG 1V6x4J4eCi94C4l389BHmG70SHtWGnMr5KN4XVhzkubdHPpbKs3GRJlHdBfXIImcuIw5 1lnQZaICM1ekdAjQZZprKLbrAiSuKGhEcupQ9krVwvQ/gl1GuZleDom/5HSeSvDJKrRa QGu4/hWgkS0/jUDg2Mj3d2aU89ZQmEO8aaLmFZKIJoWdHcKo/W/5i9qD6NgOanEGAZOt x6lthgZldPq2USfCRDkxTvhEvolzSAGlo5xcyw6AFa08hpz+MWlquDyaNwCdVdmBZLp/ tMUg== 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=myy+5z/E76kuP8bquNXM0FmIJ79NnaK8vCv2A0WRJYY=; b=P41I9DINoUOmm57+j4Kx64ldKoCsrM4eR2t6+0dMASTksgIsryiQChAkDFZwEBgblF f2MyaZKPRLFRKOd3NLbitQO6j0FA8k7xw6yZ+UbIsw8xndT+tz0CdVOzWuxYaXN68iuo mRUQxcQaCfMgL5X9GoRNWvvEfvFq2vgmnT14L9sGqoGeHaxf+1hBJQACUvO8mhxB0LLw etkN/MPuP8oE+M5PTR1tCJ+Xkywy+DvOKjahgAMdIPDMQt4ORfkIOPpw8+e24zH94zVD 0ZWZyOk6rBxHBn3PwxupC6swvaPrPsIrOOFVxe4iJgQHvm1ahMPutUu5So7dKmInWQ1g DDKQ== X-Received: by 10.50.78.133 with SMTP id b5mr124043igx.4.1423112921801; Wed, 04 Feb 2015 21:08:41 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.170.129 with SMTP id g1ls370911ioj.69.gmail; Wed, 04 Feb 2015 21:08:41 -0800 (PST) X-Received: by 10.50.66.227 with SMTP id i3mr122980igt.14.1423112921250; Wed, 04 Feb 2015 21:08:41 -0800 (PST) In-Reply-To: <20150205035235.GA27289-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:11925 Archived-At: ------=_Part_5192_2048428684.1423112919933 Content-Type: multipart/alternative; boundary="----=_Part_5193_1630546931.1423112919933" ------=_Part_5193_1630546931.1423112919933 Content-Type: text/plain; charset=UTF-8 all right, will get something going tonight On Wednesday, 4 February 2015 19:52:52 UTC-8, John MacFarlane wrote: > > OK, let's just make it insensitive to `--no-wrap`, with a line break > either way. > > +++ Tim Lin [Feb 04 15 17:42 ]: > >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-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/eef791a5-f76f-4e98-a2bc-0e63c79bc7db%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/b115520b-6af7-4fae-b95d-50a759c2ef5d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_5193_1630546931.1423112919933 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
all right, will get something going tonight

On Wedn= esday, 4 February 2015 19:52:52 UTC-8, John MacFarlane wrote:
OK, let's just make it insensitive to `--no= -wrap`, with a line break either way.

+++ Tim Lin [Feb 04 15 17:42 ]:
>The no wrap thing sounds sensible, although I really have no idea w= hether
>more people expect the whole block to be unwrapped or just the indi= vidual
>lines.
>
>Personally I would expect `--no-wrap` output to be useful for editi= ng
>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 i= t 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 lo= oking in LaTeX:
>> >
>> >\texttt{\ 1.}~\textbf{Inputs}:~variables~$A, b$\\\tex= ttt{\
>> >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{u= ntil}~$n$~\textbf{do}\\\texttt{\
>>
>> >8.}~~~~~~~~~~~~\textbf{if}~$j \ne i$~\textbf{then}\\\textt= t{\
>> >9.}~~~~~~~~~~~~~~~$\sigma \leftarrow \sigma + a_{ij}
>> >\phi_j$\\\texttt{10.}~~~~~~~~~~~~\textbf{end~if}\\\te= xttt{11.}~~~~~~~~\textbf{end}~($j$-loop)\\\texttt{12.}~~~~~~~~$\<= wbr>phi_i
>>
>> >\leftarrow \frac 1 {a_{ii}} (b_i -
>> >\sigma)$\\\texttt{13.}~~~~\textbf{end}~($i$-loop)\\\<= wbr>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 s= pecial case
>> where
>> >the usage of LineBreak can easily get out of control.
>> >
>> >I wonder if it's better to add a newline after each LineBr= eak inline
>> >element. I'm really just targeting line-blocks, but as the= y don't have
>> >their own block-level type the only alternative is to chan= ge 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~s= olution\\
>> >\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{u= ntil}~$n$~\textbf{do}\\
>>
>> >\texttt{\ 8.}~~~~~~~~~~~~\textbf{if}~$j \ne i$~\textbf{the= n}\\
>> >\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 th= e Google Groups
>> "pandoc-discuss" group.
>> >To unsubscribe from this group and stop receiving emails f= rom it, send an
>> email to pandoc-discus...@googlegroups.com <jav= ascript:>.
>> >To post to this group, send email to pandoc-...@googleg= roups.com
>> <javascript:>.
>> >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.
>>
>>
>
>--=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/eef791a5-f76f-4e98-a2bc-0e63c79bc7db%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/b115520b-6af7-4fae-b95d-50a759c2ef5d%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_5193_1630546931.1423112919933-- ------=_Part_5192_2048428684.1423112919933--