public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Kolen Cheung <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: pandoc transform between markdown and rst support Chinese character not well?
Date: Fri, 27 Oct 2017 01:42:21 -0700 (PDT)	[thread overview]
Message-ID: <cb530166-f86d-497f-b9e8-d448b5781241@googlegroups.com> (raw)
In-Reply-To: <CA+R_OtmZsToSgJoriRaDktVCDYaaH5+QcA1KYSMBvj24UivevA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 6841 bytes --]

If you just want to convert the table "just like when it was in markdown 
format", then you should set a high column width. Have you tried it yet?

Another option is not to use pipe table but grid table in your markdown 
source, provided that you have an easy way to edit grid table.

If filter is an option, you could try <https://github.com/ickc/pantable>. 
e.g. you could convert your markdown to markdown with pantable2csv, to 
convert your table to csv format first, and then add a yaml in the csv 
table block to manually specify width, and then convert the 2nd markdown to 
RST. (You might then ask if it is possible to pipe the 3 through 
automatically without manual editing the CSV table. For now the answer is 
no, because Table in pandoc cannot have attributes, so it is difficult to 
be able to provide this information to pantable.

In general, table in pandoc (and markdown in general) is complicated (e.g. 
there are 4 different table formats). Sooner or later, a pandoc user 
probably will discover some caveats and subtlety among the 4 formats, and 
for example how other parameters like the column width might affect its 
behavior. Sometimes we might feel cursed and wish things were different, 
but we are blessed at least because pandoc has been consistent, and is 
scriptable and extensible (through the filter system).

Another suggestion I might make is not to use Sphinx. Pandoc can write to 
HTML directly, have a template system that gives you a certain level of 
control on the output, plus a ton of "pandoc-extras" ecosystem to generate 
websites (see more on the pandoc wiki on GitHub). May be you can help me 
understand why one would do md-rst-html conversion but not md-html 
directly. I think it is kind of backward. If you want to use Sphinx, then 
probably you should really write in RST. Pandoc also reads RST (with some 
limitations) which might be useful if you want to cover something Sphinx 
can't do.

On Sunday, October 22, 2017 at 6:28:27 PM UTC-7, iromise wrote:
>
> yeah, there might not be some perfect methods, but I think the table can 
> show just like when it was in markdown format.
>
> 2017-10-22 0:02 GMT+08:00 John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org <javascript:>
> >:
>
>> Where should it split, if there is no space for guidance?
>>
>> One option for RST tables would be to artificially split
>> at some arbitrary location when the whole string won't fit.
>> But this is going to give ugly results in general.
>>
>> +++ Baozheng Liu [Oct 21 17 15:56 ]:
>>
>>>   But I think that may be pandoc should split the line for us since it
>>>   may take us a lot of time to make sure that space is regular...
>>>
>>>   2017-10-21 0:28 GMT+08:00 John MACFARLANE <[1]j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 
>>> <javascript:>>:
>>>
>>>     If you insert a regular space character, that will allow
>>>     pandoc to break the line.  The other alternative, as noted,
>>>     is to use a very wide --columns setting, but that's going
>>>     to give you a very wide table.
>>>     +++ Baozheng Liu [Oct 20 17 10:52 ]:
>>>
>>>       So will pandoc be able to solve this problem in another way?
>>>
>>>     --
>>>     You received this message because you are subscribed to a topic in
>>>     the Google Groups "pandoc-discuss" group.
>>>     To unsubscribe from this topic, visit
>>>     [2]https://groups.google.com/d/topic/pandoc-discuss/wGVGKiUhcNU
>>>     /unsubscribe.
>>>     To unsubscribe from this group and all its topics, send an email to
>>>     [3]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>>>     To post to this group, send email to
>>>     [4]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>>>     To view this discussion on the web visit
>>>     [5]https://groups.google.com/d/msgid/pandoc-discuss/20171020162
>>>     833.GB33085%40protagoras.
>>>
>>>   For more options, visit [6]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 [7]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>>>   To post to this group, send email to
>>>   [8]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>>>   To view this discussion on the web visit
>>>   [9]
>>> https://groups.google.com/d/msgid/pandoc-discuss/CA%2BR_OtkDLgyG67Zi
>>>   y6LM_zFxdWfFCiHS4MavZGzar1knQgQ7-Q%40mail.gmail.com.
>>>   For more options, visit [10]https://groups.google.com/d/optout.
>>>
>>> References
>>>
>>>   1. mailto:j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org <javascript:>
>>>   2. 
>>> https://groups.google.com/d/topic/pandoc-discuss/wGVGKiUhcNU/unsubscribe
>>>   3. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>>>   4. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>>>   5. 
>>> https://groups.google.com/d/msgid/pandoc-discuss/20171020162833.GB33085@protagoras
>>>   6. https://groups.google.com/d/optout
>>>   7. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>>>   8. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>
>>>   9. 
>>> https://groups.google.com/d/msgid/pandoc-discuss/CA+R_OtkDLgyG67Ziy6LM_zFxdWfFCiHS4MavZGzar1knQgQ7-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer
>>>  10. https://groups.google.com/d/optout
>>>
>>
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/pandoc-discuss/wGVGKiUhcNU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/20171021160255.GC88234%40Johns-MacBook-Pro.local
>> .
>>
>> 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/cb530166-f86d-497f-b9e8-d448b5781241%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 15142 bytes --]

      parent reply	other threads:[~2017-10-27  8:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-16 15:44 iromise
     [not found] ` <b5d59708-1d56-4c95-aa79-9360c1a14580-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-16 16:13   ` John MACFARLANE
2017-10-17  2:39   ` iromise
     [not found]     ` <feb05f9a-a367-495e-94f2-50dfc9bb3f74-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-17  3:53       ` John MacFarlane
     [not found]         ` <20171017035353.GC57897-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-17 23:33           ` Václav Haisman
     [not found]             ` <61410aee-bec7-4697-a46f-68129f92bf8f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-18  1:36               ` John MacFarlane
     [not found]                 ` <20171018013611.GC72258-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-18  9:45                   ` Baozheng Liu
2017-10-19 11:56   ` BP Jonsson
     [not found]     ` <4f48a015-3dc7-f663-81d5-a1d74333304b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-19 16:10       ` John MACFARLANE
2017-10-20  2:52         ` Baozheng Liu
     [not found]           ` <CA+R_Ot=vGzOaC_kx-RpC-k2Jrz+U2g+LEKSxOsZxczX1LzcMPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-20 16:28             ` John MACFARLANE
2017-10-21  7:56               ` Baozheng Liu
     [not found]                 ` <CA+R_OtkDLgyG67Ziy6LM_zFxdWfFCiHS4MavZGzar1knQgQ7-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-21 16:02                   ` John MacFarlane
     [not found]                     ` <20171021160255.GC88234-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-10-23  1:28                       ` Baozheng Liu
     [not found]                         ` <CA+R_OtmZsToSgJoriRaDktVCDYaaH5+QcA1KYSMBvj24UivevA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-27  8:42                           ` Kolen Cheung [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb530166-f86d-497f-b9e8-d448b5781241@googlegroups.com \
    --to=christian.kolen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).