diff options
author | Karl Berry <karl@freefriends.org> | 2013-07-12 23:26:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-07-12 23:26:02 +0000 |
commit | 50834d5bc5540f43c363b17c18a9809b5a827a47 (patch) | |
tree | d15996fcb49041557c50bf78b1a2dfd21c47e5a9 /Master/texmf-dist/doc/luatex | |
parent | 944cd493cc09852c6d84e0519760c97750efb2aa (diff) |
luatexja 20130711.0 (12jul13)
git-svn-id: svn://tug.org/texlive/trunk@31183 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/luatex')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/README | 37 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf | bin | 401738 -> 532092 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/ltjltxdoc.pdf | bin | 110893 -> 110719 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf | bin | 376762 -> 541107 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf | bin | 820434 -> 537782 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf | bin | 971860 -> 857671 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-zh.pdf | bin | 648268 -> 0 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.pdf | bin | 0 -> 463262 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.tex | 250 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx | 330 |
10 files changed, 490 insertions, 127 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexja/README b/Master/texmf-dist/doc/luatex/luatexja/README index 98878390de2..5eee451c9b8 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/README +++ b/Master/texmf-dist/doc/luatex/luatexja/README @@ -1,4 +1,4 @@ -The LuaTeX-ja Package 20130515.0 +The LuaTeX-ja Package 20130711.0 -------------------------------- Copyright (c) 2011--2013 The LuaTeX-ja project License: modified BSD (see COPYING) @@ -8,7 +8,7 @@ This package is highly affected by ASCII pTeX engine, but not a porting of it. Note that this package is still *alpha-stage*; documentations are not complete and specifications are subject to change. Documentations are located at - doc/luatexja-en.pdf (en), doc/luatexja-ja.pdf (ja), doc/luatexja-zh.pdf (zh). + doc/luatexja-en.pdf (en), doc/luatexja-ja.pdf (ja). LuaTeX-ja is developed on <http://sourceforge.jp/projects/luatex-ja/wiki/FrontPage(en)>. @@ -26,6 +26,8 @@ Installation - LuaTeX beta-0.74.0 or later - luaotfload v2.2 - luatexbase v0.6 + - Several Adobe CMaps + (e.g., UniJIS2004-UTF32-H, Adobe-Japan1-UCS2 for Japanese) Hence this version does not work in TeX Live 2012 (or earlier). 1. If you are using TeX Live 2013 or later, you can install LuaTeX-ja via tlmgr. @@ -33,17 +35,26 @@ Installation 2. If you must/want to install manually: a. Download the source archive from CTAN, - or tagged as 20130515.0 in the Git repository by + or tagged as 20130711.0 in the Git repository by <http://git.sourceforge.jp/view?p=luatex-ja/luatexja.git - ;a=snapshot;h=refs/tags/20130515.0;sf=tgz> + ;a=snapshot;h=refs/tags/20130711.0;sf=tgz> - b. Extract the archive and put src/ into your TEXMF tree. + b1. Extract the archive and process following three files by LuaLaTeX + to generate classes for Japanese typesetting: + src/ltjclasses.ins + src/ltjltxdoc.ins + src/ltjsclasses.ins + + b2. Process src/ltj-kinsoku_make.tex by (plain) LuaTeX to generate ltj-kinsoku.lua, + which stores default "kinsoku" parameters. + + c. Put src/ into your TEXMF tree. An example location is TEXMF/tex/luatex/luatexja. If you are updating from old version, you MUST remove it before extracting the new version of LuaTeX-ja. - c. You may need to update the filename database, by 'mktexlsr' or something. + d. You may need to update the filename database, by 'mktexlsr' or something. Basic Usage @@ -58,5 +69,17 @@ Simply loading luatexja.sty by \input or \usepackage does the minimal setting. It defines control sequences such as \setmainjfont, setsansjfont and \jfontspec, which can be used for specifying Japanese fonts. +Notes +----- +* This archive contains four .{dtx,ins} pairs: + src/ltjclasses.{ins,dtx}, src/ltjltxdoc.{ins,dtx} + src/ltjsclasses.{ins,dtx}, doc/luatexja.{ins,dtx} + Former three pairs generate class files (see above), + while the latter doc/luatexja.{ins,dtx} generates documentations. + (You will need Kozuka fonts to regenerate documentaion PDFs.) + + No .{dtx,ins} pair generates .sty files of LuaTeX-ja package. + +* src/*.{ins.dtx} and src/ltj-kinsoku_make.tex are not needed in regular use. -Last commit date: Wed May 15 05:43:09 2013 +0900 +Last commit date: Thu Jul 11 08:55:45 2013 +0900 diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf Binary files differindex 8506512c300..121aa798e27 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/ltjclasses.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjltxdoc.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjltxdoc.pdf Binary files differindex 21639b71c18..c2b3df854e7 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/ltjltxdoc.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/ltjltxdoc.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf Binary files differindex 97481150f1b..1bb259653e6 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/ltjsclasses.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf Binary files differindex 29465c39d12..381464652f9 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-en.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf Binary files differindex bd1be8a7058..4a3522224ff 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-ja.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-zh.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-zh.pdf Binary files differdeleted file mode 100644 index 5ce5eb87287..00000000000 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja-zh.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.pdf b/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.pdf Binary files differnew file mode 100644 index 00000000000..d756d65e468 --- /dev/null +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.pdf diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.tex b/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.tex new file mode 100644 index 00000000000..ee85774d75e --- /dev/null +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja-zhfonts.tex @@ -0,0 +1,250 @@ +\documentclass[DIV=13]{article} +\usepackage{typearea} +\usepackage{hologo} +\def\pTeX{p\TeX} +\def\LuaTeX{Lua\TeX} +\def\XeTeX{\hologo{XeTeX}} +\usepackage{booktabs} +\usepackage{multicol} +\usepackage{indentfirst} +\usepackage{luatexja-fontspec} +\parindent2\zw +\setmainjfont[BoldFont={FZXiaoBiaoSong-B05}]{FZShuSong-Z01} +\title{\LuaTeX-ja简体中文字体配置} +\author{马起园 苏 杰} +\date{2013年5月} +\begin{document} +\maketitle +\section{\LuaTeX-ja项目简介} +\LuaTeX-ja项目旨在将\pTeX 处理汉字的机制移植到\LuaTeX 下,当前项目的成员 +有:北川弘典、前田一貴、八登崇之、黒木裕介 、阿部紀行、山本宗宏、本田知 +亮、齋藤修三郎和馬起園。 + +\LuaTeX 虽然在编码上支持Unicode,但并不能直接处理汉字断行以及禁则应用,而 +在\pTeX 系列中则能够处理断行并应用禁则,但并不支持pdf输出。\LuaTeX 下处理 +汉字的断行和应用禁则需要使用其内建的诸多callback来进行。\pTeX 扩展TFM为JFM, +但是JFM抽象程度更高,该文件涉及到的内容是字体的标点压缩,可以用于多个汉字字体。 + +当前版本的\LuaTeX-ja 可以应用于\TeX\ Live和W32\TeX,但不能在MikTeX下使用, +因为MikTeX下的\LuaTeX 存在bug。 +\section{字体使用} +\subsection{关于Lua\TeX-ja的字体调用} +\XeTeX 在调用字体的时候需要使用freetype和fontconfig库,所以需要更新字体缓 +存,但是在\LuaTeX 下就不太一样。\LuaTeX 只需要在初次使用的时候刷新字体数据 +库即可(此数据库是一个lua文件)。\LuaTeX 下的字体缓存实际上是将字体的各种 +信息导出并保存的文件,在调用一个新字体的时候会生成一个。\LuaTeX 对于字体的 +处理并没有使用freetype,而是使用了fontforge,不过可能由于该库的接口有一些 +问题,导致部分字体无法在\LuaTeX 下使用。 + +在使用\LuaTeX-ja的时候,需要先刷新字体数据库,该命令的使用方法如下: +\begin{verbatim} +Usage: mkluatexfontdb [OPTION]... + +Rebuild the LuaTeX font database. + +Valid options: + -f --force force re-indexing all fonts + -q --quiet don't output anything + -v --verbose=LEVEL be more verbose (print the searched directories) + -vv print the loaded fonts + -vvv print all steps of directory searching + -V --version print version and exit + -h --help print this message +\end{verbatim} + +又是可能遇到通不过的字体,需要将这个字体的绝对路径添加到otfl-blacklist.cnf中, +这个文件的内容如下: +\begin{verbatim} +% Tackes ages to load +LastResort.ttf % a MacOSX font, but also available for free from unicode.org + +% Mac OS X TTC fonts, this list need to be filtered out +/Library/Fonts/AmericanTypewriter.ttc +/Library/Fonts/Baskerville.ttc +/Library/Fonts/Chalkboard.ttc +/Library/Fonts/Cochin.ttc +/Library/Fonts/Copperplate.ttc +/Library/Fonts/Didot.ttc +/Library/Fonts/Futura.ttc +/Library/Fonts/GillSans.ttc +/Library/Fonts/Hoefler Text.ttc +/Library/Fonts/MarkerFelt.ttc +/Library/Fonts/Optima.ttc +/Library/Fonts/Papyrus.ttc +/Library/Fonts/STHeiti Medium.ttc +/System/Library/Fonts/AquaKana.ttc +/System/Library/Fonts/HelveticaNeue.ttc +/System/Library/Fonts/LucidaGrande.ttc +/System/Library/Fonts/Menlo.ttc +/System/Library/Fonts/STHeiti Light.ttc +\end{verbatim} + +Lua\TeX 调用TrueType和OpenType字体并没有固定的方式,\XeTeX 使用了固定的接口, +而Lua\TeX 需要使用luaotfload包来进行字体的调用。这两种字体一般都有高级特性, +在\TeX\ Live或者W32\TeX 中可以使用otfinfo命令来查看相关的信息: +\begin{verbatim} +'Otfinfo' reports information about an OpenType font to standard output. +Options specify what information to print. + +Usage: otfinfo [-sfzpg | OPTIONS] [OTFFILES...] + +Query options: + -s, --scripts Report font's supported scripts. + -f, --features Report font's GSUB/GPOS features. + -z, --optical-size Report font's optical size information. + -p, --postscript-name Report font's PostScript name. + -a, --family Report font's family name. + -v, --font-version Report font's version information. + -i, --info Report font's names and designer/vendor info. + -g, --glyphs Report font's glyph names. + -t, --tables Report font's OpenType tables. + -T, --dump-table NAME Output font's 'NAME' table. + +Other options: + --script=SCRIPT[.LANG] Set script used for --features [latn]. + -V, --verbose Print progress information to standard error. + -h, --help Print this message and exit. + -q, --quiet Do not generate any error messages. + --version Print version number and exit. + +Report bugs to <ekohler@gmail.com>. +\end{verbatim} +\subsection{使用字体的方法} +目前\LuaTeX-ja支持在plain \TeX 和\LaTeX 下使用。如果你使用texinfo,那么很 +不幸,你不太可能使用\LuaTeX-ja来处理中文,因为texinfo是针对pdf\TeX 设计的, +在\LuaTeX 下使用已经有了一定的不兼容现象,即使完全兼容也需要对texinfo中的 +字体配置进行调整,如果你急需使用texinfo来处理中文,请尝试W32\TeX 下的texinfo, +这个发行版中的texinfo已经打了补丁。对于Con\TeX t用户,请使用李延瑞的zhfonts模块 +\footnote{见https://github.com/liyanrui/zhfonts}。 + +在plain \TeX 中使用Lua\TeX-ja可以在源文件中写入: +\begin{verbatim} +\input luatexja-core.sty +\end{verbatim} +Lua\TeX-ja移植的了\verb!\jfont!命令,在plain \TeX 下需要通过该命令来 +控制输出的汉字字体,例如: +\begin{verbatim} +\jfont\song={name:SimSun:jfm=banjiao} at 10pt +\song 我能吞下玻璃而不伤身体。 +\end{verbatim} +上文中的\verb!jfm=banjiao!使用来控制标点压缩的,如果此项未设定,则 +使用默认的\verb!ujis!压缩模式,对于简体中文来讲,可用的模式有: +\texttt{quanjiao,banjiao,kaiming}。 + +而在\LaTeX 下使用则较为简单,使用: +\begin{verbatim} +\usepackage{luatexja-fontspec} +\end{verbatim} +这个包对fontspec包进行了封装,令其能够较为便利地设定汉字字体。 +这个包提供的命令如下: +\begin{table}[htbp] + \centering + \begin{tabular}{ll} + \toprule + \multicolumn{1}{c}{\textbf{命令}} & \multicolumn{1}{c}{\textbf{用途}} \\ + \midrule + \verb!\jfontspec! & 改变当前汉字字体 \\ + \verb!\setmainjfont! & 设定文档主汉字字体 \\ + \verb!\setsansjfont! & 设定文档的无衬线汉字字体(黑体) \\ + \verb!\newjfontfamily! & 设定新的汉字字体族命令 \\ + \verb!\newjfontface! & 设定新的汉字字体命令 \\ + \verb!\defaultjfontfeatures! & 默认汉字字体的特性 \\ + \verb!\addjfontfeatures! & 设定当前字体的特性 \\ + \bottomrule + \end{tabular}% +\end{table}% + + +\subsection{不可用字体系列} +中文字体在丰度上与日文字体对比并不占优势,所以中文\TeX 文档在使用使用字体 +上没有太大变化。当你想在\LuaTeX-ja下是有部分特色字体的时候,请做好此种字体 +可能无法使用的准备。目前报错明显的字体有数个: +\begin{itemize} +\item 灵格斯词典附带的音标字体,这些字体会安装到系统字体文件夹下,在更新 + 字体数据库的时候会出现程序崩溃的情况,这是字体本身的原因,需要添加到黑名单中 +\item 康熙字典体,这是中国大陆一位业余字体设计者所设计的字体,由于该作者 + 缺乏相关技术知识,导致此字体的CMap出错,无论是完全版还是试用版都会出现 + 问题,此外该字体的boundingbox也是错误的,在嵌入pdf文档中十分影响阅读 +\item 信黑体,这个字体也是CMap的问题,无法使用 +\end{itemize} +\subsection{华文字体系列} +在微软提供的Office套装中附带了一定数量的中文字体, +这些字体是常州华文印刷新技术有限公司制造的。 +这些字体安装在系统字体文件夹下,在使用\LuaTeX-ja 的时候 +可以酌情使用。在本文档中,我们推荐简体中文用户使用 +此套字体,从使用率上看,各大学都会装有微软的操作系统 +和微软的Office,可以说已经相当普及,故做推荐。 + +\begin{table}[htbp] + \centering + \begin{tabular}{llll} + \toprule + \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{PostScript名}} & \multicolumn{1}{c}{\textbf{样例}} \\ + \midrule + 华文宋体 & \texttt{STSONG.TTF} & STSong & {\jfontspec{STSong}我能吞下玻璃而不伤身体} \\ + 华文中宋 & \texttt{STZHONGS.TTF} & STZhongsong & {\jfontspec{STZhongsong}我能吞下玻璃而不伤身体} \\ + 华文细黑 & \texttt{STXIHEI.TTF} & STXihei & {\jfontspec{STXihei}我能吞下玻璃而不伤身体} \\ + 华文楷体 & \texttt{STKAITI.TTF} & STKaiti & {\jfontspec{STKaiti}我能吞下玻璃而不伤身体} \\ + 华文仿宋 & \texttt{STFANGSO.TTF} & STFangsong & {\jfontspec{STFangsong}我能吞下玻璃而不伤身体} \\ + \bottomrule + \end{tabular}% +\end{table}% +\subsection{中易字体系列} +在Windows系统简体中文版中,附带了数种中文字体。 +这些字体为中易中标电子信息技术有限公司制造的。 +同我们强烈推荐的第一种方案比较,没有中宋。 +如果按照CCT的传统,一般使用黑体替换。 + +\begin{table}[htbp] + \centering + \begin{tabular}{llll} + \toprule + \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{PostScript名}} & \multicolumn{1}{c}{\textbf{样例}} \\ + \midrule + 宋体 & \texttt{simsun.ttc} & SimSun & {\jfontspec{SimSun}我能吞下玻璃而不伤身体} \\ + 黑体 & \texttt{simhei.ttf} & SimHei & {\jfontspec{SimHei}我能吞下玻璃而不伤身体} \\ + 楷体 & \texttt{simkai.ttf} & KaiTi & {\jfontspec{KaiTi}我能吞下玻璃而不伤身体} \\ + 仿宋 & \texttt{simkai.ttf} & FangSong & {\jfontspec{FangSong}我能吞下玻璃而不伤身体} \\ + \bottomrule + \end{tabular}% +\end{table}% +\subsection{Adobe字体系列} +在Adobe Reader简体中文版中,附带了宋体和黑体两种字体。 +这两种字体实际上是华文字体,但是和华文字体不能混用, +因为Adobe Reader中的中文字体的基线都进行了调整, +不能互相匹配。在Adobe InDesign中还附带了楷体和仿宋体。 +Adobe的中文字体的Postscript名即为文件名去掉后缀名。 + +\begin{table}[htbp] + \centering + \begin{tabular}{lll} + \toprule + \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{样例}} \\ + \midrule + Adobe 宋体 Std & \texttt{AdobeSongStd-Light.otf} & {\jfontspec{AdobeSongStd-Light}我能吞下玻璃而不伤身体} \\ + Adobe 黑体 Std & \texttt{AdobeHeitiStd-Regular.otf} & {\jfontspec{AdobeHeitiStd-Regular}我能吞下玻璃而不伤身体} \\ + Adobe 楷体 Std & \texttt{AdobeKaitiStd-Regular.otf} & {\jfontspec{AdobeKaitiStd-Regular}我能吞下玻璃而不伤身体} \\ + Adobe 仿宋 Std & \texttt{AdobeFangsongStd-Regular.otf} & {\jfontspec{AdobeFangsongStd-Regular}我能吞下玻璃而不伤身体} \\ + \bottomrule + \end{tabular}% +\end{table}% +\subsection{方正字体系列} +方正字体的来源有两种,第一种是使用方正的排版系统的时候会 +安装到Windows系统的字体文件夹下,第二种是针对Linux系统 +来说的,WPS for Linux附带了部分方正字体。 + +\begin{table}[htbp] + \centering + \begin{tabular}{llll} + \toprule + \multicolumn{1}{c}{\textbf{字体名}} & \multicolumn{1}{c}{\textbf{文件名}} & \multicolumn{1}{c}{\textbf{全名}} & \multicolumn{1}{c}{\textbf{样例}} \\ + \midrule + 方正书宋\_GBK & \texttt{FZSSK.TTF} & FZShuSong-Z01 & {\jfontspec{FZShuSong-Z01}我能吞下玻璃而不伤身体} \\ + 方正小标宋\_GBK & \texttt{FZXBSK.TTF} & FZXiaoBiaoSong-B05 & {\jfontspec{FZXiaoBiaoSong-B05}我能吞下玻璃而不伤身体} \\ + 方正黑体\_GBK & \texttt{FZHTK.TTF} & FZHei-B01 & {\jfontspec{FZHei-B01}我能吞下玻璃而不伤身体} \\ + 方正楷体\_GBK & \texttt{FZKTK.TTF} & FZKai-Z03 & {\jfontspec{FZKai-Z03}我能吞下玻璃而不伤身体} \\ + 方正仿宋\_GBK & \texttt{FZFSK.TTF} & FZFangSong-Z02 & {\jfontspec{FZFangSong-Z02}我能吞下玻璃而不伤身体} \\ + \bottomrule + \end{tabular}% +\end{table}% +\end{document} diff --git a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx index 1c8c2fca923..4599eb8f682 100644 --- a/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx +++ b/Master/texmf-dist/doc/luatex/luatexja/luatexja.dtx @@ -1,6 +1,11 @@ %<*!showexpl> %#! lualatex -shell-escape +% To typeset this manual, you need following two fonts: +% - KozMinPr6N-Regular.otf +% - KozGoPr6N-Medium.otf + + %<en>\documentclass[a4paper,titlepage]{article} %<ja>\documentclass[a4paper,titlepage]{ltjsarticle} @@ -27,6 +32,10 @@ \usepackage[margin=25mm,footskip=6mm]{geometry} \usepackage{luatexja-adjust}\ltjdisableadjust \parskip=\smallskipamount +\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries\raisebox{.2ex}{$\mdlgblksquare\mkern1mu$}}} %</en> %<*ja> \usepackage[textwidth=45\zw, lines=45, footskip=6mm]{geometry} @@ -80,12 +89,12 @@ %%%%%%%% fonts \usepackage{luatexja-otf} -\usepackage[jis2004]{luatexja-preset} +\usepackage[kozuka-pr6n]{luatexja-preset} %<!en>\usepackage{amssymb} %<*en> \usepackage{unicode-math} \setmainfont[Ligatures=TeX]{TeX Gyre Termes} -\setsansfont[Ligatures=TeX]{TeX Gyre Heros} +\setsansfont[Scale=0.95,Ligatures=TeX]{TeX Gyre Heros} \setmathfont{xits-math.otf} \frenchspacing %</en> @@ -143,7 +152,7 @@ %<*en> \textbf{This documentation is far from complete. It may have many grammatical (and contextual) errors.} Also, several parts -(especially, Section~\ref{sec-jfmglue}) are written in Japanese only. +are written in Japanese only. %</en> %<*ja> \textbf{\large 本ドキュメントはまだまだ未完成です.} @@ -481,6 +490,7 @@ We say `alphabetic fonts' for fonts used in \textbf{ALchar}, and `Japanese fonts \item \Pkg{luaotfload} v2.2 \item \Pkg{luatexbase} v0.6~(2013/05/04) \item \Pkg{xunicode} v0.981~(2011/09/09) +\item \Pkg{adobemapping} (Adobe cmap and pdfmapping files) \end{itemize} %<*en> @@ -584,6 +594,34 @@ But only the contents in \texttt{src/} are needed to work \LuaTeX-ja. %</ja> %<*en> +\item If you downloaded this package from CTAN, you have to run following commands + to generate classes + and \texttt{ltj-kinsoku.lua} (the file which stores default ``\textit{kinsoku}'' parameters): +%</en> +%<*ja> +\item もしCTANから本パッケージを取得したのであれば,日本語用クラスファイルや +標準の禁則処理用パラメータを +格納した \texttt{ltj-kinsoku.lua} を生成するために, +以下を実行する必要がある: +%</ja> +\begin{verbatim} +$ cd src +$ lualatex ltjclasses.ins +$ lualatex ltjsclasses.ins +$ lualatex ltjltxdoc.ins +$ luatex ltj-kinsoku_make.tex +\end{verbatim} +%<*en> +Note that \texttt{*.\{dtx,ins\}} and \texttt{ltj-kinsoku\_make.tex} are not needed in regular use. +%</en> +%<*ja> +ここで使用した \texttt{*.\{dtx,ins\}} と \texttt{ltj-kinsoku\_make.tex} は +通常の使用にあたっては必要ない. +%</ja> + + + +%<*en> \item Copy all the contents of \texttt{src/} into one of your \texttt{TEXMF} tree. \texttt{TEXMF/tex/luatex/luatexja/} is an example location. If you cloned entire Git repository, making a symbolic link of \texttt{src/} @@ -663,11 +701,11 @@ But only the contents in \texttt{src/} are needed to work \LuaTeX-ja. %</ja> \begin{itemize} %<*en> -\item It is widely accepted that the font `Ryumin-Light' and +\item It is widely accepted that fonts `Ryumin-Light' and `GothicBBB-Medium' aren't embedded into PDF files, and a PDF reader substitute them by some external Japanese fonts (\textit{e.g.}, - Kozuka Mincho is used for Ryumin-Light in Adobe Reader). We adopt this custom to - the default setting. + Ryumin-Light is substituted with Kozuka Mincho in Adobe Reader). + We adopt this custom to the default setting. %</en> %<*ja> \item `Ryumin-Light'と`GothicBBB-Medium'はPDFファイルに埋め込まずに @@ -743,22 +781,46 @@ When vertical typesetting is supported by \LuaTeX-ja in the future, \texttt{JT3} %</ja> %<*en> -\item Two font families \texttt{mc} and \texttt{gt} are defined: +\item Traditionally, Japanese documents use two typeface category: \emph{mincho}~(明朝体) and + \emph{gothic}~(\textgt{ゴシック体}). \emph{mincho} is used in the main text, while \emph{gothic} + is used in the headings or for emphasis. +\begin{center}\small +\begin{tabular}{lllc} +\toprule +\textbf{classification}&&&\textbf{family name}\\\midrule +\emph{mincho} (明朝体)&\verb+\textmc{...}+&\verb+{\mcfamily ...}+&\verb+\mcdefault+\\ +\emph{gothic} (\textgt{ゴシック体})&\verb+\textgt{...}+&\verb+{\gtfamily ...}+&\verb+\gtdefault+\\ +\bottomrule +\end{tabular} +\end{center} +\item +By default, the following fonts are used for \emph{mincho} and \emph{gothic}: \begin{center}\small \begin{tabular}{ccccc} \toprule -\textbf{classification}&\textbf{family}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule -\emph{mincho}&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\ -\emph{gothic}&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\ +\textbf{classification}&\textbf{family name}&\verb+\mdseries+&\verb+\bfseries+&\textbf{scale}\\\midrule +\emph{mincho} (明朝体)&\tt mc&Ryumin-Light &GothicBBB-Medium&0.962216\\ +\emph{gothic} (\textgt{ゴシック体})&\tt gt&GothicBBB-Medium&GothicBBB-Medium&0.962216\\ \bottomrule \end{tabular} \end{center} -Remark that the bold series in both family are same as the medium series of \emph{gothic} family. -This is a convention in \pLaTeX. This is a trace that there were only 2~fonts (these are Ryumin-Light -and GothicBBB-Medium) in early years of DTP. +Note that the bold series in both family are same as the medium series of \emph{gothic} family. +This is a convention in \pLaTeX. This is trace that there were only 2~fonts (these are Ryumin-Light +and GothicBBB-Medium) in early years of DTP. There is no italic nor slanted shape for + these \texttt{mc}~and~\texttt{gt}. %</en> %<*ja> -\item 2つのフォントファミリ\texttt{mc}と\texttt{gt}が定義されている: +\item \pLaTeX と同様に,標準では「明朝体」「ゴシック体」の2種類を用いる: +\begin{center}\small +\begin{tabular}{cllc} +\toprule +\textbf{字体}&&&\textbf{ファミリ名}\\\midrule +明朝体&\verb+\textmc{...}+&\verb+{\mcfamily ...}+&\verb+\mcdefault+\\ +\textgt{ゴシック体}&\verb+\textgt{...}+&\verb+{\gtfamily ...}+&\verb+\gtdefault+\\ +\bottomrule +\end{tabular} +\end{center} +\item 標準では,次のフォントファミリが用いられる: \begin{center}\small \begin{tabular}{ccccc} \toprule @@ -768,14 +830,16 @@ and GothicBBB-Medium) in early years of DTP. \bottomrule \end{tabular} \end{center} -どちらのファミリにおいても,そのboldシリーズはゴシック体のmediumシリーズで -あることに注意.これは初期のDTPにおいて和文フォントが2つ(それがちょうど\ +どちらのファミリにおいても,そのboldシリーズで使われるフォントは +ゴシック体のmediumシリーズで使われるフォントと同じあることに注意. +これは初期のDTPにおいて和文フォントが2つ(それがちょうど\ Ryumin-Light, GothicBBB-Mediumだった)しか利用できなかった時の名残であり,\pLaTeX{} での標準設定とも同じである. %</ja> + %<en>\item Japanese characters in math mode are typeset by the font family \texttt{mc}. -%<ja>\item 数式モード中の和文文字は\texttt{mc}ファミリで出力される. +%<ja>\item 数式モード中の和文文字は明朝体(\texttt{mc})で出力される. \end{itemize} %<*en> @@ -821,17 +885,6 @@ For \LaTeXe, \LuaTeX-ja adopted most of the font selection system of \pLaTeXe\ ( %</ja> \begin{itemize} %<*en> -\item Two control sequences \verb+\mcdefault+ and \verb+\gtdefault+ are - used to specify the default font families for \emph{mincho} and - \emph{gothic}, respectively. Default values: \texttt{mc} for - \verb+\mcdefault+ and \texttt{gt} for \verb+\gtdefault+. -%</en> -%<*ja> -\item 2つのコントロールシーケンス \verb+\mcdefault+ と \verb+\gtdefault+ がそれぞ - れ明朝体とゴシック体のデフォルトのフォントファミリを指定するために用いられる. - 初期値:\verb+\mcdefault+ は\texttt{mc},\verb+\gtdefault+ は\texttt{gt}. -%</ja> -%<*en> \item Commands \verb+\fontfamily+, \verb+\fontseries+, \verb+\fontshape+ and \verb+\selectfont+ can be used to change attributes of Japanese fonts. @@ -1030,12 +1083,12 @@ alphabetic fonts \end{tabular} \end{center} %</ja> -\begin{LTXexample} +\begin{LTXexample}[width=0.4\textwidth] \fontspec[Numbers=OldStyle]{LMSans10-Regular} \jfontspec{IPAexMincho} JIS~X~0213:2004→辻 -\addjfontfeatures{CJKShape=JIS1990} +\jfontspec[CJKShape=JIS1990]{IPAexMincho} JIS~X~0208:1990→辻 \end{LTXexample} @@ -1073,14 +1126,27 @@ and loads \Pkg{luatexja-fontspec} internally. %<en>\paragraph{General options} %<ja>\paragraph{一般的なオプション} \begin{list}{}{\def\makelabel{\ttfamily}\def\{{\char`\{}\def\}{\char`\}}\advance\leftmargin1\zw} +\item[nodeluxe] +%<*en> +Use one-weighted \textit{mincho} and \textit{gothic} font families. +This means that \verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+ and +\verb+\gtfamily\mdseries+ use the same font. +\emph{This option is enabled by default.} +%</en> +%<*ja> +\LaTeXe 環境下での標準設定のように,明朝体・ゴシック体を各1ウェイトで使用する. +より具体的に言うと,この設定の下では +\verb+\mcfamily\bfseries+, \verb+\gtfamily\bfseries+, \verb+\gtfamily\mdseries+は +みな同じフォントとなる.\emph{このオプションは標準で有効になっている.} +%</ja> \item[deluxe] %<*en> -Specifying this option enables us to use \textit{mincho} with two weights (medium~and~bold), +Use \textit{mincho} with two weights (medium~and~bold), \textit{gothic} with three weights (medium,~bold and~heavy), and \textit{rounded gothic}% \footnote{Provided by \texttt{\char92mgfamily}, because \textit{rounded gothic} is called \textit{maru gothic} (丸ゴシック) in Japanese.}. -The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+. -This is because \Pkg{fontspec} package can handle only medium (\verb+\mdseries+) and +The heavy weight of \textit{gothic} can be used by ``changing the family'' \verb+\gtebfamily+, +because \Pkg{fontspec} package can handle only medium (\verb+\mdseries+) and bold (\verb+\bfseries+). %</en> %<*ja> @@ -1115,6 +1181,16 @@ Use the JFM \texttt{jfm-jis.lua}, instead of \texttt{jfm-ujis.lua}, which is the \LuaTeX-ja標準の\texttt{jfm-ujis.lua}が用いられる. %</ja> \end{list} +%<*en> +Note that \texttt{90jis} and \texttt{jis2004} only affect with \textit{mincho}, +\textit{gothic} (and possibly \textit{rounded gothic}) defined by this package. +We didn't taken accound of when both \texttt{90jis} and \texttt{jis2004} are specified. +%</en> +%<*ja> +\texttt{90jis}と\texttt{jis2004}については本パッケージで定義された +明朝体・ゴシック体(・丸ゴシック体)にのみ有効である.両オプションが +同時に指定された場合に動作については全く考慮していない. +%</ja> %<en>\paragraph{Kozuka fonts} %<ja>\paragraph{小塚フォント} @@ -1149,18 +1225,18 @@ as a substitute for \textit{rounded gothic}. &Kozuka Gothic Pro H&Kozuka Gothic ProVI H&Kozuka Gothic Pr6N H\\ %</en> %<*ja> -\gt 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\ -\gt 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\ +\gtfamily 明朝体細字&小塚明朝Pro~R&小塚明朝ProVI~R&小塚明朝Pr6N~R\\ +\gtfamily 明朝体太字&小塚明朝Pro~B&小塚明朝ProVI~B&小塚明朝Pr6N~B\\ \midrule -\gt ゴシック体細字\\ +\gtfamily ゴシック体細字\\ 単ウェイト時 &小塚ゴシックPro~M&小塚ゴシックProVI~M&小塚ゴシックPr6N~M\\ 多ウェイト時 &小塚ゴシックPro~R&小塚ゴシックProVI~R&小塚ゴシックPr6N~R\\ \midrule -\gt ゴシック体太字 +\gtfamily ゴシック体太字 &小塚ゴシックPro~B&小塚ゴシックProVI~B&小塚ゴシックPr6N~B\\ -\gt ゴシック体極太 +\gtfamily ゴシック体極太 &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\ \inhibitglue(丸ゴシック体)\inhibitglue &小塚ゴシックPro~H&小塚ゴシックProVI~H&小塚ゴシックPr6N~H\\ @@ -1196,22 +1272,22 @@ Hiragino Kaku Gothic Std W8&Hiragino Kaku Gothic StdN W8\\ Hiragino Maru Gothic Pro W4&Hiragino Maru Gothic ProN W4\\ %</en> %<*ja> -\gt 明朝体細字& +\gtfamily 明朝体細字& ヒラギノ明朝体Pro~W3&ヒラギノ明朝体Pr6N~W3\\ -\gt 明朝体太字& +\gtfamily 明朝体太字& ヒラギノ明朝体Pro~W6&ヒラギノ明朝体Pr6N~W6\\ \midrule -\gt ゴシック体細細字\\ +\gtfamily ゴシック体細細字\\ 単ウェイト時 &ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\ 多ウェイト時 &ヒラギノ角ゴPro~W3&ヒラギノ角ゴProN~W3\\ \midrule -\gt ゴシック体太字& +\gtfamily ゴシック体太字& ヒラギノ角ゴPro~W6&ヒラギノ角ゴProN~W6\\ -\gt ゴシック体極太& +\gtfamily ゴシック体極太& ヒラギノ角ゴStd~W8&ヒラギノ角ゴStdN~W8\\ -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& ヒラギノ丸ゴPro~W4&ヒラギノ丸ゴProN~W4\\ %</ja> \midrule @@ -1233,17 +1309,17 @@ Midashi Go Pro MB31&Midashi Go Pr6N MB31\\ Jun Pro 101&Jun Pr6N 101\\ %</en> %<*ja> -\gt 明朝体細字& +\gtfamily 明朝体細字& リュウミンPro~L-KL&リュウミンPr6N~L-KL\\ -\gt 明朝体太字& +\gtfamily 明朝体太字& 太ミンA101~Pro~Bold&太ミンA101~Pr6N~Bold\\ -\gt ゴシック体細字& +\gtfamily ゴシック体細字& 中ゴシックBBB~Pro~Med&中ゴシックBBB~Pr6N~Med\\ -\gt ゴシック体太字& +\gtfamily ゴシック体太字& 太ゴB101~Pro~Bold&太ゴB101~Pr6N~Bold\\ -\gt ゴシック体極太& +\gtfamily ゴシック体極太& 見出ゴPro~MB31&見出ゴPr6N~MB31\\ -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& じゅんPro 101&じゅんPr6N 101\\ %</ja> \bottomrule @@ -1255,7 +1331,7 @@ Jun Pro 101&Jun Pr6N 101\\ Next, we describe settings for using only single weight. In four settings below, we use same fonts for medium and bold (and heavy) weights. (Hence \verb+\mcfamily\bfseries+ and \verb+\mcfamily\mdseries+ yields same Japanese fonts, -if \texttt{deluxe} option is also specified). +even if \texttt{deluxe} option is also specified). %</en> %<*ja> 次に,単ウェイト用の設定を述べる.この4設定では「細字」「太字」の区別はない. @@ -1274,9 +1350,9 @@ if \texttt{deluxe} option is also specified). &IPAGothic&IPAexGothic&MS Gothic\\ %</en> %<*ja> -\gt 明朝体&Ryumin-Light(非埋込) +\gtfamily 明朝体&Ryumin-Light(非埋込) &IPA明朝&IPAex明朝&MS明朝\\ -\gt ゴシック体&GothicBBB-Medium(非埋込) +\gtfamily ゴシック体&GothicBBB-Medium(非埋込) &IPAゴシック&IPAexゴシック&MSゴシック\\ %</ja> \bottomrule @@ -1318,11 +1394,11 @@ We can use HG~fonts bundled with Microsoft Office for realizing multiple weights \multicolumn{3}{c}{HG Maru Gothic PRO}\\ %</en> %<*ja> -\gt 明朝体細字 +\gtfamily 明朝体細字 &IPA明朝&IPAex明朝&MS明朝\\\midrule -\gt 明朝体太字& +\gtfamily 明朝体太字& \multicolumn{3}{c}{HG明朝E}\\\midrule -\gt ゴシック体細字\\ +\gtfamily ゴシック体細字\\ 単ウェイト時 &IPAゴシック&IPAexゴシック&MSゴシック\\ {\tt jis2004}指定時 @@ -1330,11 +1406,11 @@ We can use HG~fonts bundled with Microsoft Office for realizing multiple weights \cmidrule(lr){1-4} それ以外の時& \multicolumn{3}{c}{HGゴシックM}\\\midrule -\gt ゴシック体太字& +\gtfamily ゴシック体太字& \multicolumn{3}{c}{HGゴシックE}\\\midrule -\gt ゴシック体極太& +\gtfamily ゴシック体極太& \multicolumn{3}{c}{HG創英角ゴシックUB}\\\midrule -\gt 丸ゴシック体& +\gtfamily 丸ゴシック体& \multicolumn{3}{c}{HG丸ゴシック体PRO}\\ %</ja> \bottomrule @@ -1642,8 +1718,8 @@ This range consist of the following Unicode ranges, \emph{except characters in t \begin{lstlisting} \ltjdefcharrange{4}{% "500-"10FF, "1200-"1DFF, "2440-"245F, "27C0-"28FF, "2A00-"2AFF, - "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB50-"FE0F, - "FE20-"FE2F, "FE70-"FEFF, "FB00-"FB4F, "10000-"1FFFF, "E000-"F8FF} % non-Japanese + "2C00-"2E7F, "4DC0-"4DFF, "A4D0-"A82F, "A840-"ABFF, "FB00-"FE0F, + "FE20-"FE2F, "FE70-"FEFF, "10000-"1FFFF, "E000-"F8FF} % non-Japanese \end{lstlisting} %<en>\item[Range~5${}^{\text{A}}$] Surrogates and Supplementary Private Use Areas. %<ja>\item[範囲5${}^{\text{A}}$] 代用符号と補助私用領域. @@ -1914,10 +1990,10 @@ so TrueType/OpenType fonts with features can be used for Japanese fonts: TrueType/OpenTypeフォントにfeatureを指定したものを和文フォントとして用いる ことができる: %</ja> -\begin{LTXexample}[width=0.4\textwidth] -\jfont\tradgt={file:ipaexg.ttf:script=latn;% +\begin{LTXexample}[width=0.3\textwidth] +\jfont\tradgt={file:KozMinPr6N-Regular.otf:script=latn;% +trad;-kern;jfm=ujis} at 14pt -\tradgt{}当/体/医/区 +\tradgt 当/体/医/区 \end{LTXexample} %<*en> @@ -2006,11 +2082,11 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま \item[jfmvar=<string>] 標準では,JFMとサイズが同じで, 実フォントだけが異なる2つの和文フォントは…… %</ja> -\begin{LTXexample}[width=0.4\textwidth] +\begin{LTXexample}[width=0.3\textwidth] \ltjsetparameter{differentjfm=both} -\jfont\F=file:ipam.ttf:jfm=ujis -\jfont\G=file:ipag.ttf:jfm=ujis -\jfont\H=file:ipag.ttf:jfm=ujis;jfmvar=hoge +\jfont\F=file:KozMinPr6N-Regular.otf:jfm=ujis +\jfont\G=file:KozGoPr6N-Medium.otf:jfm=ujis +\jfont\H=file:KozGoPr6N-Medium.otf:jfm=ujis;jfmvar=hoge \F ){\G 【】}( % halfwidth space ){\H 『』}( % fullwidth space @@ -2025,13 +2101,13 @@ JFMの名前を指定する.もし以前に指定されたJFMが読み込ま \label{tab-difjfm} \ltjsetparameter{jacharrange={+3}} \begin{center}\small -\def\r#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g +\def\r#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g \setbox0=\vtop{\hsize=7\zw\noindent ◆◆◆◆◆◆◆ ある日モモちゃんがお使いで迷子になって泣きました.}\copy0 \vrule height 0pt depth \dp0}} -\def\s#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 14.43324pt \g +\def\s#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 14.43324pt \g \setbox0=\vtop{\hsize=7\zw\noindent ちょっと!何}\copy0}} -\def\t#1{{\jfont\g=psft:Ryumin-Light:jfm=#1 at 19.24432pt \g +\def\t#1{{\jfont\g=file:KozMinPr6N-Regular.otf:jfm=#1 at 19.24432pt \g \setbox0=\hbox{漢}% \vrule width 0.4pt height\ht0 depth\dp0\kern-.2pt\copy0 \kern-\wd0\vrule width\wd0height .2pt depth .2pt @@ -2095,6 +2171,40 @@ TODO: kanjiskip? \end{itemize} +%<*ja> +\paragraph{\texttt{extend}と\texttt{slant}} +OpenType font featureと見かけ上同じような形式で指定できるものに, +\begin{description} +\item[\texttt{extend=}<extend>] 横方向に<extend>倍拡大する. +\item[\texttt{slant=}<slant>] <slant>に指定された割合だけ傾ける. +\end{description} +の2つがある. +\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% +\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. +例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が +正しくない: +%</ja> +%<*en> +\paragraph{\texttt{extend} and \texttt{slant}} +The following setting can be specified as OpenType font features: +\begin{description} +\item[\texttt{extend=}<extend>] expand the font horizontally by <extend>. +\item[\texttt{slant=}<slant>] slant the font. +\end{description} +Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} +settings; you have to write new JFMs on purpose. +For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence +letter-spacing and the width of italic correction are not correct: +%</en> +\begin{LTXexample}[width=0.3\textwidth] +\jfont\E=file:KozMinPr6N-Regular.otf:extend=1.5;jfm=ujis +\E あいうえお + +\jfont\S=file:KozMinPr6N-Regular.otf:slant=1;jfm=ujis +\S あいう\/ABC +\end{LTXexample} + + %<en>\subsection{Prefix \texttt{psft}} %<ja>\subsection{\texttt{psft}プリフィックス} \label{ssec-psft} @@ -2105,9 +2215,12 @@ to specify a `name-only' Japanese font which will not be embedded to PDF. Typical use of this prefix is to specify the `standard' Japanese fonts, namely, `Ryumin-Light' and `GothicBBB-Medium'. + \emph{OpenType font features, such as `{\tt +jp90}', have no meaning in `name-only' fonts using this `{\tt psft:}'\ prefix. This is because we can't expect what fonts are actually used by the PDF reader.} +Note that \texttt{extend}~and~\texttt{slant} settings (see~above) are supported +with \texttt{psft} prefix, because they are only simple linear transformations. %</en> %<*ja> \texttt{file:} と \texttt{name:} のプリフィックスに加えて, @@ -2116,8 +2229,13 @@ This is because we can't expect what fonts are actually used by the PDF reader.} このプリフィックスを用いることで,PDFには埋め込まれない「名前だけの」 和文フォントを指定することができる.「標準的な」和文フォント, つまり`Ryumin-Light'と`GothicBBB-Medium'の指定でこのプリフィックスが使われる. -\textbf{非埋込フォントをPDFに使用すると,実際にどのようなフォントが表示に用いられるか予測できない. -本プリフィックス指定時には,\texttt{+jp90} などのOpenType font featureの効力はない.} + +\textbf{\texttt{psft}プリフィックスの下では +\texttt{+jp90} などのOpenType font featureの効力はない. +非埋込フォントをPDFに使用すると,実際にどのようなフォントが +表示に用いられるか予測できないからである.} +\texttt{extend}と\texttt{slant}指定は単なる変形のため +\texttt{psft}プリフィックスでも使用可能である. %</ja> %<en>\paragraph{\texttt{cid} key} @@ -2186,40 +2304,6 @@ Please contact the LuaTeX-ja project team. ? \end{lstlisting} -%<*ja> -\paragraph{\texttt{extend}と\texttt{slant}} -OpenType font featureと見かけ上同じような形式で指定できるものに, -\begin{description} -\item[\texttt{extend=}<extend>] 横方向に<extend>倍拡大する. -\item[\texttt{slant=}<slant>] <slant>に指定された割合だけ傾ける. -\end{description} -の2つがあり,これらだけは\texttt{psft}プリフィックスでも使用可能にしている. -\texttt{extend}や\texttt{slant}を指定した場合は,それに応じたJFMを指定すべきである% -\footnote{\LuaTeX-jaでは,これらに対するJFMを特に提供することはしない予定である.}. -例えば,次の例では無理やり通常のJFMを使っているために,文字間隔やイタリック補正量が -正しくない: -%</ja> -%<*en> -\paragraph{\texttt{extend} and \texttt{slant}} -The following setting can be specified as OpenType font features: -\begin{description} -\item[\texttt{extend=}<extend>] expand the font horizontally by <extend>. -\item[\texttt{slant=}<slant>] slant the font. -\end{description} -These two settings are also supported with \texttt{psft} prefix. -Note that \LuaTeX-ja doesn't adjust JFMs by these \texttt{extend} and \texttt{slant} -settings; you have to write new JFMs on purpose. -For example, the following example uses the standard JFM \texttt{jfm-ujis.lua}, hence -letter-spacing and the width of italic correction are not correct: -%</en> -\begin{LTXexample}[width=0.3\textwidth] -\jfont\E=psft:Ryumin-Light:extend=1.5;jfm=ujis -\E あいうえお - -\jfont\S=psft:Ryumin-Light:slant=1;jfm=ujis -\S あいう\/ABC -\end{LTXexample} - %<en>\subsection{Structure of JFM file} %<ja>\subsection{JFMファイルの構造} @@ -2565,7 +2649,7 @@ Furthermore, the glyph is shifted according to values of fields \end{lstlisting} 句点「。」の幅は二分であるので \begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+vert +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert \setbox0\hbox{\a 。\inhibitglue 漢} \the\wd0 \end{LTXexample} @@ -2580,8 +2664,8 @@ Furthermore, the glyph is shifted according to values of fields 一方,「\texttt{'、*'}」のようにアスタリスクつきの指定があると, 状況は異なってくる. -\begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+vert +\begin{LTXexample}[width=0.3\textwidth] +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+vert \a 漢、\inhibitglue 漢 \end{LTXexample} ここで,読点「、」の文字クラスは,以下のようにして決まる. @@ -2594,8 +2678,8 @@ Furthermore, the glyph is shifted according to values of fields \end{enumerate} なお,置換後のグリフで判定した文字クラスの値が0でなければ,そちらをそのまま作用する. -\begin{LTXexample} -\jfont\a=psft:Ryumin-Light:jfm=test;+hwid +\begin{LTXexample}[width=0.3\textwidth] +\jfont\a=file:KozMinPr6N-Regular.otf:jfm=test;+hwid \a 漢ヒひ \end{LTXexample} 上の例では, @@ -2684,7 +2768,7 @@ The following is the list of `imaginary characters': \texttt{'parbdd'}を入れれば全角下がりとなる. \begin{LTXexample} -\jfont\g=psft:Ryumin-Light:jfm=test \g +\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g \parindent1\zw\noindent{}◆◆◆◆◆ \par 「◆◆←二分下がり \par 【◆◆←全角下がり @@ -3294,7 +3378,7 @@ the beginning of a box and `あ', and also between `あ' and `ウ'. %</ja> \begin{LTXexample} -\jfont\g=psft:Ryumin-Light:jfm=test \g +\jfont\g=file:KozMinPr6N-Regular.otf:jfm=test \g \fbox{\hbox{あウあ\inhibitglue ウ}} \inhibitglue\par\noindent あ1 \par\inhibitglue\noindent あ2 @@ -3339,6 +3423,11 @@ With the help of this example, we remark the specification of \verb+\inhibitglue %<*ja> \item \verb+\inhibitglue+ を数式モード中で呼び出した場合はただ無視される. %</ja> + +%<*ja> +\item \LaTeX で\LuaTeX-ja を使用する場合は, +\verb+\inhibitglue+ の代わりとして \verb+\<+ を使うことができる. +%</ja> \end{itemize} %<en>\section{Control Sequences for \LaTeXe} @@ -3529,9 +3618,10 @@ As closing this subsection, we shall introduce an example of 紹介しておこう.\verb+\userelfont+ の使用によって,「abc」の部分のフォントが Avant Garde (OT1/pag/m/n) に変わっていることがわかる. %</ja> -\begin{LTXexample} -\kanjifamily{gt}\selectfont あいうxyz -\SetRelationFont{JY3}{gt}{m}{n}{OT1}{pag}{m}{n} +\begin{LTXexample}[width=0.3\textwidth] +\makeatletter +\SetRelationFont{JY3}{\k@family}{m}{n}{OT1}{pag}{m}{n} + % \k@family: current Japanese font family \userelfont\selectfont あいうabc \end{LTXexample} @@ -5421,7 +5511,7 @@ Each character is printed as follows: 各文字は %</ja> \begin{center} -\tt\fboxsep=1pt\fbox{\hbox to \zw{\gt あ\hss}}\,\scriptsize LUP +\tt\fboxsep=1pt\fbox{\hbox to \zw{\gtfamily あ\hss}}\,\scriptsize LUP \end{center} %<*ja> のように表示しており,各文字は次の意味を持っている. @@ -5787,7 +5877,7 @@ JIS~X~0208にないため\pTeX では使用不能と考えて良いものであ \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{\cntB}}=0 \def\@@@tmp{white}\else\def\@@@tmp{white!85!blue}\fi \fcolorbox{black}{\@@@tmp}{% - \hbox to \zw{\gt \hskip-\zw\ltjjachar\cntB \hss}}\,\scriptsize% + \hbox to \zw{\gtfamily \hskip-\zw\ltjjachar\cntB \hss}}\,\scriptsize% \ifnum\catcode\cntB=11 L\else\ \fi \chk@in@{\uplist}{\cntA}\ifnum\flag=1 U\else~\fi \chk@in@{\plist}{\cntA}\ifnum\flag=1 P\else~\fi @@ -5796,7 +5886,7 @@ JIS~X~0208にないため\pTeX では使用不能と考えて良いものであ \ifnum\ltjgetparameter{jacharrange}{\ltjgetparameter{chartorange}{\cntB}}=0 \def\@@@tmp{white}\else\def\@@@tmp{white!85!blue}\fi \fcolorbox{black}{\@@@tmp}{\color{red!50!black}% - \hbox to \zw{\gt \hskip-\zw\ltjjachar\cntB \hss}}\,\scriptsize% + \hbox to \zw{\gtfamily \hskip-\zw\ltjjachar\cntB \hss}}\,\scriptsize% \ifnum\catcode\cntB=11 L\else~\fi \chk@in@{\uplist}{\cntA}\ifnum\flag=1 U\else~\fi-% \fi\global\advance\cntA1 } |