Editing
TeX implementation on Windows
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 如何啟用數學表示 == {{Right | hedding= 軟體環境 | text= * MediaWiki: 1.10.0 * PHP: 5.2.2 (apache2handler) * MySQL: 5.0.41-community-nt * OS: MS Windows XP}} === 可以辨識 <math></math>標籤內的Tex語法 === 在LocalSettings.php啟用Tex <pre>$wgUseTeX = true; </pre> === 將<math></math>標籤內的Tex語法, 轉成 .tex檔案 === 需要Math.php與texvc * 將{MediaWiki}/includes/Math.php 替換成這個[http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Windows/math.php Math.php],否則會出現「解析失敗 (未知錯誤) 」訊息 * 下載[https://wfs.gc.cuny.edu/MCarlisle/www/texvc_win32bin_20050202.zip texvc.exe]([http://www.box.net/shared/rxoijj92cl mirrors]),儲存於{MediaWiki} (與LocalSettings.php所在的相同目錄) === 將 .tex檔 轉成 .dvi檔 === 需要latex * 需要安裝[http://miktex.org/ MiKTeX] ([http://nchc.dl.sourceforge.net/sourceforge/miktex/basic-miktex-2.6.2742.exe 直接下載Basic MiKTeX 2.6 Installer]) * 安裝後, LocalSettings.php 加上<pre>$wgLaTexCommand = 'C:/Program Files/MiKTeX 2.6/miktex/bin/latex.exe';</pre> * 安裝完系統變數PATH會自動加上 C:\Program Files\MiKTeX 2.6\miktex\bin; ([[How to setup my system path|如何設定系統PATH]]) * LocalSettings.php的$wgLaTexCommand可以改成 <pre>$wgLaTexCommand = 'latex';</pre> === 將 .dvi檔 轉成 .ps檔 === 需要dvips * 安裝MiKTeX (C:/Program Files/MiKTeX 2.6/miktex/bin/dvips.exe) * LocalSettings.php加上 <pre>$wgDvipsCommand = 'dvips'; </pre> === 將 .ps檔 轉成 .png檔 === 需要ImageMagick與Ghostscript ==== ImageMagick ==== 安裝[http://www.imagemagick.org/script/index.php ImageMagick](直接下載[http://www.imagemagick.org/script/binary-releases.php#windows ImageMagick-6.3.4-5-Q16-windows-dll.exe]) 安裝在c\usr\bin * 取得[http://www.imagemagick.org/script/convert.php convert], [http://www.imagemagick.org/script/identify.php identify]兩支程式 * LocalSettings.php加上 <pre>$wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/bin/convert"; $wgImageMagickIdentifyCommand = '/usr/bin/identify'; </pre> * ''(選擇性)'' 如果要將c\usr\bin加在系統變數PATH, 需將convert.exe更名成imageconvert.exe, 避免與Windows內建的convert.exe (fat32 轉成 ntfs; 位於C:\WINDOWS\system32\convert.exe)衝突。 ==== Ghostscript ==== 安裝[http://pages.cs.wisc.edu/~ghost/ Ghostscript]([http://downloads.sourceforge.net/ghostscript/gs856w32.exe?modtime=1173977798&big_mirror=1 直接下載gs856w32.exe]) * C:\Program Files\gs\gs8.56\bin\gswin32c.exe 更名為gs.exe * 檢查系統變數PATH有無加上 C:\Program Files\gs\gs8.56\bin\;
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information