*[[Inkscape:https://inkscape.org/]] [#ycda5b1e]

----
#contents
----

*Inkscape とは [#v6fd1815]

Inkscape はベクターグラフィックエディタ (SVG エディタ) です.

|COLOR(#FFF):BGCOLOR(#7C0):''入力''|COLOR(#FFF):BGCOLOR(#7C0):''インポート可能な形式''|COLOR(#FFF):BGCOLOR(#7C0):''出力''|
|SVG, PDF, AI (Adobe Illustrator)|EPS, PS|SVG, PDF, EPS, PS, ODG|
|SVG, PDF|EPS, PS|SVG, PDF, EPS, PS, ODG|

[[PostScript や EPS をインポートするには、Ghostscript をインストールする必要があり、ps2pdf が環境変数 Path 上になければなりません。:http://wiki.inkscape.org/wiki/index.php/FAQ_(Japanese)#Inkscape.E3.81.A7.E3.82.A4.E3.83.B3.E3.83.9D.E3.83.BC.E3.83.88.2F.E3.82.A8.E3.82.AF.E3.82.B9.E3.83.9D.E3.83.BC.E3.83.88.E3.81.A7.E3.81.8D.E3.82.8B.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB.E5.BD.A2.E5.BC.8F.E3.81.AF.E3.81.AA.E3.82.93.E3.81.A7.E3.81.99.E3.81.8B.3F]]

-[[Inkscape 公式サイト:https://inkscape.org/]]
-[[Inkscape 開発サイト:https://gitlab.com/inkscape/inkscape]]
--[[コミットログ:https://gitlab.com/inkscape/inkscape/commits/master]]
-[[Inkscape Wiki:http://wiki.inkscape.org]]
--[[LaTeX - Inkscape Wiki:http://wiki.inkscape.org/wiki/index.php/LaTeX]]
---[[Release notes/0.92 - Inkscape Wiki#Export PDF / EPS / PS:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.92#Export_PDF_.2F_EPS_.2F_PS]]
--[[FAQ (Japanese) - Inkscape Wiki:http://wiki.inkscape.org/wiki/index.php/FAQ_(Japanese)]]
---[[数学記号や特殊記号を入力するには?:http://wiki.inkscape.org/wiki/index.php/FAQ_(Japanese)#.E6.95.B0.E5.AD.A6.E8.A8.98.E5.8F.B7.E3.82.84.E7.89.B9.E6.AE.8A.E8.A8.98.E5.8F.B7.E3.82.92.E5.85.A5.E5.8A.9B.E3.81.99.E3.82.8B.E3.81.AB.E3.81.AF.3F]]
---[[Inkscapeでインポート/エクスポートできるファイル形式はなんですか?:http://wiki.inkscape.org/wiki/index.php/FAQ_(Japanese)#Inkscape.E3.81.A7.E3.82.A4.E3.83.B3.E3.83.9D.E3.83.BC.E3.83.88.2F.E3.82.A8.E3.82.AF.E3.82.B9.E3.83.9D.E3.83.BC.E3.83.88.E3.81.A7.E3.81.8D.E3.82.8B.E3.83.95.E3.82.A1.E3.82.A4.E3.83.AB.E5.BD.A2.E5.BC.8F.E3.81.AF.E3.81.AA.E3.82.93.E3.81.A7.E3.81.99.E3.81.8B.3F]]
--[[Tools:http://wiki.inkscape.org/wiki/index.php/Tools]]
--[[Extension repository:http://wiki.inkscape.org/wiki/index.php/ExtensionsRepository]]

**動作環境 [#a70b2acc]

Windows, macOS, Linux

**License [#ibc5e002]

[[GPLv2 or later (GIMP からコピーしたファイルに関しては GPLv3 or later):https://gitlab.com/inkscape/inkscape/blob/master/COPYING]]

**リリース情報 [#d961699f]
[[最新ニュース:https://inkscape.org/ja/news/]]を参照.

**ChangeLog [#q8a7ad68]

[[コミットログ:https://gitlab.com/inkscape/inkscape/commits/master]]

*ダウンロード [#i5a8dfd7]
-https://inkscape.org/download/
-https://inkscape.org/ja/release/

*不具合 [#caadafb3]

-https://bugs.launchpad.net/inkscape
//-[[Bug #1502126 “OSX 10.11 El Capitan can't run LaTeX extension” : Bugs : Inkscape:https://bugs.launchpad.net/inkscape/+bug/1502126]] → [[packaging/macosx: fix for bug #1502126 (support MacTeX on El Capitan):https://gitlab.com/inkscape/inkscape/commit/b3a069d14c6b7b180555e2d6ad0fdf7bba2d0bcb]]
-https://gitlab.com/inkscape/inkscape/issues

*PDF/EPS/PS + LaTeX [#d6b72996]

-[[Inkscape Wiki:http://wiki.inkscape.org]]
--[[LaTeX - Inkscape Wiki:http://wiki.inkscape.org/wiki/index.php/LaTeX]]
--[[Release notes/0.91 - Inkscape Wiki#PDF/EPS/PS + LaTeX:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91#PDF.2FEPS.2FPS_.2B_LaTeX]]
--[[Release notes/0.48 - Inkscape Wiki#New LaTeX export for PDF/EPS/PS:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.48#New_LaTeX_export_for_PDF.2FEPS.2FPS]]
-[[svg-inkscape:https://ctan.org/pkg/svg-inkscape]], [[CTAN:help/Catalogue/entries/svg-inkscape.html]]
--使い方は texdoc で確認してください
 texdoc svg-inkscape
-[[InkscapeでTex用の図を作成する方法:http://akitosblog.seesaa.net/article/225071699.html]]
-[[InkscapeでLaTeX用の図を書く:http://d.hatena.ne.jp/amarui/20130124/1358995146]]
---[[Release notes/0.92 - Inkscape Wiki#Export PDF / EPS / PS:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.92#Export_PDF_.2F_EPS_.2F_PS]]
---[[Release notes/0.91 - Inkscape Wiki#PDF/EPS/PS + LaTeX:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91#PDF.2FEPS.2FPS_.2B_LaTeX]]
---[[Release notes/0.48 - Inkscape Wiki#New LaTeX export for PDF/EPS/PS:http://wiki.inkscape.org/wiki/index.php/Release_notes/0.48#New_LaTeX_export_for_PDF.2FEPS.2FPS]]

Inkscape は PDF, EPS, PS ファイルで保存する場合にテキストを除外して LaTeX ファイルを生成できます.
Inkscape は PDF, EPS, PS ファイルで保存する場合に PDF, EPS, PS のテキストを除外して LaTeX ファイルを生成できます.

>
&color(#72C304,#72C304){%%%        &color(Black){''Portable Document Format''};       &color(#DD4444,#DD4444){%%%[ &color(White){''🗙''}; ]%%%};%%%};&br;
 PDF バージョン制限 %%% PDF 1.5               [ ''ᐯ'' ]%%%&br;
 テキスト出力オプション:  ◯ フォントを埋め込む&br;
            ◯ テキストをパスに変換する&br;
            🔘 PDF のテキストを除外して LaTeX ファイルを生成&br;
  ☑ フィルダーエフェクトをラスタライズする&br;
  ☑ フィルターエフェクトをラスタライズする&br;
 ラスタライズ解像度 (dpi):                      %%%90 [''⇕'']%%%&br;
 出力ページサイズ:    🔘 ドキュメントのページサイズを使用&br;
            ◯ エクスポートオブジェクトのサイズを使用&br;
 裁ち落し/マージン (mm):                   %%%0.0    [''⇕'']%%%&br;
 オブジェクトのエクスポートを ID で制限する: %%%               %%%&br;
<
>
&color(#72C304,#72C304){%%%             &color(Black){''Encapsulated PostScript''};           &color(#DD4444,#DD4444){%%%[ &color(White){''🗙''}; ]%%%};%%%};&br;
 PS レベル制限 %%% PostScript level 3             [ ''ᐯ'' ]%%%&br;
 テキスト出力オプション:  ◯ フォントを埋め込む&br;
            ◯ テキストをパスに変換する&br;
            🔘 EPS のテキストを除外して LaTeX ファイルを生成&br;
  ☑ フィルダーエフェクトをラスタライズする&br;
  ☑ フィルターエフェクトをラスタライズする&br;
 ラスタライズ解像度 (dpi):                      %%%90 [''⇕'']%%%&br;
 出力ページサイズ:    🔘 ドキュメントのページサイズを使用&br;
            ◯ エクスポートオブジェクトのサイズを使用&br;
 裁ち落し/マージン (mm):                   %%%0.0    [''⇕'']%%%&br;
 オブジェクトのエクスポートを ID で制限する: %%%               %%%&br;
<
>
&color(#72C304,#72C304){%%%                  &color(Black){''PostScript''};                &color(#DD4444,#DD4444){%%%[ &color(White){''🗙''}; ]%%%};%%%};&br;
 PS レベル制限 %%% PostScript level 3             [ ''ᐯ'' ]%%%&br;
 テキスト出力オプション:  ◯ フォントを埋め込む&br;
            ◯ テキストをパスに変換する&br;
            🔘 PS のテキストを除外して LaTeX ファイルを生成&br;
  ☑ フィルダーエフェクトをラスタライズする&br;
  ☑ フィルターエフェクトをラスタライズする&br;
 ラスタライズ解像度 (dpi):                      %%%90 [''⇕'']%%%&br;
 出力ページサイズ:    🔘 ドキュメントのページサイズを使用&br;
            ◯ エクスポートオブジェクトのサイズを使用&br;
 裁ち落し/マージン (mm):                   %%%0.0    [''⇕'']%%%&br;
 オブジェクトのエクスポートを ID で制限する: %%%               %%%&br;
>

コマンドラインからテキストを除外して LaTeX ファイルを出力することも可能です.
コマンドラインから PDF, EPS, PS のテキストを除外して LaTeX ファイルを出力することも可能です.

//-https://inkscape.modevia.com/inkscape-man.html
 inkscape -D -z --file=image.svg --export-pdf=image.pdf --export-latex
 inkscape -D -z --file=image.svg --export-eps=image.eps --export-latex
 inkscape -D -z --file=image.svg --export-ps=image.ps --export-latex

**注意点 [#i348fa25]
*svg – Include and extract SVG pictures in LaTeX documents [#p2c351e1]

***! LaTeX Error: Cannot determine size of graphic in ???.eps_tex (no BoundingBox) → 「EPS+LaTeX: EPS のテキストを除外して LaTeX ファイルを生成」 のチェックボックスを解除する [#p8fa7725]
-[[svg:https://ctan.org/pkg/svg]]
--[[[LaTeX] svg --- LaTeX文書にSVG画像を含める方法:http://konoyonohana.blog.fc2.com/blog-entry-432.html]]

! LaTeX Error: Cannot determine size of graphic in ???.eps_tex (no BoundingBox) のエラーが発生する場合は 「EPS+LaTeX: EPS のテキストを除外して LaTeX ファイルを生成」 のチェックボックスを解除してください. (→ [[inkscapeで作った画像epsをtexでの利用の仕方がわからず困っています.:http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10107244200]])

*エクステンション [#s696e33c]

-&color(Red){''エクステンションを修正する場合の注意点''};
--&color(Red){''Python はインデントに意味を持つので修正する場合はインデントに注意して修正してください.''};
--&color(Red){''タブではなくスペースでインデントすることをおすすめします.''};
--&color(Red){''コメントアウトは # (シャープ) を使用します.''};
--&color(Red){''Python で Windows のパスを文字列で表す場合は raw 文字列 (r'...') を使用すると便利です.''};
**LaTeX (pdflatex) [#w6edd3aa]

**[[EqTeXSVG (LaTeX formula):https://www.julienvitard.eu/en/eqtexsvg_en.html]] [#w6edd3aa]
pdflatex を実行して数式を埋め込むエクステンション.
Inkscape に標準で収録されています.

LaTeX と連携するためのエクステンション.
''環境変数 Path に [[pstoedit]], [[dvisvgm]], [[dvips]], latex が存在するディレクトリが含まれていれば'' [エクステンション(N)] → [レンダリング] → [LaTeX formula...] から使用可能.~
[[EqTeXSvg の公式サイト:https://www.julienvitard.eu/en/eqtexsvg_en.html]]から最新版 (2015-02-25) をインストールしてください ([[インストール>Inkscape#v77ed75c]] を参照).
[[Inkscape にデフォルトで含まれています:https://gitlab.com/inkscape/inkscape/blob/master/share/extensions/eqtexsvg.py]]が,バージョンが古く (2010-04-04),正しく動作しません.
-https://gitlab.com/inkscape/extensions/blob/master/pdflatex.inx
-https://gitlab.com/inkscape/extensions/blob/master/pdflatex.py

-[http://nan-hen.com/?p=9244 Inkscape (Win)でLaTeX数式を使えるようにする]
-[[InkscapeでLaTexを使う:http://chiron.blog.ocn.ne.jp/astrocal/2012/09/inkscapelatex_1.html]]
-[[InkscapeでLaTexを使えるようにできたメモ:http://d.hatena.ne.jp/biost/20120302/1330660995]]
-[[Inkscape で LaTeX 数式を表示しようとするとエラーになる:http://d.hatena.ne.jp/nlogn/20120131/1327995778]]
***動作環境 [#z851d64f]

***インストール (Windows) [#v77ed75c]
[[TeX Live]] には dvisvgm, dvips, latex が含まれています.~
[[W32TeX]] には pstoedit, dvisvgm, dvips, latex が含まれています.~
Windows 10 Pro バージョン 1909 x64、Inkscape 1.0 x64 with Python 3.8.2、TeX Live 2020 win32 版で動作することを確認しています。

TeX Live を使用している場合は [[pstoedit]] をダウンロード,インストールして環境変数 Path に pstoedit.exe のコマンド検索パスを追加します.
macOS では Finder からダブルクリックで Inkscape を実行するとグレーアウトされて動作しないようですが、Terminal から Inkscape を実行すると動作するようです。--&gt; [[Mac版Inkscape1.0のpdflatex>forum:2849]]
//macOS ではグレーアウトされて動作しないようですが、TexText が動作するので問題ないようです。--&gt; [[Inkscape ver.1.0では LaTeX (pdflatex)のレンダリングは 出来ない?>forum:2844]], [[「Inkscape グレーアウト問題は解決」の報告フォーマットに関して>forum:2845]], [[Inkscape Can not find the command 'pdflatex'>forum:2847]], [[Can not find the command &#39;pdflatex&#39; (#1221) · Issues · Inkscape / Inbox · GitLab:https://gitlab.com/inkscape/inbox/issues/1221]]

-https://inkscape.org/en/download/
Linux の AppImage 版ではグレーアウトはしませんが Debian GNU/Linux 10 (Buster) で動作に失敗するようです。--&gt; [[Re: Inkscape ver.1.0では LaTeX (pdflatex)のレンダリングは 出来ない。>forum:2844#p16693]]

から Inkscape 最新版をダウンロードして展開します.

展開したフォルダーを C:\inkscape と仮定します.別のフォルダーに展開した場合は読み替えてください.

-https://github.com/julienvitard/eqtexsvg
***使用方法 [#se15d9b2]

から EqTeXSVG をダウンロードします.
[エクステンション(N)] &gt; [レンダリング] &gt; [Mathmatics] &gt; [LaTeX (pdflatex)...] を選択.

eqtexsvg.inx, eqtexsvg.py を C:\inkscape\\share\extensions にコピーして元々の eqtexsvg.inx, eqtexsvg.py を上書きします.
>
&color(#72C304,#72C304){%%%                &color(Black){''LaTeX (pdflatex)''};              &color(#DD4444,#DD4444){%%%[ &color(White){''🗙''}; ]%%%};%%%};&br;
 LaTeX Input: %%%\(\displaystyle\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)%%%&br;
 Additional packages(comma-separated):&br;
&br;
 ☑ ライブプレビュー&br;
<

EqTeXSVG (LaTeX formula) は tempdir に inkscape-?????? フォルダーを作成しますが作成される inkscape-?????? フォルダーの親ディレクトリは
 PS C:\inkscape> .\python.exe
 Python 2.7.14 (default, Jan 24 2018, 14:36:54)  [GCC 7.2.0 64 bit (AMD64)] on win32
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import tempfile
 >>> tempfile.gettempdir()
とすることで確認できます.
**[[TexText:https://github.com/textext/textext]] [#l1a0873e]

***インストール (Linux) [#jbc77a7b]
Inkscape で LaTeX のグラフィックスを埋め込むエクステンション.再編集可能.

eqtexsvg を最新版に更新します.
-https://github.com/textext/textext
-https://textext.github.io/textext/

 $ wget https://github.com/julienvitard/eqtexsvg/archive/master.tar.gz
または
 $ curl -kRLO https://github.com/julienvitard/eqtexsvg/archive/master.tar.gz
***インストール [#j75ce7d3]

ファイルを展開して eqtexsvg.py に実行権限を付加して /usr/share/inkscape/extensions にコピーします.
-https://textext.github.io/textext/index.html#installation-toc
-[[FYI:Mac版TeXTextのインストール>forum:2842]]

 $ tar xvf master.tar.gz
 $ cd eqtexsvg-master
 $ chmod +x eqtexsvg.py
 $ sudo cp -p eqtexsvg.py eqtexsvg.inx /usr/share/inkscape/extensions
***使用方法 [#fce319ec]

Inkscape を起動すると [エクステンション(N)] → [レンダリング] → [LaTeX formula...] が使用出来ます.
-https://textext.github.io/textext/index.html#usage-toc

***使用方法 [#se15d9b2]
-''環境変数 Path に pstoedit, dvisvgm, dvips, latex が存在するディレクトリが含まれていれば'' [エクステンション(N)] → [レンダリング] → [LaTeX formula...] から使用可能.
**SVG2TikZ, svg2tikz [#u5ee2f7d]

LaTeX formula が表示されない場合は,まず環境変数 Path を確認します.
Inkscape 等で作成した SVG ファイルを TikZ のコードに変換するプログラムです.

Windows PowerShell の場合は
 $Env:Path
コマンド プロンプトの場合は
 path
を実行します.
-[[SVG2TikZ:https://github.com/kjellmf/svg2tikz]]
-[[svg2tikz:https://github.com/paaguti/svg2tikz]]
-[[SVG を TikZ ソースに変換する Docker コンテナを作る:https://qiita.com/doraTeX/items/4d48e86cf3fc6f2ae132]]

pstoedit, dvisvgm, dvips, latex が格納されているディレクトリが Path に登録されていればコマンドラインから Inkscape の実行ファイルが存在するディレクトリに移動して
 .\inkscape
と入力して Inkscape を起動してみてください.
**svg2pdf [#g07406d0]

>
&color(#72C304,#72C304){%%%                &color(Black){''LaTeX formula''};              &color(#DD4444,#DD4444){%%%[ &color(White){''🗙''}; ]%%%};%%%};&br;
 LaTeX formula: %%%\(\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)%%%&br;
 追加パッケージ(カンマ区切り):&br;
 ☐ Debug information&br;
&br;
 ☑ ライブプレビュー&br;
<
デフォルトでは LaTeX formula は \( ~ \) となっているようです.
 \(\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)
以下の数式モードが使用可能です.
-https://github.com/yambi/bin/blob/master/svg2pdf
-[[続・Inkscape SVG の各レイヤを PDF にエクスポートする:http://empitsu.hatenablog.com/entry/2013/02/06/205135]]
-[[Inkscapeでプレゼンテーション(jessyinkなし):http://yambi.hatenablog.com/entry/20140211/1392110852]]

-インライン数式モード
--\( ~ \)
 \(\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\)
--$ ~ $
 $\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}$
--\begin{math} ~ \end{math}
 \begin{math}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{math}
-ディスプレイ数式モード (番号を付けない場合)
--\[ ~ \]
 \[\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\]
--\begin{align*} ~ \end{align*}
 \begin{align*}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{align*}
--\begin{gather*} ~ \end{gather*}
 \begin{gather*}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{gather*}
--\begin{equation*} ~ \end{equation*}
 \begin{equation*}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{equation*}
-ディスプレイ数式モード (番号を付ける場合)
--\begin{align} ~ \end{align}
 \begin{align}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{align}
--\begin{gather} ~ \end{gather}
 \begin{gather}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{gather}
--\begin{equation} ~ \end{equation}
 \begin{equation}\frac{\pi^2}{6}=\lim_{n \to \infty}\sum_{k=1}^n \frac{1}{k^2}\end{equation}

**[[Tex Text:https://github.com/textext/textext]] [#l1a0873e]

Inkscape で LaTeX の数式を埋め込むエクステンション.再編集可能.

**[[SVG2TikZ:https://github.com/kjellmf/svg2tikz]] [#u5ee2f7d]

Inkscape 等で作成した SVG ファイルを TikZ のコードに変換するプログラムです.

**[[JessyInk:https://launchpad.net/jessyink]] [#k0206a78]

-[[Inkscapeでプレゼンテーション:http://d.hatena.ne.jp/yambi/20110405/1301974923]]

*Inkscape で TeX 数式 [#f9da7d32]

[[TeX2img]] (Windows/Mac) を使用して,TeX ソースから数式画像を EPS/PDF 形式でアウトライン化して出力するのが簡単です.
なお,TeX2img は数式以外の地の文や日本語も問題なく処理できます.
-[[InkscapeでTeX数式:http://hooktail.org/computer/index.php?Inkscape%A4%C7TeX%BF%F4%BC%B0]]
-[[Inkscapeでtex数式を使う(数式はアウトラインに):http://www.my-chicken-heart.com/2007/09/inkscapetex.html]]
-[[Latexの数式をsvgに:http://blog.livedoor.jp/les_paul_sp/archives/317234.html]]
-[[TeX, EPS, Inkscape for Win:http://researchmap.jp/jo8ju0xue-10163/#_10163]]
-[[PDFのトリミングとベクター画像抽出:http://acetaminophen.hatenablog.com/entry/2014/09/15/075714]]

*関連リンク [#l46f1d34]

-[[InkscapeでDesign:http://inkscapedesign.web.fc2.com/]]
-[[Inkscaper ~Inkscapeの使い方~:http://logo.dollsent.jp/]]
-[[Wikipedia.ja:Inkscape]]
-[[Wikibooks.ja:Inkscape]]
-[[MacWiki:Inkscape]]
-[[Inkscape - 窓の杜ライブラリ:http://www.forest.impress.co.jp/library/software/inkscape/]]
-[[macOS Sierra でInkscape の日本語化:http://a244.hateblo.jp/entry/2016/10/22/001621]]
-[[Beamerscape:https://github.com/jbohren/beamerscape]]