Converte TeX source to images.
C# C++ C
Clone or download
abenori
abenori 2.1.0
Latest commit 1fea342 May 15, 2018
Permalink
Failed to load latest commit information.
Properties 2.1.0 May 15, 2018
TeX2img_win_icon Change icon May 15, 2018
TeX2imgc .NET Framework 4.5.2, Update PDFium Jan 21, 2018
UnitTest .NET Framework 4.5.2, Update PDFium Jan 21, 2018
mudraw add version_document to mudraw Jun 12, 2016
pdfiumdraw .NET Framework 4.5.2, Update PDFium Jan 21, 2018
.gitattributes コミットを開始し、既定の .gitIgnore ファイルと .gitAttribute ファイルを追加してください。 Sep 14, 2014
.gitignore update .gitignore Jun 2, 2016
AboutDialog.Designer.cs Change icon May 15, 2018
AboutDialog.cs Version 1.2.0 Sep 14, 2014
AboutDialog.ja-JP.resx Change icon May 15, 2018
AboutDialog.resx Change icon May 15, 2018
AlternativeDataStream.cs Resurrect EMF file (via PDFium + Metafile in .Net) Mar 12, 2015
AnalyzeLaTeXCompile.cs Resurrect EMF file (via PDFium + Metafile in .Net) Mar 12, 2015
AppleDouble.cs Fix bug: if the format to /margins option was not valid, then tex2img… Oct 7, 2015
BoundingBox.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
CUIOutput.cs Add English resources Jul 2, 2016
Converter.cs .dashpath [] 0 setdash oldstroke -> strokepath fill May 15, 2018
IOutputController.cs show message when getting the BoundingBox fafils Nov 6, 2015
InputComboDialog.Designer.cs modify managing dialog of templates Feb 24, 2015
InputComboDialog.cs modify managing dialog of templates Feb 24, 2015
InputComboDialog.resx modify managing dialog of templates Feb 24, 2015
KanjiEncoding.cs Using KanjiEncoding to analyze .aux Jan 14, 2015
MainForm.Designer.cs Add English resources Jul 2, 2016
MainForm.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
MainForm.ja-JP.resx Change icon May 15, 2018
MainForm.resx Change icon May 15, 2018
ManageTemplateDialog.Designer.cs Use event generated by IDE for processing the menus. Jul 3, 2016
ManageTemplateDialog.cs Use event generated by IDE for processing the menus. Jul 3, 2016
ManageTemplateDialog.ja-JP.resx Use event generated by IDE for processing the menus. Jul 3, 2016
ManageTemplateDialog.resx Use event generated by IDE for processing the menus. Jul 3, 2016
OptionSet.cs Add English resources Jul 2, 2016
OutputForm.Designer.cs Add English resources Jul 2, 2016
OutputForm.cs Version 1.2.0 Sep 14, 2014
OutputForm.ja-JP.resx Change icon May 15, 2018
OutputForm.resx Change icon May 15, 2018
PreambleForm.Designer.cs Change icon May 15, 2018
PreambleForm.cs Add English resources Jul 2, 2016
PreambleForm.ja-JP.resx Change icon May 15, 2018
PreambleForm.resx Change icon May 15, 2018
Program.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
README.md 2.1.0 May 15, 2018
SettingForm.Designer.cs Change icon May 15, 2018
SettingForm.cs Add English resources Jul 2, 2016
SettingForm.ja-JP.resx Change icon May 15, 2018
SettingForm.resx Change icon May 15, 2018
Settings.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
SupportInputColorDialog.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
TeX2img.csproj Change icon May 15, 2018
TeX2img.exe.config .NET Framework 4.5.2, Update PDFium Jan 21, 2018
TeX2img.sln embed source file as an annotation in PDF Oct 3, 2015
TeX2img.txt 2.1.0 May 15, 2018
TeX2imgIcon.ico Change icon May 15, 2018
TeXSource.cs Use generics in mudraw Jun 15, 2016
TempFilesDeleter.cs Use PDF mainly to generated images Dec 1, 2015
app.config .NET Framework 4.5.2, Update PDFium Jan 21, 2018
license.txt .NET Framework 4.5.2, Update PDFium Jan 21, 2018
mudraw.cs 文字→数値などの変換にen-USカルチャを設定するようにした. Dec 19, 2016
source.txt pdfiumdraw draws background of emf file Dec 19, 2015

README.md

TeX2img

(C) Yusuke Terada and Noriyuki Abe http://www.math.sci.hokudai.ac.jp/~abenori/

(日本語のドキュメントは TeX2img.txt をご覧ください.)

What is TeX2img?

This generates the images with the following formats from the TeX source code:

  • EPS (outlined font)
  • PDF (outlined font or keep the text)
  • SVG(Z) (outlined font + keep the text)
  • JPEG
  • TIFF
  • PNG
  • BMP
  • EMF

This was originally made by Yusuke Terada (until Version 1.2).

Requirements

  • Windows Vista or later.
  • .NET Framework 4.5.2 or later.
  • TeX distribution (W32TeX or TeX Live is recommended), especially pdftex.
  • Ghostscript (Version 9 or later is recommended).

How to install

Download from http://www.math.sci.hokudai.ac.jp/~abenori/soft/index.html#TEX2IMG

Just extract and double click "TeX2img.exe". At the first time, TeX2img try to get paths of pdflatex.exe etc. If it is not correct, please set them from [Tools(T)] -> [Options...(O)]

TeX2imgc.exe is a wrapper program to execute TeX2img with the console.

> TeX2imgc.exe [Options] Input Output [Input Output...]

Each property are inherited from those of TeX2img except preview after compiling (always false).

Tips

  • You can also specify the options to each programs. Example:"C:\w32tex\bin\platex.exe" --guess-input-enc

  • Since the internal character code is Unicode, you can also use characters which is outside of Shift_JIS with "uplatex" etc. For that, please choose "UTF-8" or "no (input UTF-8)" for the character code.

  • If TeX2img think that the LaTeX program generated pdf file, TeX2img skips DVI driver. If TeX2img thinks that the DVI driver generates ps, then TeX2img converts the ps file to pdf file via Ghostscript. Consequently, you can specify "dvips"

  • If you drag and drop the generated file to TeX2img (or [File(F)] -> [Import(O)]), the source file is restored.

Options

The following are the options for TeX2img.exe or TeX2imgc.exe.

/latex=<VAL>             Set path for latex
/dvidriver=<VAL>         Set path for dvi driver
/gs=<VAL>                Set path for Ghostscript
/oldgs[-]                Ghostscript is before version 9.14
/kanji=<VAL>             Character code (utf8/sjis/jis/euc/no)
/guess-compile[-]        Guess compile
/num=<NUM>               (maximum) number of times for LaTeX
/resolution=<NUM>        Resolution level
/left-margin=<NUM>       Left margin
/top-margin=<NUM>        Top margin
/right-margin=<NUM>      Right margin
/bottom-margin=<NUM>     Bottom margin
/margins=<VAL>           Margins (all / leftright topbottom / left top right bottom)
/unit=<VAL>              Unit of margins ( bp/px )
/keep-page-size[-]       Keep the original page size
/merge-output-files[-]   Make a single file (PDF / TIFF /SVG(Z))
/animation-delay=<VAL>   Delay of animation (sec)
/animation-loop=<VAL>    Loop count of animation (0 =infinity)
/background-color=<VAL>  Background color (ex: FF0000, red, "255 0 0")
/transparent[-]          Transparent
/with-text[-]            Keep original text information (PDF / SVG(Z))
/delete-display-size[-]  Remove <width> and <height> (SVG(Z))
/antialias[-]            Anti-aliasing
/low-resolution[-]       Generate images with low resolution
/ignore-errors[-]        Force conversion by ignoring nonfatal errors
/delete-tmpfiles[-]      Delete temporary files after compiling
/preview[-]              Preview after compiling
/embed-source[-]         Embed the source in output image files
/copy-to-clipboard[-]    Copy generated files to the clipboard
/workingdir=<VAL>        Working folder (tmp/file/current)
/savesettings[-]         Save settings
/quiet[-]                Quiet mode
/timeout=<NUM>           Time out period (seconds)
/batch=<VAL>             Batch mode (stop/nonstop)
/exit                    Save settings and exit
/load-defaults           Load default settings
/help                    Show this message
/version                 Show version information
/language=<VAL>          Language (system/ja/en)

[-] means negation. For example. /guess-compile- means that TeX2img does not guess the compiling.

If you specify several options, TeX2img takes the last one. For example tex2imgc /transparent- /transparent a.tex a.png will generate transparent png file. In particular, because /load-defaults makes all settings default ones, the options before /load-defaults are ignored. The option /load-defaults should be the first.

Reference

Known bugs

Conversions to EMF file has some problems. See Issues in GitHub: https://github.com/abenori/TeX2img/issues/3.

Acknowledgments

license

See license.txt. For the libraries:

  • Azuki text editor engine: zlib license.
  • NDesk.Options: MIT license.
  • Gauche: modified BSD license.
  • mudraw: GPL v3 license.
  • PDFium: modified BSD license.
  • pdfiumdraw: modified BSD license.

For the detail, see the site of each library.

History (after 2.0)

  • 2.0.0 (2016/07/16)

    • Add English resources.
    • Add option /language
    • Options /platex and /dvipdfmx are now hidden.
  • 2.0.1 (2016/10/06)

    • Fix typos in Japanese resources.
    • Update PDFium
  • 2.0.2 (2016/12/19)

    • Fix bug: the conversion between strings and numbers are not correct with a certain system language.
  • 2.0.3 (2018/01/22)

    • Require .NET Framework >= 4.5.2.
    • Update PDFium
  • 2.1.0 (2018/05/16)

    • Use {strokepath fill} for preprocessing for EMF file. (The old method can't apply for new Ghostscript.)
    • Changed icons.