Numbering pattern "가" sequence needs change
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- internationalization
Línea de trabajo
Comienza localizando la implementación de numeración para el formato "가" y compara su secuencia actual con el estándar del gobierno coreano descrito en el issue. Usa como referencia la lógica de combinación de Hangul proporcionada y la salida esperada; después, verifica que la numeración continúe a través de los grupos de vocales indicados sin producir "가가" para 29.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Currently, the "가" numbering pattern has the following sequence
가나다라마바사아자차카타파하
and after that, it ends, and displaying the 29th numbering will result to "가가". But, in fact it should be "거". According to Korean government standards, the order should be the combination of plain consonants ㄱㄴㄷㄹㅁㅅㅇㅈㅊㅋㅌㅍㅎ and short vowels(monopthongs)ㅏㅓㅗㅜㅡㅣ. So it would be
가나다라마바사아자차카타파하 -> 거너더...허 -> 고노도...호 -> 구누두...후 -> ...
The current situation can be described as similar to a scenario where 'ああ いい ...' follows 'あ い う え お' in the Japanese "あ" numbering pattern. (This is just a metaphor? and currently typst works as it should where it displays "か" after "お")
Here is my implementation of the numbering system(plus a hard coded solution to typst/typst#6484[https://github.com/typst/typst/issues/6484])
#let traditional-numbering(format, ..args) = {
let result = numbering(format, ..args)
let n = args.pos().first()
if format == "가" {
// Hangul combination formula: 0xAC00 + (consonant index * 21 * 28) + (vowel index * 28)
// 1. plain consonants (ㄱ, ㄴ, ㄷ, ㄹ, ㅁ, ㅂ, ㅅ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ)
let c_map = (0, 2, 3, 5, 6, 7, 9, 11, 12, 14, 15, 16, 17, 18)
// 2. short vowels (ㅏ, ㅓ, ㅗ, ㅜ, ㅡ, ㅣ)
let v_map = (0, 4, 6, 12, 13, 18, 20)
let c_idx = calc.rem(n - 1, 14)
let v_idx = calc.floor((n - 1) / 14)
if v_idx < v_map.len() {
let char_code = 0xAC00 + (c_map.at(c_idx) * 21 * 28) + (v_map.at(v_idx) * 28)
result = str.from-unicode(char_code)
} else {
result = numbering(format, ..args)
}
} else {
result = numbering(format, ..args)
}
result
.replace("贰", "貳") // 2
.replace("叁", "參") // 3
.replace("陆", "陸") // 6
// .replace("万", "萬")
.replace("亿", "億") // 100 million
}
Below is the result of this code
#for i in range(1, 85) [
#traditional-numbering("가", i)
]
가 나 다 라 마 바 사 아 자 차 카 타 파 하 거 너 더 러 머 버 서 어 저 처 커 터 퍼 허 고 노 도 로 모 보 소 오 조 초 코 토 포 호 구 누 두 루 무 부 수 우 주 추 쿠 투 푸 후 그 느 드 르 므 브 스 으 즈 츠 크 트 프 흐 기 니 디 리 미 비 시 이 지 치 키 티 피 히
Thank you for looking in!
Use Case
This would make typst numbering match the Korean standards (from the government or the HWP word processor)
- Lenguaje dominante
- Rust
- Estrellas
- 53
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de typst/codex
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
Rename `times` to `cross`Abiertoproposal
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Lack of ⊻ U+22BBAbiertoproposal
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Todos los issues de typst/codex
Issues similares
-
area:casework bug criticality:p3 triage:needs-implementation
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
registrystack/registry-stack#1623 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
leptos-rs/leptos#4885 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
longbridge/gpui-kit#3276 ·
Los mantenedores suelen responder en 1 día
-
A-Migration Guides D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
bevyengine/bevy-website#2607 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día