From 34b688ed66fae1014bb0ce6c72c50f123d908877 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Wed, 27 May 2026 23:26:44 +0900 Subject: [PATCH] =?utf8?q?CASL2=E4=BB=95=E6=A7=98=E6=9B=B8=E3=81=AEPDF?= =?utf8?q?=E3=81=A7=E7=94=BB=E5=83=8F=E3=81=8C=E3=82=BA=E3=83=AC=E3=82=8B?= =?utf8?q?=E7=8F=BE=E8=B1=A1=E3=81=AE=E5=9B=9E=E9=81=BF=E3=80=82SVG?= =?utf8?q?=E2=86=92EPS=E5=A4=89=E6=8F=9B=E3=81=AEBoundingBox=E5=8E=9F?= =?utf8?q?=E7=82=B9=E3=81=9A=E3=82=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://claude.ai/share/316d935c-a0e6-49c7-ab56-e7d9a7050eb9 問題: rsvg-convertが生成するEPSのBoundingBox原点が(0,0)でなく (7,52)などの非ゼロ値になっており、TeXが図のサイズを誤認して 後続テキストが図に重なるズレが発生していた。 対策: gs -dEPSCropで座標変換込みで再レンダリングし、 原点を(0,0)に正規化する。 変更内容: - images.mk: eps2epsをgs -dEPSCropパイプラインに置き換え - images.mk: %.epsルールのログファイル名typo修正 - images.mk: %.pdfルール追加 - img/*.svg: font-sizeを10ptに統一(10px/15px/10ptが混在していた) ``` --- VERSION | 2 +- doc/casl2_spec/Makefile | 2 +- doc/casl2_spec/img/1_1-01.svg | 40 +++++++++++++++++------------------ doc/casl2_spec/img/r_1-01.svg | 4 ++-- doc/casl2_spec/img/r_1-02.svg | 38 ++++++++++++++++----------------- doc/casl2_spec/img/r_1-03.svg | 36 +++++++++++++++---------------- doc/casl2_spec/img/r_1-04.svg | 38 ++++++++++++++++----------------- doc/casl2_spec/img/r_1-05.svg | 38 ++++++++++++++++----------------- doc/images.mk | 12 +++++++---- 9 files changed, 107 insertions(+), 103 deletions(-) diff --git a/VERSION b/VERSION index 1ba37ab..144c974 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.5p35 +v0.5p36 diff --git a/doc/casl2_spec/Makefile b/doc/casl2_spec/Makefile index 387b808..0c7bb32 100644 --- a/doc/casl2_spec/Makefile +++ b/doc/casl2_spec/Makefile @@ -13,7 +13,7 @@ all: casl2_spec.html casl2_spec.pdf casl2_spec.html: style.css clean: texinfo-clean - $(RM) *.bak + $(RM) *.bak *.dvi $(MAKE) -C img clean distclean: clean texinfo-distclean diff --git a/doc/casl2_spec/img/1_1-01.svg b/doc/casl2_spec/img/1_1-01.svg index c047376..01e8cfc 100644 --- a/doc/casl2_spec/img/1_1-01.svg +++ b/doc/casl2_spec/img/1_1-01.svg @@ -5,28 +5,28 @@ - + 上位8ビット 下位8ビット - - 15 - 14 - 13 - 12 - 11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 - (ビット番号) + + 15 + 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 + (ビット番号) @@ -49,7 +49,7 @@ - > + > 符号(負:1, 非負:0) diff --git a/doc/casl2_spec/img/r_1-01.svg b/doc/casl2_spec/img/r_1-01.svg index 942228e..d5c8f90 100644 --- a/doc/casl2_spec/img/r_1-01.svg +++ b/doc/casl2_spec/img/r_1-01.svg @@ -42,7 +42,7 @@ - + 第1語 第2語 OP @@ -58,7 +58,7 @@ 意味 - + 001NOPno operation 102LDr,adr,xload 12STr,adr,xstore diff --git a/doc/casl2_spec/img/r_1-02.svg b/doc/casl2_spec/img/r_1-02.svg index 40b277b..33ec4df 100644 --- a/doc/casl2_spec/img/r_1-02.svg +++ b/doc/casl2_spec/img/r_1-02.svg @@ -32,26 +32,26 @@ - 0 + 0 - - OF - 15 - 14 - 13 - 12 - 11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 + + OF + 15 + 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 diff --git a/doc/casl2_spec/img/r_1-03.svg b/doc/casl2_spec/img/r_1-03.svg index f1ee87a..d281206 100644 --- a/doc/casl2_spec/img/r_1-03.svg +++ b/doc/casl2_spec/img/r_1-03.svg @@ -34,24 +34,24 @@ - - 15 - 14 - 13 - 12 - 11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 - OF + + 15 + 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 + OF diff --git a/doc/casl2_spec/img/r_1-04.svg b/doc/casl2_spec/img/r_1-04.svg index 436ba4b..aadb8bb 100644 --- a/doc/casl2_spec/img/r_1-04.svg +++ b/doc/casl2_spec/img/r_1-04.svg @@ -32,26 +32,26 @@ - 0 + 0 - - OF - 15 - 14 - 13 - 12 - 11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 + + OF + 15 + 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 diff --git a/doc/casl2_spec/img/r_1-05.svg b/doc/casl2_spec/img/r_1-05.svg index 4c84c4b..427d6ea 100644 --- a/doc/casl2_spec/img/r_1-05.svg +++ b/doc/casl2_spec/img/r_1-05.svg @@ -34,25 +34,25 @@ - 0 - - 15 - 14 - 13 - 12 - 11 - 10 - 9 - 8 - 7 - 6 - 5 - 4 - 3 - 2 - 1 - 0 - OF + + 0 + 15 + 14 + 13 + 12 + 11 + 10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 + 0 + OF diff --git a/doc/images.mk b/doc/images.mk index 5f80fd4..94d2a11 100644 --- a/doc/images.mk +++ b/doc/images.mk @@ -1,8 +1,12 @@ -INKSCAPE := inkscape -CONVERT := convert +RSVG_CONVERT := rsvg-convert +GS := gs +GS_EPSCROP := $(GS) -q -dNOPAUSE -dBATCH -sDEVICE=eps2write -dEPSCrop %.png: %.svg - $(INKSCAPE) -y 0.0 -e $@ $< >$<2png.log 2>&1 + $(RSVG_CONVERT) --format=png --output=$@ $< >$<2png.log 2>&1 %.eps: %.svg - $(INKSCAPE) --export-type=eps $@ $< >$<2eps.log 2>&1 + $(RSVG_CONVERT) --format=eps --output=$@.tmp $< >$<2eps.log 2>&1 && $(GS_EPSCROP) -sOutputFile=$@ $@.tmp + +%.pdf: %.svg + $(RSVG_CONVERT) --format=pdf --output=$@ $< >$<2pdf.log 2>&1 -- 2.47.3