-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] More friendly support for CJK words (characters) #529
Comments
采用半宽英文字体,开启 unicode-string |
终究只是权宜之计,真正根除还得作者改进统计方式啊
我现在就是用的思源黑HW,中英文标准1:2 |
搞不懂你“统计方式”意思,采用 unicode-string 功能可将 unicode 当作两字符宽来处理,带有汉字的表格可以对齐。不开启这个功能,默认是将所有字符当作等宽的。或者是说,你觉得程序应该根据实际字体的大小来统计,这是排版程序应该干的事情。问题的本质就是汉字比拉丁字母复杂太多,混排时做到中西文等宽会导致拉丁字母太大或汉字太小。若是采用半汉字宽英文,英文又会相对偏小或汉字偏大。我感觉应该给出一个用户设定中西文字体倍率的功能,比如一个汉字等于 1.5 个拉丁字母,而不是只能固定 2。 |
你想的没错,并不是天方夜谭。latexindent 的 unicode::string 功能就是 unicode 的 CJK 分区的字符当作 2 个字符来计算的,但不是实际字体的大小,所以你必须找一个 0.5 倍汉字宽的西文等宽字体配合使用。你需要在 |
还有这个解决方案?!牛逼! |
不知道了,肯定是可以的。如果你用命令行肯定是可以的,如果你用 vscode 你需要在设置中加入参数。 |
I'm sorry, I have no idea what this means
…On Fri, 22 Mar 2024, 00:55 trarer, ***@***.***> wrote:
不知道了,肯定是可以的。如果你用命令行肯定是可以的,如果你用 vscode 你需要在设置中加入参数。
—
Reply to this email directly, view it on GitHub
<#529 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYADCMAFGF6FMMVC6G3YZN6OLAVCNFSM6AAAAABFBRWTS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGEZDIMZWGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@Mikachu2333 has trouble using Unicode::GCString on vscode. |
This repository has nothing to do with vscode, I recommend posting your issue on the vscode repository. |
In the latest version 3.23.7, from the code in
it can be seen that latexindent.exe only automatically loads |
Thanks for answering! And, I use the powershell to run the command So, I change the args and use As the following output and pic show, the vscode use the latexindent in the temp floder instead of the exe file I worote in settings, and the two have different SHA-1 value...
Full vscode settings. "latex-workshop.bibtex-fields.sort.enabled": true,
"latex-workshop.bibtex-format.sort.enabled": true,
"latex-workshop.bibtex-format.tab": "4 spaces",
"latex-workshop.intellisense.file.base": "both",
"latex-workshop.intellisense.package.enabled": true,
"latex-workshop.intellisense.triggers.latex": [],
"latex-workshop.latex.autoClean.run": "onBuilt",
"latex-workshop.latex.build.clearLog.everyRecipeStep.enabled": false,
"latex-workshop.latex.clean.fileTypes": [
"*.aux",
"*.bbl",
"*.blg",
"*.idx",
"*.ind",
"*.lof",
"*.lot",
"*.out",
"*.toc",
"*.acn",
"*.acr",
"*.alg",
"*.glg",
"*.glo",
"*.gls",
"*.ist",
"*.fls",
"*.log",
"*.fdb_latexmk",
"*.synctex.gz"
],
"latex-workshop.latex.recipe.default": "lastUsed",
"latex-workshop.latex.recipes": [
{
"name": "XeLaTeX *2",
"tools": [
"xelatex",
"xelatex"
]
},
{
"name": "XeLaTeX *3",
"tools": [
"xelatex",
"xelatex",
"xelatex"
]
},
{
"name": "XeLaTeX -> BibTeX",
"tools": [
"xelatex",
"bibtex",
"xelatex",
"xelatex"
]
}
],
"latex-workshop.latex.tools": [
{
"args": [
"-synctex=1",
"-interaction=nonstopmode",
"-file-line-error",
"%DOCFILE%"
],
"command": "xelatex",
"name": "xelatex"
},
{
"args": [
"%DOCFILE%"
],
"command": "bibtex",
"name": "bibtex"
}
],
"latex-workshop.latexindent.args": [
"--screenlog",
"--overwriteIfDifferent",
"--cruft=%DIR%/",
"--modifylinebreaks",
"--yaml=defaultIndent: ' '",
"--GCString",
"%DOC_W32%"
],
"latex-workshop.latexindent.path": "D:\\texlive\\2024\\bin\\windows\\latexindent.exe",
"latex-workshop.message.error.show": false,
"latex-workshop.message.information.show": true,
"latex-workshop.message.warning.show": false,
"latex-workshop.showContextMenu": true,
"latex-workshop.synctex.afterBuild.enabled": true,
"latex-workshop.texcount.autorun": "onSave",
"latex-workshop.view.autoFocus.enabled": true,
"latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
"latex-workshop.view.pdf.invertMode.enabled": "auto",
"latex-workshop.view.pdf.viewer": "browser", |
When using |
But there is no other possible reason for this issue to occur,furthermore, I am not sure if this is related to paths that were not wrapped in double quotation marks. Besides, when running from the command line, everything is normal and correct, so I believe this is due to VSCode |
After I use the exe file repacked by @fengzyf , when I was about to use |
I believe this is fixed as of https://github.com/cmhughes/latexindent.pl/releases/tag/V3.23.8 let me know if not |
Wonderful! Tremendous! The problem that has been bothering me for a long time has been perfectly fixed! |
Here is a tabular which has been formatted by latexindent, but as you can see, due to the symbol of "~", the tabular could not be sorted as an all-English tabular.
As we all know, one Chinese character occupying space between two English characters. And all qusetions break out for that reason especially when I wrote the sentences with mixing Chinese and English, as shown in the following figure. Therefore, I hope you can make improvements to this issue...
Catastrophic
The text was updated successfully, but these errors were encountered: