public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* fancy_lists with Chinese numerals
@ 2016-12-20  1:28 Kolen Cheung
       [not found] ` <68dbc966-4cd8-4361-a1a7-e59e56a1d030-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Kolen Cheung @ 2016-12-20  1:28 UTC (permalink / raw)
  To: pandoc-discuss


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

Would [Chinese numerals](https://en.wikipedia.org/wiki/Chinese_numerals) be 
considered to be added as a variants of fancy_lists?

-- 
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/68dbc966-4cd8-4361-a1a7-e59e56a1d030%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: fancy_lists with Chinese numerals
       [not found] ` <68dbc966-4cd8-4361-a1a7-e59e56a1d030-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-12-20 16:48   ` BP Jonsson
       [not found]     ` <2918a015-07d2-03e2-79dd-37a631688988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2016-12-20 21:28   ` John MacFarlane
  1 sibling, 1 reply; 5+ messages in thread
From: BP Jonsson @ 2016-12-20 16:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Den 2016-12-20 kl. 02:28, skrev Kolen Cheung:
> Would [Chinese numerals](https://en.wikipedia.org/wiki/Chinese_numerals) be 
> considered to be added as a variants of fancy_lists?
> 

There are some complexities involved:

*   There are dozens of numeral systems in use, all of which have an at least in principle equal claim to be supported: 

    <https://en.wikipedia.org/wiki/Template:Numeral_systems>

*   Systems that are supported by pandoc need to be supported by pandoc's target formats, and in a non-broken way:

    <https://github.com/jgm/pandoc/issues/1243>

    (With a general fix for HTML/CSS: <https://github.com/jgm/pandoc/issues/1243#issuecomment-138061181>)

*   Pandoc will need to be able to convert those numbers into ASCII decimals to determine the list start number.
    There are libraries which can do that <http://billposer.org/Software/libuninum.html>, but as you will see from the previous point the boundary between letters and numbers can be hard to detect.

*   There is also alphabetical (or similar) list marking in use in dozens of scripts, which not always use letters in their Unicode order.
    I have looked and apparently there are no libraries which support these.

FWIW I tried to come up with at least a hack which would work in LaTeX using perltex and Unicode::Number which wraps libuninum.
It was too hard even without considering LaTeX as produced by pandoc.

/bpj


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

* Re: fancy_lists with Chinese numerals
       [not found] ` <68dbc966-4cd8-4361-a1a7-e59e56a1d030-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-12-20 16:48   ` BP Jonsson
@ 2016-12-20 21:28   ` John MacFarlane
       [not found]     ` <20161220212817.GF6297-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: John MacFarlane @ 2016-12-20 21:28 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Kolen Cheung [Dec 19 16 17:28 ]:
>   Would [Chinese
>   numerals](https://en.wikipedia.org/wiki/Chinese_numerals) be considered
>   to be added as a variants of fancy_lists?

I don't see why not.  I don't know anything about how
Chinese numerals work, though; perhaps you could explain?


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

* Re: fancy_lists with Chinese numerals
       [not found]     ` <20161220212817.GF6297-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2016-12-21  4:32       ` Kolen Cheung
  0 siblings, 0 replies; 5+ messages in thread
From: Kolen Cheung @ 2016-12-21  4:32 UTC (permalink / raw)
  To: pandoc-discuss


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

 

Concerning only Natural numbers, and Traditional Chinese only 
(generalzation to simplified Chinese is trivial by the mapping: 萬 [image: 
\mapsto] 万, 億 [image: \mapsto] 亿):

   - 
   
   digitizing rule:
   1. 
      
      digit: [image: 1, \ldots, 9 =] 一, 二, 三, 四, 五, 六, 七, 八, 九
      2. 
      
      powers of 10: [image: 10^1, 10^2, 10^3 =] 十, 百, 千
      3. 
      
      powers of [image: 10^4]: [image: 10^4, 10^8, 10^{12},\ldots =] 萬, 億, 
      兆,…
      - 
   
   decompositional rule: For any given number, decompose by powers of [image: 
   10^4] first, then further decompose each of them into powers of [image: 
   10], lastly, convert each digit.
   - 
   
   exceptions:
   1. 
      
      zeros: [image: 0] is 零:
      1. 
         
         one 零 will be inserted whenever a consecutive numbers of [image: 0] 
         exists. e.g. [image: 1001] will only has one 零 between.
         2. 
         
         零 is not inserted when it is at the end.
         2. 
      
      [image: 10,...19] will not have 一 at the beginning.
      
<#>Example 1: 10,091,009 
   
   1. 3rd digitizing rule: 1009萬1009 
   2. 2nd digitizing rule: 1千9萬1千9 
   3. 1st digitizing rule: 一千九萬一千九 
   4. exceptions 1.1: insert 零: 一千零九萬一千零九 

<#>Example 2: 17 
   
   1. 2nd digitizing rule: 1十7 
   2. 1st digitizing rule: 一十七 
   3. exceptions 2: 十七 

<#>Example 3: 1,017 
   
   1. 2nd digitizing rule: 1千1十7 
   2. 1st digitizing rule: 一千一十七 
   3. exceptions 1.1 (note exception 2 does not apply): 一千零一十七 

<#>Example 4: 200 
   
   1. 2nd digitizing rule: 2百 
   2. 1st digitizing rule: 二百 
   3. exceptions 1.2: no 零 is inserted at the end: 二百 

On Tuesday, December 20, 2016 at 1:28:32 PM UTC-8, John MacFarlane wrote:

+++ Kolen Cheung [Dec 19 16 17:28 ]: 
> >   Would [Chinese 
> >   numerals](https://en.wikipedia.org/wiki/Chinese_numerals) be 
> considered 
> >   to be added as a variants of fancy_lists? 
>
> I don't see why not.  I don't know anything about how 
> Chinese numerals work, though; perhaps you could explain? 
>
​

-- 
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/a1d9c620-5af4-4310-9d7e-fbdbe0a49fa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: fancy_lists with Chinese numerals
       [not found]     ` <2918a015-07d2-03e2-79dd-37a631688988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-02  6:55       ` Kolen Cheung
  0 siblings, 0 replies; 5+ messages in thread
From: Kolen Cheung @ 2017-01-02  6:55 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

Another related suggestion is custom bullet: at least it seems possible to write a filter targetting HTML related and LaTeX outputs, with a custom syntax using pandoc span for the bullet text. If this is implemented into pandoc, it will partially solve the issues @bpj referred to, albeit with an uglier syntax, say, `[一、]{.list}a list with bullet 一、`. This also solves a problem with the puntuation mark used in different language. e.g. In Chinese, it would be `、` or `()` rather than `.` and `()`. 

-- 
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/2cee2513-9174-4611-980c-abab8251e36a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

end of thread, other threads:[~2017-01-02  6:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20  1:28 fancy_lists with Chinese numerals Kolen Cheung
     [not found] ` <68dbc966-4cd8-4361-a1a7-e59e56a1d030-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-12-20 16:48   ` BP Jonsson
     [not found]     ` <2918a015-07d2-03e2-79dd-37a631688988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-02  6:55       ` Kolen Cheung
2016-12-20 21:28   ` John MacFarlane
     [not found]     ` <20161220212817.GF6297-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2016-12-21  4:32       ` Kolen Cheung

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).