- 追加された行はこの色です。
- 削除された行はこの色です。
&size(40){Texmaker は日本語入力に関する不具合とコマンドのパラメータの処理に関する不具合が発生することがあるかもしれません.};~
&size(40){問題が発生する場合は Texmaker の派生版の [[TeXstudio]] を使用してください.};~
*[[Texmaker:https://www.xm1math.net/texmaker/]] [#x838d855]
*[[Texmaker:http://www.xm1math.net/texmaker/]] → 日本語入力に関する不具合が発生する場合は派生版の [[TeXstudio]] を使用する [#x838d855]
Texmaker は,統合環境として使える LaTeX エディタです.
SyncTeX もサポートされています.
Texmaker のデフォルトの文字コードは UTF-8 です.
#ref(http://www.xm1math.net/texmaker/texmaker128.png,right,around,nolink,Texmaker)
現在は Texmaker から開発がフォークし,機能の追加や不具合が修正された [[TeXstudio]] もあります.ただし,使用感が Texmaker とは違う部分もあります.
&color(White,#5F2F2F){ ''◆CONTENTS◆'' };&br;
-[[Texmaker (free cross-platform latex editor):https://www.xm1math.net/texmaker/]]
--[[Texmaker : User manual:https://www.xm1math.net/texmaker/doc.html]]
----
#contents
----
#img(,clear)
*Texmaker とは [#y02c99e4]
Texmaker は,LaTeX エディタ (統合環境) です.~
SyncTeX がサポートされています.~
Texmaker のデフォルトの文字コードは UTF-8 です.~
-[[Texmaker (free cross-platform latex editor):http://www.xm1math.net/texmaker/]]
--[[User manual:http://www.xm1math.net/texmaker/doc.html]]
-[[Texmaker Project on Google Code:https://code.google.com/p/texmaker/]]
**動作環境 [#tf7debca]
Windows, OS X, Linux~
Windows, macOS, Linux
**License [#l7d7100c]
GPLv2
**リリース情報/ChangeLog [#g3ccd7ae]
[[ChangeLog:http://www.xm1math.net/texmaker/log.html]]
**派生版 [#n8123b82]
**[[スクリーンショット:http://www.xm1math.net/texmaker/shots.html]] [#x2eee2d6]
[[&ref(http://www.xm1math.net/texmaker/texmakertop.png,around,nolink,the structure, the document and the embedded pdf viewer side by side);>http://www.xm1math.net/texmaker/texmakertop_big.png]]&br;
(the structure, the document and the embedded pdf viewer side by side)&br;
&br;
[[&ref(http://www.xm1math.net/texmaker/sidebyside.png,around,nolink,two documents side by side);>http://www.xm1math.net/texmaker/sidebyside_big.png]]&br;
(two documents side by side)&br;
-[[TeXstudio]]
[[&ref(http://www.xm1math.net/texmaker/thumblinux.png,around,nolink,Linux で動作する Texmaker);>http://www.xm1math.net/texmaker/texmakerlinux.png]]
[[&ref(http://www.xm1math.net/texmaker/thumbmacos.png,around,nolink,OS X で動作する Texmaker);>http://www.xm1math.net/texmaker/texmakermacos.png]]&br;
Texmaker at work on Linux Texmaker at work on OS X&br;
&br;
[[&ref(http://www.xm1math.net/texmaker/thumbw32.png,around,nolink,Windows 7 で動作する Texmaker);>http://www.xm1math.net/texmaker/texmakerw32.png]]
[[&ref(http://www.xm1math.net/texmaker/thumbgnome3.png,around,nolink,GNOME 3 で動作する Texmaker);>http://www.xm1math.net/texmaker/texmakergnome3.png]]&br;
Texmaker at work on Windows 7 Texmaker at work on GNOME 3&br;
&br;
[[&ref(http://www.xm1math.net/texmaker/thumbqt5.png,around,nolink,Qt5 でコンパイルされた Texmaker);>http://www.xm1math.net/texmaker/texmakerqt5.png]]
[[&ref(http://www.xm1math.net/texmaker/thumbwindows8.png,around,nolink,Windows 8 で動作する Texmaker);>http://www.xm1math.net/texmaker/windows8.png]]&br;
Texmaker compiled with Qt5 Texmaker at work on Windows 8&br;
&br;
[[&ref(http://www.xm1math.net/texmaker/thumbtexmakerQT5_ubuntu.png,around,nolink,Ubuntu で動作する Qt5 バージョンの Texmaker);>http://www.xm1math.net/texmaker/texmakerQT5_ubuntu.png]]&br;
Qt5 version of Texmaker on Ubuntu&br;
**ダウンロード/インストール [#q69dea61]
**[[特徴>http://www.xm1math.net/texmaker/#features]] [#m6bf2399]
[[Texmaker (free cross-platform latex editor):https://www.xm1math.net/texmaker/download.html]]
から,Windows, macOS, Linux 用の 64-bit バイナリおよびソースコードがダウンロードできます.
>
|BGCOLOR(#CCF):Unicode 対応エディタ|BGCOLOR(#CCF):スペルチェッカー|
|[[&ref(http://www.xm1math.net/texmaker/pics/unicode_s.png,around,nolink,Unicode 対応エディタ);>http://www.xm1math.net/texmaker/pics/unicode.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/spell_s.png,around,nolink,スペルチェッカー);>http://www.xm1math.net/texmaker/pics/spell.png]]|
|BGCOLOR(#CCF):折りたたみ|BGCOLOR(#CCF):補完|
|[[&ref(http://www.xm1math.net/texmaker/pics/folding_s.png,around,nolink,折りたたみ);>http://www.xm1math.net/texmaker/pics/folding.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/completion_s.png,around,nolink,補完);>http://www.xm1math.net/texmaker/pics/completion.png]]|
|BGCOLOR(#CCF):アウトライン|BGCOLOR(#CCF):"マスター"モード|
|[[&ref(http://www.xm1math.net/texmaker/pics/structure_s.png,around,nolink,アウトライン);>http://www.xm1math.net/texmaker/pics/structure.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/master_s.png,around,nolink,マスターモード);>http://www.xm1math.net/texmaker/pics/master.png]]|
|BGCOLOR(#CCF):組み込みの PDF ビューア|BGCOLOR(#CCF):簡単コンパイル|
|[[&ref(http://www.xm1math.net/texmaker/pics/pdfsync_s.png,around,nolink,組み込みの PDF ビューア);>http://www.xm1math.net/texmaker/pics/pdfsync.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/quickbuild_s.png,around,nolink,簡単コンパイル);>http://www.xm1math.net/texmaker/pics/quickbuild.png]]|
|BGCOLOR(#CCF):数学記号|BGCOLOR(#CCF):作成ウィザード|
|[[&ref(http://www.xm1math.net/texmaker/pics/math_s.png,around,nolink,数学記号);>http://www.xm1math.net/texmaker/pics/math.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/wizard_s.png,around,nolink,作成ウィザード);>http://www.xm1math.net/texmaker/pics/wizard.png]]|
|BGCOLOR(#CCF):LaTeX リファレンス|BGCOLOR(#CCF):エラーハンドリング|
|[[&ref(http://www.xm1math.net/texmaker/pics/latexdoc_s.png,around,nolink,LaTeX リファレンス);>http://www.xm1math.net/texmaker/pics/latexdoc.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/log_s.png,around,nolink,エラーハンドリング);>http://www.xm1math.net/texmaker/pics/log.png]]|
|BGCOLOR(#CCF):矩形選択|BGCOLOR(#CCF):フォルダー内のテキスト検索|
|[[&ref(http://www.xm1math.net/texmaker/pics/block_s.png,around,nolink,矩形選択);>http://www.xm1math.net/texmaker/pics/block.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/findfolder_s.png,around,nolink,フォルダー内のテキスト検索);>http://www.xm1math.net/texmaker/pics/findfolder.png]]|
|BGCOLOR(#CCF):PDF ビューアの表示を回転|BGCOLOR(#CCF):TeX4ht で html, odt エクスポート|
|[[&ref(http://www.xm1math.net/texmaker/pics/rotate_s.png,around,nolink,PDF ビューアの表示を回転);>http://www.xm1math.net/texmaker/pics/rotate.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/export_s.png,around,nolink,TeX4ht で html, odt エクスポート);>http://www.xm1math.net/texmaker/pics/export.png]]|
|BGCOLOR(#CCF):正規表現|BGCOLOR(#CCF):Asymptote|
|[[&ref(http://www.xm1math.net/texmaker/pics/regular_s.png,around,nolink,正規表現);>http://www.xm1math.net/texmaker/pics/regular.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/asymptote_s.png,around,nolink,Asymptote);>http://www.xm1math.net/texmaker/pics/asymptote.png]]|
|BGCOLOR(#CCF):スニペット|BGCOLOR(#CCF):Qt5 対応|
|[[&ref(http://www.xm1math.net/texmaker/pics/snippets_s.png,around,nolink,スニペット);>http://www.xm1math.net/texmaker/pics/snippets.png]]|[[&ref(http://www.xm1math.net/texmaker/pics/qt5_s.png,around,nolink,Qt5 対応);>http://www.xm1math.net/texmaker/pics/qt5.png]]|
<
**派生版・修正版 [#n8123b82]
***Windows [#wc2183b7]
-[[TeXstudio]]
-[[texmaker(Win)修正版:http://blogs.yahoo.co.jp/igproj_fusion/folder/566040.html]]
-[[bidiTeXmaker3:https://bitbucket.org/srazi/biditexmaker3]]
Windows の場合は msi 形式のファイルをダウンロードして実行すればインストールされます.
*ダウンロード/インストール [#q69dea61]
***macOS [#g5bab958]
[[Texmaker/インストール]] を参照.
macOS の場合は dmg 形式のファイルをダウンロードして展開します.
*不具合 [#h6093782]
Homebrew でインストールすることもできます.
>
https://github.com/Homebrew/homebrew-cask/blob/master/Casks/texmaker.rb
<
brew install --cask texmaker
-[[Issues:https://code.google.com/p/texmaker/issues/list]]
//--[[Issue 46: The problem with Japanese input:https://code.google.com/p/texmaker/issues/detail?id=46]]
//--[[Issue 104: Apple JIS keyword issue:https://code.google.com/p/texmaker/issues/detail?id=104]]
//--[[Issue 364: Embedded PDF viewer doesn't show text in a certain font:https://code.google.com/p/texmaker/issues/detail?id=364]]
//--[[Issue 420: SumatraPDF forward search:https://code.google.com/p/texmaker/issues/detail?id=420]] → Done
//--[[Issue 473: Subdirectories in # parameter:https://code.google.com/p/texmaker/issues/detail?id=473]]
***Linux [#d8deaab2]
**OS X の Texmaker で,文字コードが UTF-8 の場合に Backslash (U+005C) が入力できず 円記号 (U+00A5) になってしまう → [[Karabiner:https://pqrs.org/osx/karabiner/index.html.ja]] で Backslash が優先されるようにキーバインドを変更する [#u2a90df7]
Linux の場合はパッケージ管理システムからインストールするのがよいです.パッケージ名は大抵 texmaker でしょう.
//-[[Issue 104: Apple JIS keyword issue:https://code.google.com/p/texmaker/issues/detail?id=104]]
//-[[ただし,''MacOSX SnowLeopardの環境では,半角のバックスラッシュが入力できず,半角の¥になってしまうという問題があります.''もっとも原始的な(笑)コピペよりもう少しましな方法として,次のようにすることでとりあえず回避できます.&br;▷ ことえりの「環境設定」の「入力文字」の「JISキーボードの¥キーで入力する文字」を「バックスラッシュ」に設定&br;▷ ことえりの辞書に「読み:半角バックスラッシュ→単語:半角バックスラッシュ」として登録&br;▷ ひらがな(全角入力)モードで「¥」キーを入力&br;変換確定のためreturnキーを一度叩く必要はあるものの入力は可能です.ただし''必ず全角入力モードでないとだめ''です.半角英数モードだと,当然ながら半角の¥マークになります.とりあえず,対処療法ですが,目的は達成できます(笑).ただその弊害として全角の¥記号が打てなくなりますが,こちらは「option+Y」で入力できます.:http://www.sip-ac.jp/sip/tex02.html]]
**日本語化 [#k564e4ed]
OS X の Qt アプリケーションで [[Backslash>Wikipedia.ja:バックスラッシュ]] (U+005C) が [[円記号>Wikipedia.ja:円記号]] (U+00A5) に変換されるバグがあるようです.→ [[Backslash is converted to YEN SIGN on Qt for Mac with JIS keyboard.:https://bugreports.qt-project.org/browse/QTBUG-10543]]~
[[Karabiner:https://pqrs.org/osx/karabiner/index.html.ja]] で Backslash が優先されるようにキーバインドを変更するといいようです.~
Texmaker はデフォルトでは英語でメニューが表示されますが,メニューを日本語化するためのファイルが作成されています.
----
&color(Black,#CCCCCC){%%% &color(#DD0000,#CCCCCC){●}; &color(#DDDD00,#CCCCCC){●}; &color(#DDDDDD,#CCCCCC){●}; ''Karabiner'' %%%};&br;
%%%&color(#F1F1F1,#555555){&color(#555555){[}; ''Change Key'' &color(#555555){]};};&color(Black,#EEEEEE){[ ''Key Repeat'' ][ ''Status Message'' ][ ''MenuBar'' ][ ''Misc & Uninstall'' ]};%%%&br;
&color(Black,#FAFAFA){(%%% Change Yen %%%)}; ☐ Show enabled only (1 item) %%%[ ''↻'' ReloadXML ]%%%&br;
remapping&br;
▼For Japanese&br;
▼Change Yen(¥) Key&br;
&color(Black,#9FCFFB){☑}; JIS Yen(¥) to Backslash(\)&br;
(except virtual machine, X11, RDC)&br;
----
***Texmaker 5.0.2 [#h11371e4]
**かな漢字変換をする際に,文字と背景が黒く表示され,判読不能になる → Texmaker 修正版または [[TeXstudio]] を使用する [#c698d89f]
texmaker_jp.qm を texmaker.exe と同じフォルダーに置いて Texmaker を起動して
%%%O%%%ptions > Interface Language > jp を選択して Texmaker を再起動するとメニューが日本語化されます.
Texmaker には,かな漢字変換をする際に変換候補の文字色とその背景色がともに「黒」となって判読不能になるという不具合があります.~
OS やインプットメソッドフレームワークの種類などの違いでこの不具合が発生しない場合もあるようです.~
Windows, Linux で不具合が発生して OS X では発生しないようです.~
■ Windows の場合~
Windows の場合は Texmaker の修正版を使用することで回避できます.~
■ Linux で ibus を使用している場合~
Arch Linux, Texmaker 4.1, ibus-kkc の組み合わせでは特に問題なく日本語入力できています.~
Linux Mint で ibus を使用している場合は ibus-qt4, qt4-qtconfig をインストールして Qt 設定ツールの [インターフェース]-[デフォルトのインプットメソッド] から ibus を選択することで回避できます.~
Fedora を使用している場合は ibus-qt, qt-config をインストールして Qt 設定ツールの [インターフェース]-[デフォルトのインプットメソッド] から ibus を選択することで回避できます.~
■ Linux で fcitx を使用している場合~
fcitx の [設定]-[アドオン]-[拡張を ON]-[Fcitx XIM Frontend をダブルクリック] で 「XIMで On The Spot スタイルを使う」 が OFF の場合は変換候補の場所に文字が表示されるので文字が確認できます.~
fcitx の [設定]-[アドオン]-[拡張を ON]-[Fcitx XIM Frontend をダブルクリック] で 「XIMで On The Spot スタイルを使う」 が ON の場合は背景が黒く表示されて判読不能になることがあるようです.~
■ Linux で uim を使用している場合~
uim を使用している場合は背景が黒く表示されて判読不能になることがあるようです.~
-[[TexMaker で日本語文書を作成する環境を構築する:https://wiis.info/blog/how-to-write-japanese-documents-with-texmaker/#elementor-toc__heading-anchor-2]]
-[[UbuntuでTeXmakerの日本語化(UI+日本語対応):https://jp.magicode.io/nibosea/articles/8ac5ebe0b96c48e98bc65af8f3dcaae7]]
バージョン 1.3 の公式バイナリではこの不具合は発生しませんが,1.3 のソースを Qt 4.7.2 でビルドしてみるとこの不具合が発生します.~
また,同じく Qt を使用している [[TeXworks でもハイライトに関する不具合が存在する>TeXworks#s5bfc44e]]ので,もしかすると Qt の不具合 (仕様?) かもしれません.~
*不具合 [#h6093782]
Texmaker の日本語入力を直した修正版か派生版の [[TeXstudio]] を使用するといいでしょう.~
**Windows の Texmaker でかな漢字変換をする際に,変換候補の文字と背景が黒く表示され,読めなくなる [#c698d89f]
***修正方法 (Windows) [#e1ab5b1e]
Windows の Texmaker には,かな漢字変換をする際に変換候補の文字色とその背景色がともに「黒」となって読めなくなるという不具合があります.
Texmaker のソースコードを修正してビルドすれば日本語入力に関する不具合を回避できます.~
%%%O%%%ptions > Configure Texmaker > Editor で Dark theme を選択することで回避できます.
-[[Poppler]] をインストールします.
// 以下の「修正方法」なるもので本当に解決するのならば,報告するべきでしょう.
// たぶんわざわざ setFormat() しているものをコメントアウトするので何か副作用があるのだろうと
// 思いますが.
-Texmaker のソースコードを修正してビルドします.
// ***修正方法 [#e1ab5b1e]
$ curl -R -L -O http://www.xm1math.net/texmaker/texmaker-4.2.tar.bz2
$ tar xvf texmaker-4.2.tar.bz2
$ cd texmaker-4.2
// Texmaker のソースコードを修正してビルドすれば日本語入力に関する不具合を回避できます.
Texmaker は texmaker.cpp に記述されている Texmaker::GeneralOptions() メソッドの中の
if (QColor::isValidColor(confDlg->ui.colortableWidget->item(3,1)->text())) colorStandard=QColor(confDlg->ui.colortableWidget->item(3,1)->text());
という処理でテキストの色を設定しています.~
デフォルトではテキストの色は黒です.~
日本語変換時にも,この色が適用され,文字の色が黒くなってしまうので [[latexhighlighter.cpp:https://bitbucket.org/srazi/biditexmaker3/src/tip/latexhighlighter.cpp]] の
setFormat( i, 1,ColorStandard);
と書かれている箇所を全て
//setFormat( i, 1,ColorStandard);
としてコメントアウトしてビルドすれば,日本語変換時に黒くなる現象を回避できます.~
// -Texmaker のソースコードを修正してビルドします.
Qt 5 を使用する場合は texmaker.pro を修正します.~
// // $ curl -RLO http://www.xm1math.net/texmaker/texmaker-5.0.tar.bz2
// $ powershell -Command "& {Invoke-WebRequest -Uri 'http://www.xm1math.net/texmaker/texmaker-5.0.tar.bz2' -OutFile 'texmaker-5.0.tar.bz2'}"
// $ tar xvf texmaker-5.0.tar.bz2
// $ cd texmaker-5.0
----
## QT4
#QT += xml webkit network
## QT5
QT += xml webkitwidgets network widgets printsupport concurrent
----
// Texmaker は texmaker.cpp に記述されている Texmaker::GeneralOptions() メソッドの中の
// if (QColor::isValidColor(confDlg->ui.colortableWidget->item(3,1)->text())) colorStandard=QColor(confDlg->ui.colortableWidget->item(3,1)->text());
// という処理でテキストの色を設定しています.
// デフォルトではテキストの色は黒です.
// 日本語変換時にも,この色が適用され,文字の色が黒くなってしまうので [[latexhighlighter.cpp:https://bitbucket.org/srazi/biditexmaker3/src/tip/latexhighlighter.cpp]] の
// setFormat( i, 1,ColorStandard);
// と書かれている箇所を全て
// //setFormat( i, 1,ColorStandard);
// としてコメントアウトしてビルドすれば,日本語変換時に黒くなる現象を回避できます.
poppler-qt4.h, poppler-qt5.h を参照できるようにするため,texmaker.pro に INCLUDEPATH を追加して LIBS に -lpoppler-qt5 を追加します.
// $ qmake texmaker.pro
// $ make release
// $ cd release
// $ ./texmaker &
Portable バージョンを作成する場合は #DEFINES += USB_VERSION の # を外します.
// -かな漢字変換をする際に,文字が黒くならないことを確認します.
----
win32 {
INCLUDEPATH += C:\QtSDK\mingw\include
INCLUDEPATH += C:\poppler
INCLUDEPATH += /mingw/include/poppler/qt4
INCLUDEPATH += /mingw/include/poppler/qt5
LIBS += -LC:\poppler -lpoppler-qt4 -lpoppler-qt5
RC_FILE = win.rc
DEFINES += USB_VERSION
----
// -C:\MinGW\bin と C:\Qt\Qt5.9.1\5.9.1\mingw53_32\bin に PATH を通せばエクスプローラーからダブルクリックして起動できるようになります.
$ qmake texmaker.pro
$ make release
$ cd release
$ ./texmaker &
**コマンドの設定に使用するパラメータのパースの仕方に問題があるため %% と % を同時に使用することができない [#t0aace20]
-かな漢字変換をする際に,文字が黒くならないことを確認します.
% これが本当で困っているならばバグ報告するべきでは.ここに書いて終わりですか?
-日本語のフォントが埋め込まれていない PDF ファイルが組み込みビューアで表示できることを確認します.
Texmaker はコマンドの設定に使用するパラメータのパースの仕方に問題があります.
[[TeXstudio]] ではコマンドの設定に使用するパラメータが正しく処理されています.
-このままの状態ではエクスプローラーからダブルクリックして起動する場合に dll が見つからないといったエラーメッセージが表示されるので,Texmaker の実行に必要なライブラリ (DLL ファイル) の確認をします.~
objdump の他に [[Dependency Walker:http://www.dependencywalker.com/]] ([[Dependency Walker 日本語化パッチ:http://blog.livedoor.jp/blackwingcat/archives/1000078.html]]) を使って確認することも可能です.
Texmaker のマニュアルにはコマンドの設定に % という表示が必要になった場合に %% と記述すればよいとありますが,%% を % よりも前に記述した場合は %% が % に変換されますが % が "basename" に変換されません.また,%% を % よりも後に記述した場合は %% は % に変換されずに "basename" が2回出力されてしまいます.
$ objdump -p texmaker.exe | grep -i -E "\.dll" | sort | uniq
DLL Name: KERNEL32.dll
DLL Name: Qt5Core.dll
DLL Name: Qt5Gui.dll
DLL Name: Qt5Network.dll
DLL Name: Qt5PrintSupport.dll
DLL Name: Qt5WebKitWidgets.dll
DLL Name: Qt5Widgets.dll
DLL Name: Qt5Xml.dll
DLL Name: libgcc_s_dw2-1.dll
DLL Name: libpoppler.dll
DLL Name: libstdc++-6.dll
DLL Name: msvcrt.dll
DLL Name: zlib1.dll
https://fossies.org/linux/texmaker/texmaker.cpp#l_7703 によると Texmaker では
$ objdump -p /mingw/bin/libpoppler.dll | grep "DLL Name" | sort | uniq
DLL Name: ADVAPI32.DLL
DLL Name: GDI32.dll
DLL Name: KERNEL32.dll
DLL Name: USER32.dll
DLL Name: libcurl-4.dll
DLL Name: libfontconfig-1.dll
DLL Name: libfreetype-6.dll
DLL Name: libgcc_s_dw2-1.dll
DLL Name: libjpeg-9.dll
DLL Name: liblcms2-2.dll
DLL Name: libopenjp2.dll
DLL Name: libpng16-16.dll
DLL Name: libstdc++-6.dll
DLL Name: libtiff-5.dll
DLL Name: msvcrt.dll
DLL Name: zlib1.dll
QRegExp rx2("(%+)");
capt="";
if (rx2.indexIn(commandline) != -1) capt=rx2.cap(1);
if (capt=="%") commandline.replace("%","\""+basename+"\"");
else if (capt=="%%") commandline.replace("%%","%");
$ objdump -p /mingw/bin/libfontconfig-1.dll | grep "DLL Name" | sort | uniq
DLL Name: KERNEL32.dll
DLL Name: libfreetype-6.dll
DLL Name: libxml2-2.dll
DLL Name: msvcrt.dll
と記述されており,最初に % にマッチした場合は % が "basename" に置き換えられて %% は % に変換されずに "basename" が2回出力され,最初に %% にマッチした場合は %% は % に変換されますが % は "basename" に変換されずに % のまま出力されるためこの処理方法ではファイル名 (%) と % の表記 (%%) は同時に使用することが困難であると考えられます.
$ objdump -p /mingw/bin/libxml2-2.dll | grep "DLL Name" | sort | uniq
DLL Name: KERNEL32.dll
DLL Name: WS2_32.dll
DLL Name: libiconv-2.dll
DLL Name: liblzma-5.dll
DLL Name: msvcrt.dll
DLL Name: zlib1.dll
https://github.com/texstudio-org/texstudio/blob/master/src/buildmanager.cpp#L476 によると TeXstudio では
-C:\MinGW\bin と C:\Qt\Qt5.3.0\5.3.0\mingw48_32\bin に PATH を通せばエクスプローラーからダブルクリックして起動できるようになります.
for (int i = 0; i < str.size(); i++) {
QString add;
if (str.at(i) == QChar('%')) {
if (str.at(i + 1) == QChar('%')) add = str.at(++i);
else add = "\"" + mainFile.completeBaseName() + "\"";
**Linux 版の Texmaker で \section{ を入力した直後に日本語入力をしようとすると日本語入力が ON にならなかったり,正しいかな漢字変換ができなかったりすることがある → [[TeXstudio]] を使用する [#i1222dd8]
と記述されており,正規表現は使用せずに1文字ずつ文字列をチェックして %% であれば % を追加して % であれば "basename" を追加して文字列リストを作成するようです.
Linux 版の Texmaker で \section{ を入力した直後に日本語入力をしようとすると日本語入力が ON にならなかったり,正しいかな漢字変換ができなかったりすることがあります.~
fcitx-mozc では \section{ の直後で日本語入力が ON にならないことがあります.\section{ の直後に日本語入力が ON にならない場合に手動で日本語入力を ON にした状態で \section{ の直後で 「かんじ」 を 「漢字」 に変換しようとすると 「k暗示」 と変換されます.~
ibus-kkc も同様に \section{ の直後では日本語入力が ON にならないことがあります.~
[[TeXstudio]] を使用することで回避できます.~
実例を挙げると例えば Windows 版の TeXstudio では Latexmk-upLaTeX は以下の設定で動作します.
>
latexmk.exe -e "$latex=q/uplatex %%O -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode %%S/" -e "$bibtex=q/bibtexu %%O %%B/" -e "$biber=q/biber %%O --bblencoding=utf8 -u -U --output_safechars %%B/" -e "$makeindex=q/upmendex %%O -o %%D %%S/" -e "$dvipdf=q/dvipdfmx %%O -o %%D %%S/" -norc -gg -pdfdvi -silent %
<
ところが Windows 版の Texmaker では上記の設定では動作せず以下のように %% を記述しない方法で設定する必要があります.
>
ruby -e "cmd='latexmk -e '+0x22.chr+'$latex=q/uplatex '+0x25.chr+'O'+' -kanji=utf8 -no-guess-input-enc -synctex=1 -interaction=nonstopmode '+0x25.chr+'S'+'/'+0x22.chr+' -e '+0x22.chr+'$bibtex=q/bibtexu '+0x25.chr+'O'+' '+0x25.chr+'B'+'/'+0x22.chr+' -e '+0x22.chr+'$biber=q/biber '+0x25.chr+'O'+' --bblencoding=utf8 -u -U --output_safechars '+0x25.chr+'B'+'/'+0x22.chr+' -e '+0x22.chr+'$makeindex=q/upmendex '+0x25.chr+'O'+' -o '+0x25.chr+'D'+' '+0x25.chr+'S'+'/'+0x22.chr+' -e '+0x22.chr+'$dvipdf=q/dvipdfmx '+0x25.chr+'O'+' -o '+0x25.chr+'D'+' '+0x25.chr+'S'+'/'+0x22.chr+' -norc -gg -pdfdvi '+'%.tex';system(cmd)"
<
**コマンドの設定に使用するパラメータのパースの仕方に問題がある → [[TeXstudio]] または Ruby, Windows PowerShell, バッチファイル, シェルスクリプト などを使用する [#t0aace20]
Texmaker はコマンドの設定に使用するパラメータのパースの仕方に問題があります.~
[[TeXstudio]] はコマンドの設定に使用するパラメータが正しく処理されています.~
Texmaker の場合は例えばコマンドの設定に % という表示が必要になった場合に %% と記述すればよいとありますが,%% と記述しても期待したように処理されません.~
Ruby では
0x25.chr
>
0x25.chr
<
Windows PowerShell では
[char]0x25
で % を表示できます.~
このようにして Ruby や Windows PowerShell を使用して表示したい文字を「数値→文字」の変換で表現して設定を記述すれば OK です.~
Ruby, Windows PowerShell の他に バッチファイルやシェルスクリプトを使用しても OK です.~
>
[char]0x25
<
で % を表示できます.
このようにして Ruby や Windows PowerShell を使用して表示したい文字を「数値→文字」の変換で表現して設定を記述すれば OK です.
Ruby, Windows PowerShell の他に バッチファイルやシェルスクリプトを使用しても OK です.
**Windows PowerShell を使用して設定を記述して実行すると Texmaker が応答しなくなることがある → Ruby を使用して設定を記述する [#o6c242bd]
// ↓何を言っているのか意味がわからないです.上の「不具合」をよくよく読んでようやくわかったけれども,いずれにしてもこの書き方だと伝わらないでしょう.
Windows PowerShell を使用して設定を記述して実行すると Texmaker が応答しなくなることがあります.~
この場合は Ruby を使用して設定を記述してください.~
// **Windows PowerShell を使用して設定を記述して実行すると Texmaker が応答しなくなることがある [#o6c242bd]
**W32TeX を使用して \usepackage{mathptmx} で \sum を使用した場合に組み込みの PDF ビューアで表示されない → dvipdfmx -f dlbase14.map %.dvi を設定してフォントを埋め込む [#t68c551e]
// Windows PowerShell を使用して設定を記述して実行すると Texmaker が応答しなくなることがあります.
// この場合は Ruby を使用して設定を記述してください.
//-[[Issue 364: Embedded PDF viewer doesn't show text in a certain font:https://code.google.com/p/texmaker/issues/detail?id=364]]
-[[Windows にTexmakerを導入:http://blog.sqr-main.net/2012/06/windows-texmaker.html]]
*文字コードの変換 [#y2f21c8a]
W32TeX を使用して \usepackage{mathptmx} で \sum を使用した場合に組み込みの PDF ビューアで表示されません.~
dvipdfmx -f dlbase14.map %.dvi
を設定してフォントを埋め込めば表示されるようになります.~
通常はフォントを埋め込まない設定にしておきたい場合は,TeX ファイルのプリアンブルに
\AtBeginDvi{\special{pdf:mapfile dlbase14.map}}
を記述してください.
Texmaker で使用する文字コードはデフォルトでは UTF-8 です.
このため,Shift_JIS, ISO-2022-JP, EUC-JP の文字コードを使用しているファイルを開きたい場合は,事前にファイルの文字コードを UTF-8 に変換する必要があります.
文字コードの変換には,各種テキストエディタの機能を使う方法と,コマンドラインから変換プログラムを使う方法があります.
PDF ファイルのフォントの埋め込みについては
-テキストエディタの機能を使う場合は,[[メモ帳で UTF-8 に変換する>forum:496#p2654]]方法や[[サクラエディタ]]などのテキストエディタを使う方法があります.
-コマンドラインからの場合,文字コード変換プログラムである [[nkf]] が利用できます.
-[[PDFの作り方#フォントの埋め込み設定>PDFの作り方#z0e1001a]]
を参照してください.
**[[Beamer ポスター入門:http://www.ms.u-tokyo.ac.jp/~tado/beamer/poster.html]] のサンプルを [[lualatex や pdflatex で -synctex=1 オプションを有効にした状態でクイックビルドを実行して組み込みビューアで PDF ファイルを表示しようとすると Texmaker が落ちる:http://blog.livedoor.jp/ti5942/archives/7423368.html]] → -synctex=1 オプションをはずす [#b257516a]
[[Beamer ポスター入門:http://www.ms.u-tokyo.ac.jp/~tado/beamer/poster.html]] のサンプルを [[lualatex や pdflatex で -synctex=1 オプションを有効にした状態でクイックビルドを実行して組み込みビューアで PDF ファイルを表示しようとすると Texmaker が落ちる:http://blog.livedoor.jp/ti5942/archives/7423368.html]]という不具合があります.~
この不具合が発生する場合は -synctex=1 オプションをはずしてください.~
----
-texmaker.cpp
----
void Texmaker::RunCommand(QString comd,bool waitendprocess)
メソッドの中の
if (builtinpdfview && (comd==viewpdf_command))
{
if (embedinternalpdf)
{
if (pdfviewerWidget)
{
pdfviewerWidget->openFile(outputName(finame,".pdf"),viewpdf_command,ghostscript_command);
StackedViewers->setCurrentWidget(pdfviewerWidget);
//pdfviewerWidget->raise();
showpdfview=true;
ShowPdfView(false);
pdfviewerWidget->show();
if ( (pdflatex_command.contains("synctex=1")) || (latex_command.contains("synctex=1")) ) pdfviewerWidget->jumpToPdfFromSource(getName(),currentline);
の部分の
if ( (pdflatex_command.contains("synctex=1")) || (latex_command.contains("synctex=1")) ) pdfviewerWidget->jumpToPdfFromSource(getName(),currentline);
で落ちているようです.
*組み込みの PDF ビューアで日本語を表示するために使用される代替フォント [#h2a20ebd]
**Windows の Texmaker の場合 [#h82370cc]
Texmaker の公式サイトで配布されている Windows バイナリと Texmaker 修正版は poppler-data が適切な位置に配置されており fontconfig も適切に設定されています.~
----
C:.
└─Texmaker
├─texmaker.exe
└─share
└─poppler
----
fontconfig を適切に設定すれば PDF ファイルに日本語のフォントが埋め込まれていなくても日本語を表示することが可能になります.~
日本語のフォントを埋め込んでいない PDF ファイルを表示すると texmaker.exe と同じフォルダーに WINDOWSTEMPDIR_FONTCONFIG_CACHE フォルダーが作成され,日本語が表示されます.~
なお,''初回の表示ではフォントキャッシュを作成するため時間がかかり,応答なしの状態になってしまう''かもしれませんが,作成されれば通常通り表示されるようになります.~
----
C:.
└─Texmaker
├─texmaker.exe
└─WINDOWSTEMPDIR_FONTCONFIG_CACHE
----
PDF ビューアで表示される代替フォントは texmaker.exe と同じフォルダーに存在する etc\fonts\local.conf で設定されています.~
----
C:.
└─Texmaker
├─texmaker.exe
└─etc
└─fonts
├─conf.d
├─fonts.conf
├─fonts.dtd
└─local.conf
----
デフォルトでは Ryumin-Light (明朝体) は MS Mincho,GothicBBB-Medium (ゴシック体) は MS Gothic で表示されます.~
----
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- local.conf file to configure local font access -->
<fontconfig>
<dir>c:/texlive/2014/texmf-dist/fonts/opentype</dir>
<dir>c:/texlive/2014/texmf-dist/fonts/truetype</dir>
<dir>c:/w32tex/share/texmf-dist/fonts/opentype</dir>
<dir>c:/w32tex/share/texmf-dist/fonts/truetype</dir>
<dir>c:/Windows/Fonts</dir>
<match target="pattern">
<test qual="any" name="family">
<string>Ryumin</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>MS Mincho</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>GothicBBB</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>MS Gothic</string>
</edit>
</match>
<alias binding="same">
<family>ZapfDingbats</family>
<accept><family>Dingbats</family></accept>
</alias>
</fontconfig>
----
**Linux の Texmaker の場合 [#o71b53f0]
[[代替フォントの設定>Evince#substitute]] を参照して代替フォントの設定をします.~
*設定 [#e3cd1932]
% 以下の設定解説ページは読めるものではない.一から書き直しが必要.
[[Texmaker/設定]] を参照.
*使い方 [#qb8bff72]
[[Texmaker/使い方]] を参照.
*関連リンク [#n5a9b95f]
-http://fossies.org/dox/texmaker/
-[[Newest 'texmaker' Questions - TeX - LaTeX:http://tex.stackexchange.com/questions/tagged/texmaker]]
--[[Forward/inverse search for Texmaker on OS X:http://tex.stackexchange.com/questions/9904/forward-inverse-search-for-texmaker-on-os-x]]
--[[Configure forward search with Texmaker + SumatraPDF:http://tex.stackexchange.com/questions/37327/configure-forward-search-with-texmaker-sumatrapdf]]
-http://research.informagic.org/latex-tweaks
-http://linuxg.net/how-to-install-texmaker-4-1-on-ubuntu-13-10-13-04-12-10-12-04-linux-mint-16-15-14-13-pear-os-8-7-elementary-os-0-2-debian-wheezy-and-kwheezy/
-[[Texmakerのインストール:http://dtptools.blogspot.jp/2013/08/texmaker.html]]
-[[GateKeeperに引っかかった時の対処(OS X):http://hnsn1202.hateblo.jp/entry/2013/04/09/193136]]
-[[TeXmakerで使用可能なファイル名について:http://fagahhe2645.hatenablog.com/entry/2013/02/07/231005]]
//*関連リンク [#n5a9b95f]
// 適切な解説と一緒に置かれていないとゴミ情報にしかならない.
// もちろん,リンクされていた記事がゴミという意味では全くないが,一旦消す.