[NTG-context] \setupnotation[footnote][numberconversion=numerals] in latest beta

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Mar 19 22:12:27 CET 2014


Am 19.03.2014 um 22:04 schrieb Pablo Rodriguez <oinos at gmx.es>:

> Dear list,
> 
> I have the following sample that I cannot compile with latest beta:
> 
> \setupnotation[footnote][numberconversion=numerals]
> 
> \starttext
> Text\footnote{Text.}.
> \stoptext
> 
> numberconversion=numerals seems to be the problematic part.
> 
> Has this option been changed or is it a bug?

There is a typo in strc-doc.lua (missing c in front of tx_convertnumber):

local function process(index,numbers,ownnumbers,criterium,separatorset,conversion,conversionset,index,entry,result,preceding,done)
    -- todo: too much (100 steps)
    local number = numbers and (numbers[index] or 0)
    local ownnumber = ownnumbers and ownnumbers[index] or ""
    if number > criterium or (ownnumber ~= "") then
        local block = (entry.block ~= "" and entry.block) or sections.currentblock() -- added
        if preceding then
            local separator = sets.get("structure:separators",block,separatorset,preceding,".")
            if separator then
                if result then
                    result[#result+1] = strippedprocessor(separator)
                else
                    applyprocessor(separator)
                end
            end
            preceding = false
        end
        if result then
            if ownnumber ~= "" then
                result[#result+1] = ownnumber
            elseif conversion and conversion ~= "" then -- traditional (e.g. used in itemgroups) .. inherited!
                result[#result+1] = converters.convert(conversion,number)
            else
                local theconversion = sets.get("structure:conversions",block,conversionset,index,"numbers")
                result[#result+1] = converters.convert(theconversion,number)
            end
        else
            if ownnumber ~= "" then
                applyprocessor(ownnumber)
            elseif conversion and conversion ~= "" then -- traditional (e.g. used in itemgroups)
-               tx_convertnumber(conversion,number)
+               ctx_convertnumber(conversion,number)
            else
                local theconversion = sets.get("structure:conversions",block,conversionset,index,"numbers")
                local data = startapplyprocessor(theconversion)
                ctx_convertnumber(data or "numbers",number)
                stopapplyprocessor()
            end
        end
        return index, true
    else
        return preceding or false, done
    end
end

Wolfgang


More information about the ntg-context mailing list