diff options
author | Marius <mariausol@gmail.com> | 2014-01-15 19:20:24 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2014-01-15 19:20:24 +0200 |
commit | 2736c98b75ce6a4741cbf252b8e706e139f536f9 (patch) | |
tree | 9d59e7decb3243b6480fae0c0a4735bb86c3a0a1 | |
parent | 62d02ff33b894d9b16e1a1a9b95d860f593240b3 (diff) | |
download | context-2736c98b75ce6a4741cbf252b8e706e139f536f9.tar.gz |
beta 2014.01.15 18:03
-rw-r--r-- | doc/context/manuals/allkind/mkiv-publications.tex | 8 | ||||
-rw-r--r-- | tex/context/base/back-exp.lua | 60 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4084 -> 4086 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/lpdf-tag.lua | 45 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24763 -> 24769 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 229018 -> 229144 bytes | |||
-rw-r--r-- | tex/context/base/x-set-11.mkiv | 12 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
10 files changed, 73 insertions, 58 deletions
diff --git a/doc/context/manuals/allkind/mkiv-publications.tex b/doc/context/manuals/allkind/mkiv-publications.tex index a92b2b287..49e13d79e 100644 --- a/doc/context/manuals/allkind/mkiv-publications.tex +++ b/doc/context/manuals/allkind/mkiv-publications.tex @@ -17,6 +17,14 @@ \loadsetups[publications-en.xml] \enablemode[interface:setup:defaults] +\setupbackend + [export=yes, + xhtml=yes, + css=export-example.css] + +\setupexport + [hyphen=yes] + % \input publ-tmp.mkiv \setupbodyfont diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua index cd499abe7..f51025cf8 100644 --- a/tex/context/base/back-exp.lua +++ b/tex/context/base/back-exp.lua @@ -454,13 +454,18 @@ local function checkdocument(root) if data then for i=1,#data do local di = data[i] - if di.content then - -- ok - elseif di.tg == "ignore" then + local tg = di.tg + if tg == "noexport" then +data[i] = false +-- di.element = "" +-- di.data = nil -- { } + elseif di.content then + -- okay + elseif tg == "ignore" then di.element = "" checkdocument(di) else - -- can't happen +checkdocument(di) end end end @@ -1197,23 +1202,28 @@ function structurestags.settabulatecell(align) end end +local function hascontent(data) + for i=1,#data do + local di = data[i] + if not di then + -- + elseif di.content then + return true + else + local d = di.data + if d and #d > 0 and hascontent(d) then + return true + end + end + end +end + function extras.tabulate(result,element,detail,n,fulltag,di) local data = di.data for i=1,#data do local di = data[i] - if di.tg == "tabulaterow" then - local did = di.data - local content = false - for i=1,#did do - local d = did[i].data - if d and #d > 0 and d[1].content then - content = true - break - end - end - if not content then - di.element = "" -- or simply remove - end + if di.tg == "tabulaterow" and not hascontent(di.data) then + di.element = "" -- or simply remove end end end @@ -1766,9 +1776,9 @@ local function pushentry(current) end end -local function pushcontent(currentparagraph,newparagraph) +local function pushcontent(oldparagraph,newparagraph) if nofcurrentcontent > 0 then - if currentparagraph then + if oldparagraph then if currentcontent[nofcurrentcontent] == "\n" then if trace_export then report_export("%w<!-- removing newline -->",currentdepth) @@ -1778,9 +1788,9 @@ local function pushcontent(currentparagraph,newparagraph) end local content = concat(currentcontent,"",1,nofcurrentcontent) if content == "" then - -- omit; when currentparagraph we could push, remove spaces, pop - elseif somespace[content] and currentparagraph then - -- omit; when currentparagraph we could push, remove spaces, pop + -- omit; when oldparagraph we could push, remove spaces, pop + elseif somespace[content] and oldparagraph then + -- omit; when oldparagraph we could push, remove spaces, pop else local olddepth, newdepth local list = taglist[currentattribute] @@ -1789,7 +1799,7 @@ local function pushcontent(currentparagraph,newparagraph) end local td = tree.data local nd = #td - td[nd+1] = { parnumber = currentparagraph, content = content } + td[nd+1] = { parnumber = oldparagraph or currentparagraph, content = content } if trace_export then report_export("%w<!-- start content with length %s -->",currentdepth,#content) report_export("%w%s",currentdepth,(gsub(content,"\n","\\n"))) @@ -1803,10 +1813,10 @@ local function pushcontent(currentparagraph,newparagraph) end nofcurrentcontent = 0 end - if currentparagraph then + if oldparagraph then pushentry(makebreaklist(currentnesting)) if trace_export then - report_export("%w<!-- break added betweep paragraph %a and %a -->",currentdepth,currentparagraph,newparagraph) + report_export("%w<!-- break added betweep paragraph %a and %a -->",currentdepth,oldparagraph,newparagraph) end end end diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 32469fea4..19261b64c 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2014.01.14 22:36} +\newcontextversion{2014.01.15 18:03} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 2a760c903..7541feadb 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index d0f23aa38..3dd862759 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2014.01.14 22:36} +\edef\contextversion{2014.01.15 18:03} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/lpdf-tag.lua b/tex/context/base/lpdf-tag.lua index 37a640225..2a36f5e9a 100644 --- a/tex/context/base/lpdf-tag.lua +++ b/tex/context/base/lpdf-tag.lua @@ -213,39 +213,28 @@ local function makecontent(parent,start,stop,slist,id) -- local bliteral = pdfliteral(format("/%s <</MCID %s>>BDC",tag,last)) local eliteral = pdfliteral("EMC") --- if false --- local prev = getprev(start) --- if prev then --- setfield(prev,"next",bliteral) --- setfield(bliteral,"prev",prev) --- end --- setfield(start,"prev",bliteral) --- setfield(bliteral,"next",start) --- -- --- local next = getnext(stop) --- if next then --- setfield(next,"prev",eliteral) --- setfield(eliteral,"next",next) --- end --- setfield(stop,"next",eliteral) --- setfield(eliteral,"prev",stop) --- -- --- if slist and getlist(slist) == start then --- setfield(slist,"list",bliteral) --- elseif not prev then --- report_tags("this can't happen: injection in front of nothing") --- end --- else + -- + local prev = getprev(start) + if prev then + setfield(prev,"next",bliteral) + setfield(bliteral,"prev",prev) + end + setfield(start,"prev",bliteral) + setfield(bliteral,"next",start) + -- + local next = getnext(stop) + if next then + setfield(next,"prev",eliteral) + setfield(eliteral,"next",next) + end + setfield(stop,"next",eliteral) + setfield(eliteral,"prev",stop) + -- if slist and getlist(slist) == start then setfield(slist,"list",bliteral) elseif not getprev(start) then report_tags("this can't happen: injection in front of nothing") end - -- - insert_before(start,start,bliteral) - insert_after(stop,stop,eliteral) --- end - -- index = index + 1 list[index] = parent.pref return bliteral, eliteral diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 201784050..619c76e8a 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 9ddb19bc0..04eb97fb9 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/x-set-11.mkiv b/tex/context/base/x-set-11.mkiv index 3f8d97b51..8380c9f80 100644 --- a/tex/context/base/x-set-11.mkiv +++ b/tex/context/base/x-set-11.mkiv @@ -448,8 +448,17 @@ % \def\showsetupindeed#1% % {\xmlfilterlist{\loadedsetups}{interface/command[@name='#1']/command(xml:setups:typeset)}} +% \def\showsetupindeed#1% +% {\xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}} + +\setelementnature[setup][display] + \def\showsetupindeed#1% - {\xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}} + {\startelement[setup][name=#1]% + \startelement[noexport]% + \xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}% + \stopelement + \stopelement} \unexpanded\def\placesetup {\placelistofsorts[texcommand][\c!criterium=\v!used]} \unexpanded\def\placeallsetups{\placelistofsorts[texcommand][\c!criterium=\v!all ]} @@ -823,7 +832,6 @@ \stoptabulate \stopxmlsetups - \starttexdefinition showrootvalues [#1] \edef\currentsetupparametercategory{#1} \edef\currentsetupparametercommand{setup#1} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index d95982053..6af830035 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 01/14/14 22:36:13 +-- merge date : 01/15/14 18:03:19 do -- begin closure to overcome local limits and interference |