public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* In-paragraph code between backticks and spaces
@ 2013-10-14 14:08 Václav Zeman
       [not found] ` <CAKw7uVgJABVunxbkUKMZf0z=n8z41TsuEbKGohuNNkHdLS8kmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Václav Zeman @ 2013-10-14 14:08 UTC (permalink / raw)
  To: pandoc-discuss

Hi.

I am seeing extra spaces in output when the text between backticks
spans multiple lines. E.g., the following text is wrapped (by Emacs)
inside the backticks block:

- To configure Digest authentication, use the following lines. Put
  them below other `auth_param` blocks but before `acl password
  proxy_auth REQUIRED`.

The result (DOCX and HTML at least) then contains three spaces between
"password" and "proxy_auth". Is there a way to let Pandoc contract 3
spaces into one?

-- 
VZ


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In-paragraph code between backticks and spaces
       [not found] ` <CAKw7uVgJABVunxbkUKMZf0z=n8z41TsuEbKGohuNNkHdLS8kmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-10-14 14:21   ` John MacFarlane
       [not found]     ` <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2013-10-14 14:21 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Václav Zeman [Oct 14 13 16:08 ]:
> Hi.
> 
> I am seeing extra spaces in output when the text between backticks
> spans multiple lines. E.g., the following text is wrapped (by Emacs)
> inside the backticks block:
> 
> - To configure Digest authentication, use the following lines. Put
>   them below other `auth_param` blocks but before `acl password
>   proxy_auth REQUIRED`.
> 
> The result (DOCX and HTML at least) then contains three spaces between
> "password" and "proxy_auth". Is there a way to let Pandoc contract 3
> spaces into one?

No, nor would this be desirable.  It's important to preserve the ability
to put multiple consecutive spaces in a code span.

IN your example, the spaces are clearly indentation.  But since markdown
doesn't require the list content to be indented, it's hard for the
program to tell.

Best approach would be to set up emacs so that it doesn't break code
spans when wrapping.  (Maybe something for pandoc-mode if it doesn't
already work this way?)

-- 
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/20131014142109.GA9935%40Johns-MacBook-Pro.local.
For more options, visit https://groups.google.com/groups/opt_out.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In-paragraph code between backticks and spaces
       [not found]     ` <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2013-10-14 14:42       ` Václav Zeman
  2013-10-14 14:59       ` Joost Kremers
  1 sibling, 0 replies; 4+ messages in thread
From: Václav Zeman @ 2013-10-14 14:42 UTC (permalink / raw)
  To: pandoc-discuss

On 14 October 2013 16:21, John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> +++ Václav Zeman [Oct 14 13 16:08 ]:
>> Hi.
>>
>> I am seeing extra spaces in output when the text between backticks
>> spans multiple lines. E.g., the following text is wrapped (by Emacs)
>> inside the backticks block:
>>
>> - To configure Digest authentication, use the following lines. Put
>>   them below other `auth_param` blocks but before `acl password
>>   proxy_auth REQUIRED`.
>>
>> The result (DOCX and HTML at least) then contains three spaces between
>> "password" and "proxy_auth". Is there a way to let Pandoc contract 3
>> spaces into one?
>
> No, nor would this be desirable.  It's important to preserve the ability
> to put multiple consecutive spaces in a code span.
>
> IN your example, the spaces are clearly indentation.  But since markdown
> doesn't require the list content to be indented, it's hard for the
> program to tell.
I see. I can reformat without the indentation. It fixed the problem.

>
> Best approach would be to set up emacs so that it doesn't break code
> spans when wrapping.  (Maybe something for pandoc-mode if it doesn't
> already work this way?)


-- 
VZ

-- 
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/CAKw7uVhda4drRLYBnA%2BpufyO6he59Li_QTL%3DvxtqquN0GgrJFA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In-paragraph code between backticks and spaces
       [not found]     ` <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  2013-10-14 14:42       ` Václav Zeman
@ 2013-10-14 14:59       ` Joost Kremers
  1 sibling, 0 replies; 4+ messages in thread
From: Joost Kremers @ 2013-10-14 14:59 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On Mon, Oct 14 2013, fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
> +++ Václav Zeman [Oct 14 13 16:08 ]:
>> Hi.
>> 
>> I am seeing extra spaces in output when the text between backticks
>> spans multiple lines. E.g., the following text is wrapped (by Emacs)
>> inside the backticks block:
>> 
>> - To configure Digest authentication, use the following lines. Put
>>   them below other `auth_param` blocks but before `acl password
>>   proxy_auth REQUIRED`.
>> 
>> The result (DOCX and HTML at least) then contains three spaces between
>> "password" and "proxy_auth". Is there a way to let Pandoc contract 3
>> spaces into one?
>
> No, nor would this be desirable.  It's important to preserve the ability
> to put multiple consecutive spaces in a code span.
>
> IN your example, the spaces are clearly indentation.  But since markdown
> doesn't require the list content to be indented, it's hard for the
> program to tell.
>
> Best approach would be to set up emacs so that it doesn't break code
> spans when wrapping.  (Maybe something for pandoc-mode if it doesn't
> already work this way?)

It doesn't, and since this is something that's particular to Markdown
(at least, the `code` markup is), I would argue markdown-mode would be a
better place for it.

However, I'm sceptical that it'll be possible to configure Emacs to
behave this way. I've never heard or seen anything that would make it
possible to disable auto-fill in stretches of text. I believe the OP has
three (four) options:

- use no-break spaces (U+00A0) in code spans (not practical, most
  likely).
- check out the adaptive filling section in the Emacs manual and see if
  any of the options discussed there help.
- use longlines-mode, which soft-wraps lines longer than the value
  specified by `fill-column'.
- use visual-line-mode, which soft-wraps at window edges.

visual-line-mode is set to replace longlines-mode, which AFAIK has been
deprecated in the development version of Emacs. In order to get the same
visual effect that adaptive-fill-mode produces with auto-fill-mode,
visual-line-mode can be combined with adaptive-wrap-mode, which,
however, is an external package (can be installed through Melpa,
though). If you have a wide Emacs window (frame), the automargin package
might be useful (also Melpa).

I personally use the fourth option and have to complaints.

HTH


-- 
Joost Kremers
Life has its moments

-- 
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/87bo2rj3tz.fsf%40fastmail.fm.
For more options, visit https://groups.google.com/groups/opt_out.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-14 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-14 14:08 In-paragraph code between backticks and spaces Václav Zeman
     [not found] ` <CAKw7uVgJABVunxbkUKMZf0z=n8z41TsuEbKGohuNNkHdLS8kmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-14 14:21   ` John MacFarlane
     [not found]     ` <20131014142109.GA9935-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2013-10-14 14:42       ` Václav Zeman
2013-10-14 14:59       ` Joost Kremers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).