Skip to content

Some numbering with closed brackets to be considered; hope to add a pre-made Chinese character numbering system, or add a custom numbering system to "numbering" #708

Closed as not planned

Description

@Roseleaves

The prefabricated ones can be 一, 二, 三, et al; or 甲子, 乙丑, et al (then it is a set of circular numbers with a cycle of 60)
Custom parameters can be substituted as follows:
One is whether it is a circular number.
If it is not a circular numbering (then the number grows indefinitely), then determine the base system and the sign used for each bit.
For example, #SetEnum(10, "零壹贰叁肆伍陆柒捌玖拾")
In my opinion, the self-defining module is quite useful, and we really do not need to keep too many number systems as default.

by the way, some closed brackets might be considered, like

#set heading(numbering: "1.a.(i)")
= Introduction
== Cauchy sequences
=== Limits
== Dedekind cuts

and then the enumeration on the compiled PDF shows like:

1) Introduction
1.a) Cauchy sequences
1.a.(i) Limits
1.b) Dedekind cuts

We know that the ( never shows with the absence of the third-level headings, however, the ) always presents.
How to make the ) present if and only if ( presents?

Activity

  1. changed the title [-]Hope to add a pre-made Chinese character numbering system, or add a custom numbering system to "numbering"[/-] [+]Some numbering with closed brackets to be considered; hope to add a pre-made Chinese character numbering system, or add a custom numbering system to "numbering"[/+] on Apr 10, 2023
  2. peng1999 commented on Apr 10, 2023

    @peng1999
    Contributor

    Related: #565

  3. laurmaedje commented on Apr 11, 2023

    @laurmaedje
    Member

    I have trouble understanding what exactly you want. With #565, there is at least one built-in numbering method. You can always create completely custom numberings by providing a function instead of a numbering pattern. Which specific additions would you like to see?

  4. added
    text
    on Apr 11, 2023
  5. Fusyong commented on Apr 12, 2023

    @Fusyong

    Here's how I use the built-in numbering method to customize Chinese numbers, perhaps not elegantly:

    #set text(font: (
      "Inria Serif",
      "Noto Serif CJK SC",
      "Noto Sans CJK SC",
    ))
    
    #set par(justify: true)
    
    #let arabic_to_chinese(str) = {
        let dict = (
            "0": "〇",
            "1": "一",
            "2": "二",
            "3": "三",
            "4": "四",
            "5": "五",
            "6": "六",
            "7": "七",
            "8": "八",
            "9": "九",
        )
        str.clusters().map(
            x => dict.at(x)
            ).join()
    }
    
    #let chinese_numbering(..nums) = {
        nums.pos()
            .map(str)
            .map(arabic_to_chinese)
            .join(".") + " "
    }
    
    #set heading(numbering: chinese_numbering)
    
    = 一级标题
    
    == 二级标题
    
    === 三级标题
    
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题
    = 一级标题

    image

  6. added
    feature request
    on Nov 14, 2023
  7. added
    model
    and removed on Nov 24, 2023
  8. laurmaedje commented on Jul 15, 2024

    @laurmaedje
    Member

    Closing this since I still don't understand what is meant and there wasn't a response in over a year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestmodeltext

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions