% \iffalse meta-comment % % This is file `exppl2e.sty', for experimental pLaTeX2e. % % Copyright (c) 2016 Japanese TeX Development Community % % This file is part of the pLaTeX2e system (community edition). % ------------------------------------------------------------- % % ==================================================================== % 開発者の方へ (2016-06-29 aminophen) % % このファイルのコードを実際にカーネルに取り入れるとき、単純にカット・ % ペーストで dtx ファイルへ挿入します。ペーストした dtx ファイルから % ltx / sty ファイル等を生成したあとには、必ず % * フォーマット作成に使われる ltx ファイルが意図どおり変更されたか % * platexrelease.sty に新たなブロックが一つだけ追加されたか % (例外的に 0000/00/00 の日付が含まれる場合は、ブロックが二つか) % を確認します。 % ==================================================================== % %%%%%%%% ^^A driver-like trick using catcode difference % % This file `exppl2e.sty' is a normal LaTeX package, so % \RequirePackage{exppl2e} % and % \usepackage{exppl2e} % works. However, it can also be typeset alone: % platex exppl2e.sty % for convenience. % %<*hack> \ifx\undefined\@undefined\relax % case 1: This file must be a normal package \NeedsTeXFormat{pLaTeX2e} \ProvidesPackage{exppl2e} [2016/06/29 v1.0b Experimental pLaTeX2e features] \PackageWarningNoLine{exppl2e}{% This is the unstable, experimental part of pLaTeX2e.\MessageBreak This package may contain:\MessageBreak * future patches to pLaTeX\MessageBreak * experimental new features\MessageBreak Please note that these can be removed without any\MessageBreak announcement at some point in the future, and may\MessageBreak also have some critical bugs. We appreciate any\MessageBreak reports and comments. Thank you for your cooperation} \RequirePackage[latest]{platexrelease} \else % case 2: This file pretends to be a document \documentclass{jltxdoc} \title{Experimental p\LaTeXe} \author{Japanese \TeX\ Development Community} \begin{document} \maketitle \DocInput{exppl2e.sty} \end{document} \fi % ^^A In case 2, this \fi comes after \end{document} % ^^A so it has no effect. % \fi ^^A This \fi corresponds to \iffalse, and another % ^^A \fi is required for \ifx, see below;) % %%%%%%%% ^^A trick end % % \fi % % % \emph{注意}:これはExperimentalなp\LaTeXe{}、すなわちunstableな % 実験的p\LaTeX{}コードを提供するパッケージです。 % % % \section{このパッケージの目的} % % コードの不用意な改変は即エンバグにつながり、利用者の多いp\LaTeX{}や % up\LaTeX{}では特に影響が大きいと思われます。その一方で、unstableなもの % もなるべく手軽にテストして頂きたいとも考えます。 % % このパッケージ\file{exppl2e.sty}は、カーネル(stable)に将来含める % ことを想定したunstableな実験的コードを配布することを目的に作成しました。 % テストをよろしくお願いします。 % % % \section{実験的コードの読みこみかた} % % デフォルトの配布では、実験的なコードは無効化されています。 % 実験的なp\LaTeXe{}を試したい場合は、以下のいずれかの方法を使います: % % \subsection{少しだけ試してみたい場合} % % パッケージ\file{exppl2e.sty}を読み込みます。ただし、|\usepackage|命令 % を使うのではなく、文書クラスより\emph{前}に読み込んでおくのが無難です。 % \begin{verbatim} % \RequirePackage{exppl2e} % \documentclass{article} % \end{verbatim} % % \subsection{常に実験的コードを使用したい場合} % % このパッケージと一緒にインストールされる新しいp\LaTeX{}は、お使いの % \texttt{platex}などのプログラムが見つけることのできる場所(簡単なの % はカレントディレクトリ、あるいは|$TEXMFLOCAL/tex|以下の適切な場所) % に\file{platex.cfg}というファイルがあれば、起動時にそれを読み込み % ます。この機能を利用すると、以下の内容の\file{platex.cfg}を用意し % ておくだけで、自動的に毎回\file{exppl2e.sty}が読み込まれます。 % \begin{verbatim} % \RequirePackage{exppl2e} % \end{verbatim} % % % \section{このドキュメントについて} % % コミュニティ版p\LaTeX{}が配布するほかのstyファイルとは異なり、 % 実質的には\file{exppl2e.sty}はdtxファイルと同等です。すなわち、 % コードと一緒にdtx互換ドキュメントが含まれています。このドキュメント % を組版するには % \begin{verbatim} % # platex exppl2e.sty % \end{verbatim} % を実行します。 % % % \section{コード} % % ここからp\LaTeXe{}のexperimentalコード本体です。 % % % \section{PDFのブックマークとアクセント文字} % % \begin{macro}{\pltx@isletter} % \changes{v???}{????/??/??}{PDFのしおりにアクセント文字が含まれる場合に対応} % \begin{macrocode} %\plIncludeInRelease{????/??/??}{\pltx@isletter} % {Support PD1 encoding}% %<*pldefs|platexrelease> \def\pltx@mark{\pltx@mark@} \let\pltx@scanstop\relax \long\def\pltx@cond#1\fi{% #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} \def\pltx@pdfencA{PD1} \def\pltx@composite@chkenc{% \ifx\pltx@pdfencA\f@encoding \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \long\def\pltx@isletter#1{% \expandafter\pltx@isletter@i#1\pltx@scanstop} \long\def\pltx@isletter@i#1\pltx@scanstop{% \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi{\@firstoftwo}% {\pltx@isletter@ii\pltx@scanstop#1\pltx@scanstop{}#1\pltx@mark}} \long\def\pltx@isletter@ii#1\pltx@scanstop#{% \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi% {\pltx@isletter@iii}{\pltx@isletter@iv}} \long\def\pltx@isletter@iii#1\pltx@mark{\@secondoftwo} \long\def\pltx@isletter@iv#1#2#3\pltx@mark{% \pltx@cond\ifx\pltx@mark#3\pltx@mark\fi{% \pltx@cond{\ifnum0\ifcat A\noexpand#21\fi\ifcat=\noexpand#21\fi>\z@}\fi {\@firstoftwo}{\pltx@composite@chkenc}% }{\pltx@composite@chkenc}} % %\plEndIncludeInRelease %\plIncludeInRelease{2016/06/10}{\pltx@isletter} % {Added \pltx@isletter}% %\def\pltx@mark{\pltx@mark@} %\let\pltx@scanstop\relax %\long\def\pltx@cond#1\fi{% % #1\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi} %\long\def\pltx@isletter#1{% % \expandafter\pltx@isletter@i#1\pltx@scanstop} %\long\def\pltx@isletter@i#1\pltx@scanstop{% % \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi{\@firstoftwo}% % {\pltx@isletter@ii\pltx@scanstop#1\pltx@scanstop{}#1\pltx@mark}} %\long\def\pltx@isletter@ii#1\pltx@scanstop#{% % \pltx@cond\ifx\pltx@mark#1\pltx@mark\fi% % {\pltx@isletter@iii}{\pltx@isletter@iv}} %\long\def\pltx@isletter@iii#1\pltx@mark{\@secondoftwo} %\long\def\pltx@isletter@iv#1#2#3\pltx@mark{% % \pltx@cond\ifx\pltx@mark#3\pltx@mark\fi{% % \pltx@cond{\ifnum0\ifcat A\noexpand#21\fi\ifcat=\noexpand#21\fi>\z@}\fi % {\@firstoftwo}{\@secondoftwo}% % }{\@secondoftwo}} %\plEndIncludeInRelease % \end{macrocode} % \end{macro} % % \begin{macro}{\@text@composite@x} % \changes{v???}{????/??/??}{v1.6eでいったんパッチを除去したコードを再導入} % \begin{macrocode} %\plIncludeInRelease{????/??/??}{\@text@composite@x} % {Fix for non-zero baselineshift}% %<*pldefs|platexrelease> \def\@text@composite@x#1#2{% \ifx#1\relax #2% \else\pltx@isletter{#1}{#1}{% \begingroup \setbox\z@\hbox\bgroup% \ybaselineshift\z@\tbaselineshift\z@ #1% \g@tlastchart@\@tempcntb \xdef\pltx@composite@temp{\noexpand\@tempcntb=\the\@tempcntb\relax}% \aftergroup\pltx@composite@temp \egroup % \end{macrocode} % \begin{macrocode} \ifnum\@tempcntb<\z@ \@tempdima=\iftdir \ifmdir \ifmmode\tbaselineshift\else\ybaselineshift\fi \else \tbaselineshift \fi \else \ybaselineshift \fi \@tempcntb=\@cclvi \else\@tempdima=\z@ \fi % \end{macrocode} % アクセントが付く「本体の文字」が欧文文字と推測される場合には、 % 一旦数式モードに入ることによって\cs{xkanjiskip}が前後に入るようにします。 % 必要なら、数式モードの前後に\cs{null}を補って\cs{xkanjiskip}の挿入を抑制します。 % \begin{macrocode} \ifnum\@tempcntb<\@cclvi \ifnum\@tempcntb>\m@ne\ifnum\@tempcntb<\@cclvi \ifodd\xspcode\@tempcntb\else\leavevmode\hbox{}\fi \fi\fi \begingroup\mathsurround\z@$% \ifx\textbaselineshiftfactor\@undefined\else \textbaselineshiftfactor\z@\fi \box\z@ $\endgroup% \ifnum\@tempcntb>\m@ne\ifnum\@tempcntb<\@cclvi \ifnum\xspcode\@tempcntb<2\hbox{}\fi \fi\fi % \end{macrocode} % \begin{macrocode} \else \ifdim\@tempdima=\z@{\ybaselineshift\z@\tbaselineshift\z@#1}% \else\lower\@tempdima\box\z@\fi \fi \endgroup}% \fi } % %\plEndIncludeInRelease % \end{macrocode} % \end{macro} % \endinput