diff options
Diffstat (limited to 'tex/context/base')
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4115 -> 4110 bytes | |||
-rw-r--r-- | tex/context/base/s-inf-03.pdf | bin | 1981 -> 0 bytes | |||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24748 -> 24764 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.log | 79 | ||||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 0 -> 221990 bytes | |||
-rw-r--r-- | tex/context/base/typo-fln.lua | 49 | ||||
-rw-r--r-- | tex/context/base/typo-fln.mkiv | 14 |
7 files changed, 51 insertions, 91 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 78c5807a6..1e62693f1 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/s-inf-03.pdf b/tex/context/base/s-inf-03.pdf Binary files differdeleted file mode 100644 index 30df291ed..000000000 --- a/tex/context/base/s-inf-03.pdf +++ /dev/null diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 3a770384d..4d97aa52c 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.log b/tex/context/base/status-lua.log deleted file mode 100644 index 0b1d2cfb7..000000000 --- a/tex/context/base/status-lua.log +++ /dev/null @@ -1,79 +0,0 @@ -(cont-yes.mkiv - -ConTeXt ver: 2013.09.21 10:50 MKIV beta fmt: 2013.9.21 int: english/english - -system > 'cont-new.mkiv' loaded -(cont-new.mkiv) -system > 'cont-loc.mkiv' loaded -(c:/data/develop/context/sources/cont-loc.mkiv -!!!! > testing prevdepth across page -) -system > 'cont-exp.mkiv' loaded -interface > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0 -interface > macros > processed mkvi file 'c:/data/develop/context/sources/cont-exp.mkiv', delta 0 -(c:/data/develop/context/sources/cont-exp.mkiv) -system > files > jobname 's-inf-03', input './s-inf-03.mkiv', result 'status-lua.pdf' -fonts > latin modern fonts are not preloaded -languages > language 'en' is active -(c:/data/develop/context/texmf/tex/context/base/s-inf-03.mkiv (c:/data/develop/context/sources/type-loc.mkiv) (type-imp-dejavu.mkiv) (type-imp-xits.mkiv (type-imp-texgyre.mkiv)){c:/data/develop/tex-context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} (virtual://buffer.noname.1 -references > unknown reference '[][]' -references > unknown reference '[][attributes]' -references > unknown reference '[][backends]' -references > unknown reference '[][bibtex]' -references > unknown reference '[][bit32]' -references > unknown reference '[][blobs]' -references > unknown reference '[][boolean]' -references > unknown reference '[][buffers]' -references > unknown reference '[][builders]' -references > unknown reference '[][caches]' -references > unknown reference '[][callback]' -references > unknown reference '[][callbacks]' -references > unknown reference '[][catcodes]' -references > unknown reference '[][characters]' -references > unknown reference '[][chemistry]' -references > unknown reference '[][commands]' -references > unknown reference '[][containers]' -references > unknown reference '[][context]' -references > unknown reference '[][converters]' -references > unknown reference '[][coroutine]' -references > unknown reference '[][ctxrunner]' -references > unknown reference '[][debug]' -references > unknown reference '[][dir]' -references > unknown reference '[][directives]' -references > unknown reference '[][document]' -references > unknown reference '[][documentdata]' -references > unknown reference '[][environment]' -references > unknown reference '[][epdf]' -references > unknown reference '[][experiments]' -references > unknown reference '[][figures]' -references > unknown reference '[][file]' -references > unknown reference '[][floats]' -references > unknown reference '[][font]' -references > unknown reference '[][fontloader]' -references > unknown reference '[][fonts]' -references > unknown reference '[][functions]' -references > unknown reference '[][graphics]' -references > unknown reference '[][gzip]' -references > unknown reference '[][img]' -references > unknown reference '[][interactions]' -references > unknown reference '[][interfaces]' -references > unknown reference '[][io]' -references > unknown reference '[][job]' -references > unknown reference '[][lang]' -references > unknown reference '[][languages]' -references > unknown reference '[][layouts]' -references > unknown reference '[][lfs]' -references > unknown reference '[][libraries]' -references > unknown reference '[][lmx]' -references > unknown reference '[][logs]' -references > unknown reference '[][lpdf]' -references > unknown reference '[][lpeg]' -references > unknown reference '[][ltn12]' -references > unknown reference '[][lua]' -references > unknown reference '[][luatex]' -references > unknown reference '[][lxml]' -references > unknown reference '[][math]' -references > unknown reference '[][mathematics]' -references > unknown reference '[][mbox]' -references > unknown reference '[][md5]' -references > unknown reference '[][metapost
\ No newline at end of file diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differnew file mode 100644 index 000000000..7906584df --- /dev/null +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/typo-fln.lua b/tex/context/base/typo-fln.lua index db3331b0a..4c97af450 100644 --- a/tex/context/base/typo-fln.lua +++ b/tex/context/base/typo-fln.lua @@ -23,11 +23,11 @@ local firstlines = typesetters.firstlines local nodes = nodes local tasks = nodes.tasks +local getbox = nodes.getbox local nodecodes = nodes.nodecodes -local glyph = nodecodes.glyph -local rule = nodecodes.rule -local disc = nodecodes.disc -local kern = nodecodes.kern +local glyph_code = nodecodes.glyph +local disc_code = nodecodes.disc +local kern_code = nodecodes.kern local traverse_id = nodes.traverse_id local free_node_list = nodes.flush_list @@ -36,6 +36,7 @@ local copy_node_list = nodes.copy_list local insert_node_after = nodes.insert_after local insert_node_before = nodes.insert_before local hpack_node_list = nodes.hpack +local remove_node = nodes.remove local nodepool = nodes.pool local newpenalty = nodepool.penalty @@ -89,7 +90,7 @@ actions[v_line] = function(head,setting) local n = 0 local temp = copy_node_list(head) local linebreaks = { } - for g in traverse_id(glyph,temp) do + for g in traverse_id(glyph_code,temp) do if dynamic > 0 then g[0] = dynamic end @@ -108,11 +109,11 @@ actions[v_line] = function(head,setting) end while start do local id = start.id - if id == glyph then + if id == glyph_code then n = n + 1 - elseif id == disc then + elseif id == disc_code then -- this could be an option - elseif id == kern then -- todo: fontkern + elseif id == kern_code then -- todo: fontkern -- this could be an option elseif n > 0 then local pack = hpack_node_list(copy_node_list(list,start)) @@ -139,7 +140,7 @@ actions[v_line] = function(head,setting) local linebreak = linebreaks[i] while start and n < nofchars do local id = start.id - if id == glyph then -- or id == disc then + if id == glyph_code then -- or id == disc_code then if dynamic > 0 then start[0] = dynamic end @@ -183,7 +184,7 @@ actions[v_word] = function(head,setting) while start do local id = start.id -- todo: delete disc nodes - if id == glyph then + if id == glyph_code then if not ok then words = words + 1 ok = true @@ -199,9 +200,9 @@ actions[v_word] = function(head,setting) start[0] = dynamic end start.font = font - elseif id == disc then + elseif id == disc_code then -- continue - elseif id == kern then -- todo: fontkern + elseif id == kern_code then -- todo: fontkern -- continue else ok = false @@ -244,3 +245,27 @@ function firstlines.handler(head) end return head, false end + +-- goodie + +function commands.applytofirstcharacter(box,what) + local tbox = getbox(box) -- assumes hlist + local list = tbox.list + local done = nil + for n in traverse_id(glyph_code,list) do + list = remove_node(list,n) + done = n + break + end + if done then + tbox.list = list + local kind = type(what) + if kind == "string" then + context[what](done) + elseif kind == "function" then + what(done) + else + -- error + end + end +end diff --git a/tex/context/base/typo-fln.mkiv b/tex/context/base/typo-fln.mkiv index c2c661afa..d8651b459 100644 --- a/tex/context/base/typo-fln.mkiv +++ b/tex/context/base/typo-fln.mkiv @@ -95,4 +95,18 @@ \let\typo_firstline_handle\relax +% goodie, question on list +% +% \defineframed[ChapterFramed][location=low,background=color,backgroundcolor=red,frame=off] +% +% \setuphead[chapter][deeptextcommand=\applytofirstcharacter\ChapterFramed] + +\unexpanded\def\applytofirstcharacter#1% + {\begingroup + \dowithnextbox + {\ctxcommand{applytofirstcharacter(\number\nextbox,"\strippedcsname#1")}% + \unhbox\nextbox + \endgroup}% + \hbox} + \protect \endinput |