Closed Harry-Chen closed 8 years ago
WinEdt.dnt
目前在 \Local\
下面,应该有三个,另外两个对应不同字符编码的初始配置。修改 \ConfigEx\GUI.ini
, 加入 xy-pic 相关配置,并将相关文件复制到了 \Bitmaps\
\Macros\
\Templates\
下面
具体:(文件最后)
PAGE="Diagrams"
MODE_FILTER="*"
GROUP="Bitmaps\Gui\Xy-pic\pushback.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=2
WIDTH=55
HEIGHT=40
ITEM="Pushout, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\pushout.edt')"
ITEM="Pullback, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\pullback.edt')"
GROUP="Bitmaps\Gui\Xy-pic\rect.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=3
WIDTH=49
HEIGHT=40
ITEM="Rectangular (n x m), Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\rectang.edt')"
ITEM="Cubic, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\cubic.edt')"
ITEM="Lift Square, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\lift.edt')"
GROUP="Bitmaps\Gui\Xy-pic\triag1.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=4
WIDTH=50
HEIGHT=40
ITEM="Bottom Triangle"
MACRO="Exe('%b\Macros\Xy-pic\b-triag.edt')"
ITEM="Top Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\t-triag.edt')"
ITEM="Left Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\l-triag.edt')"
ITEM="Right Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\r-triag.edt')"
GROUP="Bitmaps\Gui\Xy-pic\triag2.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=4
WIDTH=45
HEIGHT=40
ITEM="Top-Right Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\tr-triag.edt')"
ITEM="Lower-Right Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\lr-triag.edt')"
ITEM="Lower-Left Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\ll-triag.edt')"
ITEM="Top-Left Triangle, Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\tl-triag.edt')"
GROUP="Bitmaps\Gui\Xy-pic\exact.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=1
WIDTH=90
HEIGHT=40
ITEM="Exact Sequence (n), Xy-pic"
MACRO="Exe('%b\Macros\Xy-pic\exact.edt')"
GROUP="Bitmaps\Gui\Xy-pic\cd.bmp"
TOP=0
SPACE=0
ROWS=1
COLUMNS=1
WIDTH=49
HEIGHT=40
ITEM="Commutative Diagram (n x m), AmSTeX"
MACRO="Exe('%b\Macros\Xy-pic\cd.edt')"
修改\ConfigEx\MainMenu.ini
,加入CTeX_Tools
菜单
具体如下(在第3717行后):
// CTeX Tools
SUBMENU="CTeX_Tools>"
CAPTION="CTeX Tools"
CONFIG_FILTER="Default;MiKTeX"
IMAGE="Window"
ITEM="TexFriend"
CAPTION="TexFriend..."
MACRO="Run('%b\Plugins\TexFriend\TexFriend.exe');"
ITEM="-"
ITEM="CCT_LaTeX"
CAPTION="&CCT && LaTeX"
MACRO="Run(|ctex.exe --src-specials -latex-runs=1 -dvips '%N%T'|, |%P|);"
REQ_FILTER=:"%!M=TeX"?"%!T=.ctx"
ITEM="CTeXify"
CAPTION="CTe&Xify"
MACRO="Exe('%b\MUI\CTeXify\CTeXify.edt','%P');"
REQ_FILTER=:"%!M=TeX"?"%!T=.ctx"
ITEM="-"
ITEM="TY_LaTeX"
CAPTION="TY"
MACRO="Run(|tywin.exe '%N%T'|, |%P|);"
REQ_FILTER=:"%!M=TeX"?"%!T=.ty"
ITEM="TYCFG"
CAPTION="TY Config"
MACRO="Run('tywin.exe');"
END
ITEM="-"
将\MUI\CTeXify
复制到相应目录下
修改\Exec\Erase Working Files.edt
,使清除列表中加入 CTeXify 产生的临时文件
如下(41行后)
AddFileItem(1,"CTEXTEMP Files","ctextemp_*.*","");
修改\Exec\ExeCompiler.edt
,以某些方式编译时自动调用gbk2uni
防止PDF书签乱码
如下(238行:no_LOG::
段后)
IfStr("%!9","LaTeX", "=",!"JMP(!'gbk2uni');");
IfStr("%!9","PDFLaTeX", "=",!"JMP(!'gbk2uni');");
IfStr("%!9","TeXify", "=",!"JMP(!'gbk2uni');");
IfStr("%!9","PDFTeXify","=",!"JMP(!'gbk2uni');");
JMP(!'gbk2uni-Done');
:gbk2uni:: ================================================
IfFileExists("%!6\%N.out","",!"JMP(!'gbk2uni-Done');");
IfStr("%$('%!9-WinEdt_Console');",'1','=',>
!|RunConsole('gbk2uni.exe "%N"','%!6','%!9 ...',1,1);|,>
!|WinExe('','gbk2uni.exe "%N"','%!6','%!9 ...', %!0, %!2,>
'', '%b\_Out.log', '%b\_Err.log',%!1);|);
:gbk2uni-Done:: ================================================
在\Config\Startup.edt
的:Profile_OK::
段中重置并调用 TeXFriend
// reset TexFriend
SetRegStr("HKEY_CURRENT_USER","Software\VB and VBA Program Settings\TexFriend\Refreshed Packages","WinEdt","True");
SetRegStr("HKEY_CURRENT_USER","Software\VB and VBA Program Settings\TexFriend\Options","AlwaysOnTop","False");
SetRegStr("HKEY_CURRENT_USER","Software\VB and VBA Program Settings\TexFriend\Paths","WinEdt","%B");
// start TexFriend
Assign("StartTexFriend","%@('HKEY_CURRENT_USER','Software\VB and VBA Program Settings\TexFriend\Options','StartupByWinEdt');");
IfStr("%$('StartTexFriend')","False","=","","Run(""%b\Plugins\TexFriend\TexFriend.exe"")");
在\Config\Exit.edt
中关闭 TeXFriend
CloseAppl("TexFriend");
把\Plugins\TexFriend
复制到对应目录下
最后加入我的编码切换工具,把配置好的 preset 放到 WinEdt 根目录下面。 完成。
切换编码后,有没有可能保留 WinEdt 打开文件的记录?
Sorry but...nope WinEdt所有的配置之类都缓存在一个文件里面,覆盖就是全部覆盖了…
这个 issue 主要拿来记一下我对 WinEdt 做了什么…