All Projects → woct0rdho → Typeset

woct0rdho / Typeset

Licence: mit
自动修正中文、英文、代码混合排版中的全半角、空格等问题

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Typeset

Uncrustify
Code beautifier
Stars: ✭ 2,442 (+3776.19%)
Mutual labels:  beautifier, formatter
Pp sql
Rails ActiveRecord SQL queries log beautifier
Stars: ✭ 223 (+253.97%)
Mutual labels:  beautifier, formatter
Atom Beautify
📣 Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | 💄 Universal beautification package for Atom editor (⚠️ Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding ❤️ )
Stars: ✭ 1,501 (+2282.54%)
Mutual labels:  beautifier, formatter
Plugin Php
Prettier PHP Plugin
Stars: ✭ 1,243 (+1873.02%)
Mutual labels:  beautifier, formatter
vscode-liquid
💧Liquid language support for VS Code
Stars: ✭ 137 (+117.46%)
Mutual labels:  formatter, beautifier
Nginx Config Formatter
nginx config file formatter/beautifier written in Python.
Stars: ✭ 222 (+252.38%)
Mutual labels:  beautifier, formatter
Powershell Beautifier
A whitespace reformatter and code cleaner for Windows PowerShell and PowerShell Core
Stars: ✭ 213 (+238.1%)
Mutual labels:  beautifier, formatter
Unibeautify
One Beautifier to rule them all, One Beautifier to clean them, One Beautifier to bring them all and in the darkness sheen them
Stars: ✭ 466 (+639.68%)
Mutual labels:  beautifier, formatter
stylus-supremacy
A Node.js script that helps formatting Stylus files.
Stars: ✭ 86 (+36.51%)
Mutual labels:  formatter, beautifier
Mbeautifier
MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.
Stars: ✭ 248 (+293.65%)
Mutual labels:  beautifier, formatter
Latexindent.pl
Perl script to add indentation (leading horizontal space) to LaTeX files. It can modify line breaks before, during and after code blocks; it can perform text wrapping and paragraph line break removal. It can also perform string-based and regex-based substitutions/replacements. The script is customisable through its YAML interface.
Stars: ✭ 415 (+558.73%)
Mutual labels:  beautifier, formatter
Caoutchouc
Make TeX great again
Stars: ✭ 38 (-39.68%)
Mutual labels:  formatter, typesetting
Chinese Write Handling Char Recognition
汉字手写识别
Stars: ✭ 48 (-23.81%)
Mutual labels:  chinese
Emacs Document
translate emacs documents to Chinese for convenient reference
Stars: ✭ 1,085 (+1622.22%)
Mutual labels:  chinese
Awesome Gameserver Cn
中文游戏服务器资源大全
Stars: ✭ 1,038 (+1547.62%)
Mutual labels:  chinese
Trime
同文安卓輸入法平臺3.x/Android-rime/Rime Input Method Engine for Android
Stars: ✭ 1,032 (+1538.1%)
Mutual labels:  chinese
Rxswift Chinese Documentation
RxSwift 中文文档
Stars: ✭ 1,107 (+1657.14%)
Mutual labels:  chinese
Format Graphql
Formats GraphQL schema definition language (SDL) document.
Stars: ✭ 55 (-12.7%)
Mutual labels:  formatter
Sile
Simon’s Improved Layout Engine
Stars: ✭ 1,032 (+1538.1%)
Mutual labels:  typesetting
Brazilian Utils
Utils library for specific Brazilian businesses
Stars: ✭ 1,023 (+1523.81%)
Mutual labels:  formatter

typeset

自动修正中文、英文、代码混合排版中的全半角、空格、中英文标点等问题

功能

  • 全角数字、英文字母、标点改为半角
  • 空格修正
    • 中文字符与中文字符、数字之间去除空格
    • 中文字符与英文字符
      • 汉字与英文字母之间去除空格
      • 汉字与英文标点的闭侧之间去除空格,开侧有且只有一个空格
      • 中文标点与英文字符之间去除空格
    • 英文字符与英文字符
      • 英文字母与英文字母之间空格保持原样
      • 英文字母与英文标点的闭侧之间去除空格,开侧有且只有一个空格
      • 英文标点的开侧与闭侧、闭侧与闭侧之间去除空格,开侧与开侧之间有且只有一个空格
    • 英文字符与数字
      • 数字与英文字母之间空格保持原样
      • 数字与英文标点的闭侧之间去除空格,开侧(除逗号、句号、冒号外)有且只有一个空格
    • 数字与数字之间空格保持原样
  • 中英文标点修正
    • 根据句子内容判断句子是中文还是英文
    • 中文句子中的英文标点改为中文标点,英文句子中的中文标点改为英文标点
  • 汉字与英文字母、数字之间插入次级空格,次级空格的形式可以由用户定义,如忽略、普通空格、1/4 em等
  • 标点风格修正
    • 中文句号统一为全角空心句号、全角实心句号或英文句号
    • 中文引号统一为弯引号、全角直角引号、英文直引号或 TeX 记号
    • 英文引号改为 TeX 记号

TODO

  • 根据语义识别引号,区分英文撇号与单引号
  • 识别URL与文件名,不修改其中的标点
  • 将一行分成多个句子
  • 根据语义判断句子是中文还是英文
  • 根据语义修改数字、英文字母、英文标点之间的空格
  • 根据语义修改专有名词的大小写
  • 简体/繁体中文转换
  • 日文排版

参考

https://github.com/sparanoid/chinese-copywriting-guidelines

https://github.com/ricoa/copywriting-correct

示例

https://github.com/martinwu42/read-matrix 使用本项目排版

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].