将LaTeX标记转换为unicode
unicodeit的Python项目详细描述
独角兽
将LaTeX标记转换为unicode。 在线提供unicodeit.net。在
示例
\alpha α, \beta β, \infty ∞ e^+ e⁺, \mu^- μ⁻ \exists ∃, \nexists ∄
\int ∫, \sum ∑, \partial ∂ \to →, p\bar{p} pp̅ \mathcal{H} ℋ, \mathbb{R} ℝ
\slash{\partial} ∂̸ \underline{x} x̲ \phone ☎, \checkmark ✓
\dot{x} ẋ, \ddot{x} ẍ A^6 A⁶, m_0 m₀ \Im ℑ, \Re ℜ, \hbar ℏ
\gamma γ, \Gamma Γ \~{O} Õ \perp ⊥, \parallel ∥
\sfrac{3}{5} ⅗ \therefore ∴, \because ∵ \subset ⊂, \supset ⊃
Python
使用pip install unicodeit
安装并运行
或者在Python中
importunicodeitprint(unicodeit.replace('\\alpha'))
JavaScript/类型脚本
使用npm install unicodeit --save-dev
安装并按如下方式使用:
import'unicodeit';console.log(unicodeit.replace('\\alpha'));
Mac自动机
创建您自己的自动机工作流:
- 创建一个新的“快速行动”。在
- 选择“输出替换所选文本”。在
- 添加操作“运行Shell脚本”。在
- 从下拉列表中,选择“传入:作为参数”。在
- 命令是:
/usr/local/bin/python3 -m unicodeit.cli $1
。这个Python解释器必须安装unicodeit;例如,/usr/local/bin/python3 -m pip install unicodeit
。在 - 应该是这样的:
要设置键盘快捷键,请转到System Preferences
→
Keyboard
→Keyboard Shortcuts
→Services
→Text
→{Command+Option+Shift U
这样的键盘快捷方式。在
现在,您可以在许多应用程序中使用新的键盘快捷键,例如在Keynote中:
- 项目
标签: