我想把现有的.tex-File
中的betacode转换成普通的希腊字母。在
例如:我想替换:
\bcode{lo/gos}
使用简单:
^{pr2}$所有其他的字形也是如此。幸运的是,似乎有一个python脚本可以做到这一点。但是,由于完全没有经验,我根本不知道如何运行它。在
以下是python sript的代码:
^{3}$这里有一个小的.tex文件,它应该可以工作。在
\documentclass[12pt]{scrbook}
\usepackage[polutonikogreek, ngerman]{babel}
\usepackage[ngerman]{betababel}
\usepackage{fontspec}
%\defaultfontfeatures{Ligatures=TeX}
%\newfontfeature{Microtype}{protrusion=default;expansion=default;}
\begin{document}
\bcode{lo/gos}
\end{document}
如果脚本不起作用:是否可以将代码Makro中的所有字符串转换为regex之类的内容?例如“o/”到ό等等?在这里选择的武器是什么?在
我有安装python吗?
在shell提示符处尝试
python -V
。您的代码是python2代码,因此您将使用python2版本。在我需要安装Python
如果您不需要复杂的环境(对于这个问题也不需要),最直接的方法就是转到python.org。别忘了你需要python2。在
运行程序
一般来说,它将简单到:
要获取输出:
^{pr2}$剧本行吗?
差不多了。您需要将脚本末尾的代码替换为以下代码:
结果
相关问题 更多 >
编程相关推荐