- 追加された行はこの色です。
- 削除された行はこの色です。
*[[秀丸エディタ:http://hide.maruo.co.jp/software/hidemaru.html]] [#z8c2c3a5]
*[[秀丸エディタ:https://hide.maruo.co.jp/software/hidemaru.html]] [#z8c2c3a5]
&color(White,#5F2F2F){ ''◆目次◆'' };&br;
秀丸エディタは国産のテキストエディタ(シェアウェア)です.
-[[秀まるおのホームページ(サイトー企画):https://hide.maruo.co.jp/]]
--[[秀丸エディタ:https://hide.maruo.co.jp/software/hidemaru.html]]
--[[twitter:https://twitter.com/hidemaruinfo]]
----
#contents
----
*秀丸エディタとは [#w73ea51b]
**動作環境 [#m62ba31c]
秀丸エディタは国産のテキストエディタです。 (シェアウェア)
Windows 環境で幅広く動作します.
詳細は[[秀まるおのホームページ(サイトー企画)-秀丸エディタ:https://hide.maruo.co.jp/software/hidemaru.html]] を参照してください.
-[[秀まるおのホームページ(サイトー企画):http://hide.maruo.co.jp/]]
--[[秀丸エディタ:http://hide.maruo.co.jp/software/hidemaru.html]]
--[[twitter:http://twitter.com/hidemaruinfo]]
-[[秀まるおのホームページ(サイトー企画) ヘルプファイルサイト:http://homepage3.nifty.com/kons/hidemaru/helpsite/]]
--[[秀丸エディタヘルプ目次:http://homepage3.nifty.com/kons/hidemaru/helpsite/hidemaru/]]
-[[秀丸エディタ - 窓の杜ライブラリ:http://www.forest.impress.co.jp/library/software/hidemaru/]]
-[[秀丸エディタ - Vector:http://www.vector.co.jp/soft/win95/writing/se086280.html]]
**秀丸エディタフリー制度 [#faebc82e]
**動作環境 [#d2be5bb8]
秀丸エディタには,特定の条件に当てはまる場合に限り,期間限定で無料で利用できる制度があります.
対象は
Windows 8, 7, Vista, 2003, XP, 2000, NT4.0, Me, 98, 95
-学生(アカデミックフリー個人・アカデミックフリー団体)
-フリーソフトウェア作者
-ウィンドウズ関係を扱う書籍や雑誌の著者
**ChangeLog [#k3ce2677]
です.
[[秀丸エディタフリー制度:https://hide.maruo.co.jp/support/hidemarufree.html]]を参照してください.
-[[秀丸エディタ改版履歴:http://hide.maruo.co.jp/software/hidemaruhist.html]]
-[[秀丸エディタβバージョン改版履歴:http://hide.maruo.co.jp/software/hidemaruhist_pre.html]]
*秀丸エディタフリー制度 [#faebc82e]
**標準のエンコードの種類 --> Unicode(UTF-8) を選択する [#m676962a]
秀丸エディタには,特定の条件に当てはまる場合に限り,期間限定で無料で利用できる制度があります。~
対象は,学生([[アカデミックフリー個人:http://hide.maruo.co.jp/support/hmfree1.html]]/[[アカデミックフリー団体:http://hide.maruo.co.jp/support/hmfree2.html]])・[[フリーソフトウェア作者:http://hide.maruo.co.jp/support/hmfree3.html]]・[[ウィンドウズ関係の書籍や雑誌の著者:http://hide.maruo.co.jp/support/hmfree4.html]]
です。~
秀丸エディタの標準のエンコードの種類は初期設定では日本語 (Shift-JIS) です.
Unicode (UTF-8) を選択します.
-[[秀丸エディタフリー制度:http://hide.maruo.co.jp/support/hidemarufree.html]]
メニューの「その他」-->「動作環境」を選択すると設定画面が開きます.
下のほうにある「上級者向け設定」にチェックを入れると,詳細な設定ができるようになります.
ここで「ファイル」-->「エンコード1」を選択すると,エンコードの設定画面に移ります.
*正規表現 [#f7fa3efd]
-[[h-tom's Warehouse - top:http://homepage3.nifty.com/_htom/]]
--[[h-tom's Warehouse - 秀丸エディタ macro:http://homepage3.nifty.com/_htom/macro/]]
---[[hmonig.dll:http://homepage3.nifty.com/_htom/macro/macro_dll.html#label-18]]
-「ファイルの内容を解析してエンコードの種類を自動認識する」の下のリストで,Unicode (UTF-8) が一番上にくるように順序を変更します.
>
&ref(hidemaru-01.png);
<
-「標準のエンコードの種類」のボタンをクリックして設定画面を出し,「エンコードの種類」を Unicode (UTF-8) に変更します.こうすることで,新規ファイルなどは標準で UTF-8 になります.
>
&ref(hidemaru-02.png);
<
*マクロ [#m32041fb]
**行番号の計算方法 [#kfec9023]
-[[秀まるおのホームページ(サイトー企画) ヘルプファイルサイト:http://homepage3.nifty.com/kons/hidemaru/helpsite/]]
--[[秀丸エディタ マクロ言語ヘルプ目次:http://homepage3.nifty.com/kons/hidemaru/helpsite/hidemac/]]
デフォルトでは行番号の計算方法がワープロ的(折り返しも1行とする)になっています.
TeX で文書を作成する場合は行番号の計算方法をエディタ的(改行だけを数える)に変更します.
**[[祝鳥 (のりてふ)>祝鳥]] [#mdf32e5b]
**[[guishell, TeXmac>guishell]] [#ld68541f]
**正規表現 [#f7fa3efd]
//**RaTeX0e [#s1e27527]
//-[[RaTeX0e:http://uca-works.com/program/ratex.html]]
//(福中 公輔 さん)
//
//**AutoHotKey スクリプト [#va7fd93d]
//-[[AutoHotKey スクリプト:http://ryo-t.com/diary/?p=94]]
//(谷内 稜 さん)
//
//**秀丸エディタで LaTeX [#ubdba7fd]
//-[[秀丸エディタで LaTeX (hidemacro-070502.tar.gz):http://www.cymric.jp/old/tex/hidemaru.html]]
//(Maxima 普及委員会)
//
//**秀丸で簡単コンパイル [#m6700653]
//-[[秀丸で簡単コンパイル:http://imawamukashi.web.fc2.com/TeX/hidemacro.html]]
//(Outsider's Website)
//
//**秀丸マクロ for TeX editing [#h3f49b53]
//-[[秀丸マクロ for TeX editing:http://wiki.livedoor.jp/fuhmi/d/%CA%AA%C3%D6]]
//(fuhmi さん)
//
//**トリビュート [#qac4762a]
//-[[トリビュート:http://www.vector.co.jp/soft/win95/writing/se259789.html]], [[LaTeX2e 用強調表示定義ファイル:http://homepage2.nifty.com/masema/software/LaTeX_hilight.html]]
//(ませま さん)
//
//**LaTeX Compile HIDEMARU Macro [#w6e15581]
//-[[LaTeX Compile HIDEMARU Macro (LaTeXコンパイル用秀丸マクロ):http://hide.maruo.co.jp/lib/macro/lcm11.html]]
//(岩里 さん)
//
//**TeX用改行コード挿入マクロ [#ndf01264]
//-[[TeX用改行コード挿入マクロ:http://hide.maruo.co.jp/lib/macro/il-fc093.html]] (haze さん)
//
//**TeX Module Control with HIDEMARU Macro [#rff2c60d]
//-[[TeX Module Control with HIDEMARU Macro:http://www.ceres.dti.ne.jp/~sugiura/hidemaru/macros/tex_mc/index.html]]
//(杉浦 方紀 さん)
//
//**LaTeX コンパイル支援マクロ [#ob9080ba]
//-[[LaTeX コンパイル支援マクロ:http://www.seman.cs.uec.ac.jp/~inuzuka/hidemac.html]]
//(犬塚 敦史 さん)
//
//**飛鳥 (ひちょう) HiTeX [#y3147877]
//-[[飛鳥 (ひちょう) HiTeX:http://www.yatex.org/HiTeX/]]
//(安田 晴行 さん)
-[[h-tom's Warehouse - top:http://htom.in.coocan.jp/]]
--[[h-tom's Warehouse - 秀丸エディタ macro:http://htom.in.coocan.jp/macro/]]
---[[hmonig.dll:http://htom.in.coocan.jp/macro/macro_dll.html#N3.2]]
**pdfpLaTeX.mac [#h4eb5579]
----
call main;
endmacro;
main:
##fso = createobject("Scripting.FileSystemObject");
$$c = callmethod_returnstr(##fso, "GetParentFolderName", filename2);
$$b = callmethod_returnstr(##fso, "GetBaseName", filename2);
$$cd = "cd /d " + "\"" + $$c + "\"";
$$latex = "platex -synctex=1 -guess-input-enc -sjis-terminal";
if ((charset & 0x3F) == 6) {
$$latex = "platex -synctex=1 -no-guess-input-enc -kanji=utf8 -sjis-terminal";
} else if ((charset & 0x3F) == 1) {
$$latex = "platex -synctex=1 -no-guess-input-enc -kanji=sjis -sjis-terminal";
} else if ((charset & 0x3F) == 3) {
$$latex = "platex -synctex=1 -no-guess-input-enc -kanji=euc -sjis-terminal";
} else if ((charset & 0x3F) == 4) {
$$latex = "platex -synctex=1 -no-guess-input-enc -kanji=jis -sjis-terminal";
}
$$latex = $$latex + " " + "-jobname=" + "\"" + $$b + "\"" + " " + "\"" + $$b + "\"";
$$dvipdfm = "dvipdfmx" + " " + "\"" + $$b + "\"";
$$cmd = "cmd /c " + $$cd + " && " + $$latex + " && " + $$dvipdfm;
question $$cmd;
if (result == yes) {
save;
##shell = createobject("WScript.Shell");
callmethod ##shell, "Run", $$cmd;
releaseobject ##shell;
}
releaseobject ##fso;
----
**TeXworks.mac [#r100b824]
----
call main;
endmacro;
main:
##fso = createobject("Scripting.FileSystemObject");
##re = createobject("VBScript.RegExp");
$$currentTeXFile = filename2;
setpropstr ##re, "Pattern", "\.[^.]*$";
$$pdfFile = callmethod_returnstr(##re, "Replace", $$currentTeXFile, ".pdf");
$$texworks = "texworks";
if (!existfile($$pdfFile)) {
$$mainTeXFile = input("Input the path to main TeX file.", callmethod_returnstr(##re, "Replace", $$pdfFile, ".tex"));
if ($$mainTeXFile != "") {
$$pdfFile = callmethod_returnstr(##re, "Replace", $$mainTeXFile, ".pdf");
}
}
$$mainTeXDir = callmethod_returnstr(##fso, "GetParentFolderName", $$pdfFile);
$$cd = "cd /d " + "\"" + $$mainTeXDir + "\"";
$$pdfFile = "\"" + $$pdfFile + "\"";
$$args = $$texworks + " " + $$pdfFile;
$$cmd = "cmd /c " + $$cd + " && echo " + $$args + " | cmd";
##shell = createobject("WScript.Shell");
callmethod ##shell, "Run", $$cmd;
releaseobject ##shell;
releaseobject ##re;
releaseobject ##fso;
----
**マクロ [#q3a2d324]
*SumatraPDF との連携 [#r1840cf4]
-[[秀まるおのホームページ(サイトー企画) ヘルプファイルサイト:http://hidemaruo.mydns.jp:81/helpsite/]]
--[[秀丸エディタ マクロ言語ヘルプ目次:http://hidemaruo.mydns.jp:81/helpsite/hidemac/html/010_Intro.html]]
[[祝鳥]]は SumatraPDF の forward and inverse search に対応しています.
マクロを使うと LaTeX 環境を簡単に作ることができます.
一例を[[秀丸エディタ/マクロ]]に挙げておきます.
**forward and inverse search (SumatraPDF を前面に表示したい場合) [#k083ca2e]
LaTeX 用の支援として開発されたマクロ集としては,[[祝鳥]]があります.
***SumatraPDF.mac [#y16d42fd]
----
call main;
endmacro;
main:
##fso = createobject("Scripting.FileSystemObject");
##re = createobject("VBScript.RegExp");
$$hidemaru = hidemarudir + "\\Hidemaru.exe";
$$currentTeXFile = filename2;
setpropstr ##re, "Pattern", "\.[^.]*$";
$$pdfFile = callmethod_returnstr(##re, "Replace", $$currentTeXFile, ".pdf");
$$line = str(lineno);
$$sumatraPDF = "C:\\Program Files\\SumatraPDF\\SumatraPDF.exe";
if (!existfile($$sumatraPDF)) {
$$sumatraPDF = "C:\\Program Files (x86)\\SumatraPDF\\SumatraPDF.exe";
if (!existfile($$sumatraPDF)) {
$$sumatraPDF = input("Input the path to SumatraPDF.exe.", "SumatraPDF.exe");
if (!existfile($$sumatraPDF)) {
$$sumatraPDF = "SumatraPDF.exe";
}
}
}
$$sumatraPDF = "\"" + $$sumatraPDF + "\"";
if (!existfile($$pdfFile)) {
$$mainTeXFile = input("Input the path to main TeX file.", callmethod_returnstr(##re, "Replace", $$pdfFile, ".tex"));
if ($$mainTeXFile != "") {
$$pdfFile = callmethod_returnstr(##re, "Replace", $$mainTeXFile, ".pdf");
}
}
$$mainTeXDir = callmethod_returnstr(##fso, "GetParentFolderName", $$pdfFile);
$$cd = "cd /d " + "\"" + $$mainTeXDir + "\"";
$$currentTeXFile = "\"" + $$currentTeXFile + "\"";
$$pdfFile = "\"" + $$pdfFile + "\"";
$$args = $$sumatraPDF + " -reuse-instance " + $$pdfFile + " -inverse-search \"\\\"" + $$hidemaru + "\\\" /m3 /j%l \\\"%f\\\"\"" + " -forward-search " + $$currentTeXFile + " " + $$line;
$$cmd = "cmd /c " + $$cd + " && echo " + $$args + " | cmd";
##shell = createobject("WScript.Shell");
callmethod ##shell, "Run", $$cmd;
releaseobject ##shell;
releaseobject ##re;
releaseobject ##fso;
----
**inverse search [#zd12c371]
**関連リンク [#mec8cd02]
-32bit版 Windows で 32bit版の秀丸エディタを使用する場合
-64bit版 Windows で 64bit版の秀丸エディタを使用する場合
-[[TeXLive 2012でLaTeXのエラー発生時に秀丸エディタを起動する設定:http://d.hatena.ne.jp/hyuki/20121016/tex]]
-[[秀丸エディタのお勧めの設定:https://tipszone.jp/20121003_hidemaru-config/]]
-[[「秀丸エディタ」定番のテキストエディター - 窓の杜ライブラリ:https://forest.watch.impress.co.jp/library/software/hidemaru/]]
-[[秀丸エディタ - Vector:http://www.vector.co.jp/soft/win95/writing/se086280.html]]
"C:\Program Files\Hidemaru\Hidemaru.exe" /m3 /j%l "%f"
***ChangeLog [#k3ce2677]
-64bit版 Windows で 32bit版の秀丸エディタを使用する場合
-[[秀丸エディタ改版履歴:https://hide.maruo.co.jp/software/hidemaruhist.html]]
-[[秀丸エディタβバージョン改版履歴:https://hide.maruo.co.jp/software/hidemaruhist_pre.html]]
"C:\Program Files (x86)\Hidemaru\Hidemaru.exe" /m3 /j%l "%f"
*Adobe Reader との連携 [#z5e51515]
**pdfpLaTeXA.mac [#q37b5bf9]
----
call main;
endmacro;
main:
##fso = createobject("Scripting.FileSystemObject");
$$c = callmethod_returnstr(##fso, "GetParentFolderName", filename2);
$$b = callmethod_returnstr(##fso, "GetBaseName", filename2);
$$cd = "cd /d " + "\"" + $$c + "\"";
$$latex = "platex -guess-input-enc -sjis-terminal";
if ((charset & 0x3F) == 6) {
$$latex = "platex -no-guess-input-enc -kanji=utf8 -sjis-terminal";
} else if ((charset & 0x3F) == 1) {
$$latex = "platex -no-guess-input-enc -kanji=sjis -sjis-terminal";
} else if ((charset & 0x3F) == 3) {
$$latex = "platex -no-guess-input-enc -kanji=euc -sjis-terminal";
} else if ((charset & 0x3F) == 4) {
$$latex = "platex -no-guess-input-enc -kanji=jis -sjis-terminal";
}
$$latex = $$latex + " " + "-jobname=" + "\"" + $$b + "\"" + " " + "\"" + $$b + "\"";
$$dvipdfm = "dvipdfmx" + " " + "\"" + $$b + "\"";
$$pdf = "\"" + $$b + ".pdf" + "\"";
$$pdfopen = "powershell -Command \"& {$pdf = \"\"" + $$pdf + "\"\"; $pages = (pdfinfo $pdf | Select-String \"^Pages:\"); $page = (-split $pages)[1]; pdfopen --rxi --file $pdf --page $page}\"";
$$pdfclose = "tasklist /fi \"IMAGENAME eq AcroRd32.exe\" /nh | findstr \"AcroRd32.exe\" > nul && pdfopen --rxi --file " + $$pdf + " && pdfclose --rxi --file " + $$pdf;
$$cmd = "cmd /c " + $$cd + " && " + $$pdfclose + " & " + $$latex + " && " + $$dvipdfm + " && " + $$pdfopen;
question $$cmd;
if (result == yes) {
save;
##shell = createobject("WScript.Shell");
callmethod ##shell, "Run", $$cmd;
releaseobject ##shell;
}
releaseobject ##fso;
----
*スクリプト [#w87ef5ac]
**Happy [#q96fb99f]
-[[Happy:http://www.u-gakugei.ac.jp/~takizawa/Happy/]]
--HappyInput (TeX 入力支援スクリプト)
--HappyTeX (TeX タイプセット&プレビュー支援スクリプト)
*関連リンク [#mec8cd02]
-[[TeXLive 2012でLaTeXのエラー発生時に秀丸エディタを起動する設定:http://d.hatena.ne.jp/hyuki/20121016/tex]]
-[[秀丸エディタのお勧めの設定:http://tipszone.jp/20121003_hidemaru-config/]]