From 60c2355e3e1171022ea67426855e5c475fc441eb Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 5 Sep 2019 22:25:17 +0000 Subject: platex-tools (5sep19) git-svn-id: svn://tug.org/texlive/trunk@52033 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/platex-tools/LICENSE | 2 +- Master/texmf-dist/doc/latex/platex-tools/Makefile | 28 ------ Master/texmf-dist/doc/latex/platex-tools/README.md | 15 ++-- .../texmf-dist/doc/latex/platex-tools/pxxspace.pdf | Bin 0 -> 40065 bytes .../texmf-dist/doc/latex/platex-tools/pxxspace.tex | 100 +++++++++++++++++++++ 5 files changed, 111 insertions(+), 34 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/platex-tools/Makefile create mode 100644 Master/texmf-dist/doc/latex/platex-tools/pxxspace.pdf create mode 100644 Master/texmf-dist/doc/latex/platex-tools/pxxspace.tex (limited to 'Master/texmf-dist/doc/latex/platex-tools') diff --git a/Master/texmf-dist/doc/latex/platex-tools/LICENSE b/Master/texmf-dist/doc/latex/platex-tools/LICENSE index 99a0c323d19..c463b620a91 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/LICENSE +++ b/Master/texmf-dist/doc/latex/platex-tools/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016-2018 Hironobu Yamashita +Copyright (c) 2016-2019 Hironobu Yamashita All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Master/texmf-dist/doc/latex/platex-tools/Makefile b/Master/texmf-dist/doc/latex/platex-tools/Makefile deleted file mode 100644 index a1bc26e10a1..00000000000 --- a/Master/texmf-dist/doc/latex/platex-tools/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -KANJI = -kanji=utf8 -FONTMAP = -f ipaex.map -f ptex-ipaex.map -TEXMF = $(shell kpsewhich -var-value=TEXMFHOME) - -all: plarray.pdf plextarray.pdf plextdelarray.pdf \ - pxatbegshi.pdf pxftnright.pdf pxmulticol.pdf \ - pxeverysel.pdf pxeveryshi.pdf - -.SUFFIXES: .tex .dvi .pdf -%.dvi: %.tex %.sty - platex $(KANJI) $< - platex $(KANJI) $< - rm *.aux *.log -.dvi.pdf: - dvipdfmx $(FONTMAP) $< - -.PHONY: install clean -install: - mkdir -p ${TEXMF}/doc/platex/platex-tools - cp ./Makefile ${TEXMF}/doc/platex/platex-tools/ - cp ./LICENSE ${TEXMF}/doc/platex/platex-tools/ - cp ./README.md ${TEXMF}/doc/platex/platex-tools/ - cp ./*.pdf ${TEXMF}/doc/platex/platex-tools/ - cp ./*.tex ${TEXMF}/doc/platex/platex-tools/ - mkdir -p ${TEXMF}/tex/platex/platex-tools - cp ./*.sty ${TEXMF}/tex/platex/platex-tools/ -clean: - rm -f *.dvi *.pdf diff --git a/Master/texmf-dist/doc/latex/platex-tools/README.md b/Master/texmf-dist/doc/latex/platex-tools/README.md index 51d952a3b86..b1d55da4cc8 100644 --- a/Master/texmf-dist/doc/latex/platex-tools/README.md +++ b/Master/texmf-dist/doc/latex/platex-tools/README.md @@ -27,20 +27,25 @@ and some additional packages are included. Patch for multicol.sty (latex-tools) to support `\footnote` in vertical writing. Can be used on pLaTeX/upLaTeX. +- pxxspace.sty: + Patch for xspace.sty (latex-tools) to fix + interword spacing with Japanese characters. + Can be used on pLaTeX/upLaTeX. + Version 0.2 was written by Takayuki YATO in 2019 + (https://gist.github.com/zr-tex8r/7de76036846e149bc28ec6399a683e3a), + and incorporated into this bundle by his courtesy. - pxeverysel.sty: Patch for everysel.sty (ms) to improve compatibility with Japanese font selection in pLaTeX. Can be used on pLaTeX/upLaTeX. - Previous version of this package (v0.1) was written by - Takayuki YATO in 2015 + Version 0.1 was written by Takayuki YATO in 2015 (https://gist.github.com/zr-tex8r/48c6910bbbe2f41d72de), and incorporated into this bundle by his courtesy. - pxeveryshi.sty: Patch for everyshi.sty (ms) to support Japanese classes for vertical writing. Can be used on pLaTeX/upLaTeX. - Previous version of this package (v0.1) was written by - Takayuki YATO in 2012 + Version 0.1 was written by Takayuki YATO in 2012 (https://gist.github.com/zr-tex8r/2702969), and incorporated into this bundle by his courtesy. - pxatbegshi.sty: @@ -78,6 +83,6 @@ the 3-clause BSD license (see [LICENSE](./LICENSE)). ## Release Date -2018-11-25 +2019-09-05 Hironobu Yamashita diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxxspace.pdf b/Master/texmf-dist/doc/latex/platex-tools/pxxspace.pdf new file mode 100644 index 00000000000..2aa3d488310 Binary files /dev/null and b/Master/texmf-dist/doc/latex/platex-tools/pxxspace.pdf differ diff --git a/Master/texmf-dist/doc/latex/platex-tools/pxxspace.tex b/Master/texmf-dist/doc/latex/platex-tools/pxxspace.tex new file mode 100644 index 00000000000..cbdba8abf30 --- /dev/null +++ b/Master/texmf-dist/doc/latex/platex-tools/pxxspace.tex @@ -0,0 +1,100 @@ +%# -*- coding: utf-8 -*- +\ifx\epTeXinputencoding\undefined\else % defined in e-pTeX (> TL2016) + \epTeXinputencoding utf8 % ensure utf-8 encoding for platex +\fi + +\documentclass[a4paper]{jsarticle} +\usepackage{doc} +\usepackage{pxxspace} +\GetFileInfo{pxxspace.sty} +\title{Package \textsf{pxxspace} \fileversion} +\author{Takayuki Yato} +\date{\filedate} + +%%%%% BEGIN +% +% \RESTOREXSPACE: restore original behavior to show difference +% +\makeatletter\def\RESTOREXSPACE{% +% +%% patch \@xspace +\patchcmd\@xspace{%from + \pxxs@precheck + \@xspace@lettoken@if@letter@TF +}{%to + \@xspace@lettoken@if@letter@TF +}{}{} +%% patch \@xspace@eTeX@setup +\patchcmd\@xspace@eTeX@setup{%from + \begingroup + \pxxs@forcecjktoken +}{%to + \begingroup +}{}{} +% +}\makeatother +% +%%%%% END + +\begin{document} + +\maketitle + +The command \verb+\xspace+ of package \textsf{xspace} +(included in \textsf{latex-tools} bundle) +results in wrong interword spacing when followed by +a Japanese character. +The package \textsf{pxxspace} provides a patch for \textsf{xspace} +to correct interword spacing with Japanese characters. + +This package is part of \textsf{platex-tools} bundle: +\begin{verbatim} + https://github.com/aminophen/platex-tools +\end{verbatim} + +\bigskip + +\textsf{xspace}パッケージ(\textsf{latex-tools}バンドルの一つ)が +提供する \verb+\xspace+ 命令は、その直後に和文文字を伴うときに +その和文文字との間のスペーシングが正しくなりません。 +そこで、\textsf{pxxspace}パッケージを読み込めば +和文文字との間のスペーシングが修正されます。 + +以下に例を示します。 +\begin{verbatim} + % Sample code + \documentclass{article} + \usepackage{pxxspace}% or, \usepackage{xspace} + \newcommand\myTeX{\TeX\xspace} + \begin{document} + % ASCII-Kanji interword spacing should be 20pt. + % At the same time, no spacing before JP punctuations. + \xkanjiskip 20pt % visible + \myTeX is great!\par + \myTeX, it's awesome!\par + \myTeX は素晴らしい!\par + \myTeX、超スゴイ!\par + \end{document} +\end{verbatim} + +\begin{quote} +\begin{multicols}{2} + \xkanjiskip 20pt % visible + \newcommand\myTeX{\TeX\xspace} + \long\def\TEST{% + \myTeX is great!\par + \myTeX, it's awesome!\par + \myTeX は素晴らしい!\par + \myTeX、超スゴイ!\par + } + % 正しいスペーシング: + Correct with \verb+\usepackage{pxxspace}+\par + \TEST + % 誤ったスペーシング: + \RESTOREXSPACE + Wrong with \verb+\usepackage{xspace}+\par + \TEST +\end{multicols} +\end{quote} + +\end{document} -- cgit v1.2.3