-
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
latexindent.exe win32 #326
Comments
Hello,
Yes, it's available from the https://github.com/cmhughes/latexindent.pl/releases/tag/V3.14 page code 1replacements:
-
# change {\\... into { \\...
substitution: |-
s/\{\h*(\\|[a-z]|[A-Z])/\{ $1/sgx
when: after
-
# change <letter>} into <letter> }
substitution: |-
s/([a-z]|[A-Z])\h*\}/$1 \}/sgx
when: after
-
# change <letter>{ into <letter> {
substitution: |-
s/([a-z]|[A-Z])\h*\{/$1 \{/sgx
when: after
indentRules:
maoxuan_hyper_link:nn:
body: ' ' called with \cs_new_protected_nopar:Npn\maoxuan_hyper_link:nn
{ \hyper@link { link }} code 2lookForAlignDelims:
geometry:
delimiterRegEx: '(=)'
specialBeginEnd:
papersize:
begin: '\{\h*[0-9]+'
end: 'mm\h*\}'
specialBeforeCommand: 1
indentRules:
geometry:
body: ' ' gives \geometry
{
papersize = { 130mm , 184mm } ,
lines = 25 ,
hmargin = 15mm ,
bindingoffset = 5mm ,
headheight = 10pt ,
headsep = \baselineskip ,
includehead = true ,
vcentering = true
} code 3lookForAlignDelims:
mybegin:
delimiterRegEx: '(=)'
specialBeginEnd:
mybegin:
begin: '\\mybegin'
end: '\\myend' gives \geometry
\mybegin %%%%%%%% <-- can be customized begin and end
papersize = { 130mm , 184mm } ,
lines = 25 ,
hmargin = 15mm ,
bindingoffset = 5mm ,
headheight = 10pt ,
headsep = \baselineskip ,
includehead = true ,
vcentering = true
\myend %%%%%%%% <-- can be customized begin and end code 4lookForAlignDelims:
l_maoxuan_headsep_dim:
delimiterRegEx: '(-)' gives \dim_set:Nn \l_maoxuan_headsep_dim
{
\headsep - \box_ht:N \l_maoxuan_main_head_rule_box
- \box_dp:N \l_maoxuan_main_head_rule_box %%%%%%%% <-- this line need extra indent
} code 5lookForAlignDelims:
xeCJKsetup:
delimiterRegEx: '(=)'
indentRules:
xeCJKsetup:
body: ' ' gives \xeCJKsetup
{
AllowBreakBetweenPuncts = true ,
CheckSingle = true ,
AutoFakeBold = false ,
AutoFakeSlant = false ,
CheckFullRight = true ,
NewLineCS+ = \mxendarticle \item \mnitem
\maoxuan_endline_mark: , %%%%%%%% <-- this line need extra indent
NoBreakCS+ = \mnote ,
PunctStyle = kaiming ,
KaiMingPunct+ = :; ,
} I don't like the following, it's quite a hack, but lookForAlignDelims:
xeCJKsetup:
delimiterRegEx: '(=)'
indentRules:
xeCJKsetup:
body: ' '
mxendarticle: ' '
specialBeginEnd:
mxendarticle:
begin: '\\mxendarticle'
end: ',' gives \xeCJKsetup
{
AllowBreakBetweenPuncts = true ,
CheckSingle = true ,
AutoFakeBold = false ,
AutoFakeSlant = false ,
CheckFullRight = true ,
NewLineCS+ = \mxendarticle \item \mnitem
\maoxuan_endline_mark: , %%%%%%%% <-- this line need extra indent
NoBreakCS+ = \mnote ,
PunctStyle = kaiming ,
KaiMingPunct+ = :; ,
} |
Hi cmhughes, Thanks for your quick reply.
|
|
Thanks for this.
We can adapt the code I provided above replacements:
-
substitution: |-
s/([a-z]|[A-Z])\h*\\/$1 \\/sgx
when: after This means that a letter followed 0 or more spaces, followed by a
There are no general rules for this. You should be able to adapt the code I provided on a per-case basis.
The regex syntax is standard, it's not particular to
I tested this on a Windows laptop, and was not able to reproduce this error. |
I check your actions, your perl environment is 64bit, and the action's author said he have no plan to support x86-32 in issue 615. maybe we should find a way to install 32bit perl environment. I test in my PC:
I build 32bit And I google another way to install strawberry perl on windows, maybe you can also check.
I find the problem: I download
And I think your logic is not best:
|
The I'm open to trying to get a 32-bit version of |
Here's a link to the file that creates latexindent.exe |
I'm sorry, I don't know how to progress this. I'm closing it for the moment, if you can progress it, pull requests to develop, please. |
Hi cmhughes,
Thanks for your nice indent tool. Can I expect some new features?
can you build 32bit latexindent.exe still?
for latex3 code, can set such as 'add extra space' to each token to separate them.
code1:
indent to:
explain:
code2:
indent to:
code3:
indent to:
code4:
indent to:
code5:
indent to:
The text was updated successfully, but these errors were encountered: