summaryrefslogtreecommitdiff
path: root/macros/luatex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-10-05 03:01:34 +0000
committerNorbert Preining <norbert@preining.info>2022-10-05 03:01:34 +0000
commit6925a15396a955498e1d1663204e7fa7da3d1728 (patch)
tree925ce3e30472ef82315230ec2772e2e104642541 /macros/luatex
parent30b3429f0e138c93c5f1ba1d1a6d46728c0943e9 (diff)
CTAN sync 202210050301
Diffstat (limited to 'macros/luatex')
-rw-r--r--macros/luatex/generic/lualibs/NEWS6
-rw-r--r--macros/luatex/generic/lualibs/README.md9
-rw-r--r--macros/luatex/generic/lualibs/lualibs-basic-merged.lua641
-rw-r--r--macros/luatex/generic/lualibs/lualibs-dir.lua12
-rw-r--r--macros/luatex/generic/lualibs/lualibs-extended-merged.lua1173
-rw-r--r--macros/luatex/generic/lualibs/lualibs-file.lua2
-rw-r--r--macros/luatex/generic/lualibs/lualibs-gzip.lua180
-rw-r--r--macros/luatex/generic/lualibs/lualibs-io.lua10
-rw-r--r--macros/luatex/generic/lualibs/lualibs-lpeg.lua12
-rw-r--r--macros/luatex/generic/lualibs/lualibs-math.lua16
-rw-r--r--macros/luatex/generic/lualibs/lualibs-os.lua748
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-deb.lua22
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-jsn.lua19
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-prs.lua67
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-sac.lua582
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-str.lua59
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-tab.lua54
-rw-r--r--macros/luatex/generic/lualibs/lualibs-util-zip.lua684
-rw-r--r--macros/luatex/generic/lualibs/lualibs.dtx31
-rw-r--r--macros/luatex/generic/lualibs/lualibs.pdfbin81627 -> 81128 bytes
-rw-r--r--macros/luatex/latex/japanese-mathformulas/README.txt2
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.pdfbin132535 -> 132365 bytes
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex2
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdfbin536610 -> 550271 bytes
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty698
-rw-r--r--macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex2857
26 files changed, 5820 insertions, 2066 deletions
diff --git a/macros/luatex/generic/lualibs/NEWS b/macros/luatex/generic/lualibs/NEWS
index cf8a853b6c..889232dc47 100644
--- a/macros/luatex/generic/lualibs/NEWS
+++ b/macros/luatex/generic/lualibs/NEWS
@@ -1,6 +1,12 @@
History of the lualibs package
+2022/10/04 v2.75/
+ * sync with Context current as of 2022/10/04.
+ * add util-sac
+ * Replace l-gzip with util-zip
+
2021/05/20 v2.74/
* sync with Context current as of 2021/05/20.
+
2020/12/30 v2.73/
* sync with Context current as of 2020/12/30.
diff --git a/macros/luatex/generic/lualibs/README.md b/macros/luatex/generic/lualibs/README.md
index e2cd6be9bd..09194115ce 100644
--- a/macros/luatex/generic/lualibs/README.md
+++ b/macros/luatex/generic/lualibs/README.md
@@ -1,10 +1,10 @@
# The Lualibs Package
-VERSION: 2.74
+VERSION: 2.75
-DATE: 2021-05-20
+DATE: 2022-10-04
-FONTLOADERDATE: 2021-05-20
+FONTLOADERDATE: 2022-10-04
Lualibs is a collection of Lua modules useful for general programming.
@@ -47,7 +47,6 @@ See the 'NEWS' file for version history.
| lualibs-compat.lua |tex/luatex/lualibs/lualibs-compat.lua
| lualibs-dir.lua |tex/luatex/lualibs/lualibs-dir.lua
| lualibs-file.lua | tex/luatex/lualibs/lualibs-file.lua
-| lualibs-gzip.lua | tex/luatex/lualibs/lualibs-gzip.lua
| lualibs-function.lua | tex/luatex/lualibs/lualibs-function.lua
| lualibs-io.lua | tex/luatex/lualibs/lualibs-io.lua
| lualibs-lpeg.lua | tex/luatex/lualibs/lualibs-lpeg.lua
@@ -68,11 +67,13 @@ See the 'NEWS' file for version history.
| lualibs-util-jsn.lua | tex/luatex/lualibs/lualibs-util-jsn.lua
| lualibs-util-lua.lua | tex/luatex/lualibs/lualibs-util-lua.lua
| lualibs-util-prs.lua | tex/luatex/lualibs/lualibs-util-prs.lua
+| lualibs-util-sac.lua | tex/luatex/lualibs/lualibs-util-sac.lua
| lualibs-util-sta.lua | tex/luatex/lualibs/lualibs-util-sta.lua
| lualibs-util-sto.lua | tex/luatex/lualibs/lualibs-util-sto.lua
| lualibs-util-str.lua | tex/luatex/lualibs/lualibs-util-str.lua
| lualibs-util-tab.lua | tex/luatex/lualibs/lualibs-util-tab.lua
| lualibs-util-tpl.lua | tex/luatex/lualibs/lualibs-util-tpl.lua
+| lualibs-util-zip.lua | tex/luatex/lualibs/lualibs-util-zip.lua
| LICENSE | doc/luatex/lualibs/LICENSE
| NEWS | doc/luatex/lualibs/NEWS
| README | doc/luatex/lualibs/README
diff --git a/macros/luatex/generic/lualibs/lualibs-basic-merged.lua b/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
index ac98df379a..690a3160ac 100644
--- a/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
+++ b/macros/luatex/generic/lualibs/lualibs-basic-merged.lua
@@ -1,6 +1,6 @@
-- merged file : lualibs-basic-merged.lua
-- parent file : lualibs-basic.lua
--- merge date : 2021-05-20 23:14
+-- merge date : 2022-10-04 17:16
do -- begin closure to overcome local limits and interference
@@ -2737,8 +2737,14 @@ if not math.ceiling then
math.ceiling=math.ceil
end
if not math.round then
- local floor=math.floor
- function math.round(x) return floor(x+0.5) end
+ if xmath then
+ math.round=xmath.round
+ else
+ local floor=math.floor
+ function math.round(x)
+ return x<0 and -floor(-x+0.5) or floor(x+0.5)
+ end
+ end
end
if not math.div then
local floor=math.floor
@@ -2808,7 +2814,7 @@ if not math.tointeger then
end
if not math.ult then
local floor=math.floor
- function math.tointeger(m,n)
+ function math.ult(m,n)
return floor(m)<floor(n)
end
end
@@ -2882,9 +2888,12 @@ function io.copydata(source,target,action)
flush()
end
end
-function io.savedata(filename,data,joiner)
- local f=open(filename,"wb")
+function io.savedata(filename,data,joiner,append)
+ local f=open(filename,append and "ab" or "wb")
if f then
+ if append and joiner and f:seek("end")>0 then
+ f:write(joiner)
+ end
if type(data)=="table" then
f:write(concat(data,joiner or ""))
elseif type(data)=="function" then
@@ -3172,10 +3181,10 @@ if not modules then modules={} end modules ['l-os']={
license="see context related readme files"
}
local os=os
-local date,time=os.date,os.time
+local date,time,difftime=os.date,os.time,os.difftime
local find,format,gsub,upper,gmatch=string.find,string.format,string.gsub,string.upper,string.gmatch
local concat=table.concat
-local random,ceil,randomseed=math.random,math.ceil,math.randomseed
+local random,ceil,randomseed,modf=math.random,math.ceil,math.randomseed,math.modf
local type,setmetatable,tonumber,tostring=type,setmetatable,tonumber,tostring
do
local selfdir=os.selfdir
@@ -3273,7 +3282,7 @@ if not os.__getenv__ then
osenv[K]=v
end
function os.getenv(k)
- local K=upper(k)
+ local K=upper(k)
local v=osenv[K] or osgetenv(K) or osgetenv(k)
if v=="" then
return nil
@@ -3291,22 +3300,6 @@ if not os.__getenv__ then
setmetatable(os.env,{ __index=__index,__newindex=__newindex } )
end
end
-local execute=os.execute
-local iopopen=io.popen
-local function resultof(command)
- local handle=iopopen(command,"r")
- if handle then
- local result=handle:read("*all") or ""
- handle:close()
- return result
- else
- return ""
- end
-end
-os.resultof=resultof
-function os.pipeto(command)
- return iopopen(command,"w")
-end
if not io.fileseparator then
if find(os.getenv("PATH"),";",1,true) then
io.fileseparator,io.pathseparator,os.type="\\",";",os.type or "windows"
@@ -3321,228 +3314,231 @@ if os.type=="windows" then
else
os.libsuffix,os.binsuffix,os.binsuffixes='so','',{ '' }
end
-local launchers={
- windows="start %s",
- macosx="open %s",
- unix="xdg-open %s &> /dev/null &",
-}
-function os.launch(str)
- local command=format(launchers[os.name] or launchers.unix,str)
- execute(command)
-end
-local gettimeofday=os.gettimeofday or os.clock
-os.gettimeofday=gettimeofday
-local startuptime=gettimeofday()
-function os.runtime()
- return gettimeofday()-startuptime
-end
-local resolvers=os.resolvers or {}
-os.resolvers=resolvers
-setmetatable(os,{ __index=function(t,k)
- local r=resolvers[k]
- return r and r(t,k) or nil
-end })
-local name,platform=os.name or "linux",os.getenv("MTX_PLATFORM") or ""
-if platform~="" then
- os.platform=platform
-elseif os.type=="windows" then
- function resolvers.platform(t,k)
- local architecture=os.getenv("PROCESSOR_ARCHITECTURE") or ""
- local platform=""
- if find(architecture,"AMD64",1,true) then
- platform="win64"
+do
+ local execute=os.execute
+ local iopopen=io.popen
+ local ostype=os.type
+ local function resultof(command)
+ local handle=iopopen(command,ostype=="windows" and "rb" or "r")
+ if handle then
+ local result=handle:read("*all") or ""
+ handle:close()
+ return result
else
- platform="mswin"
+ return ""
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
end
-elseif name=="linux" then
- function resolvers.platform(t,k)
- local architecture=os.getenv("HOSTTYPE") or resultof("uname -m") or ""
- local platform=os.getenv("MTX_PLATFORM") or ""
+ os.resultof=resultof
+ function os.pipeto(command)
+ return iopopen(command,"w")
+ end
+ local launchers={
+ windows="start %s",
+ macosx="open %s",
+ unix="xdg-open %s &> /dev/null &",
+ }
+ function os.launch(str)
+ local command=format(launchers[os.name] or launchers.unix,str)
+ execute(command)
+ end
+end
+do
+ local gettimeofday=os.gettimeofday or os.clock
+ os.gettimeofday=gettimeofday
+ local startuptime=gettimeofday()
+ function os.runtime()
+ return gettimeofday()-startuptime
+ end
+end
+do
+ local name=os.name or "linux"
+ local platform=os.getenv("MTX_PLATFORM") or ""
+ local architecture=os.uname and os.uname().machine
+ local bits=os.getenv("MTX_BITS") or find(platform,"64") and 64 or 32
+ if platform~="" then
+ elseif os.type=="windows" then
+ architecture=string.lower(architecture or os.getenv("PROCESSOR_ARCHITECTURE") or "")
+ if architecture=="x86_64" then
+ bits,platform=64,"win64"
+ elseif find(architecture,"amd64") then
+ bits,platform=64,"win64"
+ elseif find(architecture,"arm64") then
+ bits,platform=64,"windows-arm64"
+ elseif find(architecture,"arm32") then
+ bits,platform=32,"windows-arm32"
+ else
+ bits,platform=32,"mswin"
+ end
+ elseif name=="linux" then
+ architecture=architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or ""
local musl=find(os.selfdir or "","linuxmusl")
- if platform~="" then
- elseif find(architecture,"x86_64",1,true) then
- platform=musl and "linuxmusl" or "linux-64"
- elseif find(architecture,"ppc",1,true) then
- platform="linux-ppc"
+ if find(architecture,"x86_64") then
+ bits,platform=64,musl and "linuxmusl" or "linux-64"
+ elseif find(architecture,"ppc") then
+ bits,platform=32,"linux-ppc"
else
- platform=musl and "linuxmusl" or "linux"
+ bits,platform=32,musl and "linuxmusl" or "linux"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
- end
-elseif name=="macosx" then
- function resolvers.platform(t,k)
- local architecture=resultof("echo $HOSTTYPE") or ""
- local platform=""
+ elseif name=="macosx" then
+ architecture=architecture or resultof("echo $HOSTTYPE") or ""
if architecture=="" then
- platform="osx-intel"
- elseif find(architecture,"i386",1,true) then
- platform="osx-intel"
- elseif find(architecture,"x86_64",1,true) then
- platform="osx-64"
- elseif find(architecture,"arm64",1,true) then
- platform="osx-arm"
+ bits,platform=64,"osx-intel"
+ elseif find(architecture,"i386") then
+ bits,platform=64,"osx-intel"
+ elseif find(architecture,"x86_64") then
+ bits,platform=64,"osx-64"
+ elseif find(architecture,"arm64") then
+ bits,platform=64,"osx-arm"
else
- platform="osx-ppc"
- end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
- end
-elseif name=="sunos" then
- function resolvers.platform(t,k)
- local architecture=resultof("uname -m") or ""
- local platform=""
- if find(architecture,"sparc",1,true) then
- platform="solaris-sparc"
+ bits,platform=32,"osx-ppc"
+ end
+ elseif name=="sunos" then
+ architecture=architecture or resultof("uname -m") or ""
+ if find(architecture,"sparc") then
+ bits,platform=32,"solaris-sparc"
else
- platform="solaris-intel"
- end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
- end
-elseif name=="freebsd" then
- function resolvers.platform(t,k)
- local architecture=resultof("uname -m") or ""
- local platform=""
- if find(architecture,"amd64",1,true) then
- platform="freebsd-amd64"
+ bits,platform=32,"solaris-intel"
+ end
+ elseif name=="freebsd" then
+ architecture=architecture or os.getenv("MACHTYPE") or resultof("uname -m") or ""
+ if find(architecture,"amd64") or find(architecture,"AMD64") then
+ bits,platform=64,"freebsd-amd64"
else
- platform="freebsd"
- end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
- end
-elseif name=="kfreebsd" then
- function resolvers.platform(t,k)
- local architecture=os.getenv("HOSTTYPE") or resultof("uname -m") or ""
- local platform=""
- if find(architecture,"x86_64",1,true) then
- platform="kfreebsd-amd64"
+ bits,platform=32,"freebsd"
+ end
+ elseif name=="kfreebsd" then
+ architecture=architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or ""
+ if architecture=="x86_64" then
+ bits,platform=64,"kfreebsd-amd64"
+ else
+ bits,platform=32,"kfreebsd-i386"
+ end
+ else
+ architecture=architecture or resultof("uname -m") or ""
+ if find(architecture,"aarch64") then
+ bits,platform="linux-aarch64"
+ elseif find(architecture,"armv7l") then
+ bits,platform=32,"linux-armhf"
+ elseif find(architecture,"mips64") or find(architecture,"mips64el") then
+ bits,platform=64,"linux-mipsel"
+ elseif find(architecture,"mipsel") or find(architecture,"mips") then
+ bits,platform=32,"linux-mipsel"
else
- platform="kfreebsd-i386"
+ bits,platform=64,"linux-64"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
end
-else
- function resolvers.platform(t,k)
- local platform="linux"
- os.setenv("MTX_PLATFORM",platform)
- os.platform=platform
- return platform
+ os.setenv("MTX_PLATFORM",platform)
+ os.setenv("MTX_BITS",bits)
+ os.platform=platform
+ os.bits=bits
+ os.newline=name=="windows" and "\013\010" or "\010"
+end
+do
+ local t={ 8,9,"a","b" }
+ function os.uuid()
+ return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x",
+ random(0xFFFF),random(0xFFFF),
+ random(0x0FFF),
+ t[ceil(random(4))] or 8,random(0x0FFF),
+ random(0xFFFF),
+ random(0xFFFF),random(0xFFFF),random(0xFFFF)
+ )
end
end
-os.newline=name=="windows" and "\013\010" or "\010"
-function resolvers.bits(t,k)
- local bits=find(os.platform,"64",1,true) and 64 or 32
- os.bits=bits
- return bits
-end
-local t={ 8,9,"a","b" }
-function os.uuid()
- return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x",
- random(0xFFFF),random(0xFFFF),
- random(0x0FFF),
- t[ceil(random(4))] or 8,random(0x0FFF),
- random(0xFFFF),
- random(0xFFFF),random(0xFFFF),random(0xFFFF)
- )
-end
-local d
-function os.timezone(delta)
- d=d or ((tonumber(date("%H")) or 0)-(tonumber(date("!%H")) or 0))
- if delta then
- if d>0 then
- return format("+%02i:00",d)
+do
+ local hour,min
+ function os.timezone(difference)
+ if not hour then
+ local current=time()
+ local utcdate=date("!*t",current)
+ local localdate=date("*t",current)
+ localdate.isdst=false
+ local timediff=difftime(time(localdate),time(utcdate))
+ hour,min=modf(timediff/3600)
+ min=min*60
+ end
+ if difference then
+ return hour,min
else
- return format("-%02i:00",-d)
+ return format("%+03d:%02d",hour,min)
end
- else
- return 1
- end
-end
-local timeformat=format("%%s%s",os.timezone(true))
-local dateformat="!%Y-%m-%d %H:%M:%S"
-local lasttime=nil
-local lastdate=nil
-function os.fulltime(t,default)
- t=t and tonumber(t) or 0
- if t>0 then
- elseif default then
- return default
- else
- t=time()
- end
- if t~=lasttime then
- lasttime=t
- lastdate=format(timeformat,date(dateformat))
- end
- return lastdate
-end
-local dateformat="%Y-%m-%d %H:%M:%S"
-local lasttime=nil
-local lastdate=nil
-function os.localtime(t,default)
- t=t and tonumber(t) or 0
- if t>0 then
- elseif default then
- return default
- else
- t=time()
end
- if t~=lasttime then
- lasttime=t
- lastdate=date(dateformat,t)
+ local timeformat=format("%%s%s",os.timezone())
+ local dateformat="%Y-%m-%d %H:%M:%S"
+ local lasttime=nil
+ local lastdate=nil
+ function os.fulltime(t,default)
+ t=t and tonumber(t) or 0
+ if t>0 then
+ elseif default then
+ return default
+ else
+ t=time()
+ end
+ if t~=lasttime then
+ lasttime=t
+ lastdate=format(timeformat,date(dateformat))
+ end
+ return lastdate
+ end
+ local dateformat="%Y-%m-%d %H:%M:%S"
+ local lasttime=nil
+ local lastdate=nil
+ function os.localtime(t,default)
+ t=t and tonumber(t) or 0
+ if t>0 then
+ elseif default then
+ return default
+ else
+ t=time()
+ end
+ if t~=lasttime then
+ lasttime=t
+ lastdate=date(dateformat,t)
+ end
+ return lastdate
+ end
+ function os.converttime(t,default)
+ local t=tonumber(t)
+ if t and t>0 then
+ return date(dateformat,t)
+ else
+ return default or "-"
+ end
+ end
+ function os.today()
+ return date("!*t")
+ end
+ function os.now()
+ return date("!%Y-%m-%d %H:%M:%S")
end
- return lastdate
end
-function os.converttime(t,default)
- local t=tonumber(t)
- if t and t>0 then
- return date(dateformat,t)
- else
- return default or "-"
- end
-end
-local memory={}
-local function which(filename)
- local fullname=memory[filename]
- if fullname==nil then
- local suffix=file.suffix(filename)
- local suffixes=suffix=="" and os.binsuffixes or { suffix }
- for directory in gmatch(os.getenv("PATH"),"[^"..io.pathseparator.."]+") do
- local df=file.join(directory,filename)
- for i=1,#suffixes do
- local dfs=file.addsuffix(df,suffixes[i])
- if io.exists(dfs) then
- fullname=dfs
- break
+do
+ local cache={}
+ local function which(filename)
+ local fullname=cache[filename]
+ if fullname==nil then
+ local suffix=file.suffix(filename)
+ local suffixes=suffix=="" and os.binsuffixes or { suffix }
+ for directory in gmatch(os.getenv("PATH"),"[^"..io.pathseparator.."]+") do
+ local df=file.join(directory,filename)
+ for i=1,#suffixes do
+ local dfs=file.addsuffix(df,suffixes[i])
+ if io.exists(dfs) then
+ fullname=dfs
+ break
+ end
end
end
+ if not fullname then
+ fullname=false
+ end
+ cache[filename]=fullname
end
- if not fullname then
- fullname=false
- end
- memory[filename]=fullname
+ return fullname
end
- return fullname
-end
-os.which=which
-os.where=which
-function os.today()
- return date("!*t")
-end
-function os.now()
- return date("!%Y-%m-%d %H:%M:%S")
+ os.which=which
+ os.where=which
end
if not os.sleep then
local socket=socket
@@ -3553,65 +3549,69 @@ if not os.sleep then
socket.sleep(n)
end
end
-local function isleapyear(year)
- return (year%4==0) and (year%100~=0 or year%400==0)
-end
-os.isleapyear=isleapyear
-local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
-local function nofdays(year,month,day)
- if not month then
- return isleapyear(year) and 365 or 364
- elseif not day then
- return month==2 and isleapyear(year) and 29 or days[month]
- else
- for i=1,month-1 do
- day=day+days[i]
- end
- if month>2 and isleapyear(year) then
- day=day+1
+do
+ local function isleapyear(year)
+ return (year%4==0) and (year%100~=0 or year%400==0)
+ end
+ os.isleapyear=isleapyear
+ local days={ 31,28,31,30,31,30,31,31,30,31,30,31 }
+ local function nofdays(year,month,day)
+ if not month then
+ return isleapyear(year) and 365 or 364
+ elseif not day then
+ return month==2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day=day+days[i]
+ end
+ if month>2 and isleapyear(year) then
+ day=day+1
+ end
+ return day
end
- return day
end
-end
-os.nofdays=nofdays
-function os.weekday(day,month,year)
- return date("%w",time { year=year,month=month,day=day })+1
-end
-function os.validdate(year,month,day)
- if month<1 then
- month=1
- elseif month>12 then
- month=12
+ os.nofdays=nofdays
+ function os.weekday(day,month,year)
+ return date("%w",time { year=year,month=month,day=day })+1
end
- if day<1 then
- day=1
- else
- local max=nofdays(year,month)
- if day>max then
- day=max
+ function os.validdate(year,month,day)
+ if month<1 then
+ month=1
+ elseif month>12 then
+ month=12
+ end
+ if day<1 then
+ day=1
+ else
+ local max=nofdays(year,month)
+ if day>max then
+ day=max
+ end
end
+ return year,month,day
end
- return year,month,day
-end
-function os.date(fmt,...)
- if not fmt then
- fmt="%Y-%m-%d %H:%M"
+ function os.date(fmt,...)
+ if not fmt then
+ fmt="%Y-%m-%d %H:%M"
+ end
+ return date(fmt,...)
end
- return date(fmt,...)
end
-local osexit=os.exit
-local exitcode=nil
-function os.setexitcode(code)
- exitcode=code
-end
-function os.exit(c)
- if exitcode~=nil then
- return osexit(exitcode)
+do
+ local osexit=os.exit
+ local exitcode=nil
+ function os.setexitcode(code)
+ exitcode=code
end
- if c~=nil then
- return osexit(c)
+ function os.exit(c)
+ if exitcode~=nil then
+ return osexit(exitcode)
+ end
+ if c~=nil then
+ return osexit(c)
+ end
+ return osexit()
end
- return osexit()
end
end -- closure
@@ -3872,7 +3872,7 @@ function file.join(one,two,three,...)
if not two then
return one=="" and one or lpegmatch(reslasher,one)
end
- if one=="" then
+ if not one or one=="" then
return lpegmatch(stripper,three and concat({ two,three,... },"/") or two)
end
if lpegmatch(isnetwork,one) then
@@ -4031,87 +4031,6 @@ end -- closure
do -- begin closure to overcome local limits and interference
-if not modules then modules={} end modules ['l-gzip']={
- version=1.001,
- author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright="PRAGMA ADE / ConTeXt Development Team",
- license="see context related readme files"
-}
-gzip=gzip or {}
-if not zlib then
- zlib=xzip
-elseif not xzip then
- xzip=zlib
-end
-if zlib then
- local suffix=file.suffix
- local suffixes=file.suffixes
- local find=string.find
- local openfile=io.open
- local gzipwindow=15+16
- local gziplevel=3
- local identifier="^\x1F\x8B\x08"
- local compress=zlib.compress
- local decompress=zlib.decompress
- function gzip.load(filename)
- local f=openfile(filename,"rb")
- if not f then
- else
- local data=f:read("*all")
- f:close()
- if data and data~="" then
- if suffix(filename)=="gz" then
- data=decompress(data,gzipwindow)
- end
- return data
- end
- end
- end
- function gzip.save(filename,data,level)
- if suffix(filename)~="gz" then
- filename=filename..".gz"
- end
- local f=openfile(filename,"wb")
- if f then
- data=compress(data or "",level or gziplevel,nil,gzipwindow)
- f:write(data)
- f:close()
- return #data
- end
- end
- function gzip.suffix(filename)
- local suffix,extra=suffixes(filename)
- local gzipped=extra=="gz"
- return suffix,gzipped
- end
- function gzip.compressed(s)
- return s and find(s,identifier)
- end
- function gzip.compress(s,level)
- if s and not find(s,identifier) then
- if not level then
- level=gziplevel
- elseif level<=0 then
- return s
- elseif level>9 then
- level=9
- end
- return compress(s,level or gziplevel,nil,gzipwindow) or s
- end
- end
- function gzip.decompress(s)
- if s and find(s,identifier) then
- return decompress(s,gzipwindow)
- else
- return s
- end
- end
-end
-
-end -- closure
-
-do -- begin closure to overcome local limits and interference
-
if not modules then modules={} end modules ['l-md5']={
version=1.001,
author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
@@ -4389,15 +4308,15 @@ local separator,pattern
if onwindows then
local slash=S("/\\")/"/"
pattern={
- [1]=(Cs(P(".")+slash^1)+Cs(R("az","AZ")*P(":")*slash^0)+Cc("./"))*V(2)*V(3),
- [2]=Cs(((1-S("*?/\\"))^0*slash)^0),
- [3]=Cs(P(1)^0)
+ (Cs(P(".")+slash^1)+Cs(R("az","AZ")*P(":")*slash^0)+Cc("./"))*V(2)*V(3),
+ Cs(((1-S("*?/\\"))^0*slash)^0),
+ Cs(P(1)^0)
}
else
pattern={
- [1]=(C(P(".")+P("/")^1)+Cc("./"))*V(2)*V(3),
- [2]=C(((1-S("*?/"))^0*P("/"))^0),
- [3]=C(P(1)^0)
+ (C(P(".")+P("/")^1)+Cc("./"))*V(2)*V(3),
+ C(((1-S("*?/"))^0*P("/"))^0),
+ C(P(1)^0)
}
end
local filter=Cs ((
diff --git a/macros/luatex/generic/lualibs/lualibs-dir.lua b/macros/luatex/generic/lualibs/lualibs-dir.lua
index 325039cb1e..ac8e2f4e8e 100644
--- a/macros/luatex/generic/lualibs/lualibs-dir.lua
+++ b/macros/luatex/generic/lualibs/lualibs-dir.lua
@@ -230,18 +230,18 @@ if onwindows then -- we could sanitize here
-- pattern = Ct {
pattern = {
- [1] = (Cs(P(".") + slash^1) + Cs(R("az","AZ") * P(":") * slash^0) + Cc("./")) * V(2) * V(3),
- [2] = Cs(((1-S("*?/\\"))^0 * slash)^0),
- [3] = Cs(P(1)^0)
+ (Cs(P(".") + slash^1) + Cs(R("az","AZ") * P(":") * slash^0) + Cc("./")) * V(2) * V(3),
+ Cs(((1-S("*?/\\"))^0 * slash)^0),
+ Cs(P(1)^0)
}
else -- assume unix
-- pattern = Ct {
pattern = {
- [1] = (C(P(".") + P("/")^1) + Cc("./")) * V(2) * V(3),
- [2] = C(((1-S("*?/"))^0 * P("/"))^0),
- [3] = C(P(1)^0)
+ (C(P(".") + P("/")^1) + Cc("./")) * V(2) * V(3),
+ C(((1-S("*?/"))^0 * P("/"))^0),
+ C(P(1)^0)
}
end
diff --git a/macros/luatex/generic/lualibs/lualibs-extended-merged.lua b/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
index 9cd4487bf2..08428c51ac 100644
--- a/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
+++ b/macros/luatex/generic/lualibs/lualibs-extended-merged.lua
@@ -1,6 +1,511 @@
-- merged file : lualibs-extended-merged.lua
-- parent file : lualibs-extended.lua
--- merge date : 2021-05-20 23:14
+-- merge date : 2022-10-04 17:16
+
+do -- begin closure to overcome local limits and interference
+
+if not modules then modules={} end modules ['util-sac']={
+ version=1.001,
+ optimize=true,
+ comment="companion to luat-lib.mkiv",
+ author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright="PRAGMA ADE / ConTeXt Development Team",
+ license="see context related readme files"
+}
+local byte,sub=string.byte,string.sub
+local tonumber=tonumber
+utilities=utilities or {}
+local streams={}
+utilities.streams=streams
+function streams.open(filename,zerobased)
+ local f=filename and io.loaddata(filename)
+ if f then
+ return { f,1,#f,zerobased or false }
+ end
+end
+function streams.openstring(f,zerobased)
+ if f then
+ return { f,1,#f,zerobased or false }
+ end
+end
+function streams.getstring(f)
+ if f then
+ return f[1]
+ end
+end
+function streams.close()
+end
+function streams.size(f)
+ return f and f[3] or 0
+end
+streams.getsize=streams.size
+function streams.setposition(f,i)
+ if f[4] then
+ if i<=0 then
+ f[2]=1
+ else
+ f[2]=i+1
+ end
+ else
+ if i<=1 then
+ f[2]=1
+ else
+ f[2]=i
+ end
+ end
+end
+function streams.getposition(f)
+ if f[4] then
+ return f[2]-1
+ else
+ return f[2]
+ end
+end
+function streams.look(f,n,chars)
+ local b=f[2]
+ local e=b+n-1
+ if chars then
+ return sub(f[1],b,e)
+ else
+ return byte(f[1],b,e)
+ end
+end
+function streams.skip(f,n)
+ f[2]=f[2]+n
+end
+function streams.readbyte(f)
+ local i=f[2]
+ f[2]=i+1
+ return byte(f[1],i)
+end
+function streams.readbytes(f,n)
+ local i=f[2]
+ local j=i+n
+ f[2]=j
+ return byte(f[1],i,j-1)
+end
+function streams.readbytetable(f,n)
+ local i=f[2]
+ local j=i+n
+ f[2]=j
+ return { byte(f[1],i,j-1) }
+end
+function streams.skipbytes(f,n)
+ f[2]=f[2]+n
+end
+function streams.readchar(f)
+ local i=f[2]
+ f[2]=i+1
+ return sub(f[1],i,i)
+end
+function streams.readstring(f,n)
+ local i=f[2]
+ local j=i+n
+ f[2]=j
+ return sub(f[1],i,j-1)
+end
+function streams.readinteger1(f)
+ local i=f[2]
+ f[2]=i+1
+ local n=byte(f[1],i)
+ if n>=0x80 then
+ return n-0x100
+ else
+ return n
+ end
+end
+streams.readcardinal1=streams.readbyte
+streams.readcardinal=streams.readcardinal1
+streams.readinteger=streams.readinteger1
+function streams.readcardinal2(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local a,b=byte(f[1],i,j)
+ return 0x100*a+b
+end
+function streams.readcardinal2le(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local b,a=byte(f[1],i,j)
+ return 0x100*a+b
+end
+function streams.readinteger2(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local a,b=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x100*a+b-0x10000
+ else
+ return 0x100*a+b
+ end
+end
+function streams.readinteger2le(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local b,a=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x100*a+b-0x10000
+ else
+ return 0x100*a+b
+ end
+end
+function streams.readcardinal3(f)
+ local i=f[2]
+ local j=i+2
+ f[2]=j+1
+ local a,b,c=byte(f[1],i,j)
+ return 0x10000*a+0x100*b+c
+end
+function streams.readcardinal3le(f)
+ local i=f[2]
+ local j=i+2
+ f[2]=j+1
+ local c,b,a=byte(f[1],i,j)
+ return 0x10000*a+0x100*b+c
+end
+function streams.readinteger3(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local a,b,c=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x10000*a+0x100*b+c-0x1000000
+ else
+ return 0x10000*a+0x100*b+c
+ end
+end
+function streams.readinteger3le(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local c,b,a=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x10000*a+0x100*b+c-0x1000000
+ else
+ return 0x10000*a+0x100*b+c
+ end
+end
+function streams.readcardinal4(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local a,b,c,d=byte(f[1],i,j)
+ return 0x1000000*a+0x10000*b+0x100*c+d
+end
+function streams.readcardinal4le(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local d,c,b,a=byte(f[1],i,j)
+ return 0x1000000*a+0x10000*b+0x100*c+d
+end
+function streams.readinteger4(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local a,b,c,d=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x1000000*a+0x10000*b+0x100*c+d-0x100000000
+ else
+ return 0x1000000*a+0x10000*b+0x100*c+d
+ end
+end
+function streams.readinteger4le(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local d,c,b,a=byte(f[1],i,j)
+ if a>=0x80 then
+ return 0x1000000*a+0x10000*b+0x100*c+d-0x100000000
+ else
+ return 0x1000000*a+0x10000*b+0x100*c+d
+ end
+end
+function streams.readfixed2(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local n1,n2=byte(f[1],i,j)
+ if n1>=0x80 then
+ n1=n1-0x100
+ end
+ return n1+n2/0xFF
+end
+function streams.readfixed4(f)
+ local i=f[2]
+ local j=i+3
+ f[2]=j+1
+ local a,b,c,d=byte(f[1],i,j)
+ local n1=0x100*a+b
+ local n2=0x100*c+d
+ if n1>=0x8000 then
+ n1=n1-0x10000
+ end
+ return n1+n2/0xFFFF
+end
+if bit32 then
+ local extract=bit32.extract
+ local band=bit32.band
+ function streams.read2dot14(f)
+ local i=f[2]
+ local j=i+1
+ f[2]=j+1
+ local a,b=byte(f[1],i,j)
+ if a>=0x80 then
+ local n=-(0x100*a+b)
+ return-(extract(n,14,2)+(band(n,0x3FFF)/16384.0))
+ else
+ local n=0x100*a+b
+ return (extract(n,14,2)+(band(n,0x3FFF)/16384.0))
+ end
+ end
+end
+function streams.skipshort(f,n)
+ f[2]=f[2]+2*(n or 1)
+end
+function streams.skiplong(f,n)
+ f[2]=f[2]+4*(n or 1)
+end
+if sio and sio.readcardinal2 then
+ local readcardinal1=sio.readcardinal1
+ local readcardinal2=sio.readcardinal2
+ local readcardinal3=sio.readcardinal3
+ local readcardinal4=sio.readcardinal4
+ local readinteger1=sio.readinteger1
+ local readinteger2=sio.readinteger2
+ local readinteger3=sio.readinteger3
+ local readinteger4=sio.readinteger4
+ local readfixed2=sio.readfixed2
+ local readfixed4=sio.readfixed4
+ local read2dot14=sio.read2dot14
+ local readbytes=sio.readbytes
+ local readbytetable=sio.readbytetable
+ function streams.readcardinal1(f)
+ local i=f[2]
+ f[2]=i+1
+ return readcardinal1(f[1],i)
+ end
+ function streams.readcardinal2(f)
+ local i=f[2]
+ f[2]=i+2
+ return readcardinal2(f[1],i)
+ end
+ function streams.readcardinal3(f)
+ local i=f[2]
+ f[2]=i+3
+ return readcardinal3(f[1],i)
+ end
+ function streams.readcardinal4(f)
+ local i=f[2]
+ f[2]=i+4
+ return readcardinal4(f[1],i)
+ end
+ function streams.readinteger1(f)
+ local i=f[2]
+ f[2]=i+1
+ return readinteger1(f[1],i)
+ end
+ function streams.readinteger2(f)
+ local i=f[2]
+ f[2]=i+2
+ return readinteger2(f[1],i)
+ end
+ function streams.readinteger3(f)
+ local i=f[2]
+ f[2]=i+3
+ return readinteger3(f[1],i)
+ end
+ function streams.readinteger4(f)
+ local i=f[2]
+ f[2]=i+4
+ return readinteger4(f[1],i)
+ end
+ function streams.readfixed2(f)
+ local i=f[2]
+ f[2]=i+2
+ return readfixed2(f[1],i)
+ end
+ function streams.readfixed4(f)
+ local i=f[2]
+ f[2]=i+4
+ return readfixed4(f[1],i)
+ end
+ function streams.read2dot14(f)
+ local i=f[2]
+ f[2]=i+2
+ return read2dot14(f[1],i)
+ end
+ function streams.readbytes(f,n)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ return readbytes(f[1],i,n)
+ end
+ function streams.readbytetable(f,n)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ return readbytetable(f[1],i,n)
+ end
+ streams.readbyte=streams.readcardinal1
+ streams.readsignedbyte=streams.readinteger1
+ streams.readcardinal=streams.readcardinal1
+ streams.readinteger=streams.readinteger1
+end
+if sio and sio.readcardinaltable then
+ local readcardinaltable=sio.readcardinaltable
+ local readintegertable=sio.readintegertable
+ function utilities.streams.readcardinaltable(f,n,b)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n*b
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ return readcardinaltable(f[1],i,n,b)
+ end
+ function utilities.streams.readintegertable(f,n,b)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n*b
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ return readintegertable(f[1],i,n,b)
+ end
+else
+ local readcardinal1=streams.readcardinal1
+ local readcardinal2=streams.readcardinal2
+ local readcardinal3=streams.readcardinal3
+ local readcardinal4=streams.readcardinal4
+ function streams.readcardinaltable(f,n,b)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n*b
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ local t={}
+ if b==1 then for i=1,n do t[i]=readcardinal1(f[1],i) end
+ elseif b==2 then for i=1,n do t[i]=readcardinal2(f[1],i) end
+ elseif b==3 then for i=1,n do t[i]=readcardinal3(f[1],i) end
+ elseif b==4 then for i=1,n do t[i]=readcardinal4(f[1],i) end end
+ return t
+ end
+ local readinteger1=streams.readinteger1
+ local readinteger2=streams.readinteger2
+ local readinteger3=streams.readinteger3
+ local readinteger4=streams.readinteger4
+ function streams.readintegertable(f,n,b)
+ local i=f[2]
+ local s=f[3]
+ local p=i+n*b
+ if p>s then
+ f[2]=s+1
+ else
+ f[2]=p
+ end
+ local t={}
+ if b==1 then for i=1,n do t[i]=readinteger1(f[1],i) end
+ elseif b==2 then for i=1,n do t[i]=readinteger2(f[1],i) end
+ elseif b==3 then for i=1,n do t[i]=readinteger3(f[1],i) end
+ elseif b==4 then for i=1,n do t[i]=readinteger4(f[1],i) end end
+ return t
+ end
+end
+do
+ local files=utilities.files
+ if files then
+ local openfile=files.open
+ local openstream=streams.open
+ local openstring=streams.openstring
+ local setmetatable=setmetatable
+ function io.newreader(str,method)
+ local f,m
+ if method=="string" then
+ f=openstring(str,true)
+ m=streams
+ elseif method=="stream" then
+ f=openstream(str,true)
+ m=streams
+ else
+ f=openfile(str,"rb")
+ m=files
+ end
+ if f then
+ local t={}
+ setmetatable(t,{
+ __index=function(t,k)
+ local r=m[k]
+ if k=="close" then
+ if f then
+ m.close(f)
+ f=nil
+ end
+ return function() end
+ elseif r then
+ local v=function(_,a,b) return r(f,a,b) end
+ t[k]=v
+ return v
+ else
+ print("unknown key",k)
+ end
+ end
+ } )
+ return t
+ end
+ end
+ end
+end
+if bit32 and not streams.tocardinal1 then
+ local extract=bit32.extract
+ local char=string.char
+ streams.tocardinal1=char
+ function streams.tocardinal2(n) return char(extract(8,8),extract(0,8)) end
+ function streams.tocardinal3(n) return char(extract(16,8),extract(8,8),extract(0,8)) end
+ function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+ streams.tocardinal1le=char
+ function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
+ function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
+ function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+end
+if not streams.readcstring then
+ local readchar=streams.readchar
+ local concat=table.concat
+ function streams.readcstring(f)
+ local t={}
+ while true do
+ local c=readchar(f)
+ if c and c~="\0" then
+ t[#t+1]=c
+ else
+ return concat(t)
+ end
+ end
+ end
+end
+
+end -- closure
do -- begin closure to overcome local limits and interference
@@ -14,12 +519,13 @@ if not modules then modules={} end modules ['util-str']={
utilities=utilities or {}
utilities.strings=utilities.strings or {}
local strings=utilities.strings
-local format,gsub,rep,sub,find=string.format,string.gsub,string.rep,string.sub,string.find
+local format,gsub,rep,sub,find,char=string.format,string.gsub,string.rep,string.sub,string.find,string.char
local load,dump=load,string.dump
local tonumber,type,tostring,next,setmetatable=tonumber,type,tostring,next,setmetatable
local unpack,concat=table.unpack,table.concat
local P,V,C,S,R,Ct,Cs,Cp,Carg,Cc=lpeg.P,lpeg.V,lpeg.C,lpeg.S,lpeg.R,lpeg.Ct,lpeg.Cs,lpeg.Cp,lpeg.Carg,lpeg.Cc
local patterns,lpegmatch=lpeg.patterns,lpeg.match
+local tsplitat=lpeg.tsplitat
local utfchar,utfbyte,utflen=utf.char,utf.byte,utf.len
local loadstripped=function(str,shortcuts)
if shortcuts then
@@ -373,6 +879,14 @@ patterns.escapedquotes=pattern
function string.escapedquotes(s)
return lpegmatch(pattern,s)
end
+local pattern=(1-P("\\"))^1;pattern=Cs (
+ pattern*((P("\\")/""*(digit^-3/function(s) return char(tonumber(s)) end))+pattern )^1
+)
+patterns.unescapedquotes=pattern
+function string.unescapedquotes(s)
+ return lpegmatch(pattern,s) or s
+end
+string.texnewlines=lpeg.replacer(patterns.newline,"\r",true)
local preamble=""
local environment={
global=global or _G,
@@ -908,7 +1422,6 @@ function number.to16dot16(n)
return f_16_16(n/65536.0)
end
if not string.explode then
- local tsplitat=lpeg.tsplitat
local p_utf=patterns.utf8character
local p_check=C(p_utf)*(P("+")*Cc(true))^0
local p_split=Ct(C(p_utf)^0)
@@ -928,6 +1441,20 @@ if not string.explode then
end
end
end
+do
+ local p_whitespace=patterns.whitespace^1
+ local cache=setmetatable({},{ __index=function(t,k)
+ local p=tsplitat(p_whitespace*P(k)*p_whitespace)
+ local v=function(s)
+ return lpegmatch(p,s)
+ end
+ t[k]=v
+ return v
+ end })
+ function string.wordsplitter(s)
+ return cache[s]
+ end
+end
end -- closure
@@ -1552,9 +2079,6 @@ if JITSUPPORTED then
return concat(fastserialize(t,true))
end
else
- local f_v=formatters["[%q]=%q,"]
- local f_t=formatters["[%q]="]
- local f_q=formatters["%q,"]
function table.fastserialize(t,prefix)
local r={ type(prefix)=="string" and prefix or "return" }
local m=1
@@ -1963,6 +2487,21 @@ function table.ordered(t)
return function() end
end
end
+function combine(target,source)
+ if target then
+ for k,v in next,source do
+ if type(v)=="table" then
+ target[k]=combine(target[k],source[k])
+ else
+ target[k]=v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+table.combine=combine
end -- closure
@@ -2181,8 +2720,8 @@ local noparent=1-(lparent+rparent)
local nobracket=1-(lbracket+rbracket)
local escape,left,right=P("\\"),P('{'),P('}')
lpegpatterns.balanced=P {
- [1]=((escape*(left+right))+(1-(left+right))+V(2))^0,
- [2]=left*V(1)*right
+ ((escape*(left+right))+(1-(left+right))+V(2))^0,
+ left*V(1)*right
}
local nestedbraces=P { lbrace*(nobrace+V(1))^0*rbrace }
local nestedparents=P { lparent*(noparent+V(1))^0*rparent }
@@ -2190,11 +2729,12 @@ local nestedbrackets=P { lbracket*(nobracket+V(1))^0*rbracket }
local spaces=space^0
local argument=Cs((lbrace/"")*((nobrace+nestedbraces)^0)*(rbrace/""))
local content=(1-endofstring)^0
-lpegpatterns.nestedbraces=nestedbraces
-lpegpatterns.nestedparents=nestedparents
-lpegpatterns.nested=nestedbraces
-lpegpatterns.argument=argument
-lpegpatterns.content=content
+lpegpatterns.nestedbraces=nestedbraces
+lpegpatterns.nestedparents=nestedparents
+lpegpatterns.nestedbrackets=nestedbrackets
+lpegpatterns.nested=nestedbraces
+lpegpatterns.argument=argument
+lpegpatterns.content=content
local value=lbrace*C((nobrace+nestedbraces)^0)*rbrace+C((nestedbraces+(1-comma))^0)
local key=C((1-equal-comma)^1)
local pattern_a=(space+comma)^0*(key*equal*value+key*C(""))
@@ -2600,15 +3140,24 @@ local function ranger(first,last,n,action)
action(first)
end
end
-local cardinal=lpegpatterns.cardinal/tonumber
+local cardinal=(lpegpatterns.hexadecimal+lpegpatterns.cardinal)/tonumber
local spacers=lpegpatterns.spacer^0
local endofstring=lpegpatterns.endofstring
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1
local stepper=spacers*(cardinal*(spacers*S(":-")*spacers*(cardinal+(P("*")+endofstring)*Cc(true) )+Cc(false) )*Carg(1)*Carg(2)/ranger*S(", ")^0 )^1*endofstring
function parsers.stepper(str,n,action)
+ local ts=type(str)
if type(n)=="function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts=="number" then
+ n(str)
+ elseif ts=="table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts=="string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
@@ -2626,7 +3175,7 @@ local cache={}
local spaces=lpegpatterns.space^0
local dummy=function() end
setmetatableindex(cache,function(t,k)
- local separator=P(k)
+ local separator=S(k)
local value=(1-separator)^0
local pattern=spaces*C(value)*separator^0*Cp()
t[k]=pattern
@@ -2706,8 +3255,11 @@ local p_year=lpegpatterns.digit^4/tonumber
local pattern=Cf(Ct("")*(
(Cg(Cc("year")*p_year)*S("-/")*Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("day")*cardinal)
)+(Cg(Cc("day")*cardinal)*S("-/")*Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("year")*p_year)
+ )+(Cg(Cc("year")*p_year)*S("-/")*Cg(Cc("month")*cardinal)
+ )+(Cg(Cc("month")*cardinal)*S("-/")*Cg(Cc("year")*p_year)
)
- )*P(" ")*Cg(Cc("hour")*cardinal)*P(":")*Cg(Cc("min")*cardinal)*(P(":")*Cg(Cc("sec")*cardinal))^-1
+ )*(
+ P(" ")*Cg(Cc("hour")*cardinal)*P(":")*Cg(Cc("min")*cardinal)*(P(":")*Cg(Cc("sec")*cardinal))^-1+P(-1) )
,rawset)
lpegpatterns.splittime=pattern
function parsers.totime(str)
@@ -2914,6 +3466,9 @@ if not modules then modules={} end modules ['util-jsn']={
copyright="PRAGMA ADE / ConTeXt Development Team",
license="see context related readme files"
}
+if utilities and utilities.json then
+ return json
+end
local P,V,R,S,C,Cc,Cs,Ct,Cf,Cg=lpeg.P,lpeg.V,lpeg.R,lpeg.S,lpeg.C,lpeg.Cc,lpeg.Cs,lpeg.Ct,lpeg.Cf,lpeg.Cg
local lpegmatch=lpeg.match
local format,gsub=string.format,string.gsub
@@ -3118,6 +3673,8 @@ do
k=lpegmatch(escaper,k) or k
v=lpegmatch(escaper,v) or v
n=n+1 t[n]=f_key_val_str(depth,k,v)
+ elseif i>1 then
+ n=n-1
end
elseif tv=="table" then
local l=#v
@@ -3133,6 +3690,8 @@ do
end
elseif next(v) then
tojsonpp(v,k,depth,level+1,0)
+ elseif i>1 then
+ n=n-1
end
elseif tv=="boolean" then
if tk=="number" then
@@ -3150,6 +3709,8 @@ do
else
t[n]=f_key_val_nop(depth,k)
end
+ elseif i>1 then
+ n=n-1
end
else
if tk=="number" then
@@ -3159,6 +3720,8 @@ do
k=lpegmatch(escaper,k) or k
n=n+1
t[n]=f_key_val_null(depth,k)
+ elseif i>1 then
+ n=n-1
end
end
end
@@ -3260,7 +3823,6 @@ do
return jsontostring(value,true)
end
end
-return json
end -- closure
@@ -3990,6 +4552,22 @@ local function showtraceback(rep)
end
end
debugger.showtraceback=showtraceback
+if luac then
+ local show,dump=luac.print,string.dump
+ function luac.inspect(v)
+ if type(v)=="function" then
+ local ok,str=xpcall(dump,function() end,v)
+ if ok then
+ v=str
+ end
+ end
+ if type(v)=="string" then
+ show(v,true)
+ else
+ print(v)
+ end
+ end
+end
end -- closure
@@ -4379,3 +4957,560 @@ function stacker.new(name)
end
end -- closure
+
+do -- begin closure to overcome local limits and interference
+
+if not modules then modules={} end modules ['util-zip']={
+ version=1.001,
+ author="Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright="PRAGMA ADE / ConTeXt Development Team",
+ license="see context related readme files"
+}
+local type,tostring,tonumber=type,tostring,tonumber
+local sort,concat=table.sort,table.concat
+local find,format,sub,gsub=string.find,string.format,string.sub,string.gsub
+local osdate,ostime,osclock=os.date,os.time,os.clock
+local ioopen=io.open
+local loaddata,savedata=io.loaddata,io.savedata
+local filejoin,isdir,dirname,mkdirs=file.join,lfs.isdir,file.dirname,dir.mkdirs
+local suffix,suffixes=file.suffix,file.suffixes
+local openfile=io.open
+gzip=gzip or {}
+if not zlib then
+ zlib=xzip
+elseif not xzip then
+ xzip=zlib
+end
+local files=utilities.files
+local openfile=files.open
+local closefile=files.close
+local readstring=files.readstring
+local readcardinal2=files.readcardinal2le
+local readcardinal4=files.readcardinal4le
+local setposition=files.setposition
+local getposition=files.getposition
+local band=bit32.band
+local rshift=bit32.rshift
+local lshift=bit32.lshift
+local zlibdecompress=zlib.decompress
+local zlibdecompresssize=zlib.decompresssize
+local zlibchecksum=zlib.crc32
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE==0 then
+ local cs=zlibchecksum
+ zlibchecksum=function(str,n) return cs(n or 0,str) end
+end
+local decompress=function(source) return zlibdecompress (source,-15) end
+local decompresssize=function(source,targetsize) return zlibdecompresssize(source,targetsize,-15) end
+local calculatecrc=function(buffer,initial) return zlibchecksum (initial or 0,buffer) end
+local zipfiles={}
+utilities.zipfiles=zipfiles
+local openzipfile,closezipfile,unzipfile,foundzipfile,getziphash,getziplist do
+ function openzipfile(name)
+ return {
+ name=name,
+ handle=openfile(name,0),
+ }
+ end
+ local function collect(z)
+ if not z.list then
+ local list={}
+ local hash={}
+ local position=0
+ local index=0
+ local handle=z.handle
+ while true do
+ setposition(handle,position)
+ local signature=readstring(handle,4)
+ if signature=="PK\3\4" then
+ local version=readcardinal2(handle)
+ local flag=readcardinal2(handle)
+ local method=readcardinal2(handle)
+ local filetime=readcardinal2(handle)
+ local filedate=readcardinal2(handle)
+ local crc32=readcardinal4(handle)
+ local compressed=readcardinal4(handle)
+ local uncompressed=readcardinal4(handle)
+ local namelength=readcardinal2(handle)
+ local extralength=readcardinal2(handle)
+ local filename=readstring(handle,namelength)
+ local descriptor=band(flag,8)~=0
+ local encrypted=band(flag,1)~=0
+ local acceptable=method==0 or method==8
+ local skipped=0
+ local size=0
+ if encrypted then
+ size=readcardinal2(handle)
+ skipbytes(size)
+ skipped=skipped+size+2
+ skipbytes(8)
+ skipped=skipped+8
+ size=readcardinal2(handle)
+ skipbytes(size)
+ skipped=skipped+size+2
+ size=readcardinal4(handle)
+ skipbytes(size)
+ skipped=skipped+size+4
+ size=readcardinal2(handle)
+ skipbytes(size)
+ skipped=skipped+size+2
+ end
+ position=position+30+namelength+extralength+skipped
+ if descriptor then
+ setposition(handle,position+compressed)
+ crc32=readcardinal4(handle)
+ compressed=readcardinal4(handle)
+ uncompressed=readcardinal4(handle)
+ end
+ if acceptable then
+ index=index+1
+ local data={
+ filename=filename,
+ index=index,
+ position=position,
+ method=method,
+ compressed=compressed,
+ uncompressed=uncompressed,
+ crc32=crc32,
+ encrypted=encrypted,
+ }
+ hash[filename]=data
+ list[index]=data
+ else
+ end
+ position=position+compressed
+ else
+ break
+ end
+ z.list=list
+ z.hash=hash
+ end
+ end
+ end
+ function getziplist(z)
+ local list=z.list
+ if not list then
+ collect(z)
+ end
+ return z.list
+ end
+ function getziphash(z)
+ local hash=z.hash
+ if not hash then
+ collect(z)
+ end
+ return z.hash
+ end
+ function foundzipfile(z,name)
+ return getziphash(z)[name]
+ end
+ function closezipfile(z)
+ local f=z.handle
+ if f then
+ closefile(f)
+ z.handle=nil
+ end
+ end
+ function unzipfile(z,filename,check)
+ local hash=z.hash
+ if not hash then
+ hash=zipfiles.hash(z)
+ end
+ local data=hash[filename]
+ if not data then
+ end
+ if data then
+ local handle=z.handle
+ local position=data.position
+ local compressed=data.compressed
+ if compressed>0 then
+ setposition(handle,position)
+ local result=readstring(handle,compressed)
+ if data.method==8 then
+ if decompresssize then
+ result=decompresssize(result,data.uncompressed)
+ else
+ result=decompress(result)
+ end
+ end
+ if check and data.crc32~=calculatecrc(result) then
+ print("checksum mismatch")
+ return ""
+ end
+ return result
+ else
+ return ""
+ end
+ end
+ end
+ zipfiles.open=openzipfile
+ zipfiles.close=closezipfile
+ zipfiles.unzip=unzipfile
+ zipfiles.hash=getziphash
+ zipfiles.list=getziplist
+ zipfiles.found=foundzipfile
+end
+if xzip then
+ local writecardinal1=files.writebyte
+ local writecardinal2=files.writecardinal2le
+ local writecardinal4=files.writecardinal4le
+ local logwriter=logs.writer
+ local globpattern=dir.globpattern
+ local compress=xzip.compress
+ local checksum=xzip.crc32
+ local function fromdostime(dostime,dosdate)
+ return ostime {
+ year=rshift(dosdate,9)+1980,
+ month=band(rshift(dosdate,5),0x0F),
+ day=band((dosdate ),0x1F),
+ hour=band(rshift(dostime,11) ),
+ min=band(rshift(dostime,5),0x3F),
+ sec=band((dostime ),0x1F),
+ }
+ end
+ local function todostime(time)
+ local t=osdate("*t",time)
+ return
+ lshift(t.year-1980,9)+lshift(t.month,5)+t.day,
+ lshift(t.hour,11)+lshift(t.min,5)+rshift(t.sec,1)
+ end
+ local function openzip(filename,level,comment,verbose)
+ local f=ioopen(filename,"wb")
+ if f then
+ return {
+ filename=filename,
+ handle=f,
+ list={},
+ level=tonumber(level) or 3,
+ comment=tostring(comment),
+ verbose=verbose,
+ uncompressed=0,
+ compressed=0,
+ }
+ end
+ end
+ local function writezip(z,name,data,level,time)
+ local f=z.handle
+ local list=z.list
+ local level=tonumber(level) or z.level or 3
+ local method=8
+ local zipped=compress(data,level)
+ local checksum=checksum(data)
+ local verbose=z.verbose
+ if not zipped then
+ method=0
+ zipped=data
+ end
+ local start=f:seek()
+ local compressed=#zipped
+ local uncompressed=#data
+ z.compressed=z.compressed+compressed
+ z.uncompressed=z.uncompressed+uncompressed
+ if verbose then
+ local pct=100*compressed/uncompressed
+ if pct>=100 then
+ logwriter(format("%10i %s",uncompressed,name))
+ else
+ logwriter(format("%10i %02.1f %s",uncompressed,pct,name))
+ end
+ end
+ f:write("\x50\x4b\x03\x04")
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,method)
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal4(f,checksum)
+ writecardinal4(f,compressed)
+ writecardinal4(f,uncompressed)
+ writecardinal2(f,#name)
+ writecardinal2(f,0)
+ f:write(name)
+ f:write(zipped)
+ list[#list+1]={ #zipped,#data,name,checksum,start,time or 0 }
+ end
+ local function closezip(z)
+ local f=z.handle
+ local list=z.list
+ local comment=z.comment
+ local verbose=z.verbose
+ local count=#list
+ local start=f:seek()
+ for i=1,count do
+ local l=list[i]
+ local compressed=l[1]
+ local uncompressed=l[2]
+ local name=l[3]
+ local checksum=l[4]
+ local start=l[5]
+ local time=l[6]
+ local date,time=todostime(time)
+ f:write('\x50\x4b\x01\x02')
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,8)
+ writecardinal2(f,time)
+ writecardinal2(f,date)
+ writecardinal4(f,checksum)
+ writecardinal4(f,compressed)
+ writecardinal4(f,uncompressed)
+ writecardinal2(f,#name)
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal4(f,0)
+ writecardinal4(f,start)
+ f:write(name)
+ end
+ local stop=f:seek()
+ local size=stop-start
+ f:write('\x50\x4b\x05\x06')
+ writecardinal2(f,0)
+ writecardinal2(f,0)
+ writecardinal2(f,count)
+ writecardinal2(f,count)
+ writecardinal4(f,size)
+ writecardinal4(f,start)
+ if type(comment)=="string" and comment~="" then
+ writecardinal2(f,#comment)
+ f:write(comment)
+ else
+ writecardinal2(f,0)
+ end
+ if verbose then
+ local compressed=z.compressed
+ local uncompressed=z.uncompressed
+ local filename=z.filename
+ local pct=100*compressed/uncompressed
+ logwriter("")
+ if pct>=100 then
+ logwriter(format("%10i %s",uncompressed,filename))
+ else
+ logwriter(format("%10i %02.1f %s",uncompressed,pct,filename))
+ end
+ end
+ f:close()
+ end
+ local function zipdir(zipname,path,level,verbose)
+ if type(zipname)=="table" then
+ verbose=zipname.verbose
+ level=zipname.level
+ path=zipname.path
+ zipname=zipname.zipname
+ end
+ if not zipname or zipname=="" then
+ return
+ end
+ if not path or path=="" then
+ path="."
+ end
+ if not isdir(path) then
+ return
+ end
+ path=gsub(path,"\\+","/")
+ path=gsub(path,"/+","/")
+ local list={}
+ local count=0
+ globpattern(path,"",true,function(name,size,time)
+ count=count+1
+ list[count]={ name,time }
+ end)
+ sort(list,function(a,b)
+ return a[1]<b[1]
+ end)
+ local zipf=openzip(zipname,level,comment,verbose)
+ if zipf then
+ local p=#path+2
+ for i=1,count do
+ local li=list[i]
+ local name=li[1]
+ local time=li[2]
+ local data=loaddata(name)
+ local name=sub(name,p,#name)
+ writezip(zipf,name,data,level,time,verbose)
+ end
+ closezip(zipf)
+ end
+ end
+ local function unzipdir(zipname,path,verbose)
+ if type(zipname)=="table" then
+ verbose=zipname.verbose
+ path=zipname.path
+ zipname=zipname.zipname
+ end
+ if not zipname or zipname=="" then
+ return
+ end
+ if not path or path=="" then
+ path="."
+ end
+ local z=openzipfile(zipname)
+ if z then
+ local list=getziplist(z)
+ if list then
+ local total=0
+ local count=#list
+ local step=number.idiv(count,10)
+ local done=0
+ local steps=verbose=="steps"
+ local time=steps and osclock()
+ for i=1,count do
+ local l=list[i]
+ local n=l.filename
+ local d=unzipfile(z,n)
+ if d then
+ local p=filejoin(path,n)
+ if mkdirs(dirname(p)) then
+ if steps then
+ total=total+#d
+ done=done+1
+ if done>=step then
+ done=0
+ logwriter(format("%4i files of %4i done, %10i bytes, %0.3f seconds",i,count,total,osclock()-time))
+ end
+ elseif verbose then
+ logwriter(n)
+ end
+ savedata(p,d)
+ end
+ else
+ logwriter(format("problem with file %s",n))
+ end
+ end
+ if steps then
+ logwriter(format("%4i files of %4i done, %10i bytes, %0.3f seconds",count,count,total,osclock()-time))
+ end
+ closezipfile(z)
+ return true
+ else
+ closezipfile(z)
+ end
+ end
+ end
+ zipfiles.zipdir=zipdir
+ zipfiles.unzipdir=unzipdir
+end
+local pattern="^\x1F\x8B\x08"
+local gziplevel=3
+function gzip.suffix(filename)
+ local suffix,extra=suffixes(filename)
+ local gzipped=extra=="gz"
+ return suffix,gzipped
+end
+function gzip.compressed(s)
+ return s and find(s,pattern)
+end
+local getdecompressed
+local putcompressed
+if gzip.compress then
+ local gzipwindow=15+16
+ local compress=zlib.compress
+ local decompress=zlib.decompress
+ getdecompressed=function(str)
+ return decompress(str,gzipwindow)
+ end
+ putcompressed=function(str,level)
+ return compress(str,level or gziplevel,nil,gzipwindow)
+ end
+else
+ local gzipwindow=-15
+ local identifier="\x1F\x8B"
+ local compress=zlib.compress
+ local decompress=zlib.decompress
+ local zlibchecksum=zlib.crc32
+ if not CONTEXTLMTXMODE or CONTEXTLMTXMODE==0 then
+ local cs=zlibchecksum
+ zlibchecksum=function(str,n) return cs(n or 0,str) end
+ end
+ local streams=utilities.streams
+ local openstream=streams.openstring
+ local closestream=streams.close
+ local getposition=streams.getposition
+ local readbyte=streams.readbyte
+ local readcardinal4=streams.readcardinal4le
+ local readcardinal2=streams.readcardinal2le
+ local readstring=streams.readstring
+ local readcstring=streams.readcstring
+ local skipbytes=streams.skip
+ local tocardinal1=streams.tocardinal1
+ local tocardinal4=streams.tocardinal4le
+ getdecompressed=function(str)
+ local s=openstream(str)
+ local identifier=readstring(s,2)
+ local method=readbyte(s,1)
+ local flags=readbyte(s,1)
+ local timestamp=readcardinal4(s)
+ local compression=readbyte(s,1)
+ local operating=readbyte(s,1)
+ local isjusttext=band(flags,0x01)~=0 and true or false
+ local extrasize=band(flags,0x04)~=0 and readcardinal2(s) or 0
+ local filename=band(flags,0x08)~=0 and readcstring(s) or ""
+ local comment=band(flags,0x10)~=0 and readcstring(s) or ""
+ local checksum=band(flags,0x02)~=0 and readcardinal2(s) or 0
+ local compressed=readstring(s,#str)
+ local data=decompress(compressed,gzipwindow)
+ return data
+ end
+ putcompressed=function(str,level,originalname)
+ return concat {
+ identifier,
+ tocardinal1(0x08),
+ tocardinal1(0x08),
+ tocardinal4(os.time()),
+ tocardinal1(0x02),
+ tocardinal1(0xFF),
+ (originalname or "unknownname").."\0",
+ compress(str,level,nil,gzipwindow),
+ tocardinal4(zlibchecksum(str)),
+ tocardinal4(#str),
+ }
+ end
+end
+function gzip.load(filename)
+ local f=openfile(filename,"rb")
+ if not f then
+ else
+ local data=f:read("*all")
+ f:close()
+ if data and data~="" then
+ if suffix(filename)=="gz" then
+ data=getdecompressed(data)
+ end
+ return data
+ end
+ end
+end
+function gzip.save(filename,data,level,originalname)
+ if suffix(filename)~="gz" then
+ filename=filename..".gz"
+ end
+ local f=openfile(filename,"wb")
+ if f then
+ data=putcompressed(data or "",level or gziplevel,originalname)
+ f:write(data)
+ f:close()
+ return #data
+ end
+end
+function gzip.compress(s,level)
+ if s and not find(s,pattern) then
+ if not level then
+ level=gziplevel
+ elseif level<=0 then
+ return s
+ elseif level>9 then
+ level=9
+ end
+ return putcompressed(s,level or gziplevel) or s
+ end
+end
+function gzip.decompress(s)
+ if s and find(s,pattern) then
+ return getdecompressed(s)
+ else
+ return s
+ end
+end
+
+end -- closure
diff --git a/macros/luatex/generic/lualibs/lualibs-file.lua b/macros/luatex/generic/lualibs/lualibs-file.lua
index d0af94f09d..9f8fd65483 100644
--- a/macros/luatex/generic/lualibs/lualibs-file.lua
+++ b/macros/luatex/generic/lualibs/lualibs-file.lua
@@ -456,7 +456,7 @@ function file.join(one, two, three, ...)
if not two then
return one == "" and one or lpegmatch(reslasher,one)
end
- if one == "" then
+ if not one or one == "" then
return lpegmatch(stripper,three and concat({ two, three, ... },"/") or two)
end
if lpegmatch(isnetwork,one) then
diff --git a/macros/luatex/generic/lualibs/lualibs-gzip.lua b/macros/luatex/generic/lualibs/lualibs-gzip.lua
deleted file mode 100644
index f141b5ebbb..0000000000
--- a/macros/luatex/generic/lualibs/lualibs-gzip.lua
+++ /dev/null
@@ -1,180 +0,0 @@
-if not modules then modules = { } end modules ['l-gzip'] = {
- version = 1.001,
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- We only have a few official methods here:
---
--- local decompressed = gzip.load (filename)
--- local resultsize = gzip.save (filename,compresslevel)
--- local compressed = gzip.compress (str,compresslevel)
--- local decompressed = gzip.decompress (str)
--- local iscompressed = gzip.compressed (str)
--- local suffix, okay = gzip.suffix (filename)
---
--- In LuaMetaTeX we have only xzip which implements a very few methods:
---
--- compress (str,level,method,window,memory,strategy)
--- decompress (str,window)
--- adler32 (str,checksum)
--- crc32 (str,checksum)
---
--- Special window values are:
---
--- flate : - 15
--- zlib : 15
--- gzip : 15 | 16
--- auto : 15 | 32
-
-gzip = gzip or { } -- so in luatex we keep the old ones too
-
-if not zlib then
- zlib = xzip -- in luametatex we shadow the old one
-elseif not xzip then
- xzip = zlib
-end
-
-if zlib then
-
- local suffix = file.suffix
- local suffixes = file.suffixes
- local find = string.find
- local openfile = io.open
-
- local gzipwindow = 15 + 16 -- +16: gzip, +32: gzip|zlib
- local gziplevel = 3
- local identifier = "^\x1F\x8B\x08"
-
- local compress = zlib.compress
- local decompress = zlib.decompress
-
- function gzip.load(filename)
- local f = openfile(filename,"rb")
- if not f then
- -- invalid file
- else
- local data = f:read("*all")
- f:close()
- if data and data ~= "" then
- if suffix(filename) == "gz" then
- data = decompress(data,gzipwindow)
- end
- return data
- end
- end
- end
-
- function gzip.save(filename,data,level)
- if suffix(filename) ~= "gz" then
- filename = filename .. ".gz"
- end
- local f = openfile(filename,"wb")
- if f then
- data = compress(data or "",level or gziplevel,nil,gzipwindow)
- f:write(data)
- f:close()
- return #data
- end
- end
-
- function gzip.suffix(filename)
- local suffix, extra = suffixes(filename)
- local gzipped = extra == "gz"
- return suffix, gzipped
- end
-
- function gzip.compressed(s)
- return s and find(s,identifier)
- end
-
- function gzip.compress(s,level)
- if s and not find(s,identifier) then -- the find check might go away
- if not level then
- level = gziplevel
- elseif level <= 0 then
- return s
- elseif level > 9 then
- level = 9
- end
- return compress(s,level or gziplevel,nil,gzipwindow) or s
- end
- end
-
- function gzip.decompress(s)
- if s and find(s,identifier) then
- return decompress(s,gzipwindow)
- else
- return s
- end
- end
-
-end
-
--- In luametatex we can use this one but it doesn't look like there wil be stream
--- support so for now we still use zlib (the performance difference is not that
--- spectacular in our usage.
-
--- if flate then
---
--- local type = type
--- local find = string.find
---
--- local compress = flate.gz_compress
--- local decompress = flate.gz_decompress
---
--- local absmax = 128*1024*1024
--- local initial = 64*1024
--- local identifier = "^\x1F\x8B\x08"
---
--- function gzip.compressed(s)
--- return s and find(s,identifier)
--- end
---
--- function gzip.compress(s,level)
--- if s and not find(s,identifier) then -- the find check might go away
--- if not level then
--- level = 3
--- elseif level <= 0 then
--- return s
--- elseif level > 9 then
--- level = 9
--- end
--- return compress(s,level) or s
--- end
--- end
---
--- function gzip.decompress(s,size,iterate)
--- if s and find(s,identifier) then
--- if type(size) ~= "number" then
--- size = initial
--- end
--- if size > absmax then
--- size = absmax
--- end
--- if type(iterate) == "number" then
--- max = size * iterate
--- elseif iterate == nil or iterate == true then
--- iterate = true
--- max = absmax
--- end
--- if max > absmax then
--- max = absmax
--- end
--- while true do
--- local d = decompress(s,size)
--- if d then
--- return d
--- end
--- size = 2 * size
--- if not iterate or size > max then
--- return false
--- end
--- end
--- else
--- return s
--- end
--- end
---
--- end
diff --git a/macros/luatex/generic/lualibs/lualibs-io.lua b/macros/luatex/generic/lualibs/lualibs-io.lua
index a955262a31..6bf7a97bda 100644
--- a/macros/luatex/generic/lualibs/lualibs-io.lua
+++ b/macros/luatex/generic/lualibs/lualibs-io.lua
@@ -147,9 +147,12 @@ function io.copydata(source,target,action)
end
end
-function io.savedata(filename,data,joiner)
- local f = open(filename,"wb")
+function io.savedata(filename,data,joiner,append)
+ local f = open(filename,append and "ab" or "wb")
if f then
+ if append and joiner and f:seek("end") > 0 then
+ f:write(joiner)
+ end
if type(data) == "table" then
f:write(concat(data,joiner or ""))
elseif type(data) == "function" then
@@ -288,7 +291,8 @@ end
io.noflines = noflines
--- inlined is faster ... beware, better use util-fil
+-- inlined is faster ... beware, better use util-fil so these are obsolete
+-- and will go
local nextchar = {
[ 4] = function(f)
diff --git a/macros/luatex/generic/lualibs/lualibs-lpeg.lua b/macros/luatex/generic/lualibs/lualibs-lpeg.lua
index 50306e4ab6..5f3bea08ca 100644
--- a/macros/luatex/generic/lualibs/lualibs-lpeg.lua
+++ b/macros/luatex/generic/lualibs/lualibs-lpeg.lua
@@ -665,12 +665,12 @@ end
-- lpeg.print(lpeg.P("a","b","c"))
-- lpeg.print(lpeg.S("a","b","c"))
--- print(lpeg.count("äáàa",lpeg.P("á") + lpeg.P("à")))
--- print(lpeg.count("äáàa",lpeg.UP("áà")))
--- print(lpeg.count("äáàa",lpeg.US("àá")))
--- print(lpeg.count("äáàa",lpeg.UR("aá")))
--- print(lpeg.count("äáàa",lpeg.UR("àá")))
--- print(lpeg.count("äáàa",lpeg.UR(0x0000,0xFFFF)))
+-- print(lpeg.counter(lpeg.P("á") + lpeg.P("à"))("äáàa"))
+-- print(lpeg.counter(lpeg.UP("áà"))("äáàa"))
+-- print(lpeg.counter(lpeg.US("àá"))("äáàa"))
+-- print(lpeg.counter(lpeg.UR("aá"))("äáàa"))
+-- print(lpeg.counter(lpeg.UR("àá"))("äáàa"))
+-- print(lpeg.counter(lpeg.UR(0x0000,0xFFFF)))
function lpeg.is_lpeg(p)
return p and lpegtype(p) == "pattern"
diff --git a/macros/luatex/generic/lualibs/lualibs-math.lua b/macros/luatex/generic/lualibs/lualibs-math.lua
index e5668a5db0..6105bc3c2d 100644
--- a/macros/luatex/generic/lualibs/lualibs-math.lua
+++ b/macros/luatex/generic/lualibs/lualibs-math.lua
@@ -14,9 +14,19 @@ end
if not math.round then
- local floor = math.floor
+ if xmath then
+
+ math.round = xmath.round
+
+ else
- function math.round(x) return floor(x + 0.5) end
+ local floor = math.floor
+
+ function math.round(x)
+ return x < 0 and -floor(-x + 0.5) or floor(x + 0.5)
+ end
+
+ end
end
@@ -141,7 +151,7 @@ if not math.ult then
local floor = math.floor
- function math.tointeger(m,n)
+ function math.ult(m,n)
-- not ok but i'm not motivated to look into it now
return floor(m) < floor(n) -- unsigned comparison needed
end
diff --git a/macros/luatex/generic/lualibs/lualibs-os.lua b/macros/luatex/generic/lualibs/lualibs-os.lua
index c7584ccce9..faae76881a 100644
--- a/macros/luatex/generic/lualibs/lualibs-os.lua
+++ b/macros/luatex/generic/lualibs/lualibs-os.lua
@@ -26,22 +26,27 @@ if not modules then modules = { } end modules ['l-os'] = {
-- math.randomseed(tonumber(string.sub(string.reverse(tostring(math.floor(socket.gettime()*10000))),1,6)))
local os = os
-local date, time = os.date, os.time
+local date, time, difftime = os.date, os.time, os.difftime
local find, format, gsub, upper, gmatch = string.find, string.format, string.gsub, string.upper, string.gmatch
local concat = table.concat
-local random, ceil, randomseed = math.random, math.ceil, math.randomseed
+local random, ceil, randomseed, modf = math.random, math.ceil, math.randomseed, math.modf
local type, setmetatable, tonumber, tostring = type, setmetatable, tonumber, tostring
-- This check needs to happen real early on. Todo: we can pick it up from the commandline
-- if we pass --binpath= (which is useful anyway)
do
+
local selfdir = os.selfdir
+
if selfdir == "" then
selfdir = nil
end
+
if not selfdir then
+
-- We need a fallback plan so let's see what we get.
+
if arg then
-- passed by mtx-context ... saves network access
for i=1,#arg do
@@ -52,6 +57,7 @@ do
end
end
end
+
if not selfdir then
selfdir = os.selfbin or "luatex"
if find(selfdir,"[/\\]") then
@@ -92,11 +98,16 @@ do
end
end
end
+
-- let's hope we're okay now
+
os.selfdir = selfdir or "."
+
end
+
+ -- print(os.selfdir) os.exit()
+
end
--- print(os.selfdir) os.exit()
-- The following code permits traversing the environment table, at least in luatex. Internally all
-- environment names are uppercase.
@@ -157,7 +168,7 @@ if not os.__getenv__ then
end
function os.getenv(k)
- local K = upper(k)
+ local K = upper(k) -- hm utf
local v = osenv[K] or osgetenv(K) or osgetenv(k)
if v == "" then
return nil
@@ -183,32 +194,14 @@ end
-- end of environment hack
-local execute = os.execute
-local iopopen = io.popen
-
-local function resultof(command)
- local handle = iopopen(command,"r") -- already has flush
- if handle then
- local result = handle:read("*all") or ""
- handle:close()
- return result
- else
- return ""
- end
-end
-
-os.resultof = resultof
-
-function os.pipeto(command)
- return iopopen(command,"w") -- already has flush
-end
-
if not io.fileseparator then
+
if find(os.getenv("PATH"),";",1,true) then
io.fileseparator, io.pathseparator, os.type = "\\", ";", os.type or "windows"
else
io.fileseparator, io.pathseparator, os.type = "/" , ":", os.type or "unix"
end
+
end
os.type = os.type or (io.pathseparator == ";" and "windows") or "unix"
@@ -220,351 +213,370 @@ else
os.libsuffix, os.binsuffix, os.binsuffixes = 'so', '', { '' }
end
-local launchers = {
- windows = "start %s",
- macosx = "open %s",
- unix = "xdg-open %s &> /dev/null &",
-}
+do
-function os.launch(str)
- local command = format(launchers[os.name] or launchers.unix,str)
- -- todo: pcall
--- print(command)
- execute(command)
-end
+ local execute = os.execute
+ local iopopen = io.popen
+ local ostype = os.type
+
+ local function resultof(command)
+ -- already has flush, b is new and we need it to pipe xz output
+ local handle = iopopen(command,ostype == "windows" and "rb" or "r")
+ if handle then
+ local result = handle:read("*all") or ""
+ handle:close()
+ return result
+ else
+ return ""
+ end
+ end
-local gettimeofday = os.gettimeofday or os.clock
-os.gettimeofday = gettimeofday
+ os.resultof = resultof
-local startuptime = gettimeofday()
+ function os.pipeto(command)
+ return iopopen(command,"w") -- already has flush
+ end
-function os.runtime()
- return gettimeofday() - startuptime
-end
+ local launchers = {
+ windows = "start %s",
+ macosx = "open %s",
+ unix = "xdg-open %s &> /dev/null &",
+ }
+
+ function os.launch(str)
+ local command = format(launchers[os.name] or launchers.unix,str)
+ -- todo: pcall
+ -- print(command)
+ execute(command)
+ end
--- print(os.gettimeofday()-os.time())
--- os.sleep(1.234)
--- print (">>",os.runtime())
--- print(os.date("%H:%M:%S",os.gettimeofday()))
--- print(os.date("%H:%M:%S",os.time()))
+end
--- no need for function anymore as we have more clever code and helpers now
--- this metatable trickery might as well disappear
+do
-local resolvers = os.resolvers or { }
-os.resolvers = resolvers
+ local gettimeofday = os.gettimeofday or os.clock
+ os.gettimeofday = gettimeofday
-setmetatable(os, { __index = function(t,k)
- local r = resolvers[k]
- return r and r(t,k) or nil -- no memoize
-end })
+ local startuptime = gettimeofday()
--- we can use HOSTTYPE on some platforms
+ function os.runtime()
+ return gettimeofday() - startuptime
+ end
-local name, platform = os.name or "linux", os.getenv("MTX_PLATFORM") or ""
+ -- print(os.gettimeofday()-os.time())
+ -- os.sleep(1.234)
+ -- print (">>",os.runtime())
+ -- print(os.date("%H:%M:%S",os.gettimeofday()))
+ -- print(os.date("%H:%M:%S",os.time()))
--- local function guess()
--- local architecture = resultof("uname -m") or ""
--- if architecture ~= "" then
--- return architecture
--- end
--- architecture = os.getenv("HOSTTYPE") or ""
--- if architecture ~= "" then
--- return architecture
--- end
--- return resultof("echo $HOSTTYPE") or ""
--- end
+end
+-- We can use HOSTTYPE on some platforms (but not consistently on e.g. Linux).
+--
-- os.bits = 32 | 64
+--
+-- os.uname() : return {
+-- machine = "x86_64",
+-- nodename = "MYLAPTOP",
+-- release = "build 9200",
+-- sysname = "Windows",
+-- version = "6.02",
+-- }
--- os.uname()
--- sysname
--- machine
--- release
--- version
--- nodename
-
-if platform ~= "" then
+do
- os.platform = platform
+ local name = os.name or "linux"
+ local platform = os.getenv("MTX_PLATFORM") or ""
+ local architecture = os.uname and os.uname().machine -- lmtx
+ local bits = os.getenv("MTX_BITS") or find(platform,"64") and 64 or 32
-elseif os.type == "windows" then
+ if platform ~= "" then
- -- we could set the variable directly, no function needed here
+ -- we're okay already
- -- PROCESSOR_ARCHITECTURE : binary platform
- -- PROCESSOR_ARCHITEW6432 : OS platform
+ elseif os.type == "windows" then
- -- mswin-64 is now win64
+ -- PROCESSOR_ARCHITECTURE : binary platform
+ -- PROCESSOR_ARCHITEW6432 : OS platform
- function resolvers.platform(t,k)
- local architecture = os.getenv("PROCESSOR_ARCHITECTURE") or ""
- local platform = ""
- if find(architecture,"AMD64",1,true) then
- platform = "win64"
+ architecture = string.lower(architecture or os.getenv("PROCESSOR_ARCHITECTURE") or "")
+ if architecture == "x86_64" then
+ bits, platform = 64, "win64"
+ elseif find(architecture,"amd64") then
+ bits, platform = 64, "win64"
+ elseif find(architecture,"arm64") then
+ bits, platform = 64, "windows-arm64"
+ elseif find(architecture,"arm32") then
+ bits, platform = 32, "windows-arm32"
else
- platform = "mswin"
+ bits, platform = 32, "mswin"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-elseif name == "linux" then
-
- function resolvers.platform(t,k)
- -- we sometimes have HOSTTYPE set so let's check that first
- local architecture = os.getenv("HOSTTYPE") or resultof("uname -m") or ""
- local platform = os.getenv("MTX_PLATFORM") or ""
- local musl = find(os.selfdir or "","linuxmusl")
- if platform ~= "" then
- -- we're done
- elseif find(architecture,"x86_64",1,true) then
- platform = musl and "linuxmusl" or "linux-64"
- elseif find(architecture,"ppc",1,true) then
- platform = "linux-ppc"
+ elseif name == "linux" then
+
+ -- There is no way to detect if musl is used because there is no __MUSL__
+ -- and it looks like there never will be. Folks don't care about cases where
+ -- one ships multipe binaries (as with TeX distibutions) and want to select
+ -- the right one. So probably it expects users to compile locally in which
+ -- case we don't care to much as they can then sort it out.
+
+ architecture = architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or ""
+ local musl = find(os.selfdir or "","linuxmusl")
+ if find(architecture,"x86_64") then
+ bits, platform = 64, musl and "linuxmusl" or "linux-64"
+ elseif find(architecture,"ppc") then
+ bits, platform = 32, "linux-ppc" -- this will be dropped
else
- platform = musl and "linuxmusl" or "linux"
+ bits, platform = 32, musl and "linuxmusl" or "linux"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-elseif name == "macosx" then
-
- --[[
- Identifying the architecture of OSX is quite a mess and this
- is the best we can come up with. For some reason $HOSTTYPE is
- a kind of pseudo environment variable, not known to the current
- environment. And yes, uname cannot be trusted either, so there
- is a change that you end up with a 32 bit run on a 64 bit system.
- Also, some proper 64 bit intel macs are too cheap (low-end) and
- therefore not permitted to run the 64 bit kernel.
- ]]--
-
- function resolvers.platform(t,k)
- -- local platform = ""
- -- local architecture = os.getenv("HOSTTYPE") or ""
- -- if architecture == "" then
- -- architecture = resultof("echo $HOSTTYPE") or ""
- -- end
- local architecture = resultof("echo $HOSTTYPE") or ""
- local platform = ""
+ elseif name == "macosx" then
+
+ -- Identifying the architecture of OSX is quite a mess and this is the best
+ -- we can come up with. For some reason $HOSTTYPE is a kind of pseudo
+ -- environment variable, not known to the current environment. And yes,
+ -- uname cannot be trusted either, so there is a change that you end up with
+ -- a 32 bit run on a 64 bit system. Also, some proper 64 bit intel macs are
+ -- too cheap (low-end) and therefore not permitted to run the 64 bit kernel.
+
+ architecture = architecture or resultof("echo $HOSTTYPE") or ""
if architecture == "" then
- -- print("\nI have no clue what kind of OSX you're running so let's assume an 32 bit intel.\n")
- platform = "osx-intel"
- elseif find(architecture,"i386",1,true) then
- platform = "osx-intel"
- elseif find(architecture,"x86_64",1,true) then
- platform = "osx-64"
- elseif find(architecture,"arm64",1,true) then
- platform = "osx-arm"
+ bits, platform = 64, "osx-intel"
+ elseif find(architecture,"i386") then
+ bits, platform = 64, "osx-intel"
+ elseif find(architecture,"x86_64") then
+ bits, platform = 64, "osx-64"
+ elseif find(architecture,"arm64") then
+ bits, platform = 64, "osx-arm"
else
- platform = "osx-ppc"
+ bits, platform = 32, "osx-ppc"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-elseif name == "sunos" then
+ elseif name == "sunos" then
- function resolvers.platform(t,k)
- local architecture = resultof("uname -m") or ""
- local platform = ""
- if find(architecture,"sparc",1,true) then
- platform = "solaris-sparc"
+ architecture = architecture or resultof("uname -m") or ""
+ if find(architecture,"sparc") then
+ bits, platform = 32, "solaris-sparc"
else -- if architecture == 'i86pc'
- platform = "solaris-intel"
+ bits, platform = 32, "solaris-intel"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-elseif name == "freebsd" then
+ elseif name == "freebsd" then
- function resolvers.platform(t,k)
- local architecture = resultof("uname -m") or ""
- local platform = ""
- if find(architecture,"amd64",1,true) then
- platform = "freebsd-amd64"
+ architecture = architecture or os.getenv("MACHTYPE") or resultof("uname -m") or ""
+ if find(architecture,"amd64") or find(architecture,"AMD64") then
+ bits, platform = 64, "freebsd-amd64"
else
- platform = "freebsd"
+ bits, platform = 32, "freebsd"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-elseif name == "kfreebsd" then
+ elseif name == "kfreebsd" then
- function resolvers.platform(t,k)
- -- we sometimes have HOSTTYPE set so let's check that first
- local architecture = os.getenv("HOSTTYPE") or resultof("uname -m") or ""
- local platform = ""
- if find(architecture,"x86_64",1,true) then
- platform = "kfreebsd-amd64"
+ architecture = architecture or os.getenv("HOSTTYPE") or resultof("uname -m") or ""
+ if architecture == "x86_64" then
+ bits, platform = 64, "kfreebsd-amd64"
else
- platform = "kfreebsd-i386"
+ bits, platform = 32, "kfreebsd-i386"
end
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
- end
-else
+ else
- -- platform = "linux"
- -- os.setenv("MTX_PLATFORM",platform)
- -- os.platform = platform
+ architecture = architecture or resultof("uname -m") or ""
+
+ if find(architecture,"aarch64") then
+ bits, platform = "linux-aarch64"
+ elseif find(architecture,"armv7l") then
+ -- linux-armel
+ bits, platform = 32, "linux-armhf"
+ elseif find(architecture,"mips64") or find(architecture,"mips64el") then
+ bits, platform = 64, "linux-mipsel"
+ elseif find(architecture,"mipsel") or find(architecture,"mips") then
+ bits, platform = 32, "linux-mipsel"
+ else
+ bits, platform = 64, "linux-64" -- was 32, "linux"
+ end
- function resolvers.platform(t,k)
- local platform = "linux"
- os.setenv("MTX_PLATFORM",platform)
- os.platform = platform
- return platform
end
-end
+ os.setenv("MTX_PLATFORM",platform)
+ os.setenv("MTX_BITS", bits)
-os.newline = name == "windows" and "\013\010" or "\010" -- crlf or lf
+ os.platform = platform
+ os.bits = bits
+ os.newline = name == "windows" and "\013\010" or "\010" -- crlf or lf
-function resolvers.bits(t,k)
- local bits = find(os.platform,"64",1,true) and 64 or 32
- os.bits = bits
- return bits
end
-- beware, we set the randomseed
--- from wikipedia: Version 4 UUIDs use a scheme relying only on random numbers. This algorithm sets the
--- version number as well as two reserved bits. All other bits are set using a random or pseudorandom
--- data source. Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal
--- digits x and hexadecimal digits 8, 9, A, or B for y. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479.
---
--- as we don't call this function too often there is not so much risk on repetition
-
-local t = { 8, 9, "a", "b" }
-
-function os.uuid()
- return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x",
- random(0xFFFF),random(0xFFFF),
- random(0x0FFF),
- t[ceil(random(4))] or 8,random(0x0FFF),
- random(0xFFFF),
- random(0xFFFF),random(0xFFFF),random(0xFFFF)
- )
+-- From wikipedia: Version 4 UUIDs use a scheme relying only on random numbers. This
+-- algorithm sets the version number as well as two reserved bits. All other bits
+-- are set using a random or pseudorandom data source. Version 4 UUIDs have the form
+-- xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with hexadecimal digits x and hexadecimal
+-- digits 8, 9, A, or B for y. e.g. f47ac10b-58cc-4372-a567-0e02b2c3d479. As we don't
+-- call this function too often there is not so much risk on repetition.
+
+do
+
+ local t = { 8, 9, "a", "b" }
+
+ function os.uuid()
+ return format("%04x%04x-4%03x-%s%03x-%04x-%04x%04x%04x",
+ random(0xFFFF),random(0xFFFF),
+ random(0x0FFF),
+ t[ceil(random(4))] or 8,random(0x0FFF),
+ random(0xFFFF),
+ random(0xFFFF),random(0xFFFF),random(0xFFFF)
+ )
+ end
+
end
-local d
+do
-function os.timezone(delta)
- d = d or ((tonumber(date("%H")) or 0) - (tonumber(date("!%H")) or 0))
- if delta then
- if d > 0 then
- return format("+%02i:00",d)
+ -- this is fragile because it depends on time and so we only check once during
+ -- a run (the computer doesn't move zones) .. Michal Vlasák made a better one
+
+ -- local d
+ --
+ -- function os.timezone()
+ -- d = d or ((tonumber(date("%H")) or 0) - (tonumber(date("!%H")) or 0))
+ -- if d > 0 then
+ -- return format("+%02i:00",d)
+ -- else
+ -- return format("-%02i:00",-d)
+ -- end
+ -- end
+
+ local hour, min
+
+ function os.timezone(difference)
+ if not hour then
+ -- somehow looks too complex:
+ local current = time()
+ local utcdate = date("!*t", current)
+ local localdate = date("*t", current)
+ localdate.isdst = false
+ local timediff = difftime(time(localdate), time(utcdate))
+ hour, min = modf(timediff / 3600)
+ min = min * 60
+ end
+ if difference then
+ return hour, min
else
- return format("-%02i:00",-d)
+ return format("%+03d:%02d",hour,min) -- %+ means: always show sign
end
- else
- return 1
end
-end
-local timeformat = format("%%s%s",os.timezone(true))
-local dateformat = "!%Y-%m-%d %H:%M:%S"
-local lasttime = nil
-local lastdate = nil
-
-function os.fulltime(t,default)
- t = t and tonumber(t) or 0
- if t > 0 then
- -- valid time
- elseif default then
- return default
- else
- t = time()
- end
- if t ~= lasttime then
- lasttime = t
- lastdate = format(timeformat,date(dateformat))
+ -- localtime with timezone: 2021-10-22 10:22:54+02:00
+
+ local timeformat = format("%%s%s",os.timezone())
+ local dateformat = "%Y-%m-%d %H:%M:%S"
+ local lasttime = nil
+ local lastdate = nil
+
+ function os.fulltime(t,default)
+ t = t and tonumber(t) or 0
+ if t > 0 then
+ -- valid time
+ elseif default then
+ return default
+ else
+ t = time()
+ end
+ if t ~= lasttime then
+ lasttime = t
+ lastdate = format(timeformat,date(dateformat))
+ end
+ return lastdate
end
- return lastdate
-end
-local dateformat = "%Y-%m-%d %H:%M:%S"
-local lasttime = nil
-local lastdate = nil
+ -- localtime without timezone: 2021-10-22 10:22:54
-function os.localtime(t,default)
- t = t and tonumber(t) or 0
- if t > 0 then
- -- valid time
- elseif default then
- return default
- else
- t = time()
+ local dateformat = "%Y-%m-%d %H:%M:%S"
+ local lasttime = nil
+ local lastdate = nil
+
+ function os.localtime(t,default)
+ t = t and tonumber(t) or 0
+ if t > 0 then
+ -- valid time
+ elseif default then
+ return default
+ else
+ t = time()
+ end
+ if t ~= lasttime then
+ lasttime = t
+ lastdate = date(dateformat,t)
+ end
+ return lastdate
end
- if t ~= lasttime then
- lasttime = t
- lastdate = date(dateformat,t)
+
+ function os.converttime(t,default)
+ local t = tonumber(t)
+ if t and t > 0 then
+ return date(dateformat,t)
+ else
+ return default or "-"
+ end
end
- return lastdate
-end
-function os.converttime(t,default)
- local t = tonumber(t)
- if t and t > 0 then
- return date(dateformat,t)
- else
- return default or "-"
+ -- table with values
+
+ function os.today()
+ return date("!*t")
+ end
+
+ -- utc time without timezone: 2021-10-22 08:22:54
+
+ function os.now()
+ return date("!%Y-%m-%d %H:%M:%S")
end
+
end
-local memory = { }
-
-local function which(filename)
- local fullname = memory[filename]
- if fullname == nil then
- local suffix = file.suffix(filename)
- local suffixes = suffix == "" and os.binsuffixes or { suffix }
- for directory in gmatch(os.getenv("PATH"),"[^" .. io.pathseparator .."]+") do
- local df = file.join(directory,filename)
- for i=1,#suffixes do
- local dfs = file.addsuffix(df,suffixes[i])
- if io.exists(dfs) then
- fullname = dfs
- break
+do
+
+ local cache = { }
+
+ local function which(filename)
+ local fullname = cache[filename]
+ if fullname == nil then
+ local suffix = file.suffix(filename)
+ local suffixes = suffix == "" and os.binsuffixes or { suffix }
+ for directory in gmatch(os.getenv("PATH"),"[^" .. io.pathseparator .."]+") do
+ local df = file.join(directory,filename)
+ for i=1,#suffixes do
+ local dfs = file.addsuffix(df,suffixes[i])
+ if io.exists(dfs) then
+ fullname = dfs
+ break
+ end
end
end
+ if not fullname then
+ fullname = false
+ end
+ cache[filename] = fullname
end
- if not fullname then
- fullname = false
- end
- memory[filename] = fullname
+ return fullname
end
- return fullname
-end
-os.which = which
-os.where = which
+ os.which = which
+ os.where = which
-function os.today()
- return date("!*t") -- table with values
-end
+ -- print(os.which("inkscape.exe"))
+ -- print(os.which("inkscape"))
+ -- print(os.which("gs.exe"))
+ -- print(os.which("ps2pdf"))
-function os.now()
- return date("!%Y-%m-%d %H:%M:%S") -- 2011-12-04 14:59:12
end
--- if not os.sleep and socket then
--- os.sleep = socket.sleep
--- end
-
if not os.sleep then
+
local socket = socket
+
function os.sleep(n)
if not socket then
-- so we delay ... if os.sleep is really needed then one should also
@@ -573,101 +585,105 @@ if not os.sleep then
end
socket.sleep(n)
end
-end
-
--- print(os.which("inkscape.exe"))
--- print(os.which("inkscape"))
--- print(os.which("gs.exe"))
--- print(os.which("ps2pdf"))
-
--- These are moved from core-con.lua (as I needed them elsewhere).
-local function isleapyear(year) -- timed for bram's cs practicum
- -- return (year % 400 == 0) or (year % 100 ~= 0 and year % 4 == 0) -- 3:4:1600:1900 = 9.9 : 8.2 : 5.0 : 6.8 (29.9)
- return (year % 4 == 0) and (year % 100 ~= 0 or year % 400 == 0) -- 3:4:1600:1900 = 5.1 : 6.5 : 8.1 : 10.2 (29.9)
- -- return (year % 4 == 0) and (year % 400 == 0 or year % 100 ~= 0) -- 3:4:1600:1900 = 5.2 : 8.5 : 6.8 : 10.1 (30.6)
end
-os.isleapyear = isleapyear
+-- These are moved from core-con.lua (as I needed them elsewhere).
--- nicer:
---
--- local days = {
--- [false] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
--- [true] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
--- }
---
--- local function nofdays(year,month)
--- return days[isleapyear(year)][month]
--- return month == 2 and isleapyear(year) and 29 or days[month]
--- end
---
--- more efficient:
+do
-local days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
+ local function isleapyear(year) -- timed for bram's cs practicum
+ -- return (year % 400 == 0) or (year % 100 ~= 0 and year % 4 == 0) -- 3:4:1600:1900 = 9.9 : 8.2 : 5.0 : 6.8 (29.9)
+ return (year % 4 == 0) and (year % 100 ~= 0 or year % 400 == 0) -- 3:4:1600:1900 = 5.1 : 6.5 : 8.1 : 10.2 (29.9)
+ -- return (year % 4 == 0) and (year % 400 == 0 or year % 100 ~= 0) -- 3:4:1600:1900 = 5.2 : 8.5 : 6.8 : 10.1 (30.6)
+ end
-local function nofdays(year,month,day)
- if not month then
- return isleapyear(year) and 365 or 364
- elseif not day then
- return month == 2 and isleapyear(year) and 29 or days[month]
- else
- for i=1,month-1 do
- day = day + days[i]
- end
- if month > 2 and isleapyear(year) then
- day = day + 1
+ os.isleapyear = isleapyear
+
+ -- nicer:
+ --
+ -- local days = {
+ -- [false] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },
+ -- [true] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
+ -- }
+ --
+ -- local function nofdays(year,month)
+ -- return days[isleapyear(year)][month]
+ -- return month == 2 and isleapyear(year) and 29 or days[month]
+ -- end
+ --
+ -- more efficient:
+
+ local days = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
+
+ local function nofdays(year,month,day)
+ if not month then
+ return isleapyear(year) and 365 or 364
+ elseif not day then
+ return month == 2 and isleapyear(year) and 29 or days[month]
+ else
+ for i=1,month-1 do
+ day = day + days[i]
+ end
+ if month > 2 and isleapyear(year) then
+ day = day + 1
+ end
+ return day
end
- return day
end
-end
-
-os.nofdays = nofdays
-function os.weekday(day,month,year)
- return date("%w",time { year = year, month = month, day = day }) + 1
-end
+ os.nofdays = nofdays
-function os.validdate(year,month,day)
- -- we assume that all three values are set
- -- year is always ok, even if lua has a 1970 time limit
- if month < 1 then
- month = 1
- elseif month > 12 then
- month = 12
+ function os.weekday(day,month,year)
+ return date("%w",time { year = year, month = month, day = day }) + 1
end
- if day < 1 then
- day = 1
- else
- local max = nofdays(year,month)
- if day > max then
- day = max
+
+ function os.validdate(year,month,day)
+ -- we assume that all three values are set
+ -- year is always ok, even if lua has a 1970 time limit
+ if month < 1 then
+ month = 1
+ elseif month > 12 then
+ month = 12
end
+ if day < 1 then
+ day = 1
+ else
+ local max = nofdays(year,month)
+ if day > max then
+ day = max
+ end
+ end
+ return year, month, day
end
- return year, month, day
-end
-function os.date(fmt,...)
- if not fmt then
- -- otherwise differences between unix, mingw and msvc
- fmt = "%Y-%m-%d %H:%M"
+ function os.date(fmt,...)
+ if not fmt then
+ -- otherwise differences between unix, mingw and msvc
+ fmt = "%Y-%m-%d %H:%M"
+ end
+ return date(fmt,...)
end
- return date(fmt,...)
+
end
-local osexit = os.exit
-local exitcode = nil
+do
-function os.setexitcode(code)
- exitcode = code
-end
+ local osexit = os.exit
+ local exitcode = nil
-function os.exit(c)
- if exitcode ~= nil then
- return osexit(exitcode)
+ function os.setexitcode(code)
+ exitcode = code
end
- if c ~= nil then
- return osexit(c)
+
+ function os.exit(c)
+ if exitcode ~= nil then
+ return osexit(exitcode)
+ end
+ if c ~= nil then
+ return osexit(c)
+ end
+ return osexit()
end
- return osexit()
+
end
diff --git a/macros/luatex/generic/lualibs/lualibs-util-deb.lua b/macros/luatex/generic/lualibs/lualibs-util-deb.lua
index bd94b6d01e..10e5731b03 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-deb.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-deb.lua
@@ -346,3 +346,25 @@ debugger.showtraceback = showtraceback
-- debug.showtraceback = showtraceback
-- showtraceback()
+
+-- For now also here because we want it in mtxrun (taken from lmt file):
+
+if luac then
+
+ local show, dump = luac.print, string.dump
+
+ function luac.inspect(v)
+ if type(v) == "function" then
+ local ok, str = xpcall(dump,function() end,v)
+ if ok then
+ v = str
+ end
+ end
+ if type(v) == "string" then
+ show(v,true)
+ else
+ print(v)
+ end
+ end
+
+end
diff --git a/macros/luatex/generic/lualibs/lualibs-util-jsn.lua b/macros/luatex/generic/lualibs/lualibs-util-jsn.lua
index 8da3518979..2d78561971 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-jsn.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-jsn.lua
@@ -17,6 +17,10 @@ if not modules then modules = { } end modules ['util-jsn'] = {
--
-- Upgraded for handling the somewhat more fax server templates.
+if utilities and utilities.json then
+ return json
+end
+
local P, V, R, S, C, Cc, Cs, Ct, Cf, Cg = lpeg.P, lpeg.V, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Ct, lpeg.Cf, lpeg.Cg
local lpegmatch = lpeg.match
local format, gsub = string.format, string.gsub
@@ -265,6 +269,8 @@ do
k = lpegmatch(escaper,k) or k
v = lpegmatch(escaper,v) or v
n = n + 1 t[n] = f_key_val_str(depth,k,v)
+ elseif i > 1 then
+ n = n - 1
end
elseif tv == "table" then
local l = #v
@@ -280,6 +286,9 @@ do
end
elseif next(v) then
tojsonpp(v,k,depth,level+1,0)
+ elseif i > 1 then
+ n = n - 1
+ -- we don't know if we have a hash or string
end
elseif tv == "boolean" then
if tk == "number" then
@@ -297,6 +306,8 @@ do
else
t[n] = f_key_val_nop(depth,k)
end
+ elseif i > 1 then
+ n = n - 1
end
else
if tk == "number" then
@@ -306,6 +317,8 @@ do
k = lpegmatch(escaper,k) or k
n = n + 1
t[n] = f_key_val_null(depth,k)
+ elseif i > 1 then
+ n = n - 1
end
end
end
@@ -440,4 +453,8 @@ end
-- inspect(l)
-- print(s==l.s)
-return json
+-- if not package.loaded.json then
+-- package.loaded.json = json
+-- end
+
+-- return json
diff --git a/macros/luatex/generic/lualibs/lualibs-util-prs.lua b/macros/luatex/generic/lualibs/lualibs-util-prs.lua
index 6d2f8c19e0..635b610e07 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-prs.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-prs.lua
@@ -55,9 +55,13 @@ local nobracket = 1 - (lbracket + rbracket)
local escape, left, right = P("\\"), P('{'), P('}')
+-- lpegpatterns.balanced = P {
+-- [1] = ((escape * (left+right)) + (1 - (left+right)) + V(2))^0,
+-- [2] = left * V(1) * right
+-- }
lpegpatterns.balanced = P {
- [1] = ((escape * (left+right)) + (1 - (left+right)) + V(2))^0,
- [2] = left * V(1) * right
+ ((escape * (left+right)) + (1 - (left+right)) + V(2))^0,
+ left * V(1) * right
}
local nestedbraces = P { lbrace * (nobrace + V(1))^0 * rbrace }
@@ -67,11 +71,12 @@ local spaces = space^0
local argument = Cs((lbrace/"") * ((nobrace + nestedbraces)^0) * (rbrace/""))
local content = (1-endofstring)^0
-lpegpatterns.nestedbraces = nestedbraces -- no capture
-lpegpatterns.nestedparents = nestedparents -- no capture
-lpegpatterns.nested = nestedbraces -- no capture
-lpegpatterns.argument = argument -- argument after e.g. =
-lpegpatterns.content = content -- rest after e.g =
+lpegpatterns.nestedbraces = nestedbraces -- no capture
+lpegpatterns.nestedparents = nestedparents -- no capture
+lpegpatterns.nestedbrackets = nestedbrackets -- no capture
+lpegpatterns.nested = nestedbraces -- no capture
+lpegpatterns.argument = argument -- argument after e.g. =
+lpegpatterns.content = content -- rest after e.g =
local value = lbrace * C((nobrace + nestedbraces)^0) * rbrace
+ C((nestedbraces + (1-comma))^0)
@@ -568,9 +573,9 @@ end
-- "1","2","3","4"
-- "5","6","7","8"
-- ]]
---
+
-- local mycsvsplitter = parsers.csvsplitter { numbers = true }
---
+
-- local list = mycsvsplitter(crap) inspect(list)
-- and this is a slightly patched version of a version posted by Philipp Gesang
@@ -617,12 +622,6 @@ end
-- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
-- local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
--- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
--- parsers.stepper("1-3,7,8,9")
--- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
--- parsers.stepper(" 1 : 3, ,7 ")
--- parsers.stepper("1:4,9:13,24:*",30)
-
local function ranger(first,last,n,action)
if not first then
-- forget about it
@@ -639,7 +638,7 @@ local function ranger(first,last,n,action)
end
end
-local cardinal = lpegpatterns.cardinal / tonumber
+local cardinal = (lpegpatterns.hexadecimal + lpegpatterns.cardinal) / tonumber
local spacers = lpegpatterns.spacer^0
local endofstring = lpegpatterns.endofstring
@@ -650,14 +649,29 @@ local stepper = spacers * ( cardinal * ( spacers * S(":-") * spacers * ( cardin
* Carg(1) * Carg(2) / ranger * S(", ")^0 )^1 * endofstring -- we're sort of strict (could do without endofstring)
function parsers.stepper(str,n,action)
+ local ts = type(str)
if type(n) == "function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts == "number" then
+ n(str)
+ elseif ts == "table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts == "string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
---
+-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
+-- parsers.stepper("1-3,7,8,9")
+-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
+-- parsers.stepper(" 1 : 3, ,7 ")
+-- parsers.stepper("1:4,9:13,24:*",30)
+-- parsers.stepper(1,print)
+-- parsers.stepper({1,3,4},print)
local pattern_math = Cs((P("%")/"\\percent " + P("^") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
local pattern_text = Cs((P("%")/"\\percent " + (P("^")/"\\high") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
@@ -681,7 +695,7 @@ local spaces = lpegpatterns.space^0
local dummy = function() end
setmetatableindex(cache,function(t,k)
- local separator = P(k)
+ local separator = S(k) -- was P
local value = (1-separator)^0
local pattern = spaces * C(value) * separator^0 * Cp()
t[k] = pattern
@@ -801,11 +815,20 @@ local pattern = Cf( Ct("") *
( Cg(Cc("day") * cardinal)
* S("-/") * Cg(Cc("month") * cardinal)
* S("-/") * Cg(Cc("year") * p_year)
+ ) +
+ ( Cg(Cc("year") * p_year)
+ * S("-/") * Cg(Cc("month") * cardinal)
+ ) +
+ ( Cg(Cc("month") * cardinal)
+ * S("-/") * Cg(Cc("year") * p_year)
)
)
- * P(" ") * Cg(Cc("hour") * cardinal)
+ * (
+ P(" ") * Cg(Cc("hour") * cardinal)
* P(":") * Cg(Cc("min") * cardinal)
* (P(":") * Cg(Cc("sec") * cardinal))^-1
+ + P(-1) )
+
, rawset)
lpegpatterns.splittime = pattern
@@ -814,6 +837,8 @@ function parsers.totime(str)
return lpegmatch(pattern,str)
end
+-- inspect(parsers.totime("2019-03-05"))
+-- inspect(parsers.totime("2019-03-05 12:12:12"))
-- print(os.time(parsers.totime("2019-03-05 12:12:12")))
-- print(os.time(parsers.totime("2019/03/05 12:12:12")))
-- print(os.time(parsers.totime("05-03-2019 12:12:12")))
diff --git a/macros/luatex/generic/lualibs/lualibs-util-sac.lua b/macros/luatex/generic/lualibs/lualibs-util-sac.lua
new file mode 100644
index 0000000000..36daef8167
--- /dev/null
+++ b/macros/luatex/generic/lualibs/lualibs-util-sac.lua
@@ -0,0 +1,582 @@
+if not modules then modules = { } end modules ['util-sac'] = {
+ version = 1.001,
+ optimize = true,
+ comment = "companion to luat-lib.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- experimental string access (some 3 times faster than file access when messing
+-- with bytes)
+
+local byte, sub = string.byte, string.sub
+local tonumber = tonumber
+
+utilities = utilities or { }
+local streams = { }
+utilities.streams = streams
+
+function streams.open(filename,zerobased)
+ local f = filename and io.loaddata(filename)
+ if f then
+ return { f, 1, #f, zerobased or false }
+ end
+end
+
+function streams.openstring(f,zerobased)
+ if f then
+ return { f, 1, #f, zerobased or false }
+ end
+end
+
+function streams.getstring(f)
+ if f then
+ return f[1]
+ end
+end
+
+function streams.close()
+ -- dummy
+end
+
+function streams.size(f)
+ return f and f[3] or 0
+end
+
+streams.getsize = streams.size
+
+function streams.setposition(f,i)
+ if f[4] then
+ -- zerobased
+ if i <= 0 then
+ f[2] = 1
+ else
+ f[2] = i + 1
+ end
+ else
+ if i <= 1 then
+ f[2] = 1
+ else
+ f[2] = i
+ end
+ end
+end
+
+function streams.getposition(f)
+ if f[4] then
+ -- zerobased
+ return f[2] - 1
+ else
+ return f[2]
+ end
+end
+
+function streams.look(f,n,chars)
+ local b = f[2]
+ local e = b + n - 1
+ if chars then
+ return sub(f[1],b,e)
+ else
+ return byte(f[1],b,e)
+ end
+end
+
+function streams.skip(f,n)
+ f[2] = f[2] + n
+end
+
+function streams.readbyte(f)
+ local i = f[2]
+ f[2] = i + 1
+ return byte(f[1],i)
+end
+
+function streams.readbytes(f,n)
+ local i = f[2]
+ local j = i + n
+ f[2] = j
+ return byte(f[1],i,j-1)
+end
+
+function streams.readbytetable(f,n)
+ local i = f[2]
+ local j = i + n
+ f[2] = j
+ return { byte(f[1],i,j-1) }
+end
+
+function streams.skipbytes(f,n)
+ f[2] = f[2] + n
+end
+
+function streams.readchar(f)
+ local i = f[2]
+ f[2] = i + 1
+ return sub(f[1],i,i)
+end
+
+function streams.readstring(f,n)
+ local i = f[2]
+ local j = i + n
+ f[2] = j
+ return sub(f[1],i,j-1)
+end
+
+function streams.readinteger1(f) -- one byte
+ local i = f[2]
+ f[2] = i + 1
+ local n = byte(f[1],i)
+ if n >= 0x80 then
+ return n - 0x100
+ else
+ return n
+ end
+end
+
+streams.readcardinal1 = streams.readbyte -- one byte
+streams.readcardinal = streams.readcardinal1
+streams.readinteger = streams.readinteger1
+
+function streams.readcardinal2(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ return 0x100 * a + b
+end
+
+function streams.readcardinal2le(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local b, a = byte(f[1],i,j)
+ return 0x100 * a + b
+end
+
+function streams.readinteger2(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x100 * a + b - 0x10000
+ else
+ return 0x100 * a + b
+ end
+end
+
+function streams.readinteger2le(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local b, a = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x100 * a + b - 0x10000
+ else
+ return 0x100 * a + b
+ end
+end
+
+function streams.readcardinal3(f)
+ local i = f[2]
+ local j = i + 2
+ f[2] = j + 1
+ local a, b, c = byte(f[1],i,j)
+ return 0x10000 * a + 0x100 * b + c
+end
+
+function streams.readcardinal3le(f)
+ local i = f[2]
+ local j = i + 2
+ f[2] = j + 1
+ local c, b, a = byte(f[1],i,j)
+ return 0x10000 * a + 0x100 * b + c
+end
+
+function streams.readinteger3(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x10000 * a + 0x100 * b + c - 0x1000000
+ else
+ return 0x10000 * a + 0x100 * b + c
+ end
+end
+
+function streams.readinteger3le(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local c, b, a = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x10000 * a + 0x100 * b + c - 0x1000000
+ else
+ return 0x10000 * a + 0x100 * b + c
+ end
+end
+
+function streams.readcardinal4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+end
+
+function streams.readcardinal4le(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local d, c, b, a = byte(f[1],i,j)
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+end
+
+function streams.readinteger4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d - 0x100000000
+ else
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+ end
+end
+
+function streams.readinteger4le(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local d, c, b, a = byte(f[1],i,j)
+ if a >= 0x80 then
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d - 0x100000000
+ else
+ return 0x1000000 * a + 0x10000 * b + 0x100 * c + d
+ end
+end
+
+function streams.readfixed2(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local n1, n2 = byte(f[1],i,j)
+ if n1 >= 0x80 then
+ n1 = n1 - 0x100
+ end
+ return n1 + n2/0xFF
+end
+
+function streams.readfixed4(f)
+ local i = f[2]
+ local j = i + 3
+ f[2] = j + 1
+ local a, b, c, d = byte(f[1],i,j)
+ local n1 = 0x100 * a + b
+ local n2 = 0x100 * c + d
+ if n1 >= 0x8000 then
+ n1 = n1 - 0x10000
+ end
+ return n1 + n2/0xFFFF
+end
+
+if bit32 then
+
+ local extract = bit32.extract
+ local band = bit32.band
+
+ function streams.read2dot14(f)
+ local i = f[2]
+ local j = i + 1
+ f[2] = j + 1
+ local a, b = byte(f[1],i,j)
+ if a >= 0x80 then
+ local n = -(0x100 * a + b)
+ return - (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
+ else
+ local n = 0x100 * a + b
+ return (extract(n,14,2) + (band(n,0x3FFF) / 16384.0))
+ end
+ end
+
+end
+
+function streams.skipshort(f,n)
+ f[2] = f[2] + 2*(n or 1)
+end
+
+function streams.skiplong(f,n)
+ f[2] = f[2] + 4*(n or 1)
+end
+
+if sio and sio.readcardinal2 then
+
+ local readcardinal1 = sio.readcardinal1
+ local readcardinal2 = sio.readcardinal2
+ local readcardinal3 = sio.readcardinal3
+ local readcardinal4 = sio.readcardinal4
+ local readinteger1 = sio.readinteger1
+ local readinteger2 = sio.readinteger2
+ local readinteger3 = sio.readinteger3
+ local readinteger4 = sio.readinteger4
+ local readfixed2 = sio.readfixed2
+ local readfixed4 = sio.readfixed4
+ local read2dot14 = sio.read2dot14
+ local readbytes = sio.readbytes
+ local readbytetable = sio.readbytetable
+
+ function streams.readcardinal1(f)
+ local i = f[2]
+ f[2] = i + 1
+ return readcardinal1(f[1],i)
+ end
+ function streams.readcardinal2(f)
+ local i = f[2]
+ f[2] = i + 2
+ return readcardinal2(f[1],i)
+ end
+ function streams.readcardinal3(f)
+ local i = f[2]
+ f[2] = i + 3
+ return readcardinal3(f[1],i)
+ end
+ function streams.readcardinal4(f)
+ local i = f[2]
+ f[2] = i + 4
+ return readcardinal4(f[1],i)
+ end
+ function streams.readinteger1(f)
+ local i = f[2]
+ f[2] = i + 1
+ return readinteger1(f[1],i)
+ end
+ function streams.readinteger2(f)
+ local i = f[2]
+ f[2] = i + 2
+ return readinteger2(f[1],i)
+ end
+ function streams.readinteger3(f)
+ local i = f[2]
+ f[2] = i + 3
+ return readinteger3(f[1],i)
+ end
+ function streams.readinteger4(f)
+ local i = f[2]
+ f[2] = i + 4
+ return readinteger4(f[1],i)
+ end
+ function streams.readfixed2(f) -- needs recent luatex
+ local i = f[2]
+ f[2] = i + 2
+ return readfixed2(f[1],i)
+ end
+ function streams.readfixed4(f) -- needs recent luatex
+ local i = f[2]
+ f[2] = i + 4
+ return readfixed4(f[1],i)
+ end
+ function streams.read2dot14(f)
+ local i = f[2]
+ f[2] = i + 2
+ return read2dot14(f[1],i)
+ end
+ function streams.readbytes(f,n)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ return readbytes(f[1],i,n)
+ end
+ function streams.readbytetable(f,n)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ return readbytetable(f[1],i,n)
+ end
+
+ streams.readbyte = streams.readcardinal1
+ streams.readsignedbyte = streams.readinteger1
+ streams.readcardinal = streams.readcardinal1
+ streams.readinteger = streams.readinteger1
+
+end
+
+if sio and sio.readcardinaltable then
+
+ local readcardinaltable = sio.readcardinaltable
+ local readintegertable = sio.readintegertable
+
+ function utilities.streams.readcardinaltable(f,n,b)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n * b
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ return readcardinaltable(f[1],i,n,b)
+ end
+
+ function utilities.streams.readintegertable(f,n,b)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n * b
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ return readintegertable(f[1],i,n,b)
+ end
+
+else
+
+ local readcardinal1 = streams.readcardinal1
+ local readcardinal2 = streams.readcardinal2
+ local readcardinal3 = streams.readcardinal3
+ local readcardinal4 = streams.readcardinal4
+
+ function streams.readcardinaltable(f,n,b)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n * b
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readcardinal1(f[1],i) end
+ elseif b == 2 then for i=1,n do t[i] = readcardinal2(f[1],i) end
+ elseif b == 3 then for i=1,n do t[i] = readcardinal3(f[1],i) end
+ elseif b == 4 then for i=1,n do t[i] = readcardinal4(f[1],i) end end
+ return t
+ end
+
+ local readinteger1 = streams.readinteger1
+ local readinteger2 = streams.readinteger2
+ local readinteger3 = streams.readinteger3
+ local readinteger4 = streams.readinteger4
+
+ function streams.readintegertable(f,n,b)
+ local i = f[2]
+ local s = f[3]
+ local p = i + n * b
+ if p > s then
+ f[2] = s + 1
+ else
+ f[2] = p
+ end
+ local t = { }
+ if b == 1 then for i=1,n do t[i] = readinteger1(f[1],i) end
+ elseif b == 2 then for i=1,n do t[i] = readinteger2(f[1],i) end
+ elseif b == 3 then for i=1,n do t[i] = readinteger3(f[1],i) end
+ elseif b == 4 then for i=1,n do t[i] = readinteger4(f[1],i) end end
+ return t
+ end
+
+end
+
+-- For practical reasons we put this here. It's less efficient but ok when we don't
+-- have much access.
+
+do
+
+ local files = utilities.files
+
+ if files then
+
+ local openfile = files.open
+ local openstream = streams.open
+ local openstring = streams.openstring
+
+ local setmetatable = setmetatable
+
+ function io.newreader(str,method)
+ local f, m
+ if method == "string" then
+ f = openstring(str,true)
+ m = streams
+ elseif method == "stream" then
+ f = openstream(str,true)
+ m = streams
+ else
+ f = openfile(str,"rb")
+ m = files
+ end
+ if f then
+ local t = { }
+ setmetatable(t, {
+ __index = function(t,k)
+ local r = m[k]
+ if k == "close" then
+ -- maybe use __toclose
+ if f then
+ m.close(f)
+ f = nil
+ end
+ return function() end
+ elseif r then
+ local v = function(_,a,b) return r(f,a,b) end
+ t[k] = v
+ return v
+ else
+ print("unknown key",k)
+ end
+ end
+ } )
+ return t
+ end
+ end
+
+ end
+
+end
+
+if bit32 and not streams.tocardinal1 then
+
+ local extract = bit32.extract
+ local char = string.char
+
+ streams.tocardinal1 = char
+ function streams.tocardinal2(n) return char(extract( 8,8),extract( 0,8)) end
+ function streams.tocardinal3(n) return char(extract(16,8),extract( 8,8),extract(0,8)) end
+ function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end
+
+ streams.tocardinal1le = char
+ function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end
+ function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end
+ function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end
+
+end
+
+if not streams.readcstring then
+
+ local readchar = streams.readchar
+ local concat = table.concat
+
+ function streams.readcstring(f)
+ local t = { }
+ while true do
+ local c = readchar(f)
+ if c and c ~= "\0" then
+ t[#t+1] = c
+ else
+ return concat(t)
+ end
+ end
+ end
+
+end
diff --git a/macros/luatex/generic/lualibs/lualibs-util-str.lua b/macros/luatex/generic/lualibs/lualibs-util-str.lua
index 0d1f39de9d..b5c721a41d 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-str.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-str.lua
@@ -10,12 +10,13 @@ utilities = utilities or { }
utilities.strings = utilities.strings or { }
local strings = utilities.strings
-local format, gsub, rep, sub, find = string.format, string.gsub, string.rep, string.sub, string.find
+local format, gsub, rep, sub, find, char = string.format, string.gsub, string.rep, string.sub, string.find, string.char
local load, dump = load, string.dump
local tonumber, type, tostring, next, setmetatable = tonumber, type, tostring, next, setmetatable
local unpack, concat = table.unpack, table.concat
local P, V, C, S, R, Ct, Cs, Cp, Carg, Cc = lpeg.P, lpeg.V, lpeg.C, lpeg.S, lpeg.R, lpeg.Ct, lpeg.Cs, lpeg.Cp, lpeg.Carg, lpeg.Cc
local patterns, lpegmatch = lpeg.patterns, lpeg.match
+local tsplitat = lpeg.tsplitat
local utfchar, utfbyte, utflen = utf.char, utf.byte, utf.len
----- loadstripped = utilities.lua.loadstripped
@@ -622,7 +623,7 @@ local template = [[
return function(%s) return %s end
]]
--- this might move
+-- We only use fast serialize in controlled cases.
local pattern = Cs(Cc('"') * (
(1-S('"\\\n\r'))^1
@@ -632,12 +633,43 @@ local pattern = Cs(Cc('"') * (
+ P('\r') / '\\r'
)^0 * Cc('"'))
+-- -- I need to do more experiments with this:
+--
+-- local pattern = Cs(Cc('"') * (
+-- (1-S('"\\\n\r'))^1
+-- + P('"') / '\\034'
+-- + P('\\') / '\\092'
+-- + P('\n') / '\\013'
+-- + P('\r') / '\\010'
+-- )^0 * Cc('"'))
+
patterns.escapedquotes = pattern
function string.escapedquotes(s)
return lpegmatch(pattern,s)
end
+local pattern = (1 - P("\\"))^1 ; pattern = Cs (
+ pattern
+ * ( (P("\\") / "" * (digit^-3 / function(s) return char(tonumber(s)) end)) + pattern )^1
+)
+
+patterns.unescapedquotes = pattern
+
+function string.unescapedquotes(s)
+ return lpegmatch(pattern,s) or s
+end
+
+-- function string.longifneeded(s)
+-- if find(s,'["\\\n\r]') then
+-- return "[===[" .. s .. "]===]"
+-- else
+-- return '"' .. s ..'"'
+-- end
+-- end
+
+string.texnewlines = lpeg.replacer(patterns.newline,"\r",true)
+
-- print(string.escapedquotes('1\\23\n"'))
-- but for now here
@@ -1476,7 +1508,7 @@ end
if not string.explode then
- local tsplitat = lpeg.tsplitat
+ -- local tsplitat = lpeg.tsplitat
local p_utf = patterns.utf8character
local p_check = C(p_utf) * (P("+") * Cc(true))^0
@@ -1499,3 +1531,24 @@ if not string.explode then
end
end
+
+
+do
+
+ local p_whitespace = patterns.whitespace^1
+
+ local cache = setmetatable({ }, { __index = function(t,k)
+ local p = tsplitat(p_whitespace * P(k) * p_whitespace)
+ local v = function(s)
+ return lpegmatch(p,s)
+ end
+ t[k] = v
+ return v
+ end })
+
+ function string.wordsplitter(s)
+ return cache[s]
+ end
+
+end
+
diff --git a/macros/luatex/generic/lualibs/lualibs-util-tab.lua b/macros/luatex/generic/lualibs/lualibs-util-tab.lua
index 9f7112eb91..64fa1af4fb 100644
--- a/macros/luatex/generic/lualibs/lualibs-util-tab.lua
+++ b/macros/luatex/generic/lualibs/lualibs-util-tab.lua
@@ -417,9 +417,9 @@ if JITSUPPORTED then
else
- local f_v = formatters["[%q]=%q,"]
- local f_t = formatters["[%q]="]
- local f_q = formatters["%q,"]
+ -- local f_v = formatters["[%q]=%q,"]
+ -- local f_t = formatters["[%q]="]
+ -- local f_q = formatters["%q,"]
function table.fastserialize(t,prefix) -- todo, move local function out
local r = { type(prefix) == "string" and prefix or "return" }
@@ -720,6 +720,7 @@ local function serialize(root,name,specification)
local t -- = { }
local n = 1
+ -- local m = 0 -- no gain
local unknown = false
local function do_serialize(root,name,depth,level,indexed)
@@ -850,6 +851,12 @@ local function serialize(root,name,specification)
n = n + 1 t[n] = f_key_str_value_str(depth,tostring(k),tostring(v))
end
end
+ -- if n > 100000 then -- no gain
+ -- local k = m + 1
+ -- t[k] = concat(t,"\n",k,n)
+ -- n = k
+ -- m = k
+ -- end
end
end
if level > 0 then
@@ -898,6 +905,7 @@ local function serialize(root,name,specification)
n = n + 1
t[n] = f_table_finish()
return concat(t,"\n")
+ -- return concat(t,"\n",1,n) -- no gain
end
table.serialize = serialize
@@ -970,3 +978,43 @@ end
-- return remove(t,random(1,n))
-- end
-- end
+
+function combine(target,source)
+ -- no copy so if that is needed one needs to deepcopy source first
+ if target then
+ for k, v in next, source do
+ if type(v) == "table" then
+ target[k] = combine(target[k],source[k])
+ else
+ target[k] = v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+
+table.combine = combine
+
+-- If needed we can add something (some discussion on the list but I'm not sure if
+-- it makes sense because merging such mixed tables is quite unusual.
+--
+-- function table.himerged(...)
+-- local result = { }
+-- local r = 0
+-- for i=1,select("#",...) do
+-- local s = select(i,...)
+-- if s then
+-- for k, v in next, s do
+-- if type(k) == "number" then
+-- r = r + 1
+-- result[r] = v
+-- else
+-- result[k] = v
+-- end
+-- end
+-- end
+-- end
+-- return result
+-- end
diff --git a/macros/luatex/generic/lualibs/lualibs-util-zip.lua b/macros/luatex/generic/lualibs/lualibs-util-zip.lua
new file mode 100644
index 0000000000..bd8fdf287f
--- /dev/null
+++ b/macros/luatex/generic/lualibs/lualibs-util-zip.lua
@@ -0,0 +1,684 @@
+if not modules then modules = { } end modules ['util-zip'] = {
+ version = 1.001,
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+-- This module is mostly meant for relative simple zip and unzip tasks. We can read
+-- and write zip files but with limitations. Performance is quite good and it makes
+-- us independent of zip tools, which (for some reason) are not always installed.
+--
+-- This is an lmtx module and at some point will be lmtx only but for a while we
+-- keep some hybrid functionality.
+
+local type, tostring, tonumber = type, tostring, tonumber
+local sort, concat = table.sort, table.concat
+
+local find, format, sub, gsub = string.find, string.format, string.sub, string.gsub
+local osdate, ostime, osclock = os.date, os.time, os.clock
+local ioopen = io.open
+local loaddata, savedata = io.loaddata, io.savedata
+local filejoin, isdir, dirname, mkdirs = file.join, lfs.isdir, file.dirname, dir.mkdirs
+local suffix, suffixes = file.suffix, file.suffixes
+local openfile = io.open
+
+gzip = gzip or { } -- so in luatex we keep the old ones too
+
+if not zlib then
+ zlib = xzip -- in luametatex we shadow the old one
+elseif not xzip then
+ xzip = zlib
+end
+
+local files = utilities.files
+local openfile = files.open
+local closefile = files.close
+local readstring = files.readstring
+local readcardinal2 = files.readcardinal2le
+local readcardinal4 = files.readcardinal4le
+local setposition = files.setposition
+local getposition = files.getposition
+
+local band = bit32.band
+local rshift = bit32.rshift
+local lshift = bit32.lshift
+
+local zlibdecompress = zlib.decompress
+local zlibdecompresssize = zlib.decompresssize
+local zlibchecksum = zlib.crc32
+
+if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
+ local cs = zlibchecksum
+ zlibchecksum = function(str,n) return cs(n or 0, str) end
+end
+
+local decompress = function(source) return zlibdecompress (source,-15) end -- auto
+local decompresssize = function(source,targetsize) return zlibdecompresssize(source,targetsize,-15) end -- auto
+local calculatecrc = function(buffer,initial) return zlibchecksum (initial or 0,buffer) end
+
+local zipfiles = { }
+utilities.zipfiles = zipfiles
+
+local openzipfile, closezipfile, unzipfile, foundzipfile, getziphash, getziplist do
+
+ function openzipfile(name)
+ return {
+ name = name,
+ handle = openfile(name,0),
+ }
+ end
+
+ local function collect(z)
+ if not z.list then
+ local list = { }
+ local hash = { }
+ local position = 0
+ local index = 0
+ local handle = z.handle
+ while true do
+ setposition(handle,position)
+ local signature = readstring(handle,4)
+ if signature == "PK\3\4" then
+ -- [local file header 1]
+ -- [encryption header 1]
+ -- [file data 1]
+ -- [data descriptor 1]
+ local version = readcardinal2(handle)
+ local flag = readcardinal2(handle)
+ local method = readcardinal2(handle)
+ local filetime = readcardinal2(handle)
+ local filedate = readcardinal2(handle)
+ local crc32 = readcardinal4(handle)
+ local compressed = readcardinal4(handle)
+ local uncompressed = readcardinal4(handle)
+ local namelength = readcardinal2(handle)
+ local extralength = readcardinal2(handle)
+ local filename = readstring(handle,namelength)
+ local descriptor = band(flag,8) ~= 0
+ local encrypted = band(flag,1) ~= 0
+ local acceptable = method == 0 or method == 8
+ -- 30 bytes of header including the signature
+ local skipped = 0
+ local size = 0
+ if encrypted then
+ size = readcardinal2(handle)
+ skipbytes(size)
+ skipped = skipped + size + 2
+ skipbytes(8)
+ skipped = skipped + 8
+ size = readcardinal2(handle)
+ skipbytes(size)
+ skipped = skipped + size + 2
+ size = readcardinal4(handle)
+ skipbytes(size)
+ skipped = skipped + size + 4
+ size = readcardinal2(handle)
+ skipbytes(size)
+ skipped = skipped + size + 2
+ end
+ position = position + 30 + namelength + extralength + skipped
+ if descriptor then
+ setposition(handle,position + compressed)
+ crc32 = readcardinal4(handle)
+ compressed = readcardinal4(handle)
+ uncompressed = readcardinal4(handle)
+ end
+ if acceptable then
+ index = index + 1
+ local data = {
+ filename = filename,
+ index = index,
+ position = position,
+ method = method,
+ compressed = compressed,
+ uncompressed = uncompressed,
+ crc32 = crc32,
+ encrypted = encrypted,
+ }
+ hash[filename] = data
+ list[index] = data
+ else
+ -- maybe a warning when encrypted
+ end
+ position = position + compressed
+ else
+ break
+ end
+ z.list = list
+ z.hash = hash
+ end
+ end
+ end
+
+ function getziplist(z)
+ local list = z.list
+ if not list then
+ collect(z)
+ end
+ return z.list
+ end
+
+ function getziphash(z)
+ local hash = z.hash
+ if not hash then
+ collect(z)
+ end
+ return z.hash
+ end
+
+ function foundzipfile(z,name)
+ return getziphash(z)[name]
+ end
+
+ function closezipfile(z)
+ local f = z.handle
+ if f then
+ closefile(f)
+ z.handle = nil
+ end
+ end
+
+ function unzipfile(z,filename,check)
+ local hash = z.hash
+ if not hash then
+ hash = zipfiles.hash(z)
+ end
+ local data = hash[filename] -- normalize
+ if not data then
+ -- lower and cleanup
+ -- only name
+ end
+ if data then
+ local handle = z.handle
+ local position = data.position
+ local compressed = data.compressed
+ if compressed > 0 then
+ setposition(handle,position)
+ local result = readstring(handle,compressed)
+ if data.method == 8 then
+ if decompresssize then
+ result = decompresssize(result,data.uncompressed)
+ else
+ result = decompress(result)
+ end
+ end
+ if check and data.crc32 ~= calculatecrc(result) then
+ print("checksum mismatch")
+ return ""
+ end
+ return result
+ else
+ return ""
+ end
+ end
+ end
+
+ zipfiles.open = openzipfile
+ zipfiles.close = closezipfile
+ zipfiles.unzip = unzipfile
+ zipfiles.hash = getziphash
+ zipfiles.list = getziplist
+ zipfiles.found = foundzipfile
+
+end
+
+if xzip then -- flate then do
+
+ local writecardinal1 = files.writebyte
+ local writecardinal2 = files.writecardinal2le
+ local writecardinal4 = files.writecardinal4le
+
+ local logwriter = logs.writer
+
+ local globpattern = dir.globpattern
+-- local compress = flate.flate_compress
+-- local checksum = flate.update_crc32
+ local compress = xzip.compress
+ local checksum = xzip.crc32
+
+ -- local function fromdostime(dostime,dosdate)
+ -- return ostime {
+ -- year = (dosdate >> 9) + 1980, -- 25 .. 31
+ -- month = (dosdate >> 5) & 0x0F, -- 21 .. 24
+ -- day = (dosdate ) & 0x1F, -- 16 .. 20
+ -- hour = (dostime >> 11) , -- 11 .. 15
+ -- min = (dostime >> 5) & 0x3F, -- 5 .. 10
+ -- sec = (dostime ) & 0x1F, -- 0 .. 4
+ -- }
+ -- end
+ --
+ -- local function todostime(time)
+ -- local t = osdate("*t",time)
+ -- return
+ -- ((t.year - 1980) << 9) + (t.month << 5) + t.day,
+ -- (t.hour << 11) + (t.min << 5) + (t.sec >> 1)
+ -- end
+
+ local function fromdostime(dostime,dosdate)
+ return ostime {
+ year = rshift(dosdate, 9) + 1980, -- 25 .. 31
+ month = band(rshift(dosdate, 5), 0x0F), -- 21 .. 24
+ day = band( (dosdate ), 0x1F), -- 16 .. 20
+ hour = band(rshift(dostime,11) ), -- 11 .. 15
+ min = band(rshift(dostime, 5), 0x3F), -- 5 .. 10
+ sec = band( (dostime ), 0x1F), -- 0 .. 4
+ }
+ end
+
+ local function todostime(time)
+ local t = osdate("*t",time)
+ return
+ lshift(t.year - 1980, 9) + lshift(t.month,5) + t.day,
+ lshift(t.hour ,11) + lshift(t.min ,5) + rshift(t.sec,1)
+ end
+
+ local function openzip(filename,level,comment,verbose)
+ local f = ioopen(filename,"wb")
+ if f then
+ return {
+ filename = filename,
+ handle = f,
+ list = { },
+ level = tonumber(level) or 3,
+ comment = tostring(comment),
+ verbose = verbose,
+ uncompressed = 0,
+ compressed = 0,
+ }
+ end
+ end
+
+ local function writezip(z,name,data,level,time)
+ local f = z.handle
+ local list = z.list
+ local level = tonumber(level) or z.level or 3
+ local method = 8
+ local zipped = compress(data,level)
+ local checksum = checksum(data)
+ local verbose = z.verbose
+ --
+ if not zipped then
+ method = 0
+ zipped = data
+ end
+ --
+ local start = f:seek()
+ local compressed = #zipped
+ local uncompressed = #data
+ --
+ z.compressed = z.compressed + compressed
+ z.uncompressed = z.uncompressed + uncompressed
+ --
+ if verbose then
+ local pct = 100 * compressed/uncompressed
+ if pct >= 100 then
+ logwriter(format("%10i %s",uncompressed,name))
+ else
+ logwriter(format("%10i %02.1f %s",uncompressed,pct,name))
+ end
+ end
+ --
+ f:write("\x50\x4b\x03\x04") -- PK.. 0x04034b50
+ --
+ writecardinal2(f,0) -- minimum version
+ writecardinal2(f,0) -- flag
+ writecardinal2(f,method) -- method
+ writecardinal2(f,0) -- time
+ writecardinal2(f,0) -- date
+ writecardinal4(f,checksum) -- crc32
+ writecardinal4(f,compressed) -- compressed
+ writecardinal4(f,uncompressed) -- uncompressed
+ writecardinal2(f,#name) -- namelength
+ writecardinal2(f,0) -- extralength
+ --
+ f:write(name) -- name
+ f:write(zipped)
+ --
+ list[#list+1] = { #zipped, #data, name, checksum, start, time or 0 }
+ end
+
+ local function closezip(z)
+ local f = z.handle
+ local list = z.list
+ local comment = z.comment
+ local verbose = z.verbose
+ local count = #list
+ local start = f:seek()
+ --
+ for i=1,count do
+ local l = list[i]
+ local compressed = l[1]
+ local uncompressed = l[2]
+ local name = l[3]
+ local checksum = l[4]
+ local start = l[5]
+ local time = l[6]
+ local date, time = todostime(time)
+ f:write('\x50\x4b\x01\x02')
+ writecardinal2(f,0) -- version made by
+ writecardinal2(f,0) -- version needed to extract
+ writecardinal2(f,0) -- flags
+ writecardinal2(f,8) -- method
+ writecardinal2(f,time) -- time
+ writecardinal2(f,date) -- date
+ writecardinal4(f,checksum) -- crc32
+ writecardinal4(f,compressed) -- compressed
+ writecardinal4(f,uncompressed) -- uncompressed
+ writecardinal2(f,#name) -- namelength
+ writecardinal2(f,0) -- extralength
+ writecardinal2(f,0) -- commentlength
+ writecardinal2(f,0) -- nofdisks -- ?
+ writecardinal2(f,0) -- internal attr (type)
+ writecardinal4(f,0) -- external attr (mode)
+ writecardinal4(f,start) -- local offset
+ f:write(name) -- name
+ end
+ --
+ local stop = f:seek()
+ local size = stop - start
+ --
+ f:write('\x50\x4b\x05\x06')
+ writecardinal2(f,0) -- disk
+ writecardinal2(f,0) -- disks
+ writecardinal2(f,count) -- entries
+ writecardinal2(f,count) -- entries
+ writecardinal4(f,size) -- dir size
+ writecardinal4(f,start) -- dir offset
+ if type(comment) == "string" and comment ~= "" then
+ writecardinal2(f,#comment) -- comment length
+ f:write(comment) -- comemnt
+ else
+ writecardinal2(f,0)
+ end
+ --
+ if verbose then
+ local compressed = z.compressed
+ local uncompressed = z.uncompressed
+ local filename = z.filename
+ --
+ local pct = 100 * compressed/uncompressed
+ logwriter("")
+ if pct >= 100 then
+ logwriter(format("%10i %s",uncompressed,filename))
+ else
+ logwriter(format("%10i %02.1f %s",uncompressed,pct,filename))
+ end
+ end
+ --
+ f:close()
+ end
+
+ local function zipdir(zipname,path,level,verbose)
+ if type(zipname) == "table" then
+ verbose = zipname.verbose
+ level = zipname.level
+ path = zipname.path
+ zipname = zipname.zipname
+ end
+ if not zipname or zipname == "" then
+ return
+ end
+ if not path or path == "" then
+ path = "."
+ end
+ if not isdir(path) then
+ return
+ end
+ path = gsub(path,"\\+","/")
+ path = gsub(path,"/+","/")
+ local list = { }
+ local count = 0
+ globpattern(path,"",true,function(name,size,time)
+ count = count + 1
+ list[count] = { name, time }
+ end)
+ sort(list,function(a,b)
+ return a[1] < b[1]
+ end)
+ local zipf = openzip(zipname,level,comment,verbose)
+ if zipf then
+ local p = #path + 2
+ for i=1,count do
+ local li = list[i]
+ local name = li[1]
+ local time = li[2]
+ local data = loaddata(name)
+ local name = sub(name,p,#name)
+ writezip(zipf,name,data,level,time,verbose)
+ end
+ closezip(zipf)
+ end
+ end
+
+ local function unzipdir(zipname,path,verbose)
+ if type(zipname) == "table" then
+ verbose = zipname.verbose
+ path = zipname.path
+ zipname = zipname.zipname
+ end
+ if not zipname or zipname == "" then
+ return
+ end
+ if not path or path == "" then
+ path = "."
+ end
+ local z = openzipfile(zipname)
+ if z then
+ local list = getziplist(z)
+ if list then
+ local total = 0
+ local count = #list
+ local step = number.idiv(count,10)
+ local done = 0
+ local steps = verbose == "steps"
+ local time = steps and osclock()
+ for i=1,count do
+ local l = list[i]
+ local n = l.filename
+ local d = unzipfile(z,n) -- true for check
+ if d then
+ local p = filejoin(path,n)
+ if mkdirs(dirname(p)) then
+ if steps then
+ total = total + #d
+ done = done + 1
+ if done >= step then
+ done = 0
+ logwriter(format("%4i files of %4i done, %10i bytes, %0.3f seconds",i,count,total,osclock()-time))
+ end
+ elseif verbose then
+ logwriter(n)
+ end
+ savedata(p,d)
+ end
+ else
+ logwriter(format("problem with file %s",n))
+ end
+ end
+ if steps then
+ logwriter(format("%4i files of %4i done, %10i bytes, %0.3f seconds",count,count,total,osclock()-time))
+ end
+ closezipfile(z)
+ return true
+ else
+ closezipfile(z)
+ end
+ end
+ end
+
+ zipfiles.zipdir = zipdir
+ zipfiles.unzipdir = unzipdir
+
+end
+
+-- todo: compress/decompress that work with offset in string
+
+-- We only have a few official methods here:
+--
+-- local decompressed = gzip.load (filename)
+-- local resultsize = gzip.save (filename,compresslevel)
+-- local compressed = gzip.compress (str,compresslevel)
+-- local decompressed = gzip.decompress (str)
+-- local iscompressed = gzip.compressed (str)
+-- local suffix, okay = gzip.suffix (filename)
+--
+-- In LuaMetaTeX we have only xzip which implements a very few methods:
+--
+-- compress (str,level,method,window,memory,strategy)
+-- decompress (str,window)
+-- adler32 (str,checksum)
+-- crc32 (str,checksum)
+
+local pattern = "^\x1F\x8B\x08"
+local gziplevel = 3
+
+function gzip.suffix(filename)
+ local suffix, extra = suffixes(filename)
+ local gzipped = extra == "gz"
+ return suffix, gzipped
+end
+
+function gzip.compressed(s)
+ return s and find(s,pattern)
+end
+
+local getdecompressed
+local putcompressed
+
+if gzip.compress then
+
+ local gzipwindow = 15 + 16 -- +16: gzip, +32: gzip|zlib
+
+ local compress = zlib.compress
+ local decompress = zlib.decompress
+
+ getdecompressed = function(str)
+ return decompress(str,gzipwindow) -- pass offset
+ end
+
+ putcompressed = function(str,level)
+ return compress(str,level or gziplevel,nil,gzipwindow)
+ end
+
+else
+
+ -- Special window values are: flate: -15, zlib: 15, gzip : -15
+
+ local gzipwindow = -15 -- miniz needs this
+ local identifier = "\x1F\x8B"
+
+ local compress = zlib.compress
+ local decompress = zlib.decompress
+ local zlibchecksum = zlib.crc32
+
+ if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then
+ local cs = zlibchecksum
+ zlibchecksum = function(str,n) return cs(n or 0, str) end
+ end
+
+ local streams = utilities.streams
+ local openstream = streams.openstring
+ local closestream = streams.close
+ local getposition = streams.getposition
+ local readbyte = streams.readbyte
+ local readcardinal4 = streams.readcardinal4le
+ local readcardinal2 = streams.readcardinal2le
+ local readstring = streams.readstring
+ local readcstring = streams.readcstring
+ local skipbytes = streams.skip
+
+ local tocardinal1 = streams.tocardinal1
+ local tocardinal4 = streams.tocardinal4le
+
+ getdecompressed = function(str)
+ local s = openstream(str)
+ local identifier = readstring(s,2)
+ local method = readbyte(s,1)
+ local flags = readbyte(s,1)
+ local timestamp = readcardinal4(s)
+ local compression = readbyte(s,1)
+ local operating = readbyte(s,1)
+ -- local isjusttext = (flags & 0x01 ~= 0) and true or false
+ -- local extrasize = (flags & 0x04 ~= 0) and readcardinal2(s) or 0
+ -- local filename = (flags & 0x08 ~= 0) and readcstring(s) or ""
+ -- local comment = (flags & 0x10 ~= 0) and readcstring(s) or ""
+ -- local checksum = (flags & 0x02 ~= 0) and readcardinal2(s) or 0
+ local isjusttext = band(flags,0x01) ~= 0 and true or false
+ local extrasize = band(flags,0x04) ~= 0 and readcardinal2(s) or 0
+ local filename = band(flags,0x08) ~= 0 and readcstring(s) or ""
+ local comment = band(flags,0x10) ~= 0 and readcstring(s) or ""
+ local checksum = band(flags,0x02) ~= 0 and readcardinal2(s) or 0
+ local compressed = readstring(s,#str)
+ local data = decompress(compressed,gzipwindow) -- pass offset
+ return data
+ end
+
+ putcompressed = function(str,level,originalname)
+ return concat {
+ identifier, -- 2 identifier
+ tocardinal1(0x08), -- 1 method
+ tocardinal1(0x08), -- 1 flags
+ tocardinal4(os.time()), -- 4 mtime
+ tocardinal1(0x02), -- 1 compression (2 or 4)
+ tocardinal1(0xFF), -- 1 operating
+ (originalname or "unknownname") .. "\0",
+ compress(str,level,nil,gzipwindow),
+ tocardinal4(zlibchecksum(str)), -- 4
+ tocardinal4(#str), -- 4
+ }
+ end
+
+end
+
+function gzip.load(filename)
+ local f = openfile(filename,"rb")
+ if not f then
+ -- invalid file
+ else
+ local data = f:read("*all")
+ f:close()
+ if data and data ~= "" then
+ if suffix(filename) == "gz" then
+ data = getdecompressed(data)
+ end
+ return data
+ end
+ end
+end
+
+function gzip.save(filename,data,level,originalname)
+ if suffix(filename) ~= "gz" then
+ filename = filename .. ".gz"
+ end
+ local f = openfile(filename,"wb")
+ if f then
+ data = putcompressed(data or "",level or gziplevel,originalname)
+ f:write(data)
+ f:close()
+ return #data
+ end
+end
+
+function gzip.compress(s,level)
+ if s and not find(s,pattern) then
+ if not level then
+ level = gziplevel
+ elseif level <= 0 then
+ return s
+ elseif level > 9 then
+ level = 9
+ end
+ return putcompressed(s,level or gziplevel) or s
+ end
+end
+
+function gzip.decompress(s)
+ if s and find(s,pattern) then
+ return getdecompressed(s)
+ else
+ return s
+ end
+end
+
+-- return zipfiles
diff --git a/macros/luatex/generic/lualibs/lualibs.dtx b/macros/luatex/generic/lualibs/lualibs.dtx
index 73c5aafcc1..ebdba58424 100644
--- a/macros/luatex/generic/lualibs/lualibs.dtx
+++ b/macros/luatex/generic/lualibs/lualibs.dtx
@@ -37,7 +37,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: lualibs 2021-05-20 v2.74 Lua additional functions.}
+\Msg{* Package: lualibs 2022-10-04 v2.75 Lua additional functions.}
\Msg{************************************************************************}
\keepsilent
@@ -107,7 +107,7 @@ and lualibs-extended.lua.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{lualibs.drv}
- [2021/05/20 v2.74 Lua Libraries.]
+ [2022/10/04 v2.75 Lua Libraries.]
\documentclass{ltxdoc}
\usepackage{fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -115,6 +115,7 @@ and lualibs-extended.lua.
\def\primarycolor{DodgerBlue4} %%-> rgb 16 78 139 | #104e8b
\def\secondarycolor{Goldenrod4} %%-> rgb 139 105 200 | #8b6914
%
+\AddToHook{package/hyperref/after}{%
\hypersetup{
colorlinks=true,
linkcolor=\primarycolor,
@@ -123,7 +124,7 @@ and lualibs-extended.lua.
pdftitle={The lualibs package},
pdfsubject={Port of the ConTeXt Lua libraries},
pdfauthor={Elie Roux & Philipp Gesang},
- pdfkeywords={luatex, lualatex, unicode, opentype}}
+ pdfkeywords={luatex, lualatex, unicode, opentype}}}
\newcommand*\email[1]{\href{mailto:#1}{#1}}
\usepackage{fontspec}
@@ -207,7 +208,7 @@ and lualibs-extended.lua.
% \GetFileInfo{lualibs.drv}
%
% \title{The \identifier{lualibs} package}
-% \date{2021/05/20 v2.74}
+% \date{2022/10/04 v2.75}
% \author{Élie Roux · \email{elie.roux@telecom-bretagne.eu}\\
% Philipp Gesang · \email{phg@phi-gamma.net}\\
% The \LaTeX{} Project · \email{https://github.com/latex3/lualibs/}\\
@@ -322,12 +323,11 @@ and lualibs-extended.lua.
% lualibs-io.lua & l-io.lua & reading and writing files \\
% lualibs-os.lua & l-os.lua & platform specific code \\
% lualibs-file.lua & l-file.lua & filesystem operations \\
-% lualibs-gzip.lua & l-gzip.lua & wrapper for \identifier{lgzip} \\
% lualibs-md5.lua & l-md5.lua & checksum functions \\
% lualibs-dir.lua & l-dir.lua & directory handling \\
% lualibs-unicode.lua & l-unicode.lua & utf and unicode \\
% lualibs-url.lua & l-url.lua & url handling \\
-% lualibs-set.lua & l-set.lua & sets \\[1ex]
+% lualibs-set.lua & l-set.lua & sets \\
% \end{tabular}
% \label{tab:basic}
% \hrule
@@ -346,6 +346,7 @@ and lualibs-extended.lua.
% \vskip1em
% \begin{tabular}{l l l}
% \identifier{lualibs} name & \CONTEXT name & primary purpose \\[1ex]
+% lualibs-util-sac.lua & util-sac.lua & string based file readers \\
% lualibs-util-str.lua & util-str.lua & extra |string| functions \\
% lualibs-util-fil.lua & util-fil.lua & extra |file| functions \\
% lualibs-util-tab.lua & util-tab.lua & extra |table| functions \\
@@ -357,7 +358,8 @@ and lualibs-extended.lua.
% lualibs-util-deb.lua & util-deb.lua & extra |debug| functionality \\
% lualibs-util-tpl.lua & util-tpl.lua & templating \\
% lualibs-util-sta.lua & util-sta.lua & stacker (e.~g. for \abbrev{pdf}) \\
-% lualibs-util-jsn.lua & util-jsn.lua & conversion to and from json \\[1ex]
+% lualibs-util-jsn.lua & util-jsn.lua & conversion to and from json \\
+% lualibs-util-zip.lua & util-zip.lua & compression and zip files \\[1ex]
% \end{tabular}
% \label{tab:extended}
% \hrule
@@ -428,8 +430,8 @@ lualibs = lualibs or { }
lualibs.module_info = {
name = "lualibs",
- version = "2.74", --TAGVERSION
- date = "2021-05-20", --TAGDATE
+ version = "2.75", --TAGVERSION
+ date = "2022-10-04", --TAGDATE
description = "ConTeXt Lua standard libraries.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -582,8 +584,8 @@ local loadmodule = lualibs.loadmodule
local lualibs_basic_module = {
name = "lualibs-basic",
- version = "2.74", --TAGVERSION
- date = "2021-05-20", --TAGDATE
+ version = "2.75", --TAGVERSION
+ date = "2022-10-04", --TAGDATE
description = "ConTeXt Lua libraries -- basic collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -621,7 +623,6 @@ if loaded == false then
loadmodule("lualibs-io.lua")
loadmodule("lualibs-os.lua")
loadmodule("lualibs-file.lua")
- loadmodule("lualibs-gzip.lua")
loadmodule("lualibs-md5.lua")
loadmodule("lualibs-dir.lua")
loadmodule("lualibs-unicode.lua")
@@ -664,8 +665,8 @@ lualibs = lualibs or { }
local lualibs_extended_module = {
name = "lualibs-extended",
- version = "2.74", --TAGVERSION
- date = "2021-05-20", --TAGDATE
+ version = "2.75", --TAGVERSION
+ date = "2022-10-04", --TAGDATE
description = "ConTeXt Lua libraries -- extended collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -776,6 +777,7 @@ else
end
if loaded == false then
+ loadmodule("lualibs-util-sac.lua")--- streams: string based file parsers
loadmodule("lualibs-util-str.lua")--- string formatters (fast)
loadmodule("lualibs-util-fil.lua")--- extra file helpers
loadmodule("lualibs-util-tab.lua")--- extended table operations
@@ -795,6 +797,7 @@ if loaded == false then
loadmodule("lualibs-util-deb.lua")--- extra debugging
loadmodule("lualibs-util-tpl.lua")--- templating
loadmodule("lualibs-util-sta.lua")--- stacker (for writing pdf)
+ loadmodule("lualibs-util-zip.lua")--- compression and zip files
end
unfake_context() --- TODO check if this works at runtime
diff --git a/macros/luatex/generic/lualibs/lualibs.pdf b/macros/luatex/generic/lualibs/lualibs.pdf
index 23df3045e6..175e7e9f01 100644
--- a/macros/luatex/generic/lualibs/lualibs.pdf
+++ b/macros/luatex/generic/lualibs/lualibs.pdf
Binary files differ
diff --git a/macros/luatex/latex/japanese-mathformulas/README.txt b/macros/luatex/latex/japanese-mathformulas/README.txt
index b936573615..8f5c0199b8 100644
--- a/macros/luatex/latex/japanese-mathformulas/README.txt
+++ b/macros/luatex/latex/japanese-mathformulas/README.txt
@@ -1,5 +1,5 @@
japanese-mathformulas - mathematical formula using amsmath and tikz==================================
-version 1.0.0
+version 1.0.1
Licence----------------------------------------------------------------------------------------------
lppl1.3c
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.pdf b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.pdf
index 6657bbf2e4..a1af2c5b67 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.pdf
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.pdf
Binary files differ
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
index 08786e5a34..4eb0ec70a2 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas-sample.tex
@@ -2,7 +2,7 @@
\usepackage{iwona}%
\usepackage{bookmark,xurl}
-\usepackage{mathformula,ascolorbox,enumerate,environ,tcolorbox,color}%
+\usepackage{japanese-mathformulas,ascolorbox,enumerate,environ,tcolorbox,color}%
\usepackage[hiragino-pron,deluxe,expert,bold]{luatexja-preset}%
\usepackage[usetype1]{uline--}
\usepackage[margin=15mm]{geometry}
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
index e0b9699357..8514e8de6a 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.pdf
Binary files differ
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
index 201d70314e..5038049b59 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.sty
@@ -1,6 +1,6 @@
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{mathformula}[2022/9/30,Version 1.0.0]%
+\ProvidesPackage{japanese-mathformulas}[2022/10/3,Version 1.0.1]%
\RequirePackage{luatexja}%
\RequirePackage{luatexja-fontspec}%
@@ -9,11 +9,36 @@
\RequirePackage{amsmath,amssymb,siunitx,ifthen,xparse,tikz,mathtools,graphics}%
\usetikzlibrary{arrows,shapes,intersections,calc,angles,decorations.shapes,arrows.meta,quotes,through,decorations.text}%
-\newcommand{\空行}{\vskip\baselineskip}%
+\newcommand{\空行}{\vskip0.00001\baselineskip}%
+%\def\空行{\br{.1}}
+\newlength{\@tempdimf@math}%
+\def\br{\@ifstar{\@br}{\@@br}}%
+\def\@br#1{%
+\allowbreak
+\setlength{\@tempdimf@math}{\baselineskip * \real{#1}}%
+\vspace*{\@tempdimf@math}%
+}%
+\def\@@br#1{%
+\setlength{\@tempdimf@math}{\baselineskip * \real{#1}}%
+\vspace{\@tempdimf@math}%
+}%
\newcommand{\半空行}{\vskip.5\baselineskip}%
\newcommand{\証明開始}{\noindent\textgt{【証明】}\par}%
-\newcommand{\証明終了}{\@rightalign{\ (Q.E.D.)}\par}%
+\newcommand{\証明終了}{\@rightalign{\ (Q.E.D.)}\par}%
\newcommand{\数式カンマスペース}{,\ }%
+\NewDocumentCommand\根号{ O{} m }%
+ {\ifthenelse{\equal{#1}{}}{\sqrt{#2\,}}{\sqrt[#1]{#2\,}}}%
+\newcommand{\ベクトル}[1]{\vec{\mathstrut #1}}%
+\newcommand{\overrightarrowtext}[1]{\overrightarrow{\text{#1}}}%
+\newcommand{\overarc}[1]%
+ {%
+ \tikz[baseline = (N.base),every node/.style={}]%
+ {%
+ \node[inner sep = 0pt](N){\text{#1}};%
+ \draw[line width = 0.4pt] plot [smooth, tension=1.3]coordinates%
+ {($(N.north west)+(0.1ex,0)$)($(N.north)+(0,0.5ex)$)($(N.north east)+(0,0)$)};%
+ }%
+ }%
\newcommand*{\@rightalign}[1]%
{%
\hspace{\parfillskip}%
@@ -23,7 +48,7 @@
\newcommand{\Ttyuukakko}[1]{\left(#1\right)}%
\newcommand{\Ttyuubracket}[1]{\left[#1\right]}%
\newcommand{\Tdaikakko}[1]{\left\{#1\right\}}%
-\newcommand{\Tzettaiti}[1]{\left|#1\right|}%
+\newcommand{\Tzettaiti}[1]{\left|\,#1\,\right|}%
\def\shikimaru#1{\text{\quad$\cdots\cdots$\,\ajMaru{#1}}}
\let\originalbigtriangleup\bigtriangleup
\def\bigtriangleup#1{\originalbigtriangleup{\mathrm{#1}}}
@@ -148,55 +173,55 @@
\NewDocumentCommand{\平方根}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$a$は実数として,$\sqrt{a^2}=\Tzettaiti{a}$}%
+ {$a$は実数として,$\根号{a^2}=\Tzettaiti{a}$}%
{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$a$は実数として,%
- \[\sqrt{a^2}=\Tzettaiti{a}\]%
+ \[\根号{a^2}=\Tzettaiti{a}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
{%
$a\geqq0$のとき,%
- $\Ttyuukakko{\sqrt{a}}^2=\Ttyuukakko{-\sqrt{a}}^2=a\数式カンマスペース\sqrt{a}\leqq0$%
+ $\Ttyuukakko{\根号{a}}^2=\Ttyuukakko{-\根号{a}}^2=a\数式カンマスペース\根号{a}\leqq0$%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{b}}%
{%
$a\leqq0$のとき,%
- \[\Ttyuukakko{\sqrt{a}}^2=\Ttyuukakko{-\sqrt{a}}^2=a\数式カンマスペース\sqrt{a}\leqq0\]%
+ \[\Ttyuukakko{\根号{a}}^2=\Ttyuukakko{-\根号{a}}^2=a\数式カンマスペース\根号{a}\leqq0\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {$\sqrt{a}=\Tzettaiti{a}$}%
+ {$\根号{a}=\Tzettaiti{a}$}%
{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
- {\[\sqrt{a}=\Tzettaiti{a}\]}%
+ {\[\根号{a}=\Tzettaiti{a}\]}%
{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
{%
$a>0\数式カンマスペース b>0\数式カンマスペース a\neq b$のとき,%
- $\sqrt{a}\sqrt{b}=\sqrt{ab}$%
+ $\根号{a}\根号{b}=\根号{ab}$%
}%
{\relax}
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0\数式カンマスペース a\neq b$のとき,%
- \[\sqrt{a}\sqrt{b}=\sqrt{ab}\]%
+ \[\根号{a}\根号{b}=\根号{ab}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{i}}%
- {$\bunsuu{\sqrt{a}}{\sqrt{b}}=\sqrt{\bunsuu{a}{b}}$}%
+ {$\bunsuu{\根号{a}}{\根号{b}}=\根号{\bunsuu{a}{b}}$}%
{\relax}%
\ifthenelse{\equal{#1}{性質D}\AND\equal{#2}{b}}%
- {\[\bunsuu{\sqrt{a}}{\sqrt{b}}=\sqrt{\bunsuu{a}{b}}\]}%
+ {\[\bunsuu{\根号{a}}{\根号{b}}=\根号{\bunsuu{a}{b}}\]}%
{\relax}%
\ifthenelse{\equal{#1}{性質E}\AND\equal{#2}{i}}%
- {$\sqrt{k^2a}=k\sqrt{a}$}%
+ {$\根号{k^2a}=k\根号{a}$}%
{\relax}%
\ifthenelse{\equal{#1}{性質E}\AND\equal{#2}{b}}%
- {\[\sqrt{k^2a}=k\sqrt{a}\]}%
+ {\[\根号{k^2a}=k\根号{a}\]}%
{\relax}%
}%
@@ -311,24 +336,24 @@
\NewDocumentCommand{\二次方程式の解の公式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,$x=\bunsuu{-b\pm\sqrt{b^2-4ac}}{2a}$}{\relax}%
+ {$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,$x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$ax^2+bx+c=0 \Ttyuukakko{a\neq0}$に対して,%
- \[x=\bunsuu{-b\pm\sqrt{b^2-4ac}}{2a}\]%
+ \[x=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明A}}%
{%
\証明開始%
- \vspace{-1\zw}%
+ \vspace{-2.5\zw}%
\begin{align*}%
ax^2+bx+c&=0&\\%
a\Ttyuukakko{x^2+\bunsuu{b}{a}x}+c&=0&\\%
a\Tdaikakko{\Ttyuukakko{x+\bunsuu{b}{2a}}^2-\bunsuu{b^2}{4a^2}}+c&=0&\\%
a\Ttyuukakko{x+\bunsuu{b}{2a}}^2-\bunsuu{b^2}{4a}+c&=0&\\%
\Ttyuukakko{x+\bunsuu{b}{2a}}^2&=\bunsuu{b^2-4ac}{4a^2}&\\%
- x&=\bunsuu{-b\pm\sqrt{b^2-4ac}}{2a}%
+ x&=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}%
\end{align*}%
\証明終了%
}%
@@ -336,13 +361,13 @@
\ifthenelse{\equal{#1}{証明B}}%
{%
\証明開始%
- \vspace{-1\zw}%
+ \vspace{-2.5\zw}%
\begin{align*}%
ax^2+bx+c&=0&\\%
4a^2x^2+4abx+4ac&=0&\\%
\Ttyuukakko{2ax+b}^2-b^2+4ac&=0&\\%
- 2ax+b&=\pm\sqrt{b^2-4ac}&\\%
- x&=\bunsuu{-b\pm\sqrt{b^2-4ac}}{2a}%
+ 2ax+b&=\pm\根号{b^2-4ac}&\\%
+ x&=\bunsuu{-b\pm\根号{b^2-4ac}}{2a}%
\end{align*}%
\証明終了%
}%
@@ -366,7 +391,7 @@
\draw pic["$\theta$",draw=black,->,thin,angle eccentricity=1.4,angle radius=0.4cm]{angle=B--A--C};%
\end{tikzpicture}%
\空行%
- 図の様な直角三角形ABCにおいて$\angle\mathrm{CAB}=\theta$のとき,%
+ 図の様な直角$\triangle{\text{ABC}}$において$\angle\mathrm{CAB}=\theta$のとき,%
\[%
\sin\theta=\bunsuu{\text{BC}}{\text{AC}}\数式カンマスペース%
\cos\theta=\bunsuu{\text{AB}}{\text{AC}}\数式カンマスペース%
@@ -467,15 +492,15 @@
\newcommand{\直線}{両方向に限りなく伸びたまっすぐな線。}%
-\newcommand{\線分}{直線ABのうち,二点A\数式カンマスペース Bを端とする部分。}%
+\newcommand{\線分}{直線$\text{AB}$のうち,二点$\text{A}\数式カンマスペース\text{B}$を端とする部分。}%
-\newcommand{\半直線}{直線ABのうち,一方の点を端とし,もう一方に限りなく伸びた部分。}%
+\newcommand{\半直線}{直線$\text{AB}$のうち,一方の点を端とし,もう一方に限りなく伸びた部分。}%
\newcommand{\距離}
{%
- 空でない集合Xの元$x\数式カンマスペース y$にたいして,実数値$d(x\数式カンマスペース y)$が定義され,%
+ 空でない集合Xの元$x\数式カンマスペース y$に対して,実数値$d(x\数式カンマスペース y)$が定義され,%
\[d(x\数式カンマスペース y)=0\Leftrightarrow x=y\数式カンマスペース\quad(x\数式カンマスペース y)=d(y\数式カンマスペース x)\数式カンマスペース\quad(x\数式カンマスペース y)\leqq d(x\数式カンマスペース y)+d(y\数式カンマスペース x)\]%
の三つの性質を満たす$d$をX上の距離といい,$(\text{X}\数式カンマスペース d)$を距離空間という。 %
}%
@@ -484,7 +509,7 @@
\newcommand{\円}{平面上の一点から等しい距離にある点の集合。}%
-\newcommand{\弧}{円周上の二点A\数式カンマスペース Bに対して,A\数式カンマスペース Bによって分けられた円周の各々の部分を弧ABといい,$\overarc{AB}$と表す。}%
+\newcommand{\弧}{円周上の二点$\text{A}\数式カンマスペース\text{B}$に対して,A\数式カンマスペース Bによって分けられた円周の各々の部分を弧$\text{AB}$といい,$\overarc{AB}$と表す。}%
\newcommand{\弦}{弧の両端を結んだ線分。}%
@@ -495,9 +520,9 @@
\NewDocumentCommand{\対頂角}{ m O{i} }%
{%
- \ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{定義}}%
{%
- \begin{tikzpicture}%
+ \begin{tikzpicture}%
\draw(0,0)--(2,2);%
\draw(2,0)--(0,2);%
\draw(0,0)coordinate(O);%
@@ -512,23 +537,23 @@
図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を対頂角という。%
}%
{\relax}%
- \ifthenelse{\equal{#1}{性質}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{性質}}%
{対頂角は等しい。}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
\begin{tikzpicture}%
- \draw(0,0)--(2,2);%
- \draw(2,0)--(0,2);%
- \draw(0,0)coordinate(O);%
- \draw(2,2)coordinate(A);%
- \draw(2,0)coordinate(B);%
- \draw(0,2)coordinate(C);%
- \draw(1,1)coordinate(D);%
- \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
- \draw pic["\,C",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--D--A};%
- \draw pic["B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=O--D--B};%
- \end{tikzpicture}%
+ \draw(0,0)--(2,2);%
+ \draw(2,0)--(0,2);%
+ \draw(0,0)coordinate(O);%
+ \draw(2,2)coordinate(A);%
+ \draw(2,0)coordinate(B);%
+ \draw(0,2)coordinate(C);%
+ \draw(1,1)coordinate(D);%
+ \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=A--D--C};%
+ \draw pic["\,C",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--D--A};%
+ \draw pic["B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=O--D--B};%
+ \end{tikzpicture}%
\空行%
\[180^\circ =\angle\mathrm{A}+\angle\mathrm{C}\]%
\[180^\circ=\angle\mathrm{B}+\angle\mathrm{C}\]%
@@ -541,29 +566,29 @@
\NewDocumentCommand{\錯角}{ m O{i} }%
{%
- \ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{定義}}%
{%
\begin{tikzpicture}%
- \draw(-1,-0.5)--(2,1);%
- \draw(-1,-1)--(2,-1);%
- \draw(0,-2)--(2,2);%
- \draw(2,2)coordinate(A);%
- \draw(1.3333,0.66666)coordinate(B);%
- \draw(2,1)coordinate(C);%
- \draw(2,-1)coordinate(D);%
- \draw(0.5,-1)coordinate(E);%
- \draw(0,-2)coordinate(F);%
- \draw(-1,-1)coordinate(G);%
- \draw(-1,-0.5)coordinate(H);%
- \draw pic["\,A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=E--B--C};%
- \draw pic["B\,\,\,",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--E--G};%
+ \draw(-1,-0.5)--(2,1);%
+ \draw(-1,-1)--(2,-1);%
+ \draw(0,-2)--(2,2);%
+ \draw(2,2)coordinate(A);%
+ \draw(1.3333,0.66666)coordinate(B);%
+ \draw(2,1)coordinate(C);%
+ \draw(2,-1)coordinate(D);%
+ \draw(0.5,-1)coordinate(E);%
+ \draw(0,-2)coordinate(F);%
+ \draw(-1,-1)coordinate(G);%
+ \draw(-1,-0.5)coordinate(H);%
+ \draw pic["\,A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=E--B--C};%
+ \draw pic["B\,\,\,",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.3cm] {angle=B--E--G};%
\end{tikzpicture}
\空行%
図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を錯角という。%
}%
{\relax}%
- \ifthenelse{\equal{#1}{性質}\AND\equal{#2}{i}}%
- {直線$l\数式カンマスペース m$において,錯角が等しい$\Leftrightarrow$直線$l,m$は平行。}{\relax}%
+ \ifthenelse{\equal{#1}{性質}}%
+ {直線$l\数式カンマスペース m$において,錯角が等しい$\Leftrightarrow$直線$l\数式カンマスペース m$は平行。}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
@@ -607,28 +632,28 @@
\NewDocumentCommand{\同位角}{ m O{i} }%
{%
- \ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{定義}}%
{%
\begin{tikzpicture}%
- \draw(-1,-0.5)--(2,1);%
- \draw(-1,-1)--(2,-1);%
- \draw(0,-2)--(2,2);%
- \draw(2,2)coordinate(A);%
- \draw(1.3333,0.66666)coordinate(B);%
- \draw(2,1)coordinate(C);%
- \draw(2,-1)coordinate(D);%
- \draw(0.5,-1)coordinate(E);%
- \draw(0,-2)coordinate(F);%
- \draw(-1,-1)coordinate(G);%
- \draw(-1,-0.5)coordinate(H);%
- \draw pic["\,\,A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=C--B--A};%
- \draw pic["\,\,B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=D--E--B};%
+ \draw(-1,-0.5)--(2,1);%
+ \draw(-1,-1)--(2,-1);%
+ \draw(0,-2)--(2,2);%
+ \draw(2,2)coordinate(A);%
+ \draw(1.3333,0.66666)coordinate(B);%
+ \draw(2,1)coordinate(C);%
+ \draw(2,-1)coordinate(D);%
+ \draw(0.5,-1)coordinate(E);%
+ \draw(0,-2)coordinate(F);%
+ \draw(-1,-1)coordinate(G);%
+ \draw(-1,-0.5)coordinate(H);%
+ \draw pic["\,\,A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=C--B--A};%
+ \draw pic["\,\,B",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=D--E--B};%
\end{tikzpicture}
\空行%
図において,$\angle\mathrm{A}$と$\angle\mathrm{B}$を同位角という。
}%
{\relax}%
- \ifthenelse{\equal{#1}{公理}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{公理}}%
{直線$l,m$において,同位角が等しい$\Leftrightarrow$直線$l\数式カンマスペース m$は平行。}{\relax}%
}%
@@ -636,13 +661,12 @@
\NewDocumentCommand{\正弦定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {三角形ABCの外接円の半径をRとして,$\bunsuu{a}{\sin\text{A}}=2\text{R}\text{\ (}b\数式カンマスペース\text{B
+ {$\triangle{\text{ABC}}$の外接円の半径を$R$として,$\bunsuu{a}{\sin\text{A}}=2\text{R}\text{\ (}b\数式カンマスペース\text{B
}\数式カンマスペース c\数式カンマスペース\text{Cについても同様に成立})$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- 三角形ABCの外接円の半径をRとして,%
- \[\bunsuu{a}{sin\text{A}}=2\text{R}\]%
- ($b,B,c,C$についても同様に成立)%
+ $\triangle{\text{ABC}}$の外接円の半径を$R$として,%
+ \[\bunsuu{a}{sin\text{A}}=2R\text{\ (\,$b\数式カンマスペース\text{B}\数式カンマスペース c\数式カンマスペース\text{C}$についても同様に成立)}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -651,9 +675,9 @@
\空行%
\begin{tikzpicture}%
\draw(0,1.25)coordinate(A)-- (1,-0.75)coordinate(C)-- (-1,-0.75)coordinate(B);%
- \draw pic["A",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=B--A--C};%
+ \draw pic[draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=B--A--C};%
\draw(-1,0.75)coordinate(D);%
- \draw pic["D",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=B--D--C};%
+ \draw pic[draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=B--D--C};%
\draw(0,1.25)--(1,-0.75)--(-1,-0.75)--cycle;%
\draw(0,1.25)node[above]{A};%
\draw(1,-0.75)node[below]{C};%
@@ -681,10 +705,10 @@
\NewDocumentCommand{\余弦定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {三角形ABCにおいて,$a^2=b^2+c^2-2bc\cos\text{A}$}{\relax}%
+ {$\triangle{\text{ABC}}$において,$a^2=b^2+c^2-2bc\cos\text{A}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- 三角形ABCにおいて,%
+ $\triangle{\text{ABC}}$において,%
\[a^2=b^2+c^2-2bc\cos\text{A}\]%
}%
{\relax}%
@@ -703,12 +727,12 @@
\draw(1.5,2)coordinate(B);%
\draw(1.5,0)--(1.5,2);%
\draw pic[draw,black,thin,angle radius=0.3cm] {right angle=A--H--B};%
- \draw pic["$A$",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=H--A--B};%
+ \draw pic[draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=H--A--B};%
\end{tikzpicture}%
\空行%
図において$\text{BC}=a,\text{CA}=b,\text{AC}=c$として,%
\[\text{BH}=c\sin\text{A},\quad\text{AH}=c\cos\text{A}\]%
- また,三角形BHCに三平方の定理を用いることにより%
+ また,$\triangle{\text{BHC}}$に三平方の定理を用いることにより%
\[\text{CB}^2=\text{BH}^2+\text{HC}^2\]%
ここで,$\text{HC}=\text{AC}-\text{AH}=b-c\cos\text{A},\quad\text{BH}=c\sin\text{A}$より%
\begin{align*}%
@@ -728,10 +752,10 @@
\NewDocumentCommand{\三角形の面積}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {三角形ABCの面積を$S$として,$S=\bunsuu{1}{2}bc\sin\text{A}$}{\relax}%
+ {$\triangle{\text{ABC}}$の面積を$S$として,$S=\bunsuu{1}{2}bc\sin\text{A}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- 三角形ABCの面積を$S$として,%
+ $\triangle{\text{ABC}}$の面積を$S$として,%
\[S=\bunsuu{1}{2}bc\sin\text{A}\]%
}%
{\relax}%
@@ -749,12 +773,12 @@
\draw(1.5,2)coordinate(B);%
\draw(1.5,0)--(1.5,2);%
\draw pic[draw,black,thin,angle radius=0.3cm] {right angle=A--H--B};%
- \draw pic["$A$",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=H--A--B};%
+ \draw pic[draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=H--A--B};%
\end{tikzpicture}%
\空行%
図において%
\[\text{BC}=a\数式カンマスペース\text{CA}=B\数式カンマスペース\text{AC}=c\]%
- また,三角形ABCの面積を$S$として$S=\bunsuu{1}{2}\text{AC}\times\text{BH}$と,$AB\sin\text{A}=\text{BH}$から,%
+ また,$\triangle{\text{ABC}}$の面積を$S$として$S=\bunsuu{1}{2}\text{AC}\times\text{BH}$と,$\text{AB}\sin\text{A}=\text{BH}$から,%
\[S=\bunsuu{1}{2}bc\sin\text{A}\]%
\証明終了%
}%
@@ -773,13 +797,13 @@
\ifthenelse{\equal{#1}{補集合の要素の個数}\AND\equal{#2}{b}}%
{全体集合を$U$として,\[n\Ttyuukakko{\overline{A}}=n\Ttyuukakko{U}-n\Ttyuukakko{A}\]}{\relax}%
\ifthenelse{\equal{#1}{和の法則}\AND\equal{#2}{i}}%
- {二つの事象A\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
+ {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
\ifthenelse{\equal{#1}{和の法則}\AND\equal{#2}{b}}%
- {二つの事象A\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
+ {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AまたはBの起こる場合の数は$a+b$通り}{\relax}%
\ifthenelse{\equal{#1}{積の法則}\AND\equal{#2}{i}}%
- {二つの事象A\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
+ {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
\ifthenelse{\equal{#1}{積の法則}\AND\equal{#2}{b}}%
- {二つの事象A\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
+ {二つの事象$\text{A}$\数式カンマスペース Bにたいして,Aの起こりかたが$a$通り,Bの起こりかたが$b$通りのとき,AかつBの起こる場合の数は$ab$通り}{\relax}%
\ifthenelse{\equal{#1}{順列}\AND\equal{#2}{i}}%
{異なる$n$個のものから$r$個選んで並べる場合の数は${}_{n}P_{r}=\bunsuu{n!}{\Ttyuukakko{n-r}!}$}{\relax}%
\ifthenelse{\equal{#1}{順列}\AND\equal{#2}{b}}%
@@ -788,7 +812,7 @@
\[{}_{n}P_{r}=\bunsuu{n!}{\Ttyuukakko{n-r}!}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{順列の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{順列の証明}}%
{%
\証明開始%
異なる$n$個のものから$r$個選んで並べる場合の数は,%
@@ -801,7 +825,7 @@
{異なる$n$個のものを円に並べる場合の数は$\Ttyuukakko{n-1}!$}{\relax}%
\ifthenelse{\equal{#1}{円順列}\AND\equal{#2}{b}}%
{異なる$n$個のものを円に並べる場合の数は\[\Ttyuukakko{n-1}!\]}{\relax}%
- \ifthenelse{\equal{#1}{円順列の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{円順列の証明}}%
{%
\証明開始%
$n$個のものを円形に並べるとき,1つを固定して考えると,残り$n-1$個を並べる順列の個数に等しい。よって$\Ttyuukakko{n-1}!$通りとなる。%
@@ -819,7 +843,7 @@
\[{}_{n}C_{r}=\bunsuu{n!}{r!\Ttyuukakko{n-r}!}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{組み合わせの証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{組み合わせの証明}}%
{%
\証明開始%
異なる$n$個のものから$r$個選ぶ場合の数は,順列を重複度で割ったものなので%
@@ -829,14 +853,14 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{同じものを含む順列}\AND\equal{#2}{i}}%
- {aが$p$個,bが$q$個,cが$r$個,とある時,それら全部を並べる場合の数は,$\bunsuu{n!}{p!q!r!}$(ただし,$p+q+r=n$)}{\relax}%
+ {$a$が$p$個,$b$が$q$個,$c$が$r$個,とあるとき,それら全部を並べる場合の数は,$\bunsuu{n!}{p!q!r!}$(ただし,$p+q+r=n$)}{\relax}%
\ifthenelse{\equal{#1}{同じものを含む順列}\AND\equal{#2}{b}}%
{%
- aが$p$個,bが$q$個,cが$r$個,とある時,それら全部を並べる場合の数は,%
+ $a$が$p$個,$b$が$q$個,$c$が$r$個,とあるとき,それら全部を並べる場合の数は,%
\[\bunsuu{n!}{p!q!r!}\text{\ (ただし,$p+q+r=n$)}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{同じものを含む順列の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{同じものを含む順列の証明}}%
{%
\証明開始%
$n$個のものを並べる場合の数は$n!$通りだが,$n$個の中に同じものが含まれているので,重複度で割ることで$\bunsuu{n!}{p!q!r!}$を得る。%
@@ -845,30 +869,30 @@
{\relax}%
\ifthenelse{\equal{#1}{確率の定義}\AND\equal{#2}{i}}%
- {全事象$U$のどの根元事象も同様に確からしいとき,事象Aの起こる確率は,$P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}$}{\relax}%
+ {全事象$\text{U}$のどの根元事象も同様に確からしいとき,事象$\text{A}$の起こる確率は,$P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}$}{\relax}%
\ifthenelse{\equal{#1}{確率の定義}\AND\equal{#2}{b}}%
{%
- 全事象$U$のどの根元事象も同様に確からしいとき,事象Aの起こる確率は,%
+ 全事象$\text{U}$のどの根元事象も同様に確からしいとき,事象$\text{A}$の起こる確率は,%
\[P\Ttyuukakko{A}=\bunsuu{n\Ttyuukakko{A}}{n\Ttyuukakko{U}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{排反の定義}\AND\equal{#2}{i}}%
- {事象A\数式カンマスペース Bが同時に起こりえないとき}{\relax}%
+ {事象$\text{A}$\数式カンマスペース$\text{B}$が同時に起こりえないとき,AとBは互いに排反であるという。}{\relax}%
\ifthenelse{\equal{#1}{排反の定義}\AND\equal{#2}{b}}%
- {事象A\数式カンマスペース Bが同時に起こりえないとき}{\relax}%
+ {事象$\text{A}$\数式カンマスペース$\text{B}$が同時に起こりえないとき,AとBは互いに排反であるという。}{\relax}%
\ifthenelse{\equal{#1}{確率の性質A}\AND\equal{#2}{i}}%
- {任意の事象Aに対して,$0\leqq A\leqq1$}{\relax}%
+ {任意の事象$\text{A}$に対して,$0\leqq A\leqq1$}{\relax}%
\ifthenelse{\equal{#1}{確率の性質A}\AND\equal{#2}{b}}%
{%
- 任意の事象Aに対して,%
+ 任意の事象$\text{A}$に対して,%
\[0\leqq A\leqq1\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{確率の性質B}\AND\equal{#2}{i}}%
- {全事象Uの確率$P\Ttyuukakko{U}=1$}{\relax}%
+ {全事象$\text{U}$の確率$P\Ttyuukakko{U}=1$}{\relax}%
\ifthenelse{\equal{#1}{確率の性質B}\AND\equal{#2}{b}}%
{%
- 全事象Uの確率%
+ 全事象$\text{U}$の確率%
\[P\Ttyuukakko{U}=1\]%
}%
{\relax}%
@@ -881,35 +905,35 @@
\ifthenelse{\equal{#1}{余事象の確率}\AND\equal{#2}{b}}%
{\[P\Ttyuukakko{\overline{A}}=1-P\Ttyuukakko{A}\]}{\relax}%
\ifthenelse{\equal{#1}{独立な事象の確率}\AND\equal{#2}{i}}%
- {事象AとBが独立のとき,事象Aが起こりかつ事象Bが起こる確率$p$は,$p=P\Ttyuukakko{A}P\Ttyuukakko{B}$}{\relax}%
+ {事象$\text{A}$とBが独立のとき,事象$\text{A}$が起こりかつ事象$\text{B}$が起こる確率$p$は,$p=P\Ttyuukakko{A}P\Ttyuukakko{B}$}{\relax}%
\ifthenelse{\equal{#1}{独立な事象の確率}\AND\equal{#2}{b}}%
{%
- 事象AとBが独立のとき,事象Aが起こりかつ事象Bが起こる確率$p$は,%
+ 事象$\text{A}$とBが独立のとき,事象$\text{A}$が起こりかつ事象$\text{B}$が起こる確率$p$は,%
\[p=P\Ttyuukakko{A}P\Ttyuukakko{B}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{反復試行の確率}\AND\equal{#2}{i}}%
- {一回の試行で事象Aの起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,${}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}$}{\relax}%
+ {一回の試行で事象$\text{A}$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,${}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}$}{\relax}%
\ifthenelse{\equal{#1}{反復試行の確率}\AND\equal{#2}{b}}%
{%
- 一回の試行で事象Aの起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,%
+ 一回の試行で事象$\text{A}$の起こる確率を$p$として,この試行を$n$回行う反復試行でAが$r$回起こる確率は,%
\[{}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{反復試行の確率の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{反復試行の確率の証明}}%
{%
\証明開始%
- $n$回の試行のうち事象Aが$r$回起こる順番の場合の数は${}_{n} C_{r}$通り。さらに,Aが起こる確率は$p$で$r$回起こり,Aの余事象が起こる確率は$p-1$で$n-r$回起こるので,%
+ $n$回の試行のうち事象$\text{A}$が$r$回起こる順番の場合の数は${}_{n} C_{r}$通り。さらに,Aが起こる確率は$p$で$r$回起こり,Aの余事象が起こる確率は$p-1$で$n-r$回起こるので,%
\[{}_{n}C_{r}\Ttyuukakko{p}^r\Ttyuukakko{1-p}^{n-r}\]%
となる。
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{条件付き確率}\AND\equal{#2}{i}}%
- {事象Aが起こったときの事象Bの起こる確率は,$P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}$}{\relax}%
+ {事象$\text{A}$が起こったときの事象$\text{B}$の起こる確率は,$P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}$}{\relax}%
\ifthenelse{\equal{#1}{条件付き確率}\AND\equal{#2}{b}}%
{%
- 事象Aが起こったときの事象Bの起こる確率は,%
+ 事象$\text{A}$が起こったときの事象$\text{B}$の起こる確率は,%
\[P_{A}\Ttyuukakko{B}=\bunsuu{P\Ttyuukakko{A\cap B}}{P\Ttyuukakko{A}}\]%
}%
{\relax}%
@@ -1128,9 +1152,9 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
- 三角形AOP,BOPは二等辺三角形なので,%
+ $\triangle{\text{AOP}}$\数式カンマスペース$\triangle{\text{BOP}}$は二等辺三角形なので,%
\[\angle\mathrm{APO}=\angle\mathrm{OAP}\数式カンマスペース\angle\mathrm{BPO}=\angle\mathrm{OBP}\]%
- 三角形の外角より,%
+ 外角定理より,%
\[\angle\mathrm{AOD}=2\angle\mathrm{APO}\数式カンマスペース\angle\mathrm{BOD}=2\angle\mathrm{BPO}\]%
\[\Leftrightarrow\angle\mathrm{AOB}=2\angle\mathrm{APB}\]%
\空行%
@@ -1144,9 +1168,9 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
- 三角形OPBは二等辺三角形なので,%
+ $\triangle{\text{OPB}}$は二等辺三角形なので,%
\[\angle\mathrm{OPB}=\angle\mathrm{OBP}\]%
- 三角形の外角より%
+ 外角定理より%
\[\angle\mathrm{AOB}=2\angle\mathrm{OPB}\]%
\空行%
\begin{tikzpicture}%
@@ -1161,15 +1185,13 @@
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
\空行%
- 三角形QOA,OQBは二等辺三角形なので,%
+ $\triangle{\text{QOA}}\数式カンマスペース\triangle{\text{OQB}}$は二等辺三角形なので,%
\[\angle\mathrm{OQA}=\angle\mathrm{OAQ}\数式カンマスペース\angle\mathrm{OQB}=\angle\mathrm{OBQ}\]%
- となる,\par%
- 三角形の外角より,%
+ 外角定理より,%
\[\angle\mathrm{OQA}+\angle\mathrm{OAQ}=\angle\mathrm{DOA}\数式カンマスペース\angle\mathrm{OQB}+\angle\mathrm{OBQ}=\angle\mathrm{DOB}\]%
\[\Leftrightarrow\angle\mathrm{DOA}-\angle\mathrm{DOB}=2\Ttyuukakko{\angle\mathrm{OQA}-\angle\mathrm{BQO}}\]%
\[\Leftrightarrow\angle\mathrm{AOB}=2\angle\mathrm{AQB}\]%
- \空行%
- 従って,円に内接する三角形について,円周角の$2$倍が中心角である。\par%
+ 従って,円に内接する三角形について,円周角の$2$倍が中心角である。%
\空行%
\begin{tikzpicture}%
\draw(-1.6,-1.2)--(1.2,-1.6)--(1.2,1.6)--cycle;%
@@ -1182,7 +1204,6 @@
\draw(0,0)node[above]{O};%
\draw(0,0)circle[radius=2];%
\end{tikzpicture}%
- \空行%
\[\angle\mathrm{APB}=2\angle\mathrm{AOB},\angle\mathrm{AQB}=2\angle\mathrm{AOB}\]%
\[\Leftrightarrow\angle\mathrm{AQB}=\angle\mathrm{APB}\]が成立。
\証明終了%
@@ -1250,6 +1271,7 @@
\ifthenelse{\equal{#1}{接弦定理の証明}}%
{%
\証明開始%
+ \vspace{-1\zw}%
\begin{enumerate}%
\item 鋭角のとき%
\空行%
@@ -1270,9 +1292,9 @@
\draw pic[draw,black,thin,angle radius=0.3cm] {right angle=E--B--A};%
\end{tikzpicture}%
\空行%
- 三角形ACBとABEについて円周角の定理より,%
+ $\triangle{\text{ACB}}$と$\triangle{\text{ABE}}$について円周角の定理より,%
\[\angle\mathrm{ACB}=\angle\mathrm{AEB}\]%
- ここで,三角形ABEについて%
+ ここで,$\triangle{\text{ABE}}$について%
\[\angle\mathrm{BEA}+\angle\mathrm{BAE}=90^\circ\]%
また,ATが円の接線なので$\angle\mathrm{BAE}+\angle\mathrm{BAT}=90^\circ$から,%
\[\angle\mathrm{BAT}=\angle\mathrm{AEB}\]%
@@ -1314,7 +1336,7 @@
\空行%
鋭角のときの接弦定理より,%
\[\angle\mathrm{BCA}=\angle\mathrm{BAS}\]%
- また,三角形ABCにおいて%
+ また,$\triangle{\text{ABC}}$において%
\[\angle\mathrm{ABC}=\angle\mathrm{ACB}+\angle\mathrm{BAC}\]%
\[\Leftrightarrow\angle\mathrm{ABC}=\angle\mathrm{CAT}\]%
\空行%
@@ -1376,7 +1398,7 @@
\空行%
円周角の定理より,%
\[\angle\mathrm{CAP}=\angle\mathrm{BDP},\quad\angle\mathrm{ACP}=\angle\mathrm{DBP}\]%
- 三角形ACPと三角形DBPは相似なので,\par%
+ $\triangle{\text{ACP}}$と$\triangle{\text{DBP}}$は相似なので,%
\[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
\証明終了%
}%
@@ -1414,7 +1436,7 @@
\空行%
内接四角形の証明より,%
\[\angle\mathrm{CDB}=\angle\mathrm{CAP}\数式カンマスペース\angle\mathrm{DBA}=\angle\mathrm{PCA}\]%
- 三角形ACPと三角形DPBは相似なので,%
+ $\triangle{\text{ACP}}$と$\triangle{\text{DPB}}$は相似なので,%
\[\text{PA}\cdot\text{PB}=\text{PC}\cdot\text{PD}\]%
\証明終了%
}%
@@ -1451,7 +1473,7 @@
\空行%
接弦定理より,%
\[\angle\mathrm{TBA}=\angle\mathrm{PTA}\]%
- これと,$\angle\mathrm{P}$共通なので三角形PTAと三角形PBTは相似より,%
+ これと,$\angle\mathrm{P}$共通なので$\triangle{\text{PTA}}$と$\triangle{\text{PBT}}$は相似より,%
\[\text{PA}\cdot\text{PB}=\text{PT}^2\]%
\証明終了%
}%
@@ -1548,22 +1570,22 @@
\NewDocumentCommand{\相加相乗平均}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$a>0\数式カンマスペース b>0$のとき,$\bunsuu{a+b}{2}\geqq\sqrt{ab}$}{\relax}%
+ {$a>0\数式カンマスペース b>0$のとき,$\bunsuu{a+b}{2}\geqq\根号{ab}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
$a>0\数式カンマスペース b>0$のとき,%
- \[\bunsuu{a+b}{2}\geqq\sqrt{ab}\]%
+ \[\bunsuu{a+b}{2}\geqq\根号{ab}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- $a+b-2\sqrt{ab}\geqq0$を示す。%
- \[a+b-2\sqrt{ab}=\Ttyuukakko{\sqrt{a}-\sqrt{b}}^2\]%
- より,$\sqrt{a}-\sqrt{b}$は実数なので,%
- \[\Ttyuukakko{\sqrt{a}-\sqrt{b}}^2\geqq0\]%
+ $a+b-2\根号{ab}\geqq0$を示す。%
+ \[a+b-2\根号{ab}=\Ttyuukakko{\根号{a}-\根号{b}}^2\]%
+ より,$\根号{a}-\根号{b}$は実数なので,%
+ \[\Ttyuukakko{\根号{a}-\根号{b}}^2\geqq0\]%
よって,$a>0\数式カンマスペース b>0$のとき,%
- \[\bunsuu{a+b}{2}\geqq\sqrt{ab}\text{\ (等号成立条件は$a=b$)}\]%
+ \[\bunsuu{a+b}{2}\geqq\根号{ab}\text{\ (等号成立条件は$a=b$)}\]%
\証明終了%
}%
{\relax}%
@@ -1573,9 +1595,9 @@
\NewDocumentCommand{\虚数の定義}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$i=\sqrt{-1}$}{\relax}%
+ {$i=\根号{-1}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
- {\[i=\sqrt{-1}\]}{\relax}%
+ {\[i=\根号{-1}\]}{\relax}%
}%
@@ -1623,9 +1645,10 @@
\[\alpha\beta=\bunsuu{c}{a}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{二次方程式の解と係数の関係の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{二次方程式の解と係数の関係の証明}}%
{%
\証明開始%
+ \vspace{-2.5\zw}%
\[ax^2+bx+c=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}=a\Tdaikakko{x^2-\Ttyuukakko{\alpha+\beta}x+\alpha\beta}\]%
\[\Leftrightarrow ax^2+bx+c=a\Ttyuukakko{x^2+\bunsuu{b}{a}x+\bunsuu{c}{a}}\]%
係数比較することで,%
@@ -1657,10 +1680,10 @@
\[\alpha\beta\gamma=-\bunsuu{d}{a}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{三次方程式の解と係数の関係の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{三次方程式の解と係数の関係の証明}}%
{%
\証明開始%
- \vspace{-1\zw}
+ \vspace{-2.5\zw}%
\[ax^{3}+bx^2+cx+d=a\Ttyuukakko{x-\alpha}\Ttyuukakko{x-\beta}\Ttyuukakko{x-\gamma}=a\Tdaikakko{x^3-\Ttyuukakko{\alpha+\beta+\gamma}x^2+\Ttyuukakko{\alpha\beta+\beta\gamma+\gamma\alpha}x-\alpha\beta\gamma}\]%
\[\Leftrightarrow ax^{3}+bx^2+cx+d=a\Ttyuukakko{x^3+\bunsuu{b}{a}x^2+\bunsuu{c}{a}x+\bunsuu{d}{a}}\]%
係数比較することで,\par%
@@ -1732,48 +1755,49 @@
\NewDocumentCommand{\点の座標}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{二点間の距離}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$間の距離は,$\sqrt{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}$}{\relax}%
+ {$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$間の距離は,$\根号{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}$}{\relax}%
\ifthenelse{\equal{#1}{二点間の距離}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$間の距離は,%
- \[\sqrt{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}\]%
+ $\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$間の距離は,%
+ \[\根号{\Ttyuukakko{x_{2}-x_{1}}^2-\Ttyuukakko{y_{2}-y_{1}}^2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{内分点の座標}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$を$m:n$に内分する点の座標は,$\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}$}{\relax}%
+ {$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に内分する点の座標は,$\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}$}{\relax}%
\ifthenelse{\equal{#1}{内分点の座標}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$を$m:n$に内分する点の座標は,%
+ $\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に内分する点の座標は,%
\[\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{内分点の座標の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{内分点の座標の証明}}%
{%
\証明開始%
- $m:n$に内分する点の座標を$P\Ttyuukakko{x\数式カンマスペース y}$として,%
+ $m:n$に内分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
\[m:n=x-x_{1}:x_{2}-x\]%
\[\Leftrightarrow\Ttyuukakko{\bunsuu{nx_{1}+mx_{2}}{n+m}\数式カンマスペース\bunsuu{ny_{1}+my_{2}}{n+m}}\]%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{外分点の座標}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$を$m:n$に外分する点の座標は,$\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}$}{\relax}%
+ {$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に外分する点の座標は,$\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}$}{\relax}%
\ifthenelse{\equal{#1}{外分点の座標}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$を$m:n$に外分する点の座標は,%
+ $\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$を$m:n$に外分する点の座標は,%
\[\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{外分点の座標の証明}\AND\equal{#2}{b}}%
+ \ifthenelse{\equal{#1}{外分点の座標の証明}}%
{%
\証明開始%
+ \vspace{-1\zw}%
\begin{enumerate}%
\item $m>n$のとき\par%
- $n:m$に外分する点の座標を$P\Ttyuukakko{x\数式カンマスペース y}$として,%
+ $n:m$に外分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
\[m:n=x-x_{1}:x-x_{2}\]%
\[\Leftrightarrow\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
\item $m<n$のとき\par%
- $n:m$に外分する点の座標を$P\Ttyuukakko{x\数式カンマスペース y}$として,%
+ $n:m$に外分する点の座標を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,%
\[m:n=x-x_{2}:x-x_{1}\]%
\[\Leftrightarrow\Ttyuukakko{\bunsuu{-nx_{1}+mx_{2}}{m-n}\数式カンマスペース \bunsuu{-ny_{1}+my_{2}}{m-n}}\]%
\end{enumerate}%
@@ -1784,14 +1808,14 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{中点の座標}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$の中点は,$\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}$}{\relax}%
+ {$\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$の中点は,$\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}$}{\relax}%
\ifthenelse{\equal{#1}{中点の座標}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$AB$の中点は,%
+ $\text{A}\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース \text{B}\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}$として,線分$\text{AB}$の中点は,%
\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{中点の座標の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{中点の座標の証明}}%
{%
\証明開始%
内分点の公式において$m=n$のとき,%
@@ -1800,14 +1824,14 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{重心の座標}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}\数式カンマスペース C\Ttyuukakko{x_{3}\数式カンマスペース y_{3}}$として,三角形$ABC$の重心の座標は,$\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}$}{\relax}%
+ {$A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}\数式カンマスペース C\Ttyuukakko{x_{3}\数式カンマスペース y_{3}}$として,$\triangle{\text{ABC}}$の重心の座標は,$\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}$}{\relax}%
\ifthenelse{\equal{#1}{重心の座標}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}\数式カンマスペース C\Ttyuukakko{x_{3}\数式カンマスペース y_{3}}$として,三角形$ABC$の重心の座標は,%
+ $A\Ttyuukakko{x_{1}\数式カンマスペース y_{1}}\数式カンマスペース B\Ttyuukakko{x_{2}\数式カンマスペース y_{2}}\数式カンマスペース C\Ttyuukakko{x_{3}\数式カンマスペース y_{3}}$として,$\triangle{\text{ABC}}$の重心の座標は,%
\[\Ttyuukakko{\bunsuu{x_{1}+x_{2}+x_{3}}{3}\数式カンマスペース\bunsuu{y_{1}+y_{2}+y_{3}}{3}}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{重心の座標の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{重心の座標の証明}}%
{%
\証明開始%
$A$と$B$の中点$M$の座標は$\Ttyuukakko{\bunsuu{x_{1}+x_{2}}{2}\数式カンマスペース\bunsuu{y_{1}+y_{2}}{2}}$\par%
@@ -1844,7 +1868,7 @@
\ifthenelse{\equal{#1}{公式Bの証明}}%
{%
\証明開始%
- 傾き$m$なので,$y=mx+a$と置ける($a$は切片)。\par%
+ 傾き$m$なので,$y=mx+a$と置ける(\,$a$は切片)。\par%
ここで,$\Ttyuukakko{x_{1\数式カンマスペース x_{2}}}$を通るので,$y_{1}=mx_{1}+a$となり,連立することで%
\[y-y_{1}=m\Ttyuukakko{x-x_{1}}\]%
を得る。%
@@ -1872,7 +1896,7 @@
\[\Leftrightarrow m_{1}m_{2}=-1\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{公式Bの証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{公式Bの証明}}%
{%
\証明開始%
$y=mx_{1}$上に点A$\Ttyuukakko{1\数式カンマスペース m_{1}}$\数式カンマスペース $y=mx_{2}$上にB$\Ttyuukakko{-m_{1}\数式カンマスペース 1}$をとる。\par%
@@ -1888,12 +1912,12 @@
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
{%
- 点$\Ttyuukakko{x_{1}\数式カンマスペース y_{2}}$と直線$ax+bx+c=0$の距離は,$\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\sqrt{a^2+b^2}}$%
+ 点$\Ttyuukakko{x_{1}\数式カンマスペース y_{2}}$と直線$ax+bx+c=0$の距離は,$\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}$%
}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
点$\Ttyuukakko{x_{1}\数式カンマスペース y_{2}}$と直線$ax+bx+c=0$の距離は,%
- \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\sqrt{a^2+b^2}}\]%
+ \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -1901,14 +1925,15 @@
\証明開始%
全体を$x$軸方向に$-x_{1}$\数式カンマスペース $y$軸方向に$-y_{1}$平行移動するとき,直線$l$は$a\Ttyuukakko{x+x_{1}}+b\Ttyuukakko{y+y_{1}}+c=0$となる。\par%
また,直線$l$に原点Oからおろした垂線との交点をHとする。ここでOH間の距離を$d$と置くと,%
+ \vspace{-1\zw}%
\begin{enumerate}%
\item $a\neq0$のとき\par%
直線$l$の垂線の傾きは$b$の値に依らず,$y=\bunsuu{b}{a}$となる。\par%
よって,Hの座標は二式を連立することで得られ,%
\[\Ttyuukakko{\bunsuu{-a\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}\数式カンマスペース\bunsuu{-b\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}\]%
\begin{align*}%
- \Leftrightarrow d&=\sqrt{\Tdaikakko{\Ttyuukakko{\bunsuu{-a\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}^2+\Tdaikakko{\bunsuu{-b\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}}^2}&\\%
- &=\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\sqrt{a^2+b^2}} %
+ \Leftrightarrow d&=\根号{\Tdaikakko{\Ttyuukakko{\bunsuu{-a\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}^2+\Tdaikakko{\bunsuu{-b\Ttyuukakko{ax_{1}+by_{1}+c}}{a^2+b^2}}}^2}&\\%
+ &=\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}} %
\end{align*}%
\item $a=0$のとき\par%
直線$l$は$y=-\bunsuu{by_{1}+c}{b}$となるので,%
@@ -1916,10 +1941,10 @@
d&=\Tzettaiti{-\bunsuu{by_{1}+c}{b}}&\\%
&=\bunsuu{\Tzettaiti{by_{1}+c}}{\Tzettaiti{b}}&\\%
\end{align*}%
- これは,$\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\sqrt{a^2+b^2}}$に$a=0$を代入したものである。
+ これは,$\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}$に$a=0$を代入したものである。
\end{enumerate}%
よって,いずれの場合も%
- \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\sqrt{a^2+b^2}}\]%
+ \[\bunsuu{\Tzettaiti{ax_{1}+by_{2}+c}}{\根号{a^2+b^2}}\]%
を得る。%
\証明終了%
}%
@@ -1930,8 +1955,8 @@
\NewDocumentCommand{\円の方程式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,$\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2$と表す($x^2+y^2+Ax+By+C=0\Ttyuukakko{l^2+m^2-4n>0}$の形でもよい)。}{\relax}%
- \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
+ {中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,$\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2$と表す(\,$x^2+y^2+Ax+By+C=0\Ttyuukakko{A^2+B^2-4C>0}$の形でもよい)。}{\relax}%
+ \ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
中心$\Ttyuukakko{a\数式カンマスペース b}$で半径$r$の円は,%
\[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
@@ -1943,7 +1968,7 @@
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 円の中心をO\数式カンマスペース 円周上の任意の点を$P\Ttyuukakko{x\数式カンマスペース y}$として,三平方の定理より%
+ 円の中心をO\数式カンマスペース 円周上の任意の点を$\text{P}\Ttyuukakko{x\数式カンマスペース y}$として,三平方の定理より%
\[\Ttyuukakko{x-a}^2+\Ttyuukakko{y-b}^2=r^2\]%
\証明終了%
}%
@@ -1964,15 +1989,16 @@
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
+ \vspace{-1\zw}%
\begin{enumerate}%
\item $x_{0}\neq0\数式カンマスペース y_{0}\neq0$のとき\par%
$A\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$と置いて,OAの傾きは$\bunsuu{y_{0}}{x_{0}}$となる。接線の傾きはこれに垂直なので,$-\bunsuu{x_{0}}{y_{0}}$また接線は点$\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$を通るので%
\[y=-\bunsuu{x_{0}}{y_{0}}\Ttyuukakko{x-x_{0}}+y_{0}\]%
より,$\Ttyuukakko{x_{0}\数式カンマスペース y_{0}}$が$x^2+y^2=r^2$上に存在することに留意して,$x_{0}x+y_{0}y=r^2$となる。\par%
\item $x_{0}\neq0$のとき\par%
- $y_{0}=\pm r$より接線は$y=\pm r\text{\ (複合同順)}$\par%
+ $y_{0}=\pm r$より接線は$y=\pm r\text{\ (複号同順)}$\par%
\item $y_{0}=0$のとき\par%
- $x_{0}=\pm r$より接線は$x=\pm r\text{\ (複合同順)}$%
+ $x_{0}=\pm r$より接線は$x=\pm r\text{\ (複号同順)}$%
\end{enumerate}%
よって,接線の方程式は%
\[xx_{1}+yy_{1}=r^2\]%
@@ -2103,17 +2129,17 @@
\NewDocumentCommand{\三角関数の加法定理}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\sin\Ttyuukakko{\alpha\pm\beta}=\sin\alpha \cos\beta\pm \cos\alpha \sin\beta$}{\relax}%
+ {$\sin\Ttyuukakko{\alpha\pm\beta}=\sin\alpha \cos\beta\pm \cos\alpha \sin\beta\text{\ (複号同順)}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\sin\Ttyuukakko{\alpha\pm\beta}=\sin\alpha \cos\beta\pm \cos\alpha \sin\beta\]}{\relax}%
+ {\[\sin\Ttyuukakko{\alpha\pm\beta}=\sin\alpha \cos\beta\pm \cos\alpha \sin\beta\text{\ (複号同順)}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\cos\Ttyuukakko{\alpha\pm\beta}=\cos\alpha \cos\beta\mp \sin\alpha \sin\beta$}{\relax}%
+ {$\cos\Ttyuukakko{\alpha\pm\beta}=\cos\alpha \cos\beta\mp \sin\alpha \sin\beta\text{\ (複号同順)}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\cos\Ttyuukakko{\alpha\pm\beta}=\cos\alpha \cos\beta\mp \sin\alpha \sin\beta\]}{\relax}%
+ {\[\cos\Ttyuukakko{\alpha\pm\beta}=\cos\alpha \cos\beta\mp \sin\alpha \sin\beta\]\text{\ (複号同順)}}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}$}{\relax}%
+ {$\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\text{\ (複号同順)}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\]}{\relax}%
+ {\[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\text{\ (複号同順)}\]}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
@@ -2137,7 +2163,7 @@
\draw pic["$\beta$",draw=black,-,thin,angle eccentricity=1.4,angle radius=0.4cm] {angle=R--O--Q};%
\end{tikzpicture}%
\空行%
- 図において,三角関数の性質より$\cos\Ttyuukakko{\beta-\alpha}=\cos\Ttyuukakko{\alpha-\beta}$なので,三角形QOPについて余弦定理より%
+ 図において,三角関数の性質より$\cos\Ttyuukakko{\beta-\alpha}=\cos\Ttyuukakko{\alpha-\beta}$なので,$\triangle{\text{QOP}}$について余弦定理より%
\[\mathrm{QP}^2=1^2+1^2-2\cdot1\cdot1\cdot\cos\Ttyuukakko{\alpha-\beta}\]%
また,QP間の距離について三平方の定理を用いて%
\[\mathrm{QP}^2=\Ttyuukakko{\cos\beta-\cos\alpha}^2+\Ttyuukakko{\sin\alpha-\sin\beta}^2\]%
@@ -2155,9 +2181,9 @@
\[\sin\Ttyuukakko{\alpha-\beta}=\sin\alpha \cos\beta-\cos\alpha \sin\beta\]%
\空行%
$\tan\theta=\bunsuu{\sin\theta}{\cos\theta}$より,%
- \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\sin\alpha \cos\beta\pm \cos\alpha \sin\beta}{\cos\alpha \cos\beta\mp \sin\alpha \sin\beta}\]%
+ \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\sin\alpha \cos\beta\pm \cos\alpha \sin\beta}{\cos\alpha \cos\beta\mp \sin\alpha \sin\beta}\text{\ (複号同順)}\]%
両辺を$\cos\alpha\cos\beta$でわることで,%
- \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\]%
+ \[\tan\Ttyuukakko{\alpha\pm\beta}=\bunsuu{\tan\alpha \pm \tan\beta}{1\mp \tan\alpha \tan\beta}\text{\ (複号同順)}\]%
を得る。%
\証明終了%
}%
@@ -2184,20 +2210,26 @@
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{\[\cos2\alpha=1-2\sin^{2}\alpha\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
- {$\tan2\alpha=\frac{2\tan\alpha}{1-\tan^{2}\alpha}$}{\relax}%
+ {$\tan2\alpha=\bunsuu{2\tan\alpha}{1-\tan^{2}\alpha}$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\tan2\alpha=\frac{2\tan\alpha}{1-\tan^{2}\alpha}\]}{\relax}%
+ {\[\tan2\alpha=\bunsuu{2\tan\alpha}{1-\tan^{2}\alpha}\]}{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
- 三角関数の加法定理\par%
- \[\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta\]%
- \[\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha \cos\beta- \sin\alpha \sin\beta\]%
- \[\tan\Ttyuukakko{\alpha+\beta}=\bunsuu{\tan\alpha + \tan\beta}{1- \tan\alpha \tan\beta}\]%
- において,$\alpha=\beta=\theta$として,%
- \[\sin2\theta=2\sin\theta\cos\theta\]%
- \[\cos2\theta=\cos^{2}\theta-\sin^{2}\theta\]%
- \[\tan2\theta=\bunsuu{2\tan\theta}{1-\tan^{2}\theta}\]%
+ 三角関数の加法定理%
+ \phrases@math[c]%
+ {%
+ $\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+\cos\alpha \sin\beta$\\%
+ $\cos\Ttyuukakko{\alpha+\beta}=\cos\alpha \cos\beta-\sin\alpha \sin\beta$\\%
+ $\tan\Ttyuukakko{\alpha+\beta}=\bunsuu{\tan\alpha+\tan\beta}{1-\tan\alpha \tan\beta}$%
+ }%
+ において,$\alpha=\beta=\theta$として,\par%
+ \hspace{3\zw}\phrases@math[c]%
+ {%
+ $\sin2\theta=2\sin\theta\cos\theta$\\%
+ $\cos2\theta=\cos^{2}\theta-\sin^{2}\theta$\\%
+ $\tan2\theta=\bunsuu{2\tan\theta}{1-\tan^{2}\theta}$%
+ }%
を得る。\par%
また,$\cos2\theta=\cos^{2}\theta-\sin^{2}\theta$において,三角関数の相互関係$\sin^2\theta+\cos^2\theta=1$を用いて,%
\[\cos2\theta=2\cos^{2}\theta-1\]%
@@ -2321,10 +2353,25 @@
\NewDocumentCommand{\三角関数の合成}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$a\sin\theta+b\cos\theta=\sqrt{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\text{\ (ただし,$\sin\alpha=\bunsuu{b}{\sqrt{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\sqrt{a^2+b^2}}$)}$}{\relax}%
+ {%
+ $%
+ a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\ %
+ \Ttyuukakko%
+ {%
+ \text%
+ {%
+ ただし,%
+ $%
+ \sin\alpha=\bunsuu{b}{\根号{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\根号{a^2+b^2}}%
+ $%
+ }%
+ }%
+ $%
+ }%
+ {\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- \[a\sin\theta+b\cos\theta=\sqrt{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\text{\ (ただし,$\sin\alpha=\bunsuu{b}{\sqrt{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\sqrt{a^2+b^2}}$)}\]%
+ \[a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\text{\ $\Ttyuukakko{\text{ただし,$\sin\alpha=\bunsuu{b}{\根号{a^2+b^2}}\数式カンマスペース\cos\alpha=\bunsuu{a}{\根号{a^2+b^2}}$}}$}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
@@ -2332,9 +2379,9 @@
\証明開始%
三角関数の加法定理\par%
$\sin\Ttyuukakko{\alpha+\beta}=\sin\alpha \cos\beta+ \cos\alpha \sin\beta$について,%
- \[\bunsuu{a}{\sqrt{a^2+b^2}}=\cos\alpha\数式カンマスペース\bunsuu{b}{\sqrt{a^2+b^2}}=\sin\alpha\]%
+ \[\bunsuu{a}{\根号{a^2+b^2}}=\cos\alpha\数式カンマスペース\bunsuu{b}{\根号{a^2+b^2}}=\sin\alpha\]%
とすることで,\par%
- \[a\sin\theta+b\cos\theta=\sqrt{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\]%
+ \[a\sin\theta+b\cos\theta=\根号{a^2+b^2}\sin\Ttyuukakko{\theta+\alpha}\]%
となる。%
\証明終了%
}%
@@ -2345,19 +2392,19 @@
\NewDocumentCommand{\有理数の指数}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,$a^{\bunsuu{m}{n}}=\sqrt[n]{a^{m}}$}{\relax}%
+ {$a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,$a^{\frac{m}{n}}=\sqrt[n]{a^{m}}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$a>0$また$m\数式カンマスペース n$が正の整数,$r$が正の有理数のとき,%
- \[a^{\bunsuu{m}{n}}=\sqrt[n]{a^{m}}\]%
+ \[a^{\frac{m}{n}}=\sqrt[n]{a^{m}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$a>0$また$n$が正の整数のとき,$a^{\bunsuu{1}{n}}=\sqrt[n]{a}$}{\relax}%
+ {$a>0$また$n$が正の整数のとき,$a^{\frac{1}{n}}=\根号[n]{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$a>0$また$n$が正の整数のとき,%
- \[a^{\bunsuu{1}{n}}=\sqrt[n]{a}\]%
+ \[a^{\frac{1}{n}}=\根号[n]{a}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
@@ -2420,13 +2467,13 @@
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
{%
- $a>0\数式カンマスペース b>0$また,$r\数式カンマスペース s$は有理数とする。\par%
+ $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とする。\par%
$a^{p}=M$ならば,$\log_{a}M$,$\log_{a}M \log_{a}M$ならば,$a^{p}=M$%
}%
{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
- $a>0\数式カンマスペース b>0$また,$r\数式カンマスペース s$は有理数とする。\par%
+ $a>0\数式カンマスペース b>0$で,$r\数式カンマスペース s$は有理数とする。\par%
$a^{p}=M$ならば,$\log_{a}M$\par%
$\log_{a}M$ならば,$a^{p}=M$%
}%
@@ -2612,12 +2659,11 @@
\NewDocumentCommand{\不定積分の定義}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C$($C$は積分定数)}{\relax}%
+ {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,$\displaystyle\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{($C$は積分定数)}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$のとき,%
- \[\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\]%
- ($C$は積分定数)%
+ \[\int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
}%
{\relax}%
}%
@@ -2626,10 +2672,10 @@
\NewDocumentCommand{\べき乗関数の不定積分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ ($C$は積分定数)}$}{\relax}%
+ {$\displaystyle\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- \[\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ ($C$は積分定数)}\]%
+ \[\int_{}^{} x^{n}dx=\bunsuu{1}{n+1}x^{n+1}+C\text{\ (\,$C$は積分定数)}\]%
}%
{\relax}%
}%
@@ -2638,15 +2684,15 @@
\NewDocumentCommand{\不定積分の性質}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\displaystyle \int_{}^{} kf\Ttyuukakko{x}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{}^{} kf\Ttyuukakko{x}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{\[\int_{}^{} kf\Ttyuukakko{x}dx=k\int_{}^{} f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\displaystyle \int_{}^{} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\displaystyle \int_{}^{} f\Ttyuukakko{x}dx\pm\displaystyle \int_{}^{} g\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{}^{} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\displaystyle \int_{}^{} f\Ttyuukakko{x}dx\pm\displaystyle \int_{}^{} g\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{\[\int_{}^{} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{}^{} f\Ttyuukakko{x}dx\pm\int_{}^{} g\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\displaystyle \int_{}^{} {kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx+l\displaystyle \int_{}^{} g\Ttyuukakko{x}$}{\relax}%
+ {$\displaystyle\int_{}^{} {kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\displaystyle \int_{}^{} f\Ttyuukakko{x}dx+l\displaystyle \int_{}^{} g\Ttyuukakko{x}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{\[\int_{}^{} {kf\Ttyuukakko{x}+lg\Ttyuukakko{x}}dx=k\int_{}^{} f\Ttyuukakko{x}dx+l\int_{}^{} g\Ttyuukakko{x}\]}{\relax}%
}%
@@ -2668,23 +2714,23 @@
\NewDocumentCommand{\定積分の性質}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{\[\int_{b}^{a} kf\Ttyuukakko{x}dx=k\int_{b}^{a} f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\int_{b}^{a} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{b}^{a} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{\[\int_{b}^{a} {f\Ttyuukakko{x}\pm g\Ttyuukakko{x}}dx=\int_{b}^{a} f\Ttyuukakko{x}dx\pm\int_{b}^{a} g\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\int_{a}^{a} f\Ttyuukakko{x}dx=0$}{\relax}%
+ {$\displaystyle\int_{a}^{a} f\Ttyuukakko{x}dx=0$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{\[\int_{a}^{a} f\Ttyuukakko{x}dx=0\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{\[\int_{b}^{a} f\Ttyuukakko{x}dx=-\int_{a}^{b} f\Ttyuukakko{x}dx\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
- {$\int_{b}^{a} f\Ttyuukakko{x}dx=\int_{a}^{c} f\Ttyuukakko{x}dx+\int_{c}^{b} f\Ttyuukakko{x}dx$}{\relax}%
+ {$\displaystyle\int_{b}^{a} f\Ttyuukakko{x}dx=\int_{a}^{c} f\Ttyuukakko{x}dx+\int_{c}^{b} f\Ttyuukakko{x}dx$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
{\[\int_{b}^{a} f\Ttyuukakko{x}dx=\int_{a}^{c} f\Ttyuukakko{x}dx+\int_{c}^{b} f\Ttyuukakko{x}dx\]}{\relax}%
}%
@@ -2693,84 +2739,84 @@
\NewDocumentCommand{\ベクトルの演算}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\vec{a}+\vec{b}=\vec{b}+\vec{a}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\vec{a}+\vec{b}=\vec{b}+\vec{a}\]%
+ \[\ベクトル{a}+\ベクトル{b}=\ベクトル{b}+\ベクトル{a}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{\vec{a}+\vec{b}}+\vec{c}=\vec{a}+\Ttyuukakko{\vec{b}+\vec{c}}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\Ttyuukakko{\vec{a}+\vec{b}}+\vec{c}=\vec{a}+\Ttyuukakko{\vec{b}+\vec{c}}\]%
+ \[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}+\ベクトル{c}=\ベクトル{a}+\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\vec{a}+\Ttyuukakko{a\vec{a}}=\vec{0}$}{\relax}%
+ {$\ベクトル{a}+\Ttyuukakko{a\ベクトル{a}}=\ベクトル{0}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\vec{a}+\Ttyuukakko{a\vec{a}}=\vec{0}\]}{\relax}%
+ {\[\ベクトル{a}+\Ttyuukakko{a\ベクトル{a}}=\ベクトル{0}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$\vec{a}+\vec{0}=\vec{a}$}{\relax}%
+ {$\ベクトル{a}+\ベクトル{0}=\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
- {\[\vec{a}+\vec{0}=\vec{a}\]}{\relax}%
+ {\[\ベクトル{a}+\ベクトル{0}=\ベクトル{a}\]}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
- {$\vec{a}-\vec{b}=\vec{a}+\Ttyuukakko{-\vec{b}}$}{\relax}%
+ {$\ベクトル{a}-\ベクトル{b}=\ベクトル{a}+\Ttyuukakko{-\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\vec{a}-\vec{b}=\vec{a}+\Ttyuukakko{-\vec{b}}\]}{\relax}%
+ {\[\ベクトル{a}-\ベクトル{b}=\ベクトル{a}+\Ttyuukakko{-\ベクトル{b}}\]}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$k\Ttyuukakko{l\vec{a}}=l\Ttyuukakko{k\vec{b}}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[k\Ttyuukakko{l\vec{a}}=l\Ttyuukakko{k\vec{b}}\]%
+ \[k\Ttyuukakko{l\ベクトル{a}}=l\Ttyuukakko{k\ベクトル{b}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式G}\AND\equal{#2}{i}}%
- {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{k+l}\vec{a}=k\vec{a}+l\vec{a}$}{\relax}%
+ {$k\数式カンマスペース l$が実数のとき,$\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式G}\AND\equal{#2}{b}}%
{%
$k\数式カンマスペース l$が実数のとき%
- \[\Ttyuukakko{k+l}\vec{a}=k\vec{a}+l\vec{a}\]%
+ \[\Ttyuukakko{k+l}\ベクトル{a}=k\ベクトル{a}+l\ベクトル{a}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式H}\AND\equal{#2}{i}}%
- {$k$が実数のとき,$k\Ttyuukakko{\vec{a}+\vec{b}}=k\vec{a}+k\vec{b}$}{\relax}%
+ {$k$が実数のとき,$k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式H}\AND\equal{#2}{b}}%
{%
$k$が実数のとき%
- \[k\Ttyuukakko{\vec{a}+\vec{b}}=k\vec{a}+k\vec{b}\]%
+ \[k\Ttyuukakko{\ベクトル{a}+\ベクトル{b}}=k\ベクトル{a}+k\ベクトル{b}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式I}\AND\equal{#2}{i}}%
- {$\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}$}{\relax}%
+ {$\overrightarrowtext{AB}+\overrightarrowtext{BC}=\overrightarrowtext{AC}$}{\relax}%
\ifthenelse{\equal{#1}{公式I}\AND\equal{#2}{b}}%
- {\[\overrightarrow{AB}+\overrightarrow{BC}=\overrightarrow{AC}\]}{\relax}%
+ {\[\overrightarrowtext{AB}+\overrightarrowtext{BC}=\overrightarrowtext{AC}\]}{\relax}%
\ifthenelse{\equal{#1}{公式J}\AND\equal{#2}{i}}%
- {$\overrightarrow{OA}-\overrightarrow{OB}=\overrightarrow{BA}$}{\relax}%
+ {$\overrightarrowtext{OA}-\overrightarrowtext{OB}=\overrightarrowtext{BA}$}{\relax}%
\ifthenelse{\equal{#1}{公式J}\AND\equal{#2}{b}}%
- {\[\overrightarrow{OA}-\overrightarrow{OB}=\overrightarrow{BA}\]}{\relax}%
+ {\[\overrightarrowtext{OA}-\overrightarrowtext{OB}=\overrightarrowtext{BA}\]}{\relax}%
\ifthenelse{\equal{#1}{公式K}\AND\equal{#2}{i}}%
- {$\overrightarrow{AA}=\vec{0}$}{\relax}%
+ {$\overrightarrowtext{AA}=\ベクトル{0}$}{\relax}%
\ifthenelse{\equal{#1}{公式K}\AND\equal{#2}{b}}%
- {\[\overrightarrow{AA}=\vec{0}\]}{\relax}%
+ {\[\overrightarrowtext{AA}=\ベクトル{0}\]}{\relax}%
\ifthenelse{\equal{#1}{公式L}\AND\equal{#2}{i}}%
- {$\overrightarrow{BA}=\overrightarrow{AB}$}{\relax}%
+ {$\overrightarrowtext{BA}=\overrightarrowtext{AB}$}{\relax}%
\ifthenelse{\equal{#1}{公式L}\AND\equal{#2}{b}}%
- {\[\overrightarrow{BA}=\overrightarrow{AB}\]}{\relax}%
+ {\[\overrightarrowtext{BA}=\overrightarrowtext{AB}\]}{\relax}%
}%
\NewDocumentCommand{\平面ベクトルの分解}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {$\vec{a}\neq0\数式カンマスペース\vec{b}\neq0$で,$\vec{a}$と$\vec{b}$が平行でないとき,任意の$\vec{p}$はただ一通りに,$\vec{p}=s\vec{a}+t\vec{b}$の形に表せられる。}{\relax}%
+ {$\ベクトル{a}\neq0\数式カンマスペース\ベクトル{b}\neq0$で,$\ベクトル{a}$と$\ベクトル{b}$が平行でないとき,任意の$\ベクトル{p}$はただ一通りに,$\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}$の形に表せられる。}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
- $\vec{a}\neq0\数式カンマスペース\vec{b}\neq0$で,$\vec{a}$と$\vec{b}$が平行でないとき,任意の$\vec{p}$はただ一通りに,%
- \[\vec{p}=s\vec{a}+t\vec{b}\]%
+ $\ベクトル{a}\neq0\数式カンマスペース\ベクトル{b}\neq0$で,$\ベクトル{a}$と$\ベクトル{b}$が平行でないとき,任意の$\ベクトル{p}$はただ一通りに,%
+ \[\ベクトル{p}=s\ベクトル{a}+t\ベクトル{b}\]%
の形に表せられる。%
}%
{\relax}%
@@ -2780,37 +2826,37 @@
\NewDocumentCommand{\平面ベクトルの成分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\vec{a}=\vec{b}\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\ベクトル{a}=\ベクトル{b}\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
- $\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- $\vec{a}=\vec{b}$%
+ $\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
+ $\ベクトル{a}=\ベクトル{b}$%
\[\Leftrightarrow a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\Leftrightarrow\vec{a}=\vec{b}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}\Leftrightarrow\ベクトル{a}=\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
- $\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
+ $\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
$a_{1}=b_{1}\数式カンマスペース a_{2}=b_{2}$%
- \[\Leftrightarrow\vec{a}=\vec{b}\]%
+ \[\Leftrightarrow\ベクトル{a}=\ベクトル{b}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,$\Tzettaiti{\vec{a}}=\sqrt{a_{1}^2+a_{2}^2}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,$\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
- $\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,%
- \[\Tzettaiti{\vec{a}}=\sqrt{a_{1}^2+a_{2}^2}\]%
+ $\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}$とすると,%
+ \[\Tzettaiti{\ベクトル{a}}=\根号{a_{1}^2+a_{2}^2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,$k\vec{a}+l\vec{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}$}{\relax}%
+ {$\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,$k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
- $\vec{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\vec{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,%
- \[k\vec{a}+l\vec{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}\]%
+ $\ベクトル{a}=\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース\ベクトル{b}=\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$また,$k\数式カンマスペース l$を実数として,%
+ \[k\ベクトル{a}+l\ベクトル{b}=k\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}+l\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}=\Ttyuukakko{ka_{1}+lb_{1}\数式カンマスペース ka_{2}+lb_{2}}\]%
}%
{\relax}%
}%
@@ -2819,26 +2865,26 @@
\NewDocumentCommand{\ベクトルの成分と大きさ}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\overrightarrow{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}$}{\relax}%
+ {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\overrightarrowtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- \[\overrightarrow{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}\]%
+ \[\overrightarrowtext{AB}=\Ttyuukakko{b_{1}-a_{1}\数式カンマスペース b_{2}-a_{2}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\Tzettaiti{\overrightarrow{AB}}=\sqrt{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}$}{\relax}%
+ {$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,$\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
$A\Ttyuukakko{a_{1}\数式カンマスペース a_{2}}\数式カンマスペース B\Ttyuukakko{b_{1}\数式カンマスペース b_{2}}$とすると,%
- \[\Tzettaiti{\overrightarrow{AB}}=\sqrt{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
+ \[\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{証明}}%
{%
\証明開始%
三平方の定理より,%
- \[\Tzettaiti{\overrightarrow{AB}}=\sqrt{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
+ \[\Tzettaiti{\overrightarrowtext{AB}}=\根号{\Ttyuukakko{b_{1}-a_{1}}^2+\Ttyuukakko{b_{2}-a_{2}}^2}\]%
\証明終了%
}%
{\relax}%
@@ -2848,11 +2894,11 @@
\NewDocumentCommand{\平面ベクトルの内積}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{i}}%
- {ベクトルの内積は,$\vec{a} \cdot\vec{b}=|\vec{a}||\vec{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\vec{a}$と$\vec{b}$のなす角}$}{\relax}%
+ {ベクトルの内積は,$\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}$}{\relax}%
\ifthenelse{\equal{#1}{公式}\AND\equal{#2}{b}}%
{%
ベクトルの内積は,%
- \[\vec{a} \cdot\vec{b}=|\vec{a}||\vec{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\vec{a}$と$\vec{b}$のなす角}\]%
+ \[\ベクトル{a} \cdot\ベクトル{b}=|\ベクトル{a}||\ベクトル{b}|\cos\theta \Ttyuukakko{0^{\circ} \leqq \theta \leqq 180^{\circ}}\text{\ (ただし,$\theta$は$\ベクトル{a}$と$\ベクトル{b}$のなす角)}\]%
}%
{\relax}%
}%
@@ -2861,33 +2907,33 @@
\NewDocumentCommand{\内積の性質}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$\vec{a} \cdot\vec{b}=\vec{b} \cdot\vec{a}$}{\relax}%
+ {$\ベクトル{a} \cdot\ベクトル{b}=\ベクトル{b} \cdot\ベクトル{a}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
- {\[\vec{a} \cdot\vec{b}=\vec{b} \cdot\vec{a}\]}{\relax}%
+ {\[\ベクトル{a} \cdot\ベクトル{b}=\ベクトル{b} \cdot\ベクトル{a}\]}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$\Ttyuukakko{\vec{a}+\vec{b}} \cdot\vec{c}=\vec{a} \cdot\vec{c}+\vec{b} \cdot\vec{c}$}{\relax}%
+ {$\Ttyuukakko{\ベクトル{a}+\ベクトル{b}} \cdot\ベクトル{c}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
- {\[\Ttyuukakko{\vec{a}+\vec{b}} \cdot\vec{c}=\vec{a} \cdot\vec{c}+\vec{b} \cdot\vec{c}\]}{\relax}%
+ {\[\Ttyuukakko{\ベクトル{a}+\ベクトル{b}} \cdot\ベクトル{c}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$\vec{c} \cdot\Ttyuukakko{\vec{b}+\vec{c}}=\vec{a} \cdot\vec{c}+\vec{b} \cdot\vec{c}$}{\relax}%
+ {$\ベクトル{c} \cdot\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
- {\[\vec{c} \cdot\Ttyuukakko{\vec{b}+\vec{c}}=\vec{a} \cdot\vec{c}+\vec{b} \cdot\vec{c}\]}{\relax}%
+ {\[\ベクトル{c} \cdot\Ttyuukakko{\ベクトル{b}+\ベクトル{c}}=\ベクトル{a} \cdot\ベクトル{c}+\ベクトル{b} \cdot\ベクトル{c}\]}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$k$が実数のとき,$\Ttyuukakko{k\vec{a}} \cdot\vec{b}=\vec{a} \cdot\Ttyuukakko{k\vec{b}}=k\Ttyuukakko{\vec{a} \cdot\vec{b}}$}{\relax}%
+ {$k$が実数のとき,$\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
$k$が実数のとき,%
- \[\Ttyuukakko{k\vec{a}} \cdot\vec{b}=\vec{a} \cdot\Ttyuukakko{k\vec{b}}=k\Ttyuukakko{\vec{a} \cdot\vec{b}}\]%
+ \[\Ttyuukakko{k\ベクトル{a}} \cdot\ベクトル{b}=\ベクトル{a} \cdot\Ttyuukakko{k\ベクトル{b}}=k\Ttyuukakko{\ベクトル{a} \cdot\ベクトル{b}}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{i}}%
- {$\vec{a} \cdot\vec{a}=\Tzettaiti{\vec{a}}^2$}{\relax}%
+ {$\ベクトル{a} \cdot\ベクトル{a}=\Tzettaiti{\ベクトル{a}}^2$}{\relax}%
\ifthenelse{\equal{#1}{公式E}\AND\equal{#2}{b}}%
- {\[\vec{a} \cdot\vec{a}=\Tzettaiti{\vec{a}}^2\]}{\relax}%
+ {\[\ベクトル{a} \cdot\ベクトル{a}=\Tzettaiti{\ベクトル{a}}^2\]}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{i}}%
- {$\Tzettaiti{\vec{a}}=\sqrt{\vec{a} \cdot\vec{a}}$}{\relax}%
+ {$\Tzettaiti{\ベクトル{a}}=\根号{\ベクトル{a} \cdot\ベクトル{a}}$}{\relax}%
\ifthenelse{\equal{#1}{公式F}\AND\equal{#2}{b}}%
- {\[\Tzettaiti{\vec{a}}=\sqrt{\vec{a} \cdot\vec{a}}\]}{\relax}%
+ {\[\Tzettaiti{\ベクトル{a}}=\根号{\ベクトル{a} \cdot\ベクトル{a}}\]}{\relax}%
}%
@@ -2895,15 +2941,15 @@
{%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{i}}%
{%
- $\vec{a}\neq\vec{0}\数式カンマスペース\vec{b}\neq\vec{0}$また,$k$は実数とする,\par%
- $\vec{a}/ \!/ \vec{b}\Leftrightarrow\vec{b}=k\vec{a}$,$\vec{b}=k\vec{a}$%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$また,$k$は実数とする,\par%
+ $\ベクトル{a}/ \!/ \ベクトル{b}\Leftrightarrow\ベクトル{b}=k\ベクトル{a}$,$\ベクトル{b}=k\ベクトル{a}$%
}%
{\relax}%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{b}}%
{%
- $\vec{a}\neq\vec{0}\数式カンマスペース\vec{b}\neq\vec{0}$また,$k$は実数とする,\par%
- $\vec{a}/ \!/ \vec{b}$%
- \[\Leftrightarrow\vec{b}=k\vec{a}\]%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$また,$k$は実数とする,\par%
+ $\ベクトル{a}/ \!/ \ベクトル{b}$%
+ \[\Leftrightarrow\ベクトル{b}=k\ベクトル{a}\]%
}%
{\relax}%
}%
@@ -2913,15 +2959,14 @@
{%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{i}}%
{%
- $\vec{a}\neq\vec{0}\数式カンマスペース\vec{b}\neq\vec{0}$また,$k$は実数とする,\par%
- $\vec{a} \perp \vec{b}\Leftrightarrow\vec{a} \cdot\vec{b}=0$%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$で,$k$は実数とすると,%
+ $\ベクトル{a} \perp \ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0$%
}%
{\relax}%
\ifthenelse{\equal{#1}{条件}\AND\equal{#2}{b}}%
{%
- $\vec{a}\neq\vec{0}\数式カンマスペース\vec{b}\neq\vec{0}$また,$k$は実数とする,\par%
- $\vec{a} \perp \vec{b}$%
- \[\Leftrightarrow\vec{a} \cdot\vec{b}=0\]%
+ $\ベクトル{a}\neq\ベクトル{0}\数式カンマスペース\ベクトル{b}\neq\ベクトル{0}$で,$k$は実数とすると,%
+ \[\ベクトル{a} \perp \ベクトル{b}\Leftrightarrow\ベクトル{a} \cdot\ベクトル{b}=0\]%
}%
{\relax}%
}%
@@ -2930,53 +2975,53 @@
\NewDocumentCommand{\位置ベクトル}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$を$m:n$に内分する点は,$\bunsuu{n\vec{a}+m\vec{b}}{m+n}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に内分する点は,$\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$を$m:n$に内分する点は,%
- \[\bunsuu{n\vec{a}+m\vec{b}}{m+n}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とすると,線分$\text{AB}$を$m:n$に内分する点は,%
+ \[\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{内分点の位置ベクトルの証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{内分点の位置ベクトルの証明}}%
{%
\証明開始%
- $P\Ttyuukakko{\vec{p}}$が$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$を$m:n$に内分するとき,%
+ $P\Ttyuukakko{\ベクトル{p}}$が$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を$m:n$に内分するとき,%
\begin{align*}%
- \vec{p}&=\vec{a}+\bunsuu{m}{m+n}\Ttyuukakko{\vec{b}-\vec{a}}&\\%
- &=\bunsuu{n\vec{a}+m\vec{b}}{m+n}&\\%
+ \ベクトル{p}&=\ベクトル{a}+\bunsuu{m}{m+n}\Ttyuukakko{\ベクトル{b}-\ベクトル{a}}&\\%
+ &=\bunsuu{n\ベクトル{a}+m\ベクトル{b}}{m+n}&\\%
\end{align*}%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$を$m:n$に外分する点は,$\bunsuu{-n\vec{a}+m\vec{b}}{m-n}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$を$m:n$に外分する点は,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$を$m:n$に外分する点は,%
- \[\bunsuu{-n\vec{a}+m\vec{b}}{m-n}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$を$m:n$に外分する点は,%
+ \[\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}\]%
}%
{\relax}%
- \ifthenelse{\equal{#1}{外分点の位置ベクトルの証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{外分点の位置ベクトルの証明}}%
{%
\証明開始%
- $m:n$に外分ということは$m:-n$に内分ということなので,$\bunsuu{-n\vec{a}+m\vec{b}}{m-n}$%
+ $m:n$に外分ということは$m:-n$に内分ということなので,$\bunsuu{-n\ベクトル{a}+m\ベクトル{b}}{m-n}$%
\証明終了%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$の中点は,$\bunsuu{\vec{a}+\vec{b}}{2}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$の中点は,$\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$とする,線分$AB$の中点は,%
- \[\bunsuu{\vec{a}+\vec{b}}{2}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$とする,線分$\text{AB}$の中点は,%
+ \[\bunsuu{\ベクトル{a}+\ベクトル{b}}{2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}\数式カンマスペース C\Ttyuukakko{\vec{c}}$とする,三角形$ABC$の重心は,$\bunsuu{\vec{a}+\vec{b}+\vec{c}}{3}$}{\relax}%
+ {$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とする,$\triangle{\text{ABC}}$の重心は,$\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
- $A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}\数式カンマスペース C\Ttyuukakko{\vec{c}}$とする,三角形$ABC$の重心は,%
- \[\bunsuu{\vec{a}+\vec{b}+\vec{c}}{3}\]%
+ $A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}\数式カンマスペース C\Ttyuukakko{\ベクトル{c}}$とする,$\triangle{\text{ABC}}$の重心は,%
+ \[\bunsuu{\ベクトル{a}+\ベクトル{b}+\ベクトル{c}}{3}\]%
}%
{\relax}%
}%
@@ -2985,36 +3030,36 @@
\NewDocumentCommand{\ベクトル方程式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{i}}%
- {$s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\vec{a}}$をとおり,$\vec{d}$に平行な直線は,$\vec{p}=\vec{a}+t\vec{b}$}{\relax}%
+ {$s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\ベクトル{a}}$をとおり,$\ベクトル{d}$に平行な直線は,$\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}$}{\relax}%
\ifthenelse{\equal{#1}{公式A}\AND\equal{#2}{b}}%
{%
- $s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\vec{a}}$をとおり,$\vec{d}$に平行な直線は,%
- \[\vec{p}=\vec{a}+t\vec{b}\]%
+ $s\数式カンマスペース t$を実数とする。点$A\Ttyuukakko{\ベクトル{a}}$をとおり,$\ベクトル{d}$に平行な直線は,%
+ \[\ベクトル{p}=\ベクトル{a}+t\ベクトル{b}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{i}}%
- {$s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$を通る直線は,$\vec{p}=\Ttyuukakko{1-t}\vec{a}+t\vec{b}\数式カンマスペース\vec{p}=a\vec{a}+t\vec{b}\text{\ (ただし,$s+t=1$)}$}{\relax}%
+ {$s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を通る直線は,$\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}$}{\relax}%
\ifthenelse{\equal{#1}{公式B}\AND\equal{#2}{b}}%
{%
- $s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\vec{a}}\数式カンマスペース B\Ttyuukakko{\vec{b}}$を通る直線は,%
- \[\vec{p}=\Ttyuukakko{1-t}\vec{a}+t\vec{b}\数式カンマスペース\vec{p}=a\vec{a}+t\vec{b}\text{\ (ただし,$s+t=1$)}\]%
+ $s\数式カンマスペース t$を実数とする。二点$A\Ttyuukakko{\ベクトル{a}}\数式カンマスペース B\Ttyuukakko{\ベクトル{b}}$を通る直線は,%
+ \[\ベクトル{p}=\Ttyuukakko{1-t}\ベクトル{a}+t\ベクトル{b}\数式カンマスペース\ベクトル{p}=a\ベクトル{a}+t\ベクトル{b}\text{\ (ただし,$s+t=1$)}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{i}}%
- {点$A\Ttyuukakko{\vec{a}}$を通り,$\vec{n}$に垂直な直線$\vec{p}$について,$\vec{n}\cdot\Ttyuukakko{\vec{p}-\vec{a}}=0$}{\relax}%
+ {点$A\Ttyuukakko{\ベクトル{a}}$を通り,$\ベクトル{n}$に垂直な直線$\ベクトル{p}$について,$\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0$}{\relax}%
\ifthenelse{\equal{#1}{公式C}\AND\equal{#2}{b}}%
{%
- 点$A\Ttyuukakko{\vec{a}}$を通り,$\vec{n}$に垂直な直線$\vec{p}$について,%
- \[\vec{n}\cdot\Ttyuukakko{\vec{p}-\vec{a}}=0\]%
+ 点$A\Ttyuukakko{\ベクトル{a}}$を通り,$\ベクトル{n}$に垂直な直線$\ベクトル{p}$について,%
+ \[\ベクトル{n}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{a}}=0\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{i}}%
- {中心$C\Ttyuukakko{\vec{c}}$,半径$r$の円は,$\Tzettaiti{\vec{p}-\vec{c}}=r\数式カンマスペース\Ttyuukakko{\vec{p}-\vec{c}}\cdot\Ttyuukakko{\vec{p}-\vec{c}}=r^2$}{\relax}%
+ {中心$C\Ttyuukakko{\ベクトル{c}}$,半径$r$の円は,$\Tzettaiti{\ベクトル{p}-\ベクトル{c}}=r\数式カンマスペース\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}=r^2$}{\relax}%
\ifthenelse{\equal{#1}{公式D}\AND\equal{#2}{b}}%
{%
- 中心$C\Ttyuukakko{\vec{c}}$,半径$r$の円は,%
- \[\Tzettaiti{\vec{p}-\vec{c}}=r\]%
- \[\Ttyuukakko{\vec{p}-\vec{c}}\cdot\Ttyuukakko{\vec{p}-\vec{c}}=r^2\]%
+ 中心$C\Ttyuukakko{\ベクトル{c}}$,半径$r$の円は,%
+ \[\Tzettaiti{\ベクトル{p}-\ベクトル{c}}=r\]%
+ \[\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}\cdot\Ttyuukakko{\ベクトル{p}-\ベクトル{c}}=r^2\]%
}%
{\relax}%
}%
@@ -3266,11 +3311,11 @@
\NewDocumentCommand{\複素数の絶対値}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {複素数$z=a+bi$に対して,$\Tzettaiti{z}=\Tzettaiti{a+bi}=\sqrt{a^2+b^2}$}{\relax}%
+ {複素数$z=a+bi$に対して,$\Tzettaiti{z}=\Tzettaiti{a+bi}=\根号{a^2+b^2}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
複素数$z=a+bi$に対して,%
- \[\Tzettaiti{z}=\Tzettaiti{a+bi}=\sqrt{a^2+b^2}\]%
+ \[\Tzettaiti{z}=\Tzettaiti{a+bi}=\根号{a^2+b^2}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
@@ -3287,12 +3332,12 @@
\NewDocumentCommand{\極形式}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {複素数$\alpha=a+bi$について,$\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\text{\ (ただし$z>0$)}$また,$r=\Tzettaiti{\alpha}=\sqrt{a^2+b^2}\数式カンマスペース\cos\theta=\bunsuu{a}{r}\数式カンマスペース\sin\theta=\bunsuu{b}{r}$を極形式という。}{\relax}%
+ {複素数$\alpha=a+bi$について,$\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\text{\ (ただし$z>0$)}$また,$r=\Tzettaiti{\alpha}=\根号{a^2+b^2}\数式カンマスペース\cos\theta=\bunsuu{a}{r}\数式カンマスペース\sin\theta=\bunsuu{b}{r}$を極形式という。}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
複素数$\alpha=a+bi$について,%
\[\alpha=r\Ttyuukakko{\cos\theta+i\sin\theta}\text{\ (ただし$z>0$)}\]%
- また,$r=\Tzettaiti{\alpha}=\sqrt{a^2+b^2}\数式カンマスペース\cos\theta=\bunsuu{a}{r}\数式カンマスペース\sin\theta=\bunsuu{b}{r}$を極形式という。%
+ また,$r=\Tzettaiti{\alpha}=\根号{a^2+b^2}\数式カンマスペース\cos\theta=\bunsuu{a}{r}\数式カンマスペース\sin\theta=\bunsuu{b}{r}$を極形式という。%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質A}\AND\equal{#2}{i}}%
@@ -3440,11 +3485,11 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {楕円の焦点は$F\Ttyuukakko{\sqrt{a^2-b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\sqrt{a^2-b^2}\数式カンマスペース 0}$}{\relax}%
+ {楕円の焦点は$F\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
楕円の焦点は%
- \[F\Ttyuukakko{\sqrt{a^2-b^2}\数式カンマスペース 0} F'\Ttyuukakko{\sqrt{a^2-b^2}\数式カンマスペース 0}\]%
+ \[F\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2-b^2}\数式カンマスペース 0}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
@@ -3474,11 +3519,11 @@
}%
{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{i}}%
- {双曲線の焦点は$F\Ttyuukakko{\sqrt{a^2+b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\sqrt{a^2+b^2}\数式カンマスペース 0}$}{\relax}%
+ {双曲線の焦点は$F\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}$と,$F'\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}$}{\relax}%
\ifthenelse{\equal{#1}{性質B}\AND\equal{#2}{b}}%
{%
双曲線の焦点は%
- \[F\Ttyuukakko{\sqrt{a^2+b^2}\数式カンマスペース 0} F'\Ttyuukakko{\sqrt{a^2+b^2}\数式カンマスペース 0}\]%
+ \[F\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0} F'\Ttyuukakko{\根号{a^2+b^2}\数式カンマスペース 0}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{性質C}\AND\equal{#2}{i}}%
@@ -3600,7 +3645,7 @@
{$\Ttyuukakko{a^{x}}'=a^{x}\log a$}{\relax}%
\ifthenelse{\equal{#1}{初等関数の微分公式I}\AND\equal{#2}{b}}%
{\[\Ttyuukakko{a^{x}}'=a^{x}\log a\]}{\relax}%
- \ifthenelse{\equal{#1}{三角関数の微分公式の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{三角関数の微分公式の証明}}%
{%
\証明開始%
\begin{align*}%
@@ -3617,7 +3662,7 @@
\証明終了%
}%
{\relax}%
- \ifthenelse{\equal{#1}{対数関数の微分公式の証明}\AND\equal{#2}{i}}%
+ \ifthenelse{\equal{#1}{対数関数の微分公式の証明}}%
{%
\証明開始%
\begin{align*}%
@@ -3628,7 +3673,7 @@
\begin{align*}%
\Ttyuukakko{\log x}'&=\displaystyle\lim_{h \to 0} \bunsuu{\log\Ttyuukakko{1+t}}{xt}&\\%
&=\displaystyle\lim_{h \to 0} \Tdaikakko{\bunsuu{\log\Ttyuukakko{1+t}}{t}\cdot\bunsuu{1}{x}}&\\%
- &=\displaystyle\lim_{h \to 0} \log\Ttyuukakko{1+t}^{\bunsuu{1}{t}}\cdot\bunsuu{1}{x}&\\%
+ &=\displaystyle\lim_{h \to 0} \log\Ttyuukakko{1+t}^{\frac{1}{t}}\cdot\bunsuu{1}{x}&\\%
&=\log e\cdot\bunsuu{1}{x}&\\%
&=\bunsuu{1}{x}
\end{align*}%
@@ -3667,12 +3712,11 @@
\NewDocumentCommand{\不定積分}{ m O{i} }%
{%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{i}}%
- {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,$\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C$ ($C$は積分定数)}{\relax}%
+ {$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,$\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}$}{\relax}%
\ifthenelse{\equal{#1}{定義}\AND\equal{#2}{b}}%
{%
$F'\Ttyuukakko{x}=f\Ttyuukakko{x}$とすると,%
- \[\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\]%
- ($C$は積分定数)%
+ \[\displaystyle \int_{}^{} f\Ttyuukakko{x}dx=F\Ttyuukakko{x}+C\text{\ (\,$C$は積分定数)}\]%
}%
{\relax}%
\ifthenelse{\equal{#1}{置換積分}\AND\equal{#2}{i}}%
diff --git a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
index f63a375bb5..7c68dffbd7 100644
--- a/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
+++ b/macros/luatex/latex/japanese-mathformulas/japanese-mathformulas.tex
@@ -1,8 +1,8 @@
\documentclass[fleqn]{ltjsarticle}% !lualatex
\usepackage[hiragino-pron,deluxe,expert,bold]{luatexja-preset}%
-\usepackage{mathformula,framed,comment}%
-\usepackage[usetype1]{uline--}
+\usepackage{japanese-mathformulas,framed,comment}%
+\usepackage[usetype1]{uline--}%
\title{\LARGE\uline{japanese-mathformulas.sty}\Large\\manual pdf\\(mainly for Japanese, lulatex)}%
\author{\Large Hugh / Ponkichi}%
\date{\today}
@@ -15,8 +15,10 @@
\newlength{\@tempdimi}
\let\@@vspace@@\vspace
\def\vspace{\@ifstar{\@@vspace@}{\@vspace@}}
-\def\@vspace@#1{\par\setlength{\@tempdimi}{#1}\@@vspace@@{\@tempdimi}}
-\def\@@vspace@#1{\par\setlength{\@tempdimi}{#1}\@@vspace@@*{\@tempdimi}}
+\def\@vspace@#1{
+\setlength{\@tempdimi}{#1}\@@vspace@@{\@tempdimi}}
+\def\@@vspace@#1{
+\setlength{\@tempdimi}{#1}\@@vspace@@*{\@tempdimi}}
\newlength{\pseprule} % 段仕切り線の太さ
\setlength{\pseprule}{.5truept}
@@ -70,38 +72,38 @@
\maketitle
\begin{multicolparx}{2}
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
-機能紹介と注記-
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
- Function Introduction and Notes -
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
中学高校で習う数学の定理や公式を出力するためのstyファイル。\\
\detokenize{\NewDocumentCommand}によって,インデント数式か別行立て数式かを指定できる。
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
This is a style file for compiling basic math formulas.\\
\detokenize{\NewDocumentCommand} allows you to specify whether the formula should be used within a sentence or on a new line.
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
後の例では記述がないが,$\Ttyuubracket{\mathrm{i}}$か$\Ttyuubracket{\mathrm{b}}$かの指定をしない場合は自動的に$\Ttyuubracket{\mathrm{i}}$とみなされる。
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
Although not shown in the examples below, if $\Ttyuubracket{\mathrm{i}}$ or $\Ttyuubracket{\mathrm{b}}$ is not specified, it is automatically assumed to be $\Ttyuubracket{\mathrm{i}}$.
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+\noindent\parbox[t]{\hsize}{\begin{center}%
二段組の文書を作成するときは,数式の上下間スペースを減らすために,以下をpreambleに記述するとよい。
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
-When making two-column document, you are recommended to put these lines at preamble.\par
+\noindent\parbox[t]{\hsize}{\begin{center}%
+When making two-column document, you are recommended to put these lines at preamble.\\
These reduce the space above and below math expressions.
\end{center}}%
\end{multicolparx}
@@ -117,149 +119,253 @@ These reduce the space above and below math expressions.
\end{framed}
\begin{multicolparx}{2}
-\parbox[t]{\hsize}{\begin{center}%
+
+\noindent\parbox[t]{\hsize}{\begin{center}%
以下が実例。
\end{center}}%
-\parbox[t]{\hsize}{\begin{center}%
+
+\noindent\parbox[t]{\hsize}{\begin{center}%
Now, here are the actual examples!
\end{center}}%
\end{multicolparx}
-\auto{1}{\detokenize{\二次式展開{公式A}[i]}}\par
-\二次式展開{公式A}[i]\par
+\auto{1}{\detokenize{\二次式展開{公式A}[i]}}
+
+\二次式展開{公式A}[i]
+
\auto{2}{\detokenize{\二次式展開{公式A}[b]}}
+
\二次式展開{公式A}[b]
-\auto{33}{\detokenize{\二次式因数分解{公式A}[i]}}\par
-\二次式因数分解{公式A}[i]\par
+
+\auto{33}{\detokenize{\二次式因数分解{公式A}[i]}}
+
+\二次式因数分解{公式A}[i]
+
\auto{34}{\detokenize{\二次式因数分解{公式A}[b]}}
+
\二次式因数分解{公式A}[b]
+
%\begin{simplesquarebox}{二次式展開}
%\begin{description}
-\auto{1}{\detokenize{\二次式展開{公式A}[i]}}\par
-\二次式展開{公式A}[i]\par
+\auto{1}{\detokenize{\二次式展開{公式A}[i]}}
+
+\二次式展開{公式A}[i]
+
\auto{2}{\detokenize{\二次式展開{公式A}[b]}}
+
\二次式展開{公式A}[b]
-\auto{3}{\detokenize{\二次式展開{公式B}[i]}}\par
-\二次式展開{公式B}[i]\par
+
+\auto{3}{\detokenize{\二次式展開{公式B}[i]}}
+
+\二次式展開{公式B}[i]
+
\auto{4}{\detokenize{\二次式展開{公式B}[b]}}
+
\二次式展開{公式B}[b]
-\auto{5}{\detokenize{\二次式展開{公式C}[i]}}\par
-\二次式展開{公式C}[i]\par
+
+\auto{5}{\detokenize{\二次式展開{公式C}[i]}}
+
+\二次式展開{公式C}[i]
+
\auto{6}{\detokenize{\二次式展開{公式C}[b]}}
+
\二次式展開{公式C}[b]
-\auto{7}{\detokenize{\二次式展開{公式D}[i]}}\par
-\二次式展開{公式D}[i]\par
+
+\auto{7}{\detokenize{\二次式展開{公式D}[i]}}
+
+\二次式展開{公式D}[i]
+
\auto{8}{\detokenize{\二次式展開{公式D}[b]}}
+
\二次式展開{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{二次式因数分解}
%\begin{description}
-\auto{9}{\detokenize{\二次式因数分解{公式A}[i]}}\par
-\二次式因数分解{公式A}[i]\par
+\auto{9}{\detokenize{\二次式因数分解{公式A}[i]}}
+
+\二次式因数分解{公式A}[i]
+
\auto{10}{\detokenize{\二次式因数分解{公式A}[b]}}
+
\二次式因数分解{公式A}[b]
-\auto{11}{\detokenize{\二次式因数分解{公式B}[i]}}\par
-\二次式因数分解{公式B}[i]\par
+
+\auto{11}{\detokenize{\二次式因数分解{公式B}[i]}}
+
+\二次式因数分解{公式B}[i]
+
\auto{12}{\detokenize{\二次式因数分解{公式B}[b]}}
+
\二次式因数分解{公式B}[b]
-\auto{13}{\detokenize{\二次式因数分解{公式C}[i]}}\par
-\二次式因数分解{公式C}[i]\par
+
+\auto{13}{\detokenize{\二次式因数分解{公式C}[i]}}
+
+\二次式因数分解{公式C}[i]
+
\auto{14}{\detokenize{\二次式因数分解{公式C}[b]}}
+
\二次式因数分解{公式C}[b]
-\auto{15}{\detokenize{\二次式因数分解{公式D}[i]}}\par
-\二次式因数分解{公式D}[i]\par
+
+\auto{15}{\detokenize{\二次式因数分解{公式D}[i]}}
+
+\二次式因数分解{公式D}[i]
+
\auto{16}{\detokenize{\二次式因数分解{公式D}[b]}}
+
\二次式因数分解{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平方根}
%\begin{description}
-\auto{17}{\detokenize{\平方根{定義}[i]}}\par
-\平方根{定義}[i]\par
-\auto{18}{\detokenize{\平方根{定義}[b]}}\par
+\auto{17}{\detokenize{\平方根{定義}[i]}}
+
+\平方根{定義}[i]
+
+\auto{18}{\detokenize{\平方根{定義}[b]}}
+
+
\平方根{定義}[b]
-\auto{19}{\detokenize{\平方根{性質A}[i]}}\par
-\平方根{性質A}[i]\par
-\auto{20}{\detokenize{\平方根{性質A}[b]}}\par
+
+\auto{19}{\detokenize{\平方根{性質A}[i]}}
+
+\平方根{性質A}[i]
+
+\auto{20}{\detokenize{\平方根{性質A}[b]}}
+
+
\平方根{性質A}[b]
-\auto{21}{\detokenize{\平方根{性質B}[i]}}\par
-\平方根{性質B}[i]\par
+
+\auto{21}{\detokenize{\平方根{性質B}[i]}}
+
+\平方根{性質B}[i]
+
\auto{22}{\detokenize{\平方根{性質B}[b]}}
+
\平方根{性質B}[b]
-\auto{23}{\detokenize{\平方根{性質C}[i]}}\par
-\平方根{性質C}[i]\par
+
+\auto{23}{\detokenize{\平方根{性質C}[i]}}
+
+\平方根{性質C}[i]
+
\auto{24}{\detokenize{\平方根{性質C}[b]}}
+
\平方根{性質C}[b]
-\auto{25}{\detokenize{\平方根{性質D}[i]}}\par
-\平方根{性質D}[i]\par
+
+\auto{25}{\detokenize{\平方根{性質D}[i]}}
+
+\平方根{性質D}[i]
+
\auto{26}{\detokenize{\平方根{性質D}[b]}}
+
\平方根{性質D}[b]
-\auto{27}{\detokenize{\平方根{性質E}[i]}}\par
-\平方根{性質E}[i]\par
+
+\auto{27}{\detokenize{\平方根{性質E}[i]}}
+
+\平方根{性質E}[i]
+
\auto{28}{\detokenize{\平方根{性質E}[b]}}
+
\平方根{性質E}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{一次不等式}
%\begin{description}
-\auto{29}{\detokenize{\一次不等式{性質A}[i]}}\par
-\一次不等式{性質A}[i]\par
-\auto{30}{\detokenize{\一次不等式{性質A}[b]}}\par
+\auto{29}{\detokenize{\一次不等式{性質A}[i]}}
+
+\一次不等式{性質A}[i]
+
+\auto{30}{\detokenize{\一次不等式{性質A}[b]}}
+
+
\一次不等式{性質A}[b]
-\auto{31}{\detokenize{\一次不等式{性質B}[i]}}\par
-\一次不等式{性質B}[i]\par
-\auto{32}{\detokenize{\一次不等式{性質B}[b]}}\par
+
+\auto{31}{\detokenize{\一次不等式{性質B}[i]}}
+
+\一次不等式{性質B}[i]
+
+\auto{32}{\detokenize{\一次不等式{性質B}[b]}}
+
+
\一次不等式{性質B}[b]
-\auto{33}{\detokenize{\一次不等式{性質C}[i]}}\par
-\一次不等式{性質C}[i]\par
-\auto{34}{\detokenize{\一次不等式{性質C}[b]}}\par
+
+\auto{33}{\detokenize{\一次不等式{性質C}[i]}}
+
+\一次不等式{性質C}[i]
+
+\auto{34}{\detokenize{\一次不等式{性質C}[b]}}
+
+
\一次不等式{性質C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{集合}
%\begin{description}
-\auto{35}{\detokenize{\集合{積集合}[i]}}\par
-\集合{積集合}[i]\par
+\auto{35}{\detokenize{\集合{積集合}[i]}}
+
+\集合{積集合}[i]
+
\auto{36}{\detokenize{\集合{積集合}[b]}}
+
\集合{積集合}[b]
-\auto{37}{\detokenize{\集合{和集合}[i]}}\par
-\集合{和集合}[i]\par
+
+\auto{37}{\detokenize{\集合{和集合}[i]}}
+
+\集合{和集合}[i]
+
\auto{38}{\detokenize{\集合{和集合}[b]}}
+
\集合{和集合}[b]
-\auto{39}{\detokenize{\集合{補集合}[i]}}\par
-\集合{補集合}[i]\par
+
+\auto{39}{\detokenize{\集合{補集合}[i]}}
+
+\集合{補集合}[i]
+
\auto{40}{\detokenize{\集合{補集合}[b]}}
+
\集合{補集合}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{対偶}
%\begin{description}
-\auto{41}{\detokenize{\対偶{定理}[i]}}\par
-\対偶{定理}[i]\par
-\auto{41}{\detokenize{\対偶{定理}[b]}}\par
-\対偶{定理}[b]\par
-\auto{41}{\detokenize{\対偶{証明}}}\par
-\対偶{証明}\par
+\auto{41}{\detokenize{\対偶{定理}[i]}}
+
+\対偶{定理}[i]
+
+\auto{41}{\detokenize{\対偶{定理}[b]}}
+
+
+\対偶{定理}[b]
+
+
+\auto{41}{\detokenize{\対偶{証明}}}
+
+\対偶{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{背理法}
%\begin{description}
-\auto{42}{\detokenize{\背理法}}\par
+\auto{42}{\detokenize{\背理法}}
+
\背理法
%\end{description}
@@ -267,239 +373,433 @@ Now, here are the actual examples!
%\begin{simplesquarebox}{二次関数}
%\begin{description}
-\auto{43}{\detokenize{\二次関数{標準形}[i]}}\par
-\二次関数{標準形}[i]\par
+\auto{43}{\detokenize{\二次関数{標準形}[i]}}
+
+\二次関数{標準形}[i]
+
\auto{44}{\detokenize{\二次関数{標準形}[b]}}
+
\二次関数{標準形}[b]
-\auto{45}{\detokenize{\二次関数{一般形}[i]}}\par
-\二次関数{一般形}[i]\par
+
+\auto{45}{\detokenize{\二次関数{一般形}[i]}}
+
+\二次関数{一般形}[i]
+
\auto{46}{\detokenize{\二次関数{一般形}[b]}}
+
\二次関数{一般形}[b]
-\auto{47}{\detokenize{\二次関数{切片形}[i]}}\par
-\二次関数{切片形}[i]\par
+
+\auto{47}{\detokenize{\二次関数{切片形}[i]}}
+
+\二次関数{切片形}[i]
+
\auto{48}{\detokenize{\二次関数{切片形}[b]}}
+
\二次関数{切片形}[b]
-\auto{49}{\detokenize{\二次関数{平方完成}[i]}}\par
-\二次関数{平方完成}[i]\par
-\auto{50}{\detokenize{\二次関数{平方完成}[b]}}\par
+
+\auto{49}{\detokenize{\二次関数{平方完成}[i]}}
+
+\二次関数{平方完成}[i]
+
+\auto{50}{\detokenize{\二次関数{平方完成}[b]}}
+
+
\二次関数{平方完成}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{二次方程式の解の公式}
%\begin{description}
-\auto{51}{\detokenize{\二次方程式の解の公式{公式}[i]}}\par
-\二次方程式の解の公式{公式}[i]\par
-\auto{52}{\detokenize{\二次方程式の解の公式{公式}[b]}}\par
+\auto{51}{\detokenize{\二次方程式の解の公式{公式}[i]}}
+
+\二次方程式の解の公式{公式}[i]
+
+\auto{52}{\detokenize{\二次方程式の解の公式{公式}[b]}}
+
+
\二次方程式の解の公式{公式}[b]
-\auto{52}{\detokenize{\二次方程式の解の公式{証明A}[i]}}\par
-\二次方程式の解の公式{証明A}[i]\par
-\auto{52}{\detokenize{\二次方程式の解の公式{証明B}[i]}}\par
-\二次方程式の解の公式{証明B}[i]\par
+
+\auto{52}{\detokenize{\二次方程式の解の公式{証明A}[i]}}
+
+\二次方程式の解の公式{証明A}[i]
+
+\auto{52}{\detokenize{\二次方程式の解の公式{証明B}[i]}}
+
+\二次方程式の解の公式{証明B}[i]
+
%\end{description}
%\end{simplesquarebox}
-\auto{52}{\detokenize{\三角比の定義{定義A}[i]}}\par
-\三角比の定義{定義A}[i]\par
-\auto{52}{\detokenize{\三角比の定義{定義B}[i]}}\par
-\三角比の定義{定義B}[i]\par
+\auto{52}{\detokenize{\三角比の定義{定義A}[i]}}
+
+\三角比の定義{定義A}[i]
+
+\auto{52}{\detokenize{\三角比の定義{定義B}[i]}}
+
+\三角比の定義{定義B}[i]
+
%\begin{simplesquarebox}{三角比の相互関係}
%\begin{description}
-\auto{53}{\detokenize{\三角比の相互関係{公式A}[i]}}\par
-\三角比の相互関係{公式A}[i]\par
+\auto{53}{\detokenize{\三角比の相互関係{公式A}[i]}}
+
+\三角比の相互関係{公式A}[i]
+
\auto{54}{\detokenize{\三角比の相互関係{公式A}[b]}}
+
\三角比の相互関係{公式A}[b]
-\auto{55}{\detokenize{\三角比の相互関係{公式B}[i]}}\par
-\三角比の相互関係{公式B}[i]\par
+
+\auto{55}{\detokenize{\三角比の相互関係{公式B}[i]}}
+
+\三角比の相互関係{公式B}[i]
+
\auto{56}{\detokenize{\三角比の相互関係{公式B}[b]}}
+
\三角比の相互関係{公式B}[b]
-\auto{57}{\detokenize{\三角比の相互関係{公式C}[i]}}\par
-\三角比の相互関係{公式C}[i]\par
+
+\auto{57}{\detokenize{\三角比の相互関係{公式C}[i]}}
+
+\三角比の相互関係{公式C}[i]
+
\auto{58}{\detokenize{\三角比の相互関係{公式C}[b]}}
+
\三角比の相互関係{公式C}[b]
-\auto{57}{\detokenize{\三角比の相互関係{証明}}}\par
-\三角比の相互関係{証明}\par
+
+\auto{57}{\detokenize{\三角比の相互関係{証明}}}
+
+\三角比の相互関係{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{正弦定理}
%\begin{description}
-\auto{59}{\detokenize{\正弦定理{公式}[i]}}\par
-\正弦定理{公式}[i]\par
+\auto{59}{\detokenize{\正弦定理{公式}[i]}}
+
+\正弦定理{公式}[i]
+
\auto{60}{\detokenize{\正弦定理{公式}[b]}}
-\正弦定理{公式}[b]\par
-\auto{59}{\detokenize{\正弦定理{証明}}}\par
-\正弦定理{証明}\par
+
+\正弦定理{公式}[b]
+
+
+\auto{59}{\detokenize{\正弦定理{証明}}}
+
+\正弦定理{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{余弦定理}
%\begin{description}
-\auto{61}{\detokenize{\余弦定理{公式}[i]}}\par
-\余弦定理{公式}[i]\par
+\auto{61}{\detokenize{\余弦定理{公式}[i]}}
+
+\余弦定理{公式}[i]
+
\auto{62}{\detokenize{\余弦定理{公式}[b]}}
+
\余弦定理{公式}[b]
-\auto{61}{\detokenize{\余弦定理{証明}}}\par
-\余弦定理{証明}\par
+
+\auto{61}{\detokenize{\余弦定理{証明}}}
+
+\余弦定理{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{三角形の面積}
%\begin{description}
-\auto{63}{\detokenize{\三角形の面積{公式}[i]}}\par
-\三角形の面積{公式}[i]\par
+\auto{63}{\detokenize{\三角形の面積{公式}[i]}}
+
+\三角形の面積{公式}[i]
+
\auto{64}{\detokenize{\三角形の面積{公式}[b]}}
+
\三角形の面積{公式}[b]
-\auto{63}{\detokenize{\三角形の面積{証明}}}\par
-\三角形の面積{証明}\par
+
+\auto{63}{\detokenize{\三角形の面積{証明}}}
+
+\三角形の面積{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{場合の数と確率}
%\begin{description}
-\auto{65}{\detokenize{\場合の数と確率{和集合の要素の個数}[i]}}\par
-\場合の数と確率{和集合の要素の個数}[i]\par
+\auto{65}{\detokenize{\場合の数と確率{和集合の要素の個数}[i]}}
+
+\場合の数と確率{和集合の要素の個数}[i]
+
\auto{66}{\detokenize{\場合の数と確率{和集合の要素の個数}[b]}}
+
\場合の数と確率{和集合の要素の個数}[b]
-%\auto{67}{\detokenize{\場合の数と確率{積集合の要素の個数}[i]}}\par
-%\場合の数と確率{積集合の要素の個数}[i]\par
+
+%\auto{67}{\detokenize{\場合の数と確率{積集合の要素の個数}[i]}}
+
+%\場合の数と確率{積集合の要素の個数}[i]
+
%\auto{68}{\detokenize{\場合の数と確率{積集合の要素の個数}[b]}}
+
%\場合の数と確率{積集合の要素の個数}[b]
-\auto{69}{\detokenize{\場合の数と確率{補集合の要素の個数}[i]}}\par
-\場合の数と確率{補集合の要素の個数}[i]\par
+
+\auto{69}{\detokenize{\場合の数と確率{補集合の要素の個数}[i]}}
+
+\場合の数と確率{補集合の要素の個数}[i]
+
\auto{70}{\detokenize{\場合の数と確率{補集合の要素の個数}[b]}}
+
\場合の数と確率{補集合の要素の個数}[b]
-\auto{71}{\detokenize{\場合の数と確率{和の法則}[i]}}\par
-\場合の数と確率{和の法則}[i]\par
+
+\auto{71}{\detokenize{\場合の数と確率{和の法則}[i]}}
+
+\場合の数と確率{和の法則}[i]
+
\auto{72}{\detokenize{\場合の数と確率{和の法則}[b]}}
+
\場合の数と確率{和の法則}[b]
-\auto{73}{\detokenize{\場合の数と確率{積の法則}[i]}}\par
-\場合の数と確率{積の法則}[i]\par
+
+\auto{73}{\detokenize{\場合の数と確率{積の法則}[i]}}
+
+\場合の数と確率{積の法則}[i]
+
\auto{74}{\detokenize{\場合の数と確率{積の法則}[b]}}
+
\場合の数と確率{積の法則}[b]
-\auto{75}{\detokenize{\場合の数と確率{順列}[i]}}\par
-\場合の数と確率{順列}[i]\par
+
+\auto{75}{\detokenize{\場合の数と確率{順列}[i]}}
+
+\場合の数と確率{順列}[i]
+
\auto{76}{\detokenize{\場合の数と確率{順列}[b]}}
+
\場合の数と確率{順列}[b]
-\auto{75}{\detokenize{\場合の数と確率{順列の証明}[i]}}\par
-\場合の数と確率{順列の証明}[i]\par
-\auto{77}{\detokenize{\場合の数と確率{円順列}[i]}}\par
-\場合の数と確率{円順列}[i]\par
+
+\auto{75}{\detokenize{\場合の数と確率{順列の証明}}}
+
+\場合の数と確率{順列の証明}
+
+\auto{77}{\detokenize{\場合の数と確率{円順列}[i]}}
+
+\場合の数と確率{円順列}[i]
+
\auto{78}{\detokenize{\場合の数と確率{円順列}[b]}}
+
\場合の数と確率{円順列}[b]
-\auto{77}{\detokenize{\場合の数と確率{円順列の証明}[i]}}\par
-\場合の数と確率{円順列の証明}[i]\par
-\auto{79}{\detokenize{\場合の数と確率{重複順列}[i]}}\par
-\場合の数と確率{重複順列}[i]\par
+
+\auto{77}{\detokenize{\場合の数と確率{円順列の証明}}}
+
+\場合の数と確率{円順列の証明}
+
+\auto{79}{\detokenize{\場合の数と確率{重複順列}[i]}}
+
+\場合の数と確率{重複順列}[i]
+
\auto{80}{\detokenize{\場合の数と確率{重複順列}[b]}}
+
\場合の数と確率{重複順列}[b]
-\auto{81}{\detokenize{\場合の数と確率{組み合わせ}[i]}}\par
-\場合の数と確率{組み合わせ}[i]\par
+
+\auto{81}{\detokenize{\場合の数と確率{組み合わせ}[i]}}
+
+\場合の数と確率{組み合わせ}[i]
+
\auto{82}{\detokenize{\場合の数と確率{組み合わせ}[b]}}
+
\場合の数と確率{組み合わせ}[b]
-\auto{81}{\detokenize{\場合の数と確率{組み合わせの証明}[i]}}\par
-\場合の数と確率{組み合わせの証明}[i]\par
-\auto{83}{\detokenize{\場合の数と確率{同じものを含む順列}[i]}}\par
-\場合の数と確率{同じものを含む順列}[i]\par
+
+\auto{81}{\detokenize{\場合の数と確率{組み合わせの証明}}}
+
+\場合の数と確率{組み合わせの証明}
+
+\auto{83}{\detokenize{\場合の数と確率{同じものを含む順列}[i]}}
+
+\場合の数と確率{同じものを含む順列}[i]
+
\auto{84}{\detokenize{\場合の数と確率{同じものを含む順列}[b]}}
+
\場合の数と確率{同じものを含む順列}[b]
-\auto{83}{\detokenize{\場合の数と確率{同じものを含む順列の証明}[i]}}\par
-\場合の数と確率{同じものを含む順列の証明}[i]\par
-\auto{85}{\detokenize{\場合の数と確率{確率の定義}[i]}}\par
-\場合の数と確率{確率の定義}[i]\par
+
+\auto{83}{\detokenize{\場合の数と確率{同じものを含む順列の証明}}}
+
+\場合の数と確率{同じものを含む順列の証明}
+
+\auto{85}{\detokenize{\場合の数と確率{確率の定義}[i]}}
+
+\場合の数と確率{確率の定義}[i]
+
\auto{86}{\detokenize{\場合の数と確率{確率の定義}[b]}}
+
\場合の数と確率{確率の定義}[b]
-\auto{87}{\detokenize{\場合の数と確率{排反の定義}[i]}}\par
-\場合の数と確率{排反の定義}[i]\par
+
+\auto{87}{\detokenize{\場合の数と確率{排反の定義}[i]}}
+
+\場合の数と確率{排反の定義}[i]
+
\auto{88}{\detokenize{\場合の数と確率{排反の定義}[b]}}
-\場合の数と確率{排反の定義}[b]\par
-\auto{89}{\detokenize{\場合の数と確率{確率の性質A}[i]}}\par
-\場合の数と確率{確率の性質A}[i]\par
+
+\場合の数と確率{排反の定義}[b]
+
+
+\auto{89}{\detokenize{\場合の数と確率{確率の性質A}[i]}}
+
+\場合の数と確率{確率の性質A}[i]
+
\auto{90}{\detokenize{\場合の数と確率{確率の性質A}[b]}}
+
\場合の数と確率{確率の性質A}[b]
-\auto{91}{\detokenize{\場合の数と確率{確率の性質B}[i]}}\par
-\場合の数と確率{確率の性質B}[i]\par
+
+\auto{91}{\detokenize{\場合の数と確率{確率の性質B}[i]}}
+
+\場合の数と確率{確率の性質B}[i]
+
\auto{92}{\detokenize{\場合の数と確率{確率の性質B}[b]}}
+
\場合の数と確率{確率の性質B}[b]
-\auto{93}{\detokenize{\場合の数と確率{和事象の確率}[i]}}\par
-\場合の数と確率{和事象の確率}[i]\par
+
+\auto{93}{\detokenize{\場合の数と確率{和事象の確率}[i]}}
+
+\場合の数と確率{和事象の確率}[i]
+
\auto{94}{\detokenize{\場合の数と確率{和事象の確率}[b]}}
+
\場合の数と確率{和事象の確率}[b]
-\auto{95}{\detokenize{\場合の数と確率{積事象の確率}[i]}}\par
-%\場合の数と確率{積事象の確率}[i]\par
+
+\auto{95}{\detokenize{\場合の数と確率{積事象の確率}[i]}}
+
+%\場合の数と確率{積事象の確率}[i]
+
%\auto{96}{\detokenize{\場合の数と確率{積事象の確率}[b]}}
+
%\場合の数と確率{積事象の確率}[b]
-%\auto{97}{\detokenize{\場合の数と確率{余事象の確率}[i]}}\par
-\場合の数と確率{余事象の確率}[i]\par
+
+%\auto{97}{\detokenize{\場合の数と確率{余事象の確率}[i]}}
+
+\場合の数と確率{余事象の確率}[i]
+
\auto{98}{\detokenize{\場合の数と確率{余事象の確率}[b]}}
+
\場合の数と確率{余事象の確率}[b]
-\auto{99}{\detokenize{\場合の数と確率{独立な事象の確率}[i]}}\par
-\場合の数と確率{独立な事象の確率}[i]\par
+
+\auto{99}{\detokenize{\場合の数と確率{独立な事象の確率}[i]}}
+
+\場合の数と確率{独立な事象の確率}[i]
+
\auto{100}{\detokenize{\場合の数と確率{独立な事象の確率}[b]}}
+
\場合の数と確率{独立な事象の確率}[b]
-\auto{101}{\detokenize{\場合の数と確率{反復試行の確率}[i]}}\par
-\場合の数と確率{反復試行の確率}[i]\par
+
+\auto{101}{\detokenize{\場合の数と確率{反復試行の確率}[i]}}
+
+\場合の数と確率{反復試行の確率}[i]
+
\auto{102}{\detokenize{\場合の数と確率{反復試行の確率}[b]}}
+
\場合の数と確率{反復試行の確率}[b]
-\auto{101}{\detokenize{\場合の数と確率{反復試行の確率の証明}[i]}}\par
-\場合の数と確率{反復試行の確率の証明}[i]\par
-\auto{103}{\detokenize{\場合の数と確率{条件付き確率}[i]}}\par
-\場合の数と確率{条件付き確率}[i]\par
+
+\auto{101}{\detokenize{\場合の数と確率{反復試行の確率の証明}}}
+
+\場合の数と確率{反復試行の確率の証明}
+
+\auto{103}{\detokenize{\場合の数と確率{条件付き確率}[i]}}
+
+\場合の数と確率{条件付き確率}[i]
+
\auto{104}{\detokenize{\場合の数と確率{条件付き確率}[b]}}
+
\場合の数と確率{条件付き確率}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{図形の性質}
%\begin{description}
-\auto{105}{\detokenize{\図形の性質{内心}}}\par
-\図形の性質{内心}\par
-\auto{106}{\detokenize{\図形の性質{外心}}}\par
-\図形の性質{外心}\par
-\auto{107}{\detokenize{\図形の性質{垂心}}}\par
-\図形の性質{垂心}\par
-\auto{108}{\detokenize{\図形の性質{重心}}}\par
-\図形の性質{重心}\par
-\auto{109}{\detokenize{\図形の性質{傍心}}}\par
-\図形の性質{傍心}\par
-\auto{110}{\detokenize{\図形の性質{チェバの定理}}}\par
-\図形の性質{チェバの定理}\par
-\auto{110}{\detokenize{\図形の性質{チェバの定理の証明}}}\par
-\図形の性質{チェバの定理の証明}\par
-\auto{111}{\detokenize{\図形の性質{メネラウスの定理}}}\par
-\図形の性質{メネラウスの定理}\par
-\auto{111}{\detokenize{\図形の性質{メネラウスの定理の証明}}}\par
+\auto{105}{\detokenize{\図形の性質{内心}}}
+
+\図形の性質{内心}
+
+\auto{106}{\detokenize{\図形の性質{外心}}}
+
+\図形の性質{外心}
+
+\auto{107}{\detokenize{\図形の性質{垂心}}}
+
+\図形の性質{垂心}
+
+\auto{108}{\detokenize{\図形の性質{重心}}}
+
+\図形の性質{重心}
+
+\auto{109}{\detokenize{\図形の性質{傍心}}}
+
+\図形の性質{傍心}
+
+\auto{110}{\detokenize{\図形の性質{チェバの定理}}}
+
+\図形の性質{チェバの定理}
+
+\auto{110}{\detokenize{\図形の性質{チェバの定理の証明}}}
+
+\図形の性質{チェバの定理の証明}
+
+\auto{111}{\detokenize{\図形の性質{メネラウスの定理}}}
+
+\図形の性質{メネラウスの定理}
+
+\auto{111}{\detokenize{\図形の性質{メネラウスの定理の証明}}}
+
\図形の性質{メネラウスの定理の証明}
-\auto{112}{\detokenize{\図形の性質{円周角の定理}}}\par
-\図形の性質{円周角の定理}\par
-\auto{112}{\detokenize{\図形の性質{円周角の定理の証明}}}\par
-\図形の性質{円周角の定理の証明}\par
-\auto{113}{\detokenize{\図形の性質{内接四角形の定理}}}\par
-\図形の性質{内接四角形の定理}\par
-\auto{113}{\detokenize{\図形の性質{内接四角形の定理の証明}}}\par
-\図形の性質{内接四角形の定理の証明}\par
-\auto{114}{\detokenize{\図形の性質{接弦定理}}}\par
-\図形の性質{接弦定理}\par
-\auto{114}{\detokenize{\図形の性質{接弦定理の証明}}}\par
-\図形の性質{接弦定理の証明}\par
-\auto{115}{\detokenize{\図形の性質{内角と外角の二等分線}}}\par
-\図形の性質{内角と外角の二等分線}\par
-\auto{116}{\detokenize{\図形の性質{方べきの定理A}}}\par
-\図形の性質{方べきの定理A}\par
-\auto{116}{\detokenize{\図形の性質{方べきの定理Aの証明}}}\par
+\auto{112}{\detokenize{\図形の性質{円周角の定理}}}
+
+\図形の性質{円周角の定理}
+
+\auto{112}{\detokenize{\図形の性質{円周角の定理の証明}}}
+
+\図形の性質{円周角の定理の証明}
+
+\auto{113}{\detokenize{\図形の性質{内接四角形の定理}}}
+
+\図形の性質{内接四角形の定理}
+
+\auto{113}{\detokenize{\図形の性質{内接四角形の定理の証明}}}
+
+\図形の性質{内接四角形の定理の証明}
+
+\auto{114}{\detokenize{\図形の性質{接弦定理}}}
+
+\図形の性質{接弦定理}
+
+\auto{114}{\detokenize{\図形の性質{接弦定理の証明}}}
+
+\図形の性質{接弦定理の証明}
+
+\auto{115}{\detokenize{\図形の性質{内角と外角の二等分線}}}
+
+\図形の性質{内角と外角の二等分線}
+
+\auto{116}{\detokenize{\図形の性質{方べきの定理A}}}
+
+\図形の性質{方べきの定理A}
+
+\auto{116}{\detokenize{\図形の性質{方べきの定理Aの証明}}}
+
\図形の性質{方べきの定理Aの証明}
-\auto{117}{\detokenize{\図形の性質{方べきの定理B}}}\par
-\図形の性質{方べきの定理B}\par
-\auto{117}{\detokenize{\図形の性質{方べきの定理Bの証明}}}\par
+\auto{117}{\detokenize{\図形の性質{方べきの定理B}}}
+
+\図形の性質{方べきの定理B}
+
+\auto{117}{\detokenize{\図形の性質{方べきの定理Bの証明}}}
+
\図形の性質{方べきの定理Bの証明}
-\auto{118}{\detokenize{\図形の性質{方べきの定理C}}}\par
-\図形の性質{方べきの定理C}\par
-\auto{118}{\detokenize{\図形の性質{方べきの定理Cの証明}}}\par
+\auto{118}{\detokenize{\図形の性質{方べきの定理C}}}
+
+\図形の性質{方べきの定理C}
+
+\auto{118}{\detokenize{\図形の性質{方べきの定理Cの証明}}}
+
\図形の性質{方べきの定理Cの証明}
%\end{description}
%\end{simplesquarebox}
@@ -508,119 +808,193 @@ Now, here are the actual examples!
%n-118=個数
%\begin{simplesquarebox}{展開}
%\begin{description}
-\auto{119}{\detokenize{\三次式展開{公式A}[i]}}\par
-\三次式展開{公式A}[i]\par
+\auto{119}{\detokenize{\三次式展開{公式A}[i]}}
+
+\三次式展開{公式A}[i]
+
\auto{120}{\detokenize{\三次式展開{公式A}[b]}}
+
\三次式展開{公式A}[b]
-\auto{121}{\detokenize{\三次式展開{公式B}[i]}}\par
-\三次式展開{公式B}[i]\par
+
+\auto{121}{\detokenize{\三次式展開{公式B}[i]}}
+
+\三次式展開{公式B}[i]
+
\auto{122}{\detokenize{\三次式展開{公式B}[b]}}
+
\三次式展開{公式B}[b]
-\auto{123}{\detokenize{\三次式展開{公式C}[i]}}\par
-\三次式展開{公式C}[i]\par
+
+\auto{123}{\detokenize{\三次式展開{公式C}[i]}}
+
+\三次式展開{公式C}[i]
+
\auto{124}{\detokenize{\三次式展開{公式C}[b]}}
+
\三次式展開{公式C}[b]
-\auto{125}{\detokenize{\三次式展開{公式D}[i]}}\par
-\三次式展開{公式D}[i]\par
+
+\auto{125}{\detokenize{\三次式展開{公式D}[i]}}
+
+\三次式展開{公式D}[i]
+
\auto{126}{\detokenize{\三次式展開{公式D}[b]}}
+
\三次式展開{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{因数分解}
%\begin{description}
-\auto{127}{\detokenize{\三次式因数分解{公式A}[i]}}\par
-\三次式因数分解{公式A}[i]\par
+\auto{127}{\detokenize{\三次式因数分解{公式A}[i]}}
+
+\三次式因数分解{公式A}[i]
+
\auto{128}{\detokenize{\三次式因数分解{公式A}[b]}}
+
\三次式因数分解{公式A}[b]
-\auto{129}{\detokenize{\三次式因数分解{公式B}[i]}}\par
-\三次式因数分解{公式B}[i]\par
+
+\auto{129}{\detokenize{\三次式因数分解{公式B}[i]}}
+
+\三次式因数分解{公式B}[i]
+
\auto{130}{\detokenize{\三次式因数分解{公式B}[b]}}
+
\三次式因数分解{公式B}[b]
-\auto{131}{\detokenize{\三次式因数分解{公式C}[i]}}\par
-\三次式因数分解{公式C}[i]\par
+
+\auto{131}{\detokenize{\三次式因数分解{公式C}[i]}}
+
+\三次式因数分解{公式C}[i]
+
\auto{132}{\detokenize{\三次式因数分解{公式C}[b]}}
+
\三次式因数分解{公式C}[b]
-\auto{133}{\detokenize{\三次式因数分解{公式D}[i]}}\par
-\三次式因数分解{公式D}[i]\par
+
+\auto{133}{\detokenize{\三次式因数分解{公式D}[i]}}
+
+\三次式因数分解{公式D}[i]
+
\auto{134}{\detokenize{\三次式因数分解{公式D}[b]}}
+
\三次式因数分解{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{二項定理}
%\begin{description}
-\auto{135}{\detokenize{\二項定理{公式}[i]}}\par
-\二項定理{公式}[i]\par
+\auto{135}{\detokenize{\二項定理{公式}[i]}}
+
+\二項定理{公式}[i]
+
\auto{136}{\detokenize{\二項定理{公式}[b]}}
+
\二項定理{公式}[b]
-\auto{137}{\detokenize{\二項定理{一般項}[i]}}\par
-\二項定理{一般項}[i]\par
+
+\auto{137}{\detokenize{\二項定理{一般項}[i]}}
+
+\二項定理{一般項}[i]
+
\auto{138}{\detokenize{\二項定理{一般項}[b]}}
+
\二項定理{一般項}[b]
-\auto{135}{\detokenize{\二項定理{証明}}}\par
-\二項定理{証明}\par
+
+\auto{135}{\detokenize{\二項定理{証明}}}
+
+\二項定理{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{分数式}
%\begin{description}
-\auto{139}{\detokenize{\分数式{公式A}[i]}}\par
-\分数式{公式A}[i]\par
+\auto{139}{\detokenize{\分数式{公式A}[i]}}
+
+\分数式{公式A}[i]
+
\auto{140}{\detokenize{\分数式{公式A}[b]}}
+
\分数式{公式A}[b]
-\auto{141}{\detokenize{\分数式{公式B}[i]}}\par
-\分数式{公式B}[i]\par
+
+\auto{141}{\detokenize{\分数式{公式B}[i]}}
+
+\分数式{公式B}[i]
+
\auto{142}{\detokenize{\分数式{公式B}[b]}}
+
\分数式{公式B}[b]
-\auto{143}{\detokenize{\分数式{公式C}[i]}}\par
-\分数式{公式C}[i]\par
+
+\auto{143}{\detokenize{\分数式{公式C}[i]}}
+
+\分数式{公式C}[i]
+
\auto{144}{\detokenize{\分数式{公式C}[b]}}
+
\分数式{公式C}[b]
-\auto{145}{\detokenize{\分数式{公式D}[i]}}\par
-\分数式{公式D}[i]\par
+
+\auto{145}{\detokenize{\分数式{公式D}[i]}}
+
+\分数式{公式D}[i]
+
\auto{146}{\detokenize{\分数式{公式D}[b]}}
+
\分数式{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{相加相乗平均}
%\begin{description}
-\auto{147}{\detokenize{\相加相乗平均{公式}[i]}}\par
-\相加相乗平均{公式}[i]\par
+\auto{147}{\detokenize{\相加相乗平均{公式}[i]}}
+
+\相加相乗平均{公式}[i]
+
\auto{148}{\detokenize{\相加相乗平均{公式}[b]}}
+
\相加相乗平均{公式}[b]
-\auto{147}{\detokenize{\相加相乗平均{証明}}}\par
-\相加相乗平均{証明}\par
+
+\auto{147}{\detokenize{\相加相乗平均{証明}}}
+
+\相加相乗平均{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{虚数の定義}
%\begin{description}
-\auto{149}{\detokenize{\虚数の定義{定義}[i]}}\par
-\虚数の定義{定義}[i]\par
+\auto{149}{\detokenize{\虚数の定義{定義}[i]}}
+
+\虚数の定義{定義}[i]
+
\auto{150}{\detokenize{\虚数の定義{定義}[b]}}
+
\虚数の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{複素数の定義}
%\begin{description}
-\auto{151}{\detokenize{\複素数の定義{定義}[i]}}\par
-\複素数の定義{定義}[i]\par
-\auto{152}{\detokenize{\複素数の定義{定義}[b]}}\par
+\auto{151}{\detokenize{\複素数の定義{定義}[i]}}
+
+\複素数の定義{定義}[i]
+
+\auto{152}{\detokenize{\複素数の定義{定義}[b]}}
+
+
\複素数の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{二次方程式の解の判別}
%\begin{description}
-\auto{153}{\detokenize{\二次方程式の解の判別}}\par
+\auto{153}{\detokenize{\二次方程式の解の判別}}
+
\二次方程式の解の判別
%\end{description}
@@ -628,888 +1002,1611 @@ Now, here are the actual examples!
%\begin{simplesquarebox}{解と係数の関係}
%\begin{description}
-\auto{154}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係A}[i]}}\par
-\解と係数の関係{二次方程式の解と係数の関係A}[i]\par
+\auto{154}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係A}[i]}}
+
+\解と係数の関係{二次方程式の解と係数の関係A}[i]
+
\auto{155}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係A}[b]}}
+
\解と係数の関係{二次方程式の解と係数の関係A}[b]
-\auto{156}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係B}[i]}}\par
-\解と係数の関係{二次方程式の解と係数の関係B}[i]\par
+
+\auto{156}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係B}[i]}}
+
+\解と係数の関係{二次方程式の解と係数の関係B}[i]
+
\auto{157}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係B}[b]}}
+
\解と係数の関係{二次方程式の解と係数の関係B}[b]
-\auto{154}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係の証明}[i]}}\par
-\解と係数の関係{二次方程式の解と係数の関係の証明}[i]\par
-\auto{158}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係A}[i]}}\par
-\解と係数の関係{三次方程式の解と係数の関係A}[i]\par
+
+\auto{154}{\detokenize{\解と係数の関係{二次方程式の解と係数の関係の証明}}}
+
+\解と係数の関係{二次方程式の解と係数の関係の証明}
+
+\auto{158}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係A}[i]}}
+
+\解と係数の関係{三次方程式の解と係数の関係A}[i]
+
\auto{159}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係A}[b]}}
+
\解と係数の関係{三次方程式の解と係数の関係A}[b]
-\auto{160}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係B}[i]}}\par
-\解と係数の関係{三次方程式の解と係数の関係B}[i]\par
+
+\auto{160}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係B}[i]}}
+
+\解と係数の関係{三次方程式の解と係数の関係B}[i]
+
\auto{161}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係B}[b]}}
+
\解と係数の関係{三次方程式の解と係数の関係B}[b]
-\auto{162}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係C}[i]}}\par
-\解と係数の関係{三次方程式の解と係数の関係C}[i]\par
+
+\auto{162}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係C}[i]}}
+
+\解と係数の関係{三次方程式の解と係数の関係C}[i]
+
\auto{163}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係C}[b]}}
+
\解と係数の関係{三次方程式の解と係数の関係C}[b]
-\auto{158}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係の証明}[i]}}\par
-\解と係数の関係{三次方程式の解と係数の関係の証明}[i]\par
+
+\auto{158}{\detokenize{\解と係数の関係{三次方程式の解と係数の関係の証明}}}
+
+\解と係数の関係{三次方程式の解と係数の関係の証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{剰余定理}
%\begin{description}
-\auto{164}{\detokenize{\剰余定理{定理A}[i]}}\par
-\剰余定理{定理A}[i]\par
+\auto{164}{\detokenize{\剰余定理{定理A}[i]}}
+
+\剰余定理{定理A}[i]
+
\auto{165}{\detokenize{\剰余定理{定理A}[b]}}
+
\剰余定理{定理A}[b]
-\auto{166}{\detokenize{\剰余定理{定理B}[i]}}\par
-\剰余定理{定理B}[i]\par
+
+\auto{166}{\detokenize{\剰余定理{定理B}[i]}}
+
+\剰余定理{定理B}[i]
+
\auto{167}{\detokenize{\剰余定理{定理B}[b]}}
+
\剰余定理{定理B}[b]
-\auto{164}{\detokenize{\剰余定理{証明}}}\par
-\剰余定理{証明}\par
+
+\auto{164}{\detokenize{\剰余定理{証明}}}
+
+\剰余定理{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{因数定理}
%\begin{description}
-\auto{168}{\detokenize{\因数定理{定理}[i]}}\par
-\因数定理{定理}[i]\par
+\auto{168}{\detokenize{\因数定理{定理}[i]}}
+
+\因数定理{定理}[i]
+
\auto{168}{\detokenize{\因数定理{定理}[b]}}
+
\因数定理{定理}[b]
-\auto{168}{\detokenize{\因数定理{証明}}}\par
-\因数定理{証明}\par
+\auto{168}{\detokenize{\因数定理{証明}}}
+
+\因数定理{証明}
+
+\auto{168}{\detokenize{\ユークリッド幾何の公理{公理A}}}
+
+\ユークリッド幾何の公理{公理A}
+
+\auto{168}{\detokenize{\ユークリッド幾何の公理{公理B}}}
+
+\ユークリッド幾何の公理{公理B}
+
+\auto{168}{\detokenize{\直線}}
+
+\直線
+
+\auto{168}{\detokenize{\線分}}
+
+\線分
+
+\auto{168}{\detokenize{\半直線}}
+
+\半直線
+
+\auto{168}{\detokenize{\距離}}
+
+\距離
+
+\auto{168}{\detokenize{\円}}
+
+\円
+
+\auto{168}{\detokenize{\弧}}
+
+\弧
+
+\auto{168}{\detokenize{\弦}}
+
+\弦
+
+\auto{168}{\detokenize{\中心角}}
+
+\中心角
+
+\auto{168}{\detokenize{\対頂角{定義}}}
+
+\対頂角{定義}
+
+\auto{168}{\detokenize{\対頂角{性質}}}
+
+\対頂角{性質}
+
+\auto{168}{\detokenize{\対頂角{証明}}}
+
+\対頂角{証明}
+
+\auto{168}{\detokenize{\錯角{定義}}}
+
+\錯角{定義}
+
+\auto{168}{\detokenize{\錯角{性質}}}
+
+\錯角{性質}
+
+\auto{168}{\detokenize{\錯角{証明}}}
+
+\錯角{証明}
+
+\auto{168}{\detokenize{\同位角{定義}}}
+
+\同位角{定義}
+
+\auto{168}{\detokenize{\同位角{公理}}}
+
+\同位角{公理}
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{点の座標}
%\begin{description}
-\auto{169}{\detokenize{\点の座標{二点間の距離}[i]}}\par
-\点の座標{二点間の距離}[i]\par
+\auto{169}{\detokenize{\点の座標{二点間の距離}[i]}}
+
+\点の座標{二点間の距離}[i]
+
\auto{170}{\detokenize{\点の座標{二点間の距離}[b]}}
+
\点の座標{二点間の距離}[b]
-\auto{171}{\detokenize{\点の座標{内分点の座標}[i]}}\par
-\点の座標{内分点の座標}[i]\par
+
+\auto{171}{\detokenize{\点の座標{内分点の座標}[i]}}
+
+\点の座標{内分点の座標}[i]
+
\auto{172}{\detokenize{\点の座標{内分点の座標}[b]}}
+
\点の座標{内分点の座標}[b]
-\auto{171}{\detokenize{\点の座標{内分点の座標の証明}[i]}}\par
-\点の座標{内分点の座標の証明}[i]\par
-\auto{173}{\detokenize{\点の座標{外分点の座標}[i]}}\par
-\点の座標{外分点の座標}[i]\par
+
+\auto{171}{\detokenize{\点の座標{内分点の座標の証明}}}
+
+\点の座標{内分点の座標の証明}
+
+\auto{173}{\detokenize{\点の座標{外分点の座標}[i]}}
+
+\点の座標{外分点の座標}[i]
+
\auto{174}{\detokenize{\点の座標{外分点の座標}[b]}}
+
\点の座標{外分点の座標}[b]
-\auto{173}{\detokenize{\点の座標{外分点の座標の証明}[i]}}\par
-\点の座標{外分点の座標の証明}[i]\par
-\auto{175}{\detokenize{\点の座標{中点の座標}[i]}}\par
-\点の座標{中点の座標}[i]\par
+
+\auto{173}{\detokenize{\点の座標{外分点の座標の証明}}}
+
+\点の座標{外分点の座標の証明}
+
+\auto{175}{\detokenize{\点の座標{中点の座標}[i]}}
+
+\点の座標{中点の座標}[i]
+
\auto{176}{\detokenize{\点の座標{中点の座標}[b]}}
+
\点の座標{中点の座標}[b]
-\auto{175}{\detokenize{\点の座標{中点の座標の証明}[i]}}\par
-\点の座標{中点の座標の証明}[i]\par
-\auto{177}{\detokenize{\点の座標{重心の座標}[i]}}\par
-\点の座標{重心の座標}[i]\par
+
+\auto{175}{\detokenize{\点の座標{中点の座標の証明}}}
+
+\点の座標{中点の座標の証明}
+
+\auto{177}{\detokenize{\点の座標{重心の座標}[i]}}
+
+\点の座標{重心の座標}[i]
+
\auto{178}{\detokenize{\点の座標{重心の座標}[b]}}
+
\点の座標{重心の座標}[b]
-\auto{177}{\detokenize{\点の座標{重心の座標の証明}[i]}}\par
-\点の座標{重心の座標の証明}[i]\par
+
+\auto{177}{\detokenize{\点の座標{重心の座標の証明}}}
+
+\点の座標{重心の座標の証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{直線の方程式}
%\begin{description}
-\auto{179}{\detokenize{\直線の方程式{公式A}[i]}}\par
-\直線の方程式{公式A}[i]\par
+\auto{179}{\detokenize{\直線の方程式{公式A}[i]}}
+
+\直線の方程式{公式A}[i]
+
\auto{180}{\detokenize{\直線の方程式{公式A}[b]}}
+
\直線の方程式{公式A}[b]
-\auto{181}{\detokenize{\直線の方程式{公式B}[i]}}\par
-\直線の方程式{公式B}[i]\par
+
+\auto{181}{\detokenize{\直線の方程式{公式B}[i]}}
+
+\直線の方程式{公式B}[i]
+
\auto{182}{\detokenize{\直線の方程式{公式B}[b]}}
+
\直線の方程式{公式B}[b]
-\auto{183}{\detokenize{\直線の方程式{公式C}[i]}}\par
-\直線の方程式{公式C}[i]\par
+
+\auto{183}{\detokenize{\直線の方程式{公式C}[i]}}
+
+\直線の方程式{公式C}[i]
+
\auto{184}{\detokenize{\直線の方程式{公式C}[b]}}
+
\直線の方程式{公式C}[b]
-\auto{183}{\detokenize{\直線の方程式{公式Bの証明}}}\par
-\直線の方程式{公式Bの証明}\par
+
+\auto{183}{\detokenize{\直線の方程式{公式Bの証明}}}
+
+\直線の方程式{公式Bの証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{二直線の関係}
%\begin{description}
-\auto{185}{\detokenize{\二直線の関係{公式A}[i]}}\par
-\二直線の関係{公式A}[i]\par
+\auto{185}{\detokenize{\二直線の関係{公式A}[i]}}
+
+\二直線の関係{公式A}[i]
+
\auto{186}{\detokenize{\二直線の関係{公式A}[b]}}
+
\二直線の関係{公式A}[b]
-\auto{187}{\detokenize{\二直線の関係{公式B}[i]}}\par
-\二直線の関係{公式B}[i]\par
+
+\auto{187}{\detokenize{\二直線の関係{公式B}[i]}}
+
+\二直線の関係{公式B}[i]
+
\auto{188}{\detokenize{\二直線の関係{公式B}[b]}}
+
\二直線の関係{公式B}[b]
-\auto{185}{\detokenize{\二直線の関係{公式Bの証明}[i]}}\par
-\二直線の関係{公式Bの証明}[i]\par
+
+\auto{185}{\detokenize{\二直線の関係{公式Bの証明}}}
+
+\二直線の関係{公式Bの証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{点と直線の距離}
%\begin{description}
-\auto{189}{\detokenize{\点と直線の距離{公式}[i]}}\par
-\点と直線の距離{公式}[i]\par
+\auto{189}{\detokenize{\点と直線の距離{公式}[i]}}
+
+\点と直線の距離{公式}[i]
+
\auto{190}{\detokenize{\点と直線の距離{公式}[b]}}
+
\点と直線の距離{公式}[b]
-\auto{189}{\detokenize{\点と直線の距離{証明}}}\par
-\点と直線の距離{証明}\par
+
+\auto{189}{\detokenize{\点と直線の距離{証明}}}
+
+\点と直線の距離{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{円の方程式}
%\begin{description}
-\auto{191}{\detokenize{\円の方程式{公式}[i]}}\par
-\円の方程式{公式}[i]\par
+\auto{191}{\detokenize{\円の方程式{公式}[i]}}
+
+\円の方程式{公式}[i]
+
\auto{192}{\detokenize{\円の方程式{公式}[b]}}
+
\円の方程式{公式}[b]
-\auto{191}{\detokenize{\円の方程式{証明}}}\par
-\円の方程式{証明}\par
+
+\auto{191}{\detokenize{\円の方程式{証明}}}
+
+\円の方程式{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{円と直線}
%\begin{description}
-\auto{193}{\detokenize{\円と直線{公式}[i]}}\par
-\円と直線{公式}[i]\par
+\auto{193}{\detokenize{\円と直線{公式}[i]}}
+
+\円と直線{公式}[i]
+
\auto{194}{\detokenize{\円と直線{公式}[b]}}
+
\円と直線{公式}[b]
-\auto{193}{\detokenize{\円と直線{証明}}}\par
-\円と直線{証明}\par
+
+\auto{193}{\detokenize{\円と直線{証明}}}
+
+\円と直線{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{三角関数の相互関係}
%\begin{description}
-\auto{195}{\detokenize{\三角関数の相互関係{公式A}[i]}}\par
-\三角関数の相互関係{公式A}[i]\par
+\auto{195}{\detokenize{\三角関数の相互関係{公式A}[i]}}
+
+\三角関数の相互関係{公式A}[i]
+
\auto{196}{\detokenize{\三角関数の相互関係{公式A}[b]}}
+
\三角関数の相互関係{公式A}[b]
-\auto{197}{\detokenize{\三角関数の相互関係{公式B}[i]}}\par
-\三角関数の相互関係{公式B}[i]\par
+
+\auto{197}{\detokenize{\三角関数の相互関係{公式B}[i]}}
+
+\三角関数の相互関係{公式B}[i]
+
\auto{198}{\detokenize{\三角関数の相互関係{公式B}[b]}}
+
\三角関数の相互関係{公式B}[b]
-\auto{199}{\detokenize{\三角関数の相互関係{公式C}[i]}}\par
-\三角関数の相互関係{公式C}[i]\par
+
+\auto{199}{\detokenize{\三角関数の相互関係{公式C}[i]}}
+
+\三角関数の相互関係{公式C}[i]
+
\auto{200}{\detokenize{\三角関数の相互関係{公式C}[b]}}
+
\三角関数の相互関係{公式C}[b]
-\auto{195}{\detokenize{\三角関数の相互関係{証明}}}\par
-\三角関数の相互関係{証明}\par
+
+\auto{195}{\detokenize{\三角関数の相互関係{証明}}}
+
+\三角関数の相互関係{証明}
+
%\end{description}
%\end{simplesquarebox}
-\auto{201}{\detokenize{\三角関数の性質{性質A}[i]}}\par
-\三角関数の性質{性質A}[i]\par
+\auto{201}{\detokenize{\三角関数の性質{性質A}[i]}}
+
+\三角関数の性質{性質A}[i]
+
\auto{202}{\detokenize{\三角関数の性質{性質A}[b]}}
+
\三角関数の性質{性質A}[b]
-\auto{203}{\detokenize{\三角関数の性質{性質B}[i]}}\par
-\三角関数の性質{性質B}[i]\par
+
+\auto{203}{\detokenize{\三角関数の性質{性質B}[i]}}
+
+\三角関数の性質{性質B}[i]
+
\auto{204}{\detokenize{\三角関数の性質{性質B}[b]}}
+
\三角関数の性質{性質B}[b]
-\auto{205}{\detokenize{\三角関数の性質{性質C}[i]}}\par
-\三角関数の性質{性質C}[i]\par
+
+\auto{205}{\detokenize{\三角関数の性質{性質C}[i]}}
+
+\三角関数の性質{性質C}[i]
+
\auto{206}{\detokenize{\三角関数の性質{性質C}[b]}}
+
\三角関数の性質{性質C}[b]
-\auto{207}{\detokenize{\三角関数の性質{性質D}[i]}}\par
-\三角関数の性質{性質D}[i]\par
+
+\auto{207}{\detokenize{\三角関数の性質{性質D}[i]}}
+
+\三角関数の性質{性質D}[i]
+
\auto{208}{\detokenize{\三角関数の性質{性質D}[b]}}
+
\三角関数の性質{性質D}[b]
-\auto{209}{\detokenize{\三角関数の性質{性質E}[i]}}\par
-\三角関数の性質{性質E}[i]\par
+
+\auto{209}{\detokenize{\三角関数の性質{性質E}[i]}}
+
+\三角関数の性質{性質E}[i]
+
\auto{210}{\detokenize{\三角関数の性質{性質E}[b]}}
+
\三角関数の性質{性質E}[b]
-\auto{211}{\detokenize{\三角関数の性質{性質F}[i]}}\par
-\三角関数の性質{性質F}[i]\par
+
+\auto{211}{\detokenize{\三角関数の性質{性質F}[i]}}
+
+\三角関数の性質{性質F}[i]
+
\auto{212}{\detokenize{\三角関数の性質{性質F}[b]}}
+
\三角関数の性質{性質F}[b]
-\auto{213}{\detokenize{\三角関数の性質{性質G}[i]}}\par
-\三角関数の性質{性質G}[i]\par
+
+\auto{213}{\detokenize{\三角関数の性質{性質G}[i]}}
+
+\三角関数の性質{性質G}[i]
+
\auto{214}{\detokenize{\三角関数の性質{性質G}[b]}}
+
\三角関数の性質{性質G}[b]
-\auto{215}{\detokenize{\三角関数の性質{性質H}[i]}}\par
-\三角関数の性質{性質H}[i]\par
+
+\auto{215}{\detokenize{\三角関数の性質{性質H}[i]}}
+
+\三角関数の性質{性質H}[i]
+
\auto{216}{\detokenize{\三角関数の性質{性質H}[b]}}
+
\三角関数の性質{性質H}[b]
-\auto{217}{\detokenize{\三角関数の性質{性質I}[i]}}\par
-\三角関数の性質{性質I}[i]\par
+
+\auto{217}{\detokenize{\三角関数の性質{性質I}[i]}}
+
+\三角関数の性質{性質I}[i]
+
\auto{218}{\detokenize{\三角関数の性質{性質I}[b]}}
+
\三角関数の性質{性質I}[b]
-\auto{219}{\detokenize{\三角関数の性質{性質J}[i]}}\par
-\三角関数の性質{性質J}[i]\par
+
+\auto{219}{\detokenize{\三角関数の性質{性質J}[i]}}
+
+\三角関数の性質{性質J}[i]
+
\auto{220}{\detokenize{\三角関数の性質{性質J}[b]}}
+
\三角関数の性質{性質J}[b]
-\auto{221}{\detokenize{\三角関数の性質{性質K}[i]}}\par
-\三角関数の性質{性質K}[i]\par
+
+\auto{221}{\detokenize{\三角関数の性質{性質K}[i]}}
+
+\三角関数の性質{性質K}[i]
+
\auto{222}{\detokenize{\三角関数の性質{性質K}[b]}}
+
\三角関数の性質{性質K}[b]
-\auto{223}{\detokenize{\三角関数の性質{性質L}[i]}}\par
-\三角関数の性質{性質L}[i]\par
+
+\auto{223}{\detokenize{\三角関数の性質{性質L}[i]}}
+
+\三角関数の性質{性質L}[i]
+
\auto{224}{\detokenize{\三角関数の性質{性質L}[b]}}
+
\三角関数の性質{性質L}[b]
-\auto{225}{\detokenize{\三角関数の性質{性質M}[i]}}\par
-\三角関数の性質{性質M}[i]\par
+
+\auto{225}{\detokenize{\三角関数の性質{性質M}[i]}}
+
+\三角関数の性質{性質M}[i]
+
\auto{226}{\detokenize{\三角関数の性質{性質M}[b]}}
+
\三角関数の性質{性質M}[b]
-\auto{227}{\detokenize{\三角関数の性質{性質N}[i]}}\par
-\三角関数の性質{性質N}[i]\par
+
+\auto{227}{\detokenize{\三角関数の性質{性質N}[i]}}
+
+\三角関数の性質{性質N}[i]
+
\auto{228}{\detokenize{\三角関数の性質{性質N}[b]}}
+
\三角関数の性質{性質N}[b]
-\auto{229}{\detokenize{\三角関数の性質{性質O}[i]}}\par
-\三角関数の性質{性質O}[i]\par
+
+\auto{229}{\detokenize{\三角関数の性質{性質O}[i]}}
+
+\三角関数の性質{性質O}[i]
+
\auto{230}{\detokenize{\三角関数の性質{性質O}[b]}}
+
\三角関数の性質{性質O}[b]
+
%\begin{simplesquarebox}{三角関数の加法定理}
%\begin{description}
-\auto{231}{\detokenize{\三角関数の加法定理{公式A}[i]}}\par
-\三角関数の加法定理{公式A}[i]\par
+\auto{231}{\detokenize{\三角関数の加法定理{公式A}[i]}}
+
+\三角関数の加法定理{公式A}[i]
+
\auto{232}{\detokenize{\三角関数の加法定理{公式A}[b]}}
+
\三角関数の加法定理{公式A}[b]
-\auto{233}{\detokenize{\三角関数の加法定理{公式B}[i]}}\par
-\三角関数の加法定理{公式B}[i]\par
+
+\auto{233}{\detokenize{\三角関数の加法定理{公式B}[i]}}
+
+\三角関数の加法定理{公式B}[i]
+
\auto{234}{\detokenize{\三角関数の加法定理{公式B}[b]}}
+
\三角関数の加法定理{公式B}[b]
-\auto{235}{\detokenize{\三角関数の加法定理{公式C}[i]}}\par
-\三角関数の加法定理{公式C}[i]\par
+
+\auto{235}{\detokenize{\三角関数の加法定理{公式C}[i]}}
+
+\三角関数の加法定理{公式C}[i]
+
\auto{236}{\detokenize{\三角関数の加法定理{公式C}[b]}}
+
\三角関数の加法定理{公式C}[b]
-\auto{231}{\detokenize{\三角関数の加法定理{証明}}}\par
-\三角関数の加法定理{証明}\par
+
+\auto{231}{\detokenize{\三角関数の加法定理{証明}}}
+
+\三角関数の加法定理{証明}
+
%\end{description}
%\end{simplesquarebox}
-\auto{237}{\detokenize{\三角関数の二倍角の公式{公式A}[i]}}\par
-\三角関数の二倍角の公式{公式A}[i]\par
+\auto{237}{\detokenize{\三角関数の二倍角の公式{公式A}[i]}}
+
+\三角関数の二倍角の公式{公式A}[i]
+
\auto{238}{\detokenize{\三角関数の二倍角の公式{公式A}[b]}}
+
\三角関数の二倍角の公式{公式A}[b]
-\auto{239}{\detokenize{\三角関数の二倍角の公式{公式B}[i]}}\par
-\三角関数の二倍角の公式{公式B}[i]\par
+
+\auto{239}{\detokenize{\三角関数の二倍角の公式{公式B}[i]}}
+
+\三角関数の二倍角の公式{公式B}[i]
+
\auto{240}{\detokenize{\三角関数の二倍角の公式{公式B}[b]}}
+
\三角関数の二倍角の公式{公式B}[b]
-\auto{241}{\detokenize{\三角関数の二倍角の公式{公式C}[i]}}\par
-\三角関数の二倍角の公式{公式C}[i]\par
+
+\auto{241}{\detokenize{\三角関数の二倍角の公式{公式C}[i]}}
+
+\三角関数の二倍角の公式{公式C}[i]
+
\auto{242}{\detokenize{\三角関数の二倍角の公式{公式C}[b]}}
+
\三角関数の二倍角の公式{公式C}[b]
-\auto{243}{\detokenize{\三角関数の二倍角の公式{公式D}[i]}}\par
-\三角関数の二倍角の公式{公式D}[i]\par
+
+\auto{243}{\detokenize{\三角関数の二倍角の公式{公式D}[i]}}
+
+\三角関数の二倍角の公式{公式D}[i]
+
\auto{244}{\detokenize{\三角関数の二倍角の公式{公式D}[b]}}
+
\三角関数の二倍角の公式{公式D}[b]
-\auto{245}{\detokenize{\三角関数の二倍角の公式{公式E}[i]}}\par
-\三角関数の二倍角の公式{公式E}[i]\par
+
+\auto{245}{\detokenize{\三角関数の二倍角の公式{公式E}[i]}}
+
+\三角関数の二倍角の公式{公式E}[i]
+
\auto{246}{\detokenize{\三角関数の二倍角の公式{公式E}[b]}}
+
\三角関数の二倍角の公式{公式E}[b]
-\auto{237}{\detokenize{\三角関数の二倍角の公式{証明}}}\par
-\三角関数の二倍角の公式{証明}\par
-\auto{247}{\detokenize{\三角関数の三倍角の公式{公式A}[i]}}\par
-\三角関数の三倍角の公式{公式A}[i]\par
+
+\auto{237}{\detokenize{\三角関数の二倍角の公式{証明}}}
+
+\三角関数の二倍角の公式{証明}
+
+\auto{247}{\detokenize{\三角関数の三倍角の公式{公式A}[i]}}
+
+\三角関数の三倍角の公式{公式A}[i]
+
\auto{248}{\detokenize{\三角関数の三倍角の公式{公式A}[b]}}
+
\三角関数の三倍角の公式{公式A}[b]
-\auto{249}{\detokenize{\三角関数の三倍角の公式{公式B}[i]}}\par
-\三角関数の三倍角の公式{公式B}[i]\par
+
+\auto{249}{\detokenize{\三角関数の三倍角の公式{公式B}[i]}}
+
+\三角関数の三倍角の公式{公式B}[i]
+
\auto{250}{\detokenize{\三角関数の三倍角の公式{公式B}[b]}}
+
\三角関数の三倍角の公式{公式B}[b]
-%\auto{251}{\detokenize{\三角関数の三倍角の公式{公式C}[i]}}\par
-%\三角関数の三倍角の公式{公式C}[i]\par
+
+%\auto{251}{\detokenize{\三角関数の三倍角の公式{公式C}[i]}}
+
+%\三角関数の三倍角の公式{公式C}[i]
+
%\auto{251}{\detokenize{\三角関数の三倍角の公式{公式C}[b]}}
+
%\三角関数の三倍角の公式{公式C}[b]
-\auto{247}{\detokenize{\三角関数の三倍角の公式{証明}}}\par
-\三角関数の三倍角の公式{証明}\par
-\auto{252}{\detokenize{\三角関数の積和公式{公式A}[i]}}\par
-\三角関数の積和公式{公式A}[i]\par
+\auto{247}{\detokenize{\三角関数の三倍角の公式{証明}}}
+
+\三角関数の三倍角の公式{証明}
+
+
+\auto{252}{\detokenize{\三角関数の積和公式{公式A}[i]}}
+
+\三角関数の積和公式{公式A}[i]
+
\auto{253}{\detokenize{\三角関数の積和公式{公式A}[b]}}
+
\三角関数の積和公式{公式A}[b]
-\auto{254}{\detokenize{\三角関数の積和公式{公式B}[i]}}\par
-\三角関数の積和公式{公式B}[i]\par
+
+\auto{254}{\detokenize{\三角関数の積和公式{公式B}[i]}}
+
+\三角関数の積和公式{公式B}[i]
+
\auto{255}{\detokenize{\三角関数の積和公式{公式B}[b]}}
+
\三角関数の積和公式{公式B}[b]
-\auto{256}{\detokenize{\三角関数の積和公式{公式C}[i]}}\par
-\三角関数の積和公式{公式C}[i]\par
+
+\auto{256}{\detokenize{\三角関数の積和公式{公式C}[i]}}
+
+\三角関数の積和公式{公式C}[i]
+
\auto{257}{\detokenize{\三角関数の積和公式{公式C}[b]}}
+
\三角関数の積和公式{公式C}[b]
-\auto{252}{\detokenize{\三角関数の積和公式{証明}}}\par
-\三角関数の積和公式{証明}\par
-\auto{258}{\detokenize{\三角関数の和積公式{公式A}[i]}}\par
-\三角関数の和積公式{公式A}[i]\par
+\auto{252}{\detokenize{\三角関数の積和公式{証明}}}
+
+\三角関数の積和公式{証明}
+
+
+\auto{258}{\detokenize{\三角関数の和積公式{公式A}[i]}}
+
+\三角関数の和積公式{公式A}[i]
+
\auto{259}{\detokenize{\三角関数の和積公式{公式A}[b]}}
+
\三角関数の和積公式{公式A}[b]
-\auto{260}{\detokenize{\三角関数の和積公式{公式B}[i]}}\par
-\三角関数の和積公式{公式B}[i]\par
+
+\auto{260}{\detokenize{\三角関数の和積公式{公式B}[i]}}
+
+\三角関数の和積公式{公式B}[i]
+
\auto{261}{\detokenize{\三角関数の和積公式{公式B}[b]}}
+
\三角関数の和積公式{公式B}[b]
-\auto{262}{\detokenize{\三角関数の和積公式{公式C}[i]}}\par
-\三角関数の和積公式{公式C}[i]\par
+
+\auto{262}{\detokenize{\三角関数の和積公式{公式C}[i]}}
+
+\三角関数の和積公式{公式C}[i]
+
\auto{263}{\detokenize{\三角関数の和積公式{公式C}[b]}}
+
\三角関数の和積公式{公式C}[b]
-\auto{264}{\detokenize{\三角関数の和積公式{公式D}[i]}}\par
-\三角関数の和積公式{公式D}[i]\par
+
+\auto{264}{\detokenize{\三角関数の和積公式{公式D}[i]}}
+
+\三角関数の和積公式{公式D}[i]
+
\auto{265}{\detokenize{\三角関数の和積公式{公式D}[b]}}
+
\三角関数の和積公式{公式D}[b]
-\auto{258}{\detokenize{\三角関数の和積公式{証明}}}\par
-\三角関数の和積公式{証明}\par
+
+\auto{258}{\detokenize{\三角関数の和積公式{証明}}}
+
+\三角関数の和積公式{証明}
+
%\begin{simplesquarebox}{三角関数の合成}
%\begin{description}
-\auto{267}{\detokenize{\三角関数の合成{公式}[i]}}\par
-\三角関数の合成{公式}[i]\par
+\auto{267}{\detokenize{\三角関数の合成{公式}[i]}}
+
+\三角関数の合成{公式}[i]
+
\auto{268}{\detokenize{\三角関数の合成{公式}[b]}}
-\三角関数の合成{公式}[b]\par
-\auto{267}{\detokenize{\三角関数の合成{証明}}}\par
-\三角関数の合成{証明}\par
+
+\三角関数の合成{公式}[b]
+
+
+\auto{267}{\detokenize{\三角関数の合成{証明}}}
+
+\三角関数の合成{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{有理数の指数}
%\begin{description}
-\auto{269}{\detokenize{\有理数の指数{公式A}[i]}}\par
-\有理数の指数{公式A}[i]\par
+\auto{269}{\detokenize{\有理数の指数{公式A}[i]}}
+
+\有理数の指数{公式A}[i]
+
\auto{270}{\detokenize{\有理数の指数{公式A}[b]}}
+
\有理数の指数{公式A}[b]
-\auto{271}{\detokenize{\有理数の指数{公式B}[i]}}\par
-\有理数の指数{公式B}[i]\par
+
+\auto{271}{\detokenize{\有理数の指数{公式B}[i]}}
+
+\有理数の指数{公式B}[i]
+
\auto{272}{\detokenize{\有理数の指数{公式B}[b]}}
+
\有理数の指数{公式B}[b]
-\auto{273}{\detokenize{\有理数の指数{公式C}[i]}}\par
-\有理数の指数{公式C}[i]\par
+
+\auto{273}{\detokenize{\有理数の指数{公式C}[i]}}
+
+\有理数の指数{公式C}[i]
+
\auto{274}{\detokenize{\有理数の指数{公式C}[b]}}
+
\有理数の指数{公式C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{指数法則}
%\begin{description}
-\auto{275}{\detokenize{\指数法則{公式A}[i]}}\par
-\指数法則{公式A}[i]\par
+\auto{275}{\detokenize{\指数法則{公式A}[i]}}
+
+\指数法則{公式A}[i]
+
\auto{276}{\detokenize{\指数法則{公式A}[b]}}
+
\指数法則{公式A}[b]
-\auto{277}{\detokenize{\指数法則{公式B}[i]}}\par
-\指数法則{公式B}[i]\par
+
+\auto{277}{\detokenize{\指数法則{公式B}[i]}}
+
+\指数法則{公式B}[i]
+
\auto{278}{\detokenize{\指数法則{公式B}[b]}}
+
\指数法則{公式B}[b]
-\auto{279}{\detokenize{\指数法則{公式C}[i]}}\par
-\指数法則{公式C}[i]\par
+
+\auto{279}{\detokenize{\指数法則{公式C}[i]}}
+
+\指数法則{公式C}[i]
+
\auto{280}{\detokenize{\指数法則{公式C}[b]}}
+
\指数法則{公式C}[b]
-\auto{281}{\detokenize{\指数法則{公式D}[i]}}\par
-\指数法則{公式D}[i]\par
+
+\auto{281}{\detokenize{\指数法則{公式D}[i]}}
+
+\指数法則{公式D}[i]
+
\auto{282}{\detokenize{\指数法則{公式D}[b]}}
+
\指数法則{公式D}[b]
-\auto{283}{\detokenize{\指数法則{公式E}[i]}}\par
-\指数法則{公式E}[i]\par
+
+\auto{283}{\detokenize{\指数法則{公式E}[i]}}
+
+\指数法則{公式E}[i]
+
\auto{284}{\detokenize{\指数法則{公式E}[b]}}
+
\指数法則{公式E}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{対数の定義}
%\begin{description}
-\auto{285}{\detokenize{\対数の定義{定義}[i]}}\par
-\対数の定義{定義}[i]\par
+\auto{285}{\detokenize{\対数の定義{定義}[i]}}
+
+\対数の定義{定義}[i]
+
\auto{286}{\detokenize{\対数の定義{定義}[b]}}
+
\対数の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{対数の性質}
%\begin{description}
-\auto{287}{\detokenize{\対数の性質{公式A}[i]}}\par
-\対数の性質{公式A}[i]\par
+\auto{287}{\detokenize{\対数の性質{公式A}[i]}}
+
+\対数の性質{公式A}[i]
+
\auto{288}{\detokenize{\対数の性質{公式A}[b]}}
+
\対数の性質{公式A}[b]
-\auto{289}{\detokenize{\対数の性質{公式B}[i]}}\par
-\対数の性質{公式B}[i]\par
+
+\auto{289}{\detokenize{\対数の性質{公式B}[i]}}
+
+\対数の性質{公式B}[i]
+
\auto{290}{\detokenize{\対数の性質{公式B}[b]}}
+
\対数の性質{公式B}[b]
-\auto{291}{\detokenize{\対数の性質{公式C}[i]}}\par
-\対数の性質{公式C}[i]\par
+
+\auto{291}{\detokenize{\対数の性質{公式C}[i]}}
+
+\対数の性質{公式C}[i]
+
\auto{292}{\detokenize{\対数の性質{公式C}[b]}}
+
\対数の性質{公式C}[b]
-\auto{293}{\detokenize{\対数の性質{公式D}[i]}}\par
-\対数の性質{公式D}[i]\par
+
+\auto{293}{\detokenize{\対数の性質{公式D}[i]}}
+
+\対数の性質{公式D}[i]
+
\auto{294}{\detokenize{\対数の性質{公式D}[b]}}
+
\対数の性質{公式D}[b]
-\auto{295}{\detokenize{\対数の性質{公式E}[i]}}\par
-\対数の性質{公式E}[i]\par
+
+\auto{295}{\detokenize{\対数の性質{公式E}[i]}}
+
+\対数の性質{公式E}[i]
+
\auto{296}{\detokenize{\対数の性質{公式E}[b]}}
+
\対数の性質{公式E}[b]
-\auto{297}{\detokenize{\対数の性質{公式F}[i]}}\par
-\対数の性質{公式F}[i]\par
+
+\auto{297}{\detokenize{\対数の性質{公式F}[i]}}
+
+\対数の性質{公式F}[i]
+
\auto{298}{\detokenize{\対数の性質{公式F}[b]}}
+
\対数の性質{公式F}[b]
-\auto{287}{\detokenize{\対数の性質{証明}}}\par
-\対数の性質{証明}\par
+
+\auto{287}{\detokenize{\対数の性質{証明}}}
+
+\対数の性質{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{底の変換公式}
%\begin{description}
-\auto{299}{\detokenize{\底の変換公式{公式}[i]}}\par
-\底の変換公式{公式}[i]\par
+\auto{299}{\detokenize{\底の変換公式{公式}[i]}}
+
+\底の変換公式{公式}[i]
+
\auto{300}{\detokenize{\底の変換公式{公式}[b]}}
+
\底の変換公式{公式}[b]
-\auto{299}{\detokenize{\底の変換公式{証明}}}\par
-\底の変換公式{証明}\par
+
+\auto{299}{\detokenize{\底の変換公式{証明}}}
+
+\底の変換公式{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{導関数の微分}
%\begin{description}
-\auto{301}{\detokenize{\導関数の定義{定義}[i]}}\par
-\導関数の定義{定義}[i]\par
+\auto{301}{\detokenize{\導関数の定義{定義}[i]}}
+
+\導関数の定義{定義}[i]
+
\auto{302}{\detokenize{\導関数の定義{定義}[b]}}
+
\導関数の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{べき乗関数と定数関数の導関数}
%\begin{description}
-\auto{303}{\detokenize{\べき乗関数と定数関数の導関数{公式A}[i]}}\par
-\べき乗関数と定数関数の導関数{公式A}[i]\par
+\auto{303}{\detokenize{\べき乗関数と定数関数の導関数{公式A}[i]}}
+
+\べき乗関数と定数関数の導関数{公式A}[i]
+
\auto{304}{\detokenize{\べき乗関数と定数関数の導関数{公式A}[b]}}
+
\べき乗関数と定数関数の導関数{公式A}[b]
-\auto{305}{\detokenize{\べき乗関数と定数関数の導関数{公式B}[i]}}\par
-\べき乗関数と定数関数の導関数{公式B}[i]\par
+
+\auto{305}{\detokenize{\べき乗関数と定数関数の導関数{公式B}[i]}}
+
+\べき乗関数と定数関数の導関数{公式B}[i]
+
\auto{306}{\detokenize{\べき乗関数と定数関数の導関数{公式B}[b]}}
+
\べき乗関数と定数関数の導関数{公式B}[b]
-\auto{303}{\detokenize{\べき乗関数と定数関数の導関数{証明}}}\par
-\べき乗関数と定数関数の導関数{証明}\par
+
+\auto{303}{\detokenize{\べき乗関数と定数関数の導関数{証明}}}
+
+\べき乗関数と定数関数の導関数{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{導関数の性質}
%\begin{description}
-\auto{307}{\detokenize{\導関数の性質{公式A}[i]}}\par
-\導関数の性質{公式A}[i]\par
+\auto{307}{\detokenize{\導関数の性質{公式A}[i]}}
+
+\導関数の性質{公式A}[i]
+
\auto{308}{\detokenize{\導関数の性質{公式A}[b]}}
+
\導関数の性質{公式A}[b]
-\auto{309}{\detokenize{\導関数の性質{公式B}[i]}}\par
-\導関数の性質{公式B}[i]\par
+
+\auto{309}{\detokenize{\導関数の性質{公式B}[i]}}
+
+\導関数の性質{公式B}[i]
+
\auto{310}{\detokenize{\導関数の性質{公式B}[b]}}
+
\導関数の性質{公式B}[b]
-\auto{311}{\detokenize{\導関数の性質{公式C}[i]}}\par
-\導関数の性質{公式C}[i]\par
+
+\auto{311}{\detokenize{\導関数の性質{公式C}[i]}}
+
+\導関数の性質{公式C}[i]
+
\auto{312}{\detokenize{\導関数の性質{公式C}[b]}}
+
\導関数の性質{公式C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{接線の方程式}
%\begin{description}
-\auto{313}{\detokenize{\接線の方程式{公式}[i]}}\par
-\接線の方程式{公式}[i]\par
+\auto{313}{\detokenize{\接線の方程式{公式}[i]}}
+
+\接線の方程式{公式}[i]
+
\auto{314}{\detokenize{\接線の方程式{公式}[b]}}
+
\接線の方程式{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{不定積分の定義}
%\begin{description}
-\auto{315}{\detokenize{\不定積分の定義{定義}[i]}}\par
-\不定積分の定義{定義}[i]\par
+\auto{315}{\detokenize{\不定積分の定義{定義}[i]}}
+
+\不定積分の定義{定義}[i]
+
\auto{316}{\detokenize{\不定積分の定義{定義}[b]}}
+
\不定積分の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{べき乗関数の不定積分}
%\begin{description}
-\auto{317}{\detokenize{\べき乗関数の不定積分{公式}[i]}}\par
-\べき乗関数の不定積分{公式}[i]\par
+\auto{317}{\detokenize{\べき乗関数の不定積分{公式}[i]}}
+
+\べき乗関数の不定積分{公式}[i]
+
\auto{318}{\detokenize{\べき乗関数の不定積分{公式}[b]}}
+
\べき乗関数の不定積分{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{不定積分の性質}
%\begin{description}
-%\auto{319}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式A}[i]\par}\par
-\不定積分の性質{公式A}[i]\par\par
-%\auto{320}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式A}[b]}\par
+%\auto{319}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式A}[i]
+}
+
+\不定積分の性質{公式A}[i]
+
+
+%\auto{320}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式A}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式A}[b]
+}
+
\不定積分の性質{公式A}[b]
-%\auto{321}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式B}[i]\par}\par
-\不定積分の性質{公式B}[i]\par\par
-%\auto{322}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式B}[b]}\par
+
+%\auto{321}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式B}[i]
+}
+
+\不定積分の性質{公式B}[i]
+
+
+%\auto{322}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式B}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式B}[b]
+}
+
\不定積分の性質{公式B}[b]
-%\auto{323}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式C}[i]\par}\par
-\不定積分の性質{公式C}[i]\par\par
+
+%\auto{323}{\texttt{\textbackslash 不定積分の性質\h{-0.1mm}$\lbrace$\h{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式C}[i]
+}
+
+\不定積分の性質{公式C}[i]
+
+
%\auto{324}{\texttt{\textbackslash
-%\不定積分の性質{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}\par
-\auto[1]{\不定積分の性質{公式C}[b]}\par
+%\不定積分の性質{公式C}\h{-0.1mm}$\rbrace$\kakkokukuri[[]{i}}}
+
+\auto[1]{\不定積分の性質{公式C}[b]
+}
+
\不定積分の性質{公式C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{定積分の定義}
%\begin{description}
-\auto{325}{\detokenize{\定積分の定義{定義}[i]}}\par
-\定積分の定義{定義}[i]\par
+\auto{325}{\detokenize{\定積分の定義{定義}[i]}}
+
+\定積分の定義{定義}[i]
+
\auto{326}{\detokenize{\定積分の定義{定義}[b]}}
+
\定積分の定義{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{定積分の性質}
%\begin{description}
-\auto{327}{\detokenize{\定積分の性質{公式A}[i]}}\par
-\定積分の性質{公式A}[i]\par
+\auto{327}{\detokenize{\定積分の性質{公式A}[i]}}
+
+\定積分の性質{公式A}[i]
+
\auto{328}{\detokenize{\定積分の性質{公式A}[b]}}
+
\定積分の性質{公式A}[b]
-\auto{329}{\detokenize{\定積分の性質{公式B}[i]}}\par
-\定積分の性質{公式B}[i]\par
+
+\auto{329}{\detokenize{\定積分の性質{公式B}[i]}}
+
+\定積分の性質{公式B}[i]
+
\auto{330}{\detokenize{\定積分の性質{公式B}[b]}}
+
\定積分の性質{公式B}[b]
-\auto{331}{\detokenize{\定積分の性質{公式C}[i]}}\par
-\定積分の性質{公式C}[i]\par
+
+\auto{331}{\detokenize{\定積分の性質{公式C}[i]}}
+
+\定積分の性質{公式C}[i]
+
\auto{332}{\detokenize{\定積分の性質{公式C}[b]}}
+
\定積分の性質{公式C}[b]
-\auto{333}{\detokenize{\定積分の性質{公式D}[i]}}\par
-\定積分の性質{公式D}[i]\par
+
+\auto{333}{\detokenize{\定積分の性質{公式D}[i]}}
+
+\定積分の性質{公式D}[i]
+
\auto{334}{\detokenize{\定積分の性質{公式D}[b]}}
+
\定積分の性質{公式D}[b]
-\auto{335}{\detokenize{\定積分の性質{公式E}[i]}}\par
-\定積分の性質{公式E}[i]\par
+
+\auto{335}{\detokenize{\定積分の性質{公式E}[i]}}
+
+\定積分の性質{公式E}[i]
+
\auto{336}{\detokenize{\定積分の性質{公式E}[b]}}
+
\定積分の性質{公式E}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{ベクトルの演算}
%\begin{description}
%n-336=個数
-\auto{337}{\detokenize{\ベクトルの演算{公式A}[i]}}\par
-\ベクトルの演算{公式A}[i]\par
+\auto{337}{\detokenize{\ベクトルの演算{公式A}[i]}}
+
+\ベクトルの演算{公式A}[i]
+
\auto{338}{\detokenize{\ベクトルの演算{公式A}[b]}}
+
\ベクトルの演算{公式A}[b]
-\auto{339}{\detokenize{\ベクトルの演算{公式B}[i]}}\par
-\ベクトルの演算{公式B}[i]\par
+
+\auto{339}{\detokenize{\ベクトルの演算{公式B}[i]}}
+
+\ベクトルの演算{公式B}[i]
+
\auto{340}{\detokenize{\ベクトルの演算{公式B}[b]}}
+
\ベクトルの演算{公式B}[b]
-\auto{341}{\detokenize{\ベクトルの演算{公式C}[i]}}\par
-\ベクトルの演算{公式C}[i]\par
+
+\auto{341}{\detokenize{\ベクトルの演算{公式C}[i]}}
+
+\ベクトルの演算{公式C}[i]
+
\auto{342}{\detokenize{\ベクトルの演算{公式C}[b]}}
+
\ベクトルの演算{公式C}[b]
-\auto{343}{\detokenize{\ベクトルの演算{公式D}[i]}}\par
-\ベクトルの演算{公式D}[i]\par
+
+\auto{343}{\detokenize{\ベクトルの演算{公式D}[i]}}
+
+\ベクトルの演算{公式D}[i]
+
\auto{344}{\detokenize{\ベクトルの演算{公式D}[b]}}
+
\ベクトルの演算{公式D}[b]
-\auto{345}{\detokenize{\ベクトルの演算{公式E}[i]}}\par
-\ベクトルの演算{公式E}[i]\par
+
+\auto{345}{\detokenize{\ベクトルの演算{公式E}[i]}}
+
+\ベクトルの演算{公式E}[i]
+
\auto{346}{\detokenize{\ベクトルの演算{公式E}[b]}}
+
\ベクトルの演算{公式E}[b]
-\auto{347}{\detokenize{\ベクトルの演算{公式F}[i]}}\par
-\ベクトルの演算{公式F}[i]\par
+
+\auto{347}{\detokenize{\ベクトルの演算{公式F}[i]}}
+
+\ベクトルの演算{公式F}[i]
+
\auto{348}{\detokenize{\ベクトルの演算{公式F}[b]}}
+
\ベクトルの演算{公式F}[b]
-\auto{349}{\detokenize{\ベクトルの演算{公式G}[i]}}\par
-\ベクトルの演算{公式G}[i]\par
+
+\auto{349}{\detokenize{\ベクトルの演算{公式G}[i]}}
+
+\ベクトルの演算{公式G}[i]
+
\auto{350}{\detokenize{\ベクトルの演算{公式G}[b]}}
+
\ベクトルの演算{公式G}[b]
-\auto{351}{\detokenize{\ベクトルの演算{公式H}[i]}}\par
-\ベクトルの演算{公式H}[i]\par
+
+\auto{351}{\detokenize{\ベクトルの演算{公式H}[i]}}
+
+\ベクトルの演算{公式H}[i]
+
\auto{352}{\detokenize{\ベクトルの演算{公式H}[b]}}
+
\ベクトルの演算{公式H}[b]
-\auto{353}{\detokenize{\ベクトルの演算{公式I}[i]}}\par
-\ベクトルの演算{公式I}[i]\par
+
+\auto{353}{\detokenize{\ベクトルの演算{公式I}[i]}}
+
+\ベクトルの演算{公式I}[i]
+
\auto{354}{\detokenize{\ベクトルの演算{公式I}[b]}}
+
\ベクトルの演算{公式I}[b]
-\auto{355}{\detokenize{\ベクトルの演算{公式J}[i]}}\par
-\ベクトルの演算{公式J}[i]\par
+
+\auto{355}{\detokenize{\ベクトルの演算{公式J}[i]}}
+
+\ベクトルの演算{公式J}[i]
+
\auto{356}{\detokenize{\ベクトルの演算{公式J}[b]}}
+
\ベクトルの演算{公式J}[b]
-\auto{357}{\detokenize{\ベクトルの演算{公式K}[i]}}\par
-\ベクトルの演算{公式K}[i]\par
+
+\auto{357}{\detokenize{\ベクトルの演算{公式K}[i]}}
+
+\ベクトルの演算{公式K}[i]
+
\auto{358}{\detokenize{\ベクトルの演算{公式K}[b]}}
+
\ベクトルの演算{公式K}[b]
-\auto{359}{\detokenize{\ベクトルの演算{公式L}[i]}}\par
-\ベクトルの演算{公式L}[i]\par
+
+\auto{359}{\detokenize{\ベクトルの演算{公式L}[i]}}
+
+\ベクトルの演算{公式L}[i]
+
\auto{360}{\detokenize{\ベクトルの演算{公式L}[b]}}
+
\ベクトルの演算{公式L}[b]
-%\auto{361}{\detokenize{\ベクトルの演算{公式M}[i]}}\par
-%\ベクトルの演算{公式M}[i]\par
+
+%\auto{361}{\detokenize{\ベクトルの演算{公式M}[i]}}
+
+%\ベクトルの演算{公式M}[i]
+
%\auto{362}{\detokenize{\ベクトルの演算{公式M}[b]}}
+
%\ベクトルの演算{公式M}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平面ベクトルの分解}
%\begin{description}
-\auto{363}{\detokenize{\平面ベクトルの分解{公式}[i]}}\par
-\平面ベクトルの分解{公式}[i]\par
+\auto{363}{\detokenize{\平面ベクトルの分解{公式}[i]}}
+
+\平面ベクトルの分解{公式}[i]
+
\auto{364}{\detokenize{\平面ベクトルの分解{公式}[b]}}
+
\平面ベクトルの分解{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平面ベクトルの成分}
%\begin{description}
-\auto{365}{\detokenize{\平面ベクトルの成分{公式A}[i]}}\par
-\平面ベクトルの成分{公式A}[i]\par
+\auto{365}{\detokenize{\平面ベクトルの成分{公式A}[i]}}
+
+\平面ベクトルの成分{公式A}[i]
+
\auto{366}{\detokenize{\平面ベクトルの成分{公式A}[b]}}
+
\平面ベクトルの成分{公式A}[b]
-\auto{367}{\detokenize{\平面ベクトルの成分{公式B}[i]}}\par
-\平面ベクトルの成分{公式B}[i]\par
+
+\auto{367}{\detokenize{\平面ベクトルの成分{公式B}[i]}}
+
+\平面ベクトルの成分{公式B}[i]
+
\auto{368}{\detokenize{\平面ベクトルの成分{公式B}[b]}}
+
\平面ベクトルの成分{公式B}[b]
-\auto{369}{\detokenize{\平面ベクトルの成分{公式C}[i]}}\par
-\平面ベクトルの成分{公式C}[i]\par
+
+\auto{369}{\detokenize{\平面ベクトルの成分{公式C}[i]}}
+
+\平面ベクトルの成分{公式C}[i]
+
\auto{370}{\detokenize{\平面ベクトルの成分{公式C}[b]}}
+
\平面ベクトルの成分{公式C}[b]
-\auto{371}{\detokenize{\平面ベクトルの成分{公式D}[i]}}\par
-\平面ベクトルの成分{公式D}[i]\par
+
+\auto{371}{\detokenize{\平面ベクトルの成分{公式D}[i]}}
+
+\平面ベクトルの成分{公式D}[i]
+
\auto{372}{\detokenize{\平面ベクトルの成分{公式D}[b]}}
+
\平面ベクトルの成分{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{ベクトルの成分と大きさ}
%\begin{description}
-\auto{373}{\detokenize{\ベクトルの成分と大きさ{公式A}[i]}}\par
-\ベクトルの成分と大きさ{公式A}[i]\par
+\auto{373}{\detokenize{\ベクトルの成分と大きさ{公式A}[i]}}
+
+\ベクトルの成分と大きさ{公式A}[i]
+
\auto{374}{\detokenize{\ベクトルの成分と大きさ{公式A}[b]}}
+
\ベクトルの成分と大きさ{公式A}[b]
-\auto{375}{\detokenize{\ベクトルの成分と大きさ{公式B}[i]}}\par
-\ベクトルの成分と大きさ{公式B}[i]\par
+
+\auto{375}{\detokenize{\ベクトルの成分と大きさ{公式B}[i]}}
+
+\ベクトルの成分と大きさ{公式B}[i]
+
\auto{376}{\detokenize{\ベクトルの成分と大きさ{公式B}[b]}}
+
\ベクトルの成分と大きさ{公式B}[b]
-\auto{373}{\detokenize{\ベクトルの成分と大きさ{証明}}}\par
-\ベクトルの成分と大きさ{証明}\par
+
+\auto{373}{\detokenize{\ベクトルの成分と大きさ{証明}}}
+
+\ベクトルの成分と大きさ{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平面ベクトルの内積}
%\begin{description}
-\auto{377}{\detokenize{\平面ベクトルの内積{公式}[i]}}\par
-\平面ベクトルの内積{公式}[i]\par
+\auto{377}{\detokenize{\平面ベクトルの内積{公式}[i]}}
+
+\平面ベクトルの内積{公式}[i]
+
\auto{378}{\detokenize{\平面ベクトルの内積{公式}[b]}}
+
\平面ベクトルの内積{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{内積の性質}
%\begin{description}
-\auto{379}{\detokenize{\内積の性質{公式A}[i]}}\par
-\内積の性質{公式A}[i]\par
+\auto{379}{\detokenize{\内積の性質{公式A}[i]}}
+
+\内積の性質{公式A}[i]
+
\auto{380}{\detokenize{\内積の性質{公式A}[b]}}
+
\内積の性質{公式A}[b]
-\auto{381}{\detokenize{\内積の性質{公式B}[i]}}\par
-\内積の性質{公式B}[i]\par
+
+\auto{381}{\detokenize{\内積の性質{公式B}[i]}}
+
+\内積の性質{公式B}[i]
+
\auto{382}{\detokenize{\内積の性質{公式B}[b]}}
+
\内積の性質{公式B}[b]
-\auto{383}{\detokenize{\内積の性質{公式C}[i]}}\par
-\内積の性質{公式C}[i]\par
+
+\auto{383}{\detokenize{\内積の性質{公式C}[i]}}
+
+\内積の性質{公式C}[i]
+
\auto{384}{\detokenize{\内積の性質{公式C}[b]}}
+
\内積の性質{公式C}[b]
-\auto{385}{\detokenize{\内積の性質{公式D}[i]}}\par
-\内積の性質{公式D}[i]\par
+
+\auto{385}{\detokenize{\内積の性質{公式D}[i]}}
+
+\内積の性質{公式D}[i]
+
\auto{386}{\detokenize{\内積の性質{公式D}[b]}}
+
\内積の性質{公式D}[b]
-\auto{387}{\detokenize{\内積の性質{公式E}[i]}}\par
-\内積の性質{公式E}[i]\par
+
+\auto{387}{\detokenize{\内積の性質{公式E}[i]}}
+
+\内積の性質{公式E}[i]
+
\auto{388}{\detokenize{\内積の性質{公式E}[b]}}
+
\内積の性質{公式E}[b]
-\auto{389}{\detokenize{\内積の性質{公式F}[i]}}\par
-\内積の性質{公式F}[i]\par
+
+\auto{389}{\detokenize{\内積の性質{公式F}[i]}}
+
+\内積の性質{公式F}[i]
+
\auto{390}{\detokenize{\内積の性質{公式F}[b]}}
+
\内積の性質{公式F}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平面ベクトルの平行条件}
%\begin{description}
-\auto{391}{\detokenize{\平面ベクトルの平行条件{条件}[i]}}\par
-\平面ベクトルの平行条件{条件}[i]\par
+\auto{391}{\detokenize{\平面ベクトルの平行条件{条件}[i]}}
+
+\平面ベクトルの平行条件{条件}[i]
+
\auto{392}{\detokenize{\平面ベクトルの平行条件{条件}[b]}}
+
\平面ベクトルの平行条件{条件}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平面ベクトルの垂直条件}
%\begin{description}
-\auto{393}{\detokenize{\平面ベクトルの垂直条件{条件}[i]}}\par
-\平面ベクトルの垂直条件{条件}[i]\par
+\auto{393}{\detokenize{\平面ベクトルの垂直条件{条件}[i]}}
+
+\平面ベクトルの垂直条件{条件}[i]
+
\auto{394}{\detokenize{\平面ベクトルの垂直条件{条件}[b]}}
+
\平面ベクトルの垂直条件{条件}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{位置ベクトル}
%\begin{description}
-\auto{395}{\detokenize{\位置ベクトル{公式A}[i]}}\par
-\位置ベクトル{公式A}[i]\par
+\auto{395}{\detokenize{\位置ベクトル{公式A}[i]}}
+
+\位置ベクトル{公式A}[i]
+
\auto{396}{\detokenize{\位置ベクトル{公式A}[b]}}
+
\位置ベクトル{公式A}[b]
-\auto{395}{\detokenize{\位置ベクトル{公式A}[i]}}\par
-\位置ベクトル{内分点の位置ベクトルの証明}[i]\par
-\auto{397}{\detokenize{\位置ベクトル{公式B}[i]}}\par
-\位置ベクトル{公式B}[i]\par
+
+\auto{395}{\detokenize{\位置ベクトル{公式A}[i]}}
+
+\位置ベクトル{内分点の位置ベクトルの証明}
+
+\auto{397}{\detokenize{\位置ベクトル{公式B}[i]}}
+
+\位置ベクトル{公式B}[i]
+
\auto{398}{\detokenize{\位置ベクトル{公式B}[b]}}
+
\位置ベクトル{公式B}[b]
-\auto{397}{\detokenize{\位置ベクトル{外分点の位置ベクトルの証明}[i]}}\par
-\位置ベクトル{外分点の位置ベクトルの証明}[i]\par
-\auto{399}{\detokenize{\位置ベクトル{公式C}[i]}}\par
-\位置ベクトル{公式C}[i]\par
+
+\auto{397}{\detokenize{\位置ベクトル{外分点の位置ベクトルの証明}}}
+
+\位置ベクトル{外分点の位置ベクトルの証明}
+
+\auto{399}{\detokenize{\位置ベクトル{公式C}[i]}}
+
+\位置ベクトル{公式C}[i]
+
\auto{400}{\detokenize{\位置ベクトル{公式C}[b]}}
+
\位置ベクトル{公式C}[b]
-\auto{401}{\detokenize{\位置ベクトル{公式D}[i]}}\par
-\位置ベクトル{公式D}[i]\par
+
+\auto{401}{\detokenize{\位置ベクトル{公式D}[i]}}
+
+\位置ベクトル{公式D}[i]
+
\auto{402}{\detokenize{\位置ベクトル{公式D}[b]}}
+
\位置ベクトル{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{ベクトル方程式}
%\begin{description}
-\auto{403}{\detokenize{\ベクトル方程式{公式A}[i]}}\par
-\ベクトル方程式{公式A}[i]\par
+\auto{403}{\detokenize{\ベクトル方程式{公式A}[i]}}
+
+\ベクトル方程式{公式A}[i]
+
\auto{404}{\detokenize{\ベクトル方程式{公式A}[b]}}
+
\ベクトル方程式{公式A}[b]
-\auto{405}{\detokenize{\ベクトル方程式{公式B}[i]}}\par
-\ベクトル方程式{公式B}[i]\par
+
+\auto{405}{\detokenize{\ベクトル方程式{公式B}[i]}}
+
+\ベクトル方程式{公式B}[i]
+
\auto{406}{\detokenize{\ベクトル方程式{公式B}[b]}}
+
\ベクトル方程式{公式B}[b]
-\auto{407}{\detokenize{\ベクトル方程式{公式C}[i]}}\par
-\ベクトル方程式{公式C}[i]\par
+
+\auto{407}{\detokenize{\ベクトル方程式{公式C}[i]}}
+
+\ベクトル方程式{公式C}[i]
+
\auto{408}{\detokenize{\ベクトル方程式{公式C}[b]}}
+
\ベクトル方程式{公式C}[b]
-\auto{409}{\detokenize{\ベクトル方程式{公式D}[i]}}\par
-\ベクトル方程式{公式D}[i]\par
+
+\auto{409}{\detokenize{\ベクトル方程式{公式D}[i]}}
+
+\ベクトル方程式{公式D}[i]
+
\auto{410}{\detokenize{\ベクトル方程式{公式D}[b]}}
+
\ベクトル方程式{公式D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{等差数列}
%\begin{description}
-\auto{411}{\detokenize{\等差数列{一般項}[i]}}\par
-\等差数列{一般項}[i]\par
+\auto{411}{\detokenize{\等差数列{一般項}[i]}}
+
+\等差数列{一般項}[i]
+
\auto{412}{\detokenize{\等差数列{一般項}[b]}}
+
\等差数列{一般項}[b]
-\auto{413}{\detokenize{\等差数列{総和}[i]}}\par
-\等差数列{総和}[i]\par
+
+\auto{413}{\detokenize{\等差数列{総和}[i]}}
+
+\等差数列{総和}[i]
+
\auto{414}{\detokenize{\等差数列{総和}[b]}}
+
\等差数列{総和}[b]
-\auto{411}{\detokenize{\等差数列{証明}}}\par
-\等差数列{証明}\par
+
+\auto{411}{\detokenize{\等差数列{証明}}}
+
+\等差数列{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{等比数列}
%\begin{description}
-\auto{415}{\detokenize{\等比数列{一般項}[i]}}\par
-\等比数列{一般項}[i]\par
+\auto{415}{\detokenize{\等比数列{一般項}[i]}}
+
+\等比数列{一般項}[i]
+
\auto{416}{\detokenize{\等比数列{一般項}[b]}}
+
\等比数列{一般項}[b]
-\auto{417}{\detokenize{\等比数列{総和}[i]}}\par
-\等比数列{総和}[i]\par
+
+\auto{417}{\detokenize{\等比数列{総和}[i]}}
+
+\等比数列{総和}[i]
+
\auto{418}{\detokenize{\等比数列{総和}[b]}}
+
\等比数列{総和}[b]
-\auto{415}{\detokenize{\等比数列{証明}}}\par
-\等比数列{証明}\par
+
+\auto{415}{\detokenize{\等比数列{証明}}}
+
+\等比数列{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{シグマの公式}
%\begin{description}
-\auto{419}{\detokenize{\シグマの公式{公式A}[i]}}\par
-\シグマの公式{公式A}[i]\par
+\auto{419}{\detokenize{\シグマの公式{公式A}[i]}}
+
+\シグマの公式{公式A}[i]
+
\auto{420}{\detokenize{\シグマの公式{公式A}[b]}}
+
\シグマの公式{公式A}[b]
-\auto{421}{\detokenize{\シグマの公式{公式B}[i]}}\par
-\シグマの公式{公式B}[i]\par
+
+\auto{421}{\detokenize{\シグマの公式{公式B}[i]}}
+
+\シグマの公式{公式B}[i]
+
\auto{422}{\detokenize{\シグマの公式{公式B}[b]}}
+
\シグマの公式{公式B}[b]
-\auto{423}{\detokenize{\シグマの公式{公式C}[i]}}\par
-\シグマの公式{公式C}[i]\par
+
+\auto{423}{\detokenize{\シグマの公式{公式C}[i]}}
+
+\シグマの公式{公式C}[i]
+
\auto{424}{\detokenize{\シグマの公式{公式C}[b]}}
+
\シグマの公式{公式C}[b]
-\auto{425}{\detokenize{\シグマの公式{公式D}[i]}}\par
-\シグマの公式{公式D}[i]\par
+
+\auto{425}{\detokenize{\シグマの公式{公式D}[i]}}
+
+\シグマの公式{公式D}[i]
+
\auto{426}{\detokenize{\シグマの公式{公式D}[b]}}
+
\シグマの公式{公式D}[b]
-\auto{427}{\detokenize{\シグマの公式{公式E}[i]}}\par
-\シグマの公式{公式E}[i]\par
+
+\auto{427}{\detokenize{\シグマの公式{公式E}[i]}}
+
+\シグマの公式{公式E}[i]
+
\auto{428}{\detokenize{\シグマの公式{公式E}[b]}}
+
\シグマの公式{公式E}[b]
-\auto{419}{\detokenize{\シグマの公式{証明}}}\par
-\シグマの公式{証明}\par
+
+\auto{419}{\detokenize{\シグマの公式{証明}}}
+
+\シグマの公式{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{シグマの性質}
%\begin{description}
-\auto{429}{\detokenize{\シグマの性質{性質}[i]}}\par
-\シグマの性質{性質}[i]\par
+\auto{429}{\detokenize{\シグマの性質{性質}[i]}}
+
+\シグマの性質{性質}[i]
+
\auto{430}{\detokenize{\シグマの性質{性質}[b]}}
+
\シグマの性質{性質}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{階差数列}
%\begin{description}
-\auto{431}{\detokenize{\階差数列{一般項}[i]}}\par
-\階差数列{一般項}[i]\par
+\auto{431}{\detokenize{\階差数列{一般項}[i]}}
+
+\階差数列{一般項}[i]
+
\auto{432}{\detokenize{\階差数列{一般項}[b]}}
+
\階差数列{一般項}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{漸化式}
%\begin{description}
-\auto{433}{\detokenize{\漸化式{等差型}[i]}}\par
-\漸化式{等差型}[i]\par
+\auto{433}{\detokenize{\漸化式{等差型}[i]}}
+
+\漸化式{等差型}[i]
+
\auto{434}{\detokenize{\漸化式{等差型}[b]}}
+
\漸化式{等差型}[b]
-\auto{435}{\detokenize{\漸化式{等比型}[i]}}\par
-\漸化式{等比型}[i]\par
+
+\auto{435}{\detokenize{\漸化式{等比型}[i]}}
+
+\漸化式{等比型}[i]
+
\auto{436}{\detokenize{\漸化式{等比型}[b]}}
-\漸化式{等比型}[b]\par
-\auto{437}{\detokenize{\漸化式{階差型}[i]}}\par
-\漸化式{階差型}[i]\par
+
+\漸化式{等比型}[b]
+
+
+\auto{437}{\detokenize{\漸化式{階差型}[i]}}
+
+\漸化式{階差型}[i]
+
\auto{438}{\detokenize{\漸化式{階差型}[b]}}
-\漸化式{階差型}[b]\par
-\auto{439}{\detokenize{\漸化式{特性方程式}[i]}}\par
-\漸化式{特性方程式}[i]\par
+
+\漸化式{階差型}[b]
+
+
+\auto{439}{\detokenize{\漸化式{特性方程式}[i]}}
+
+\漸化式{特性方程式}[i]
+
\auto{440}{\detokenize{\漸化式{特性方程式}[b]}}
+
\漸化式{特性方程式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{数学的帰納法}
%\begin{description}
-\auto{441}{\detokenize{\数学的帰納法}}\par
+\auto{441}{\detokenize{\数学的帰納法}}
+
\数学的帰納法
%\end{description}
@@ -1520,347 +2617,615 @@ Now, here are the actual examples!
%\begin{simplesquarebox}{共役複素数}
%\begin{description}
%n-441=個数
-\auto{442}{\detokenize{\共役複素数{定義}[i]}}\par
-\共役複素数{定義}[i]\par
+\auto{442}{\detokenize{\共役複素数{定義}[i]}}
+
+\共役複素数{定義}[i]
+
\auto{443}{\detokenize{\共役複素数{定義}[b]}}
+
\共役複素数{定義}[b]
-\auto{444}{\detokenize{\共役複素数{性質A}[i]}}\par
-\共役複素数{性質A}[i]\par
+
+\auto{444}{\detokenize{\共役複素数{性質A}[i]}}
+
+\共役複素数{性質A}[i]
+
\auto{445}{\detokenize{\共役複素数{性質A}[b]}}
-\共役複素数{性質A}[b]\par
-\auto{446}{\detokenize{\共役複素数{性質B}[i]}}\par
-\共役複素数{性質B}[i]\par
+
+\共役複素数{性質A}[b]
+
+
+\auto{446}{\detokenize{\共役複素数{性質B}[i]}}
+
+\共役複素数{性質B}[i]
+
\auto{447}{\detokenize{\共役複素数{性質B}[b]}}
+
\共役複素数{性質B}[b]
-\auto{448}{\detokenize{\共役複素数{性質C}[i]}}\par
-\共役複素数{性質C}[i]\par
+
+\auto{448}{\detokenize{\共役複素数{性質C}[i]}}
+
+\共役複素数{性質C}[i]
+
\auto{449}{\detokenize{\共役複素数{性質C}[b]}}
-\共役複素数{性質C}[b]\par
-\auto{450}{\detokenize{\共役複素数{性質D}[i]}}\par
-\共役複素数{性質D}[i]\par
+
+\共役複素数{性質C}[b]
+
+
+\auto{450}{\detokenize{\共役複素数{性質D}[i]}}
+
+\共役複素数{性質D}[i]
+
\auto{451}{\detokenize{\共役複素数{性質D}[b]}}
+
\共役複素数{性質D}[b]
-\auto{452}{\detokenize{\共役複素数{性質E}[i]}}\par
-\共役複素数{性質E}[i]\par
+
+\auto{452}{\detokenize{\共役複素数{性質E}[i]}}
+
+\共役複素数{性質E}[i]
+
\auto{453}{\detokenize{\共役複素数{性質E}[b]}}
+
\共役複素数{性質E}[b]
-\auto{454}{\detokenize{\共役複素数{性質F}[i]}}\par
-\共役複素数{性質F}[i]\par
+
+\auto{454}{\detokenize{\共役複素数{性質F}[i]}}
+
+\共役複素数{性質F}[i]
+
\auto{455}{\detokenize{\共役複素数{性質F}[b]}}
+
\共役複素数{性質F}[b]
-\auto{456}{\detokenize{\共役複素数{性質G}[i]}}\par
-\共役複素数{性質G}[i]\par
+
+\auto{456}{\detokenize{\共役複素数{性質G}[i]}}
+
+\共役複素数{性質G}[i]
+
\auto{457}{\detokenize{\共役複素数{性質G}[b]}}
+
\共役複素数{性質G}[b]
-\auto{442}{\detokenize{\共役複素数{証明}}}\par
-\共役複素数{証明}\par
+
+\auto{442}{\detokenize{\共役複素数{証明}}}
+
+\共役複素数{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{複素数の絶対値}
%\begin{description}
-\auto{458}{\detokenize{\複素数の絶対値{定義}[i]}}\par
-\複素数の絶対値{定義}[i]\par
+\auto{458}{\detokenize{\複素数の絶対値{定義}[i]}}
+
+\複素数の絶対値{定義}[i]
+
\auto{459}{\detokenize{\複素数の絶対値{定義}[b]}}
+
\複素数の絶対値{定義}[b]
-\auto{460}{\detokenize{\複素数の絶対値{性質A}[i]}}\par
-\複素数の絶対値{性質A}[i]\par
+
+\auto{460}{\detokenize{\複素数の絶対値{性質A}[i]}}
+
+\複素数の絶対値{性質A}[i]
+
\auto{461}{\detokenize{\複素数の絶対値{性質A}[b]}}
+
\複素数の絶対値{性質A}[b]
-\auto{462}{\detokenize{\複素数の絶対値{性質B}[i]}}\par
-\複素数の絶対値{性質B}[i]\par
+
+\auto{462}{\detokenize{\複素数の絶対値{性質B}[i]}}
+
+\複素数の絶対値{性質B}[i]
+
\auto{463}{\detokenize{\複素数の絶対値{性質B}[b]}}
+
\複素数の絶対値{性質B}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{極形式}
%\begin{description}
-\auto{464}{\detokenize{\極形式{定義}[i]}}\par
-\極形式{定義}[i]\par
+\auto{464}{\detokenize{\極形式{定義}[i]}}
+
+\極形式{定義}[i]
+
\auto{465}{\detokenize{\極形式{定義}[b]}}
-\極形式{定義}[b]\par
-\auto{466}{\detokenize{\極形式{性質A}[i]}}\par
-\極形式{性質A}[i]\par
+
+\極形式{定義}[b]
+
+
+\auto{466}{\detokenize{\極形式{性質A}[i]}}
+
+\極形式{性質A}[i]
+
\auto{467}{\detokenize{\極形式{性質A}[b]}}
+
\極形式{性質A}[b]
-\auto{468}{\detokenize{\極形式{性質B}[i]}}\par
-\極形式{性質B}[i]\par
+
+\auto{468}{\detokenize{\極形式{性質B}[i]}}
+
+\極形式{性質B}[i]
+
\auto{469}{\detokenize{\極形式{性質B}[b]}}
+
\極形式{性質B}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{偏角}
%\begin{description}
-\auto{470}{\detokenize{\偏角{定義}[i]}}\par
-\偏角{定義}[i]\par
+\auto{470}{\detokenize{\偏角{定義}[i]}}
+
+\偏角{定義}[i]
+
\auto{471}{\detokenize{\偏角{定義}[b]}}
-\偏角{定義}[b]\par
-\auto{472}{\detokenize{\偏角{性質A}[i]}}\par
-\偏角{性質A}[i]\par
+
+\偏角{定義}[b]
+
+
+\auto{472}{\detokenize{\偏角{性質A}[i]}}
+
+\偏角{性質A}[i]
+
\auto{473}{\detokenize{\偏角{性質A}[b]}}
-\偏角{性質A}[b]\par
-\auto{474}{\detokenize{\偏角{性質B}[i]}}\par
-\偏角{性質B}[i]\par
+
+\偏角{性質A}[b]
+
+
+\auto{474}{\detokenize{\偏角{性質B}[i]}}
+
+\偏角{性質B}[i]
+
\auto{475}{\detokenize{\偏角{性質B}[b]}}
+
\偏角{性質B}[b]
-\auto{476}{\detokenize{\偏角{性質C}[i]}}\par
-\偏角{性質C}[i]\par
+
+\auto{476}{\detokenize{\偏角{性質C}[i]}}
+
+\偏角{性質C}[i]
+
\auto{477}{\detokenize{\偏角{性質C}[b]}}
+
\偏角{性質C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{ドモアブルの定理}
%\begin{description}
-\auto{478}{\detokenize{\ドモアブルの定理{公式}[i]}}\par
-\ドモアブルの定理{公式}[i]\par
+\auto{478}{\detokenize{\ドモアブルの定理{公式}[i]}}
+
+\ドモアブルの定理{公式}[i]
+
\auto{479}{\detokenize{\ドモアブルの定理{公式}[b]}}
+
\ドモアブルの定理{公式}[b]
-\auto{478}{\detokenize{\ドモアブルの定理{証明}}}\par
-\ドモアブルの定理{証明}\par
+
+\auto{478}{\detokenize{\ドモアブルの定理{証明}}}
+
+\ドモアブルの定理{証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{放物線}
%\begin{description}
-\auto{480}{\detokenize{\放物線{定義}[i]}}\par
-\放物線{定義}[i]\par
+\auto{480}{\detokenize{\放物線{定義}[i]}}
+
+\放物線{定義}[i]
+
\auto{481}{\detokenize{\放物線{定義}[b]}}
+
\放物線{定義}[b]
-\auto{482}{\detokenize{\放物線{性質A}[i]}}\par
-\放物線{性質A}[i]\par
+
+\auto{482}{\detokenize{\放物線{性質A}[i]}}
+
+\放物線{性質A}[i]
+
\auto{483}{\detokenize{\放物線{性質A}[b]}}
-\放物線{性質A}[b]\par
-\auto{484}{\detokenize{\放物線{性質B}[i]}}\par
-\放物線{性質B}[i]\par
+
+\放物線{性質A}[b]
+
+
+\auto{484}{\detokenize{\放物線{性質B}[i]}}
+
+\放物線{性質B}[i]
+
\auto{485}{\detokenize{\放物線{性質B}[b]}}
+
\放物線{性質B}[b]
-\auto{486}{\detokenize{\放物線{性質C}[i]}}\par
-\放物線{性質C}[i]\par
+
+\auto{486}{\detokenize{\放物線{性質C}[i]}}
+
+\放物線{性質C}[i]
+
\auto{487}{\detokenize{\放物線{性質C}[b]}}
+
\放物線{性質C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{楕円}
%\begin{description}
-\auto{488}{\detokenize{\楕円{定義}[i]}}\par
-\楕円{定義}[i]\par
+\auto{488}{\detokenize{\楕円{定義}[i]}}
+
+\楕円{定義}[i]
+
\auto{489}{\detokenize{\楕円{定義}[b]}}
-\楕円{定義}[b]\par
-\auto{490}{\detokenize{\楕円{性質A}[i]}}\par
-\楕円{性質A}[i]\par
+
+\楕円{定義}[b]
+
+
+\auto{490}{\detokenize{\楕円{性質A}[i]}}
+
+\楕円{性質A}[i]
+
\auto{491}{\detokenize{\楕円{性質A}[b]}}
-\楕円{性質A}[b]\par
-\auto{492}{\detokenize{\楕円{性質B}[i]}}\par
-\楕円{性質B}[i]\par
+
+\楕円{性質A}[b]
+
+
+\auto{492}{\detokenize{\楕円{性質B}[i]}}
+
+\楕円{性質B}[i]
+
\auto{493}{\detokenize{\楕円{性質B}[b]}}
+
\楕円{性質B}[b]
-\auto{494}{\detokenize{\楕円{性質C}[i]}}\par
-\楕円{性質C}[i]\par
+
+\auto{494}{\detokenize{\楕円{性質C}[i]}}
+
+\楕円{性質C}[i]
+
\auto{495}{\detokenize{\楕円{性質C}[b]}}
+
\楕円{性質C}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{双曲線}
%\begin{description}
-\auto{496}{\detokenize{\双曲線{定義}[i]}}\par
-\双曲線{定義}[i]\par
+\auto{496}{\detokenize{\双曲線{定義}[i]}}
+
+\双曲線{定義}[i]
+
\auto{497}{\detokenize{\双曲線{定義}[b]}}
-\双曲線{定義}[b]\par
-\auto{498}{\detokenize{\双曲線{性質A}[i]}}\par
-\双曲線{性質A}[i]\par
+
+\双曲線{定義}[b]
+
+
+\auto{498}{\detokenize{\双曲線{性質A}[i]}}
+
+\双曲線{性質A}[i]
+
\auto{499}{\detokenize{\双曲線{性質A}[b]}}
-\双曲線{性質A}[b]\par
-\auto{500}{\detokenize{\双曲線{性質B}[i]}}\par
-\双曲線{性質B}[i]\par
+
+\双曲線{性質A}[b]
+
+
+\auto{500}{\detokenize{\双曲線{性質B}[i]}}
+
+\双曲線{性質B}[i]
+
\auto{501}{\detokenize{\双曲線{性質B}[b]}}
+
\双曲線{性質B}[b]
-\auto{502}{\detokenize{\双曲線{性質C}[i]}}\par
-\双曲線{性質C}[i]\par
+
+\auto{502}{\detokenize{\双曲線{性質C}[i]}}
+
+\双曲線{性質C}[i]
+
\auto{503}{\detokenize{\双曲線{性質C}[b]}}
+
\双曲線{性質C}[b]
-\auto{504}{\detokenize{\双曲線{性質D}[i]}}\par
-\双曲線{性質D}[i]\par
+
+\auto{504}{\detokenize{\双曲線{性質D}[i]}}
+
+\双曲線{性質D}[i]
+
\auto{505}{\detokenize{\双曲線{性質D}[b]}}
+
\双曲線{性質D}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{連続な関数}
%\begin{description}
-\auto{506}{\detokenize{\連続な関数{公式}[i]}}\par
-\連続な関数{公式}[i]\par
+\auto{506}{\detokenize{\連続な関数{公式}[i]}}
+
+\連続な関数{公式}[i]
+
\auto{507}{\detokenize{\連続な関数{公式}[b]}}
+
\連続な関数{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{中間値の定理}
%\begin{description}
-\auto{508}{\detokenize{\中間値の定理{公式}[i]}}\par
-\中間値の定理{公式}[i]\par
+\auto{508}{\detokenize{\中間値の定理{公式}[i]}}
+
+\中間値の定理{公式}[i]
+
\auto{509}{\detokenize{\中間値の定理{公式}[b]}}
+
\中間値の定理{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{平均値の定理}
%\begin{description}
-\auto{510}{\detokenize{\平均値の定理{公式}[i]}}\par
-\平均値の定理{公式}[i]\par
+\auto{510}{\detokenize{\平均値の定理{公式}[i]}}
+
+\平均値の定理{公式}[i]
+
\auto{511}{\detokenize{\平均値の定理{公式}[b]}}
+
\平均値の定理{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{微分}
%\begin{description}
-\auto{512}{\detokenize{\微分{定義}[i]}}\par
-\微分{定義}[i]\par
+\auto{512}{\detokenize{\微分{定義}[i]}}
+
+\微分{定義}[i]
+
\auto{513}{\detokenize{\微分{定義}[b]}}
+
\微分{定義}[b]
-\auto{514}{\detokenize{\微分{積の微分公式}[i]}}\par
-\微分{積の微分公式}[i]\par
+
+\auto{514}{\detokenize{\微分{積の微分公式}[i]}}
+
+\微分{積の微分公式}[i]
+
\auto{515}{\detokenize{\微分{積の微分公式}[b]}}
+
\微分{積の微分公式}[b]
-\auto{516}{\detokenize{\微分{商の微分公式}[i]}}\par
-\微分{商の微分公式}[i]\par
+
+\auto{516}{\detokenize{\微分{商の微分公式}[i]}}
+
+\微分{商の微分公式}[i]
+
\auto{517}{\detokenize{\微分{商の微分公式}[b]}}
+
\微分{商の微分公式}[b]
-\auto{518}{\detokenize{\微分{合成関数の微分}[i]}}\par
-\微分{合成関数の微分}[i]\par
+
+\auto{518}{\detokenize{\微分{合成関数の微分}[i]}}
+
+\微分{合成関数の微分}[i]
+
\auto{519}{\detokenize{\微分{合成関数の微分}[b]}}
+
\微分{合成関数の微分}[b]
-\auto{520}{\detokenize{\微分{初等関数の微分公式A}[i]}}\par
-\微分{初等関数の微分公式A}[i]\par
+
+\auto{520}{\detokenize{\微分{初等関数の微分公式A}[i]}}
+
+\微分{初等関数の微分公式A}[i]
+
\auto{521}{\detokenize{\微分{初等関数の微分公式A}[b]}}
+
\微分{初等関数の微分公式A}[b]
-\auto{522}{\detokenize{\微分{初等関数の微分公式B}[i]}}\par
-\微分{初等関数の微分公式B}[i]\par
+
+\auto{522}{\detokenize{\微分{初等関数の微分公式B}[i]}}
+
+\微分{初等関数の微分公式B}[i]
+
\auto{523}{\detokenize{\微分{初等関数の微分公式B}[b]}}
+
\微分{初等関数の微分公式B}[b]
-\auto{524}{\detokenize{\微分{初等関数の微分公式C}[i]}}\par
-\微分{初等関数の微分公式C}[i]\par
+
+\auto{524}{\detokenize{\微分{初等関数の微分公式C}[i]}}
+
+\微分{初等関数の微分公式C}[i]
+
\auto{525}{\detokenize{\微分{初等関数の微分公式C}[b]}}
+
\微分{初等関数の微分公式C}[b]
-\auto{526}{\detokenize{\微分{初等関数の微分公式D}[i]}}\par
-\微分{初等関数の微分公式D}[i]\par
+
+\auto{526}{\detokenize{\微分{初等関数の微分公式D}[i]}}
+
+\微分{初等関数の微分公式D}[i]
+
\auto{527}{\detokenize{\微分{初等関数の微分公式D}[b]}}
+
\微分{初等関数の微分公式D}[b]
-\auto{528}{\detokenize{\微分{初等関数の微分公式E}[i]}}\par
-\微分{初等関数の微分公式E}[i]\par
+
+\auto{528}{\detokenize{\微分{初等関数の微分公式E}[i]}}
+
+\微分{初等関数の微分公式E}[i]
+
\auto{529}{\detokenize{\微分{初等関数の微分公式E}[b]}}
+
\微分{初等関数の微分公式E}[b]
-\auto{530}{\detokenize{\微分{初等関数の微分公式F}[i]}}\par
-\微分{初等関数の微分公式F}[i]\par
+
+\auto{530}{\detokenize{\微分{初等関数の微分公式F}[i]}}
+
+\微分{初等関数の微分公式F}[i]
+
\auto{531}{\detokenize{\微分{初等関数の微分公式F}[b]}}
+
\微分{初等関数の微分公式F}[b]
-\auto{532}{\detokenize{\微分{初等関数の微分公式G}[i]}}\par
-\微分{初等関数の微分公式G}[i]\par
+
+\auto{532}{\detokenize{\微分{初等関数の微分公式G}[i]}}
+
+\微分{初等関数の微分公式G}[i]
+
\auto{533}{\detokenize{\微分{初等関数の微分公式G}[b]}}
+
\微分{初等関数の微分公式G}[b]
-\auto{534}{\detokenize{\微分{初等関数の微分公式H}[i]}}\par
-\微分{初等関数の微分公式H}[i]\par
+
+\auto{534}{\detokenize{\微分{初等関数の微分公式H}[i]}}
+
+\微分{初等関数の微分公式H}[i]
+
\auto{535}{\detokenize{\微分{初等関数の微分公式H}[b]}}
+
\微分{初等関数の微分公式H}[b]
-\auto{536}{\detokenize{\微分{初等関数の微分公式I}[i]}}\par
-\微分{初等関数の微分公式I}[i]\par
+
+\auto{536}{\detokenize{\微分{初等関数の微分公式I}[i]}}
+
+\微分{初等関数の微分公式I}[i]
+
\auto{537}{\detokenize{\微分{初等関数の微分公式I}[b]}}
+
\微分{初等関数の微分公式I}[b]
-\auto{512}{\detokenize{\微分{三角関数の微分公式の証明}[i]}}\par
-\微分{三角関数の微分公式の証明}[i]\par
-\auto{512}{\detokenize{\微分{対数関数の微分公式の証明}[i]}}\par
-\微分{対数関数の微分公式の証明}[i]\par
+
+\auto{512}{\detokenize{\微分{三角関数の微分公式の証明}}}
+
+\微分{三角関数の微分公式の証明}
+
+\auto{512}{\detokenize{\微分{対数関数の微分公式の証明}}}
+
+\微分{対数関数の微分公式の証明}
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{接線の方程式}
%\begin{description}
-\auto{538}{\detokenize{\接線の方程式{公式}[i]}}\par
-\接線の方程式{公式}[i]\par
+\auto{538}{\detokenize{\接線の方程式{公式}[i]}}
+
+\接線の方程式{公式}[i]
+
\auto{539}{\detokenize{\接線の方程式{公式}[b]}}
+
\接線の方程式{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{法線の方程式}
%\begin{description}
-\auto{540}{\detokenize{\法線の方程式{公式}[i]}}\par
-\法線の方程式{公式}[i]\par
+\auto{540}{\detokenize{\法線の方程式{公式}[i]}}
+
+\法線の方程式{公式}[i]
+
\auto{541}{\detokenize{\法線の方程式{公式}[b]}}
+
\法線の方程式{公式}[b]
+
%\end{description
%\end{simplesquarebox}
%\begin{simplesquarebox}{不定積分}
%\begin{description}
-\auto{542}{\detokenize{\不定積分{定義}[i]}}\par
-\不定積分{定義}[i]\par
+\auto{542}{\detokenize{\不定積分{定義}[i]}}
+
+\不定積分{定義}[i]
+
\auto{543}{\detokenize{\不定積分{定義}[b]}}
-\不定積分{定義}[b]\par
-\auto{544}{\detokenize{\不定積分{置換積分}[i]}}\par
-\不定積分{置換積分}[i]\par
+
+\不定積分{定義}[b]
+
+
+\auto{544}{\detokenize{\不定積分{置換積分}[i]}}
+
+\不定積分{置換積分}[i]
+
\auto{545}{\detokenize{\不定積分{置換積分}[b]}}
-\不定積分{置換積分}[b]\par
-\auto{546}{\detokenize{\不定積分{部分積分}[i]}}\par
-\不定積分{部分積分}[i]\par
+
+\不定積分{置換積分}[b]
+
+
+\auto{546}{\detokenize{\不定積分{部分積分}[i]}}
+
+\不定積分{部分積分}[i]
+
\auto{547}{\detokenize{\不定積分{部分積分}[b]}}
+
\不定積分{部分積分}[b]
-\auto{548}{\detokenize{\不定積分{初等関数の積分公式A}[i]}}\par
-\不定積分{初等関数の積分公式A}[i]\par
+
+\auto{548}{\detokenize{\不定積分{初等関数の積分公式A}[i]}}
+
+\不定積分{初等関数の積分公式A}[i]
+
\auto{549}{\detokenize{\不定積分{初等関数の積分公式A}[b]}}
+
\不定積分{初等関数の積分公式A}[b]
-\auto{550}{\detokenize{\不定積分{初等関数の積分公式B}[i]}}\par
-\不定積分{初等関数の積分公式B}[i]\par
+
+\auto{550}{\detokenize{\不定積分{初等関数の積分公式B}[i]}}
+
+\不定積分{初等関数の積分公式B}[i]
+
\auto{551}{\detokenize{\不定積分{初等関数の積分公式B}[b]}}
+
\不定積分{初等関数の積分公式B}[b]
-\auto{552}{\detokenize{\不定積分{初等関数の積分公式C}[i]}}\par
-\不定積分{初等関数の積分公式C}[i]\par
+
+\auto{552}{\detokenize{\不定積分{初等関数の積分公式C}[i]}}
+
+\不定積分{初等関数の積分公式C}[i]
+
\auto{553}{\detokenize{\不定積分{初等関数の積分公式C}[b]}}
+
\不定積分{初等関数の積分公式C}[b]
-\auto{554}{\detokenize{\不定積分{初等関数の積分公式D}[i]}}\par
-\不定積分{初等関数の積分公式D}[i]\par
+
+\auto{554}{\detokenize{\不定積分{初等関数の積分公式D}[i]}}
+
+\不定積分{初等関数の積分公式D}[i]
+
\auto{555}{\detokenize{\不定積分{初等関数の積分公式D}[b]}}
+
\不定積分{初等関数の積分公式D}[b]
-\auto{556}{\detokenize{\不定積分{初等関数の積分公式E}[i]}}\par
-\不定積分{初等関数の積分公式E}[i]\par
+
+\auto{556}{\detokenize{\不定積分{初等関数の積分公式E}[i]}}
+
+\不定積分{初等関数の積分公式E}[i]
+
\auto{557}{\detokenize{\不定積分{初等関数の積分公式E}[b]}}
+
\不定積分{初等関数の積分公式E}[b]
-\auto{558}{\detokenize{\不定積分{初等関数の積分公式F}[i]}}\par
-\不定積分{初等関数の積分公式F}[i]\par
+
+\auto{558}{\detokenize{\不定積分{初等関数の積分公式F}[i]}}
+
+\不定積分{初等関数の積分公式F}[i]
+
\auto{559}{\detokenize{\不定積分{初等関数の積分公式F}[b]}}
+
\不定積分{初等関数の積分公式F}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{定積分}
%\begin{description}
-\auto{560}{\detokenize{\定積分{定義}[i]}}\par
-\定積分{定義}[i]\par
+\auto{560}{\detokenize{\定積分{定義}[i]}}
+
+\定積分{定義}[i]
+
\auto{561}{\detokenize{\定積分{定義}[b]}}
+
\定積分{定義}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{区分求積法}
%\begin{description}
-\auto{562}{\detokenize{\区分求積法{公式}[i]}}\par
-\区分求積法{公式}[i]\par
+\auto{562}{\detokenize{\区分求積法{公式}[i]}}
+
+\区分求積法{公式}[i]
+
\auto{563}{\detokenize{\区分求積法{公式}[b]}}
+
\区分求積法{公式}[b]
+
%\end{description}
%\end{simplesquarebox}
%\begin{simplesquarebox}{体積の積分}
%\begin{description}
-\auto{564}{\detokenize{\体積の積分{公式}[i]}}\par
-\体積の積分{公式}[i]\par
+\auto{564}{\detokenize{\体積の積分{公式}[i]}}
+
+\体積の積分{公式}[i]
+
\auto{565}{\detokenize{\体積の積分{公式}[b]}}
+
\体積の積分{公式}[b]
+
%\end{description}
%\end{simplesquarebox}