Hi,

Meanwhile we found there is a timing issue inside \everyjob.
Hans is thinking really hard about a solution.

Just for verification purposes, you could try the attached,
patched t-openoffice.tex. That one should work, but it is
not a solution, just to verify the bug.

Best wishes,
Taco

luigi scarso wrote:


On Tue, Nov 4, 2008 at 1:28 PM, Hans Hagen <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Johannes Graumann wrote:
     > No changes in error message. I attach the code that doesn't work
    like so:
     >
     > context --ctx=t-openoffice Attempt.odt

    runs ok here


hmm
not here


minimals-beta
Linux luigicasa-laptop 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux
This is LuaTeX, Version snapshot-0.30.2-2008102016, build unknown
ConTeXt MtxRun | current version: 2008.11.03 09:22

minimalsBIRTHDAY
Linux luigicasa-laptop 2.6.24-21-generic #1 SMP Tue Oct 21 23:43:45 UTC 2008 i686 GNU/Linux
This is LuaTeX, Version snapshot-0.30.2-2008102016, build unknown
ConTeXt MtxRun | current version: 2008.10.31 13:58

--
luigi


------------------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________
%context --ctx=t-openoffice BoldAndItalicContent.xml

\startenvironment t-openoffice.tex

\checknotes 
\initializeMPgraphics 
\MPLIBregister 
\the \everysetupxml
\ctxlua {input.stoptiming(ctx)}
\checkpreprocessor


  \startluacode
    document.commands = document.commands or { }
    function document.commands.somehexcolor(str)
      local r, g, b = str:match("#(..)(..)(..)")
      r, g, b = tonumber(r,16) or 0, tonumber(g,16) or 0, tonumber(b,16) or 0
      tex.sprint(string.format("\\colored[r=%s,g=%s,b=%s]",r/255,g/255,b/255))
    end
  \stopluacode

  \startxmlsetups office
    \xmlsetsetup{main}{text:p|text:span}{*}
  \stopxmlsetups
  \xmlregistersetup{office}

  \startxmlsetups text:p
    \xmlflush{#1}\endgraf
  \stopxmlsetups

  \startxmlsetups text:span
    \bgroup
      \let\leftofspan \relax
      \let\rightofspan\relax
      \xmlfilter{main}{office:automatic-styles/style:[EMAIL PROTECTED]:name='\xmlatt{#1}{style-name}']/style:text-properties/command(do:style:text-properties)}
      \leftofspan
      \xmlflush{#1}
      \rightofspan
    \egroup
  \stopxmlsetups

  \startxmlsetups do:style:text-properties
    \xmlval{fo:font-weight}            {\xmlatt{#1}{font-weight}}{}% todo: namespaces in attributes
    \xmlval{fo:font-style}             {\xmlatt{#1}{font-style}}{}
    %\xmlval{fo:color}                  {\xmlatt{#1}{color}}{}
    \getvalue{fo:color}{\xmlatt{#1}{color}}
    \xmlval{style:text-position}       {\xmlatt{#1}{text-position}}{}
    \xmlval{style:text-underline-style}{\xmlatt{#1}{text-underline-style}}{}
  \stopxmlsetups

  \xmlmapvalue{fo:font-weight}{bold}{\bf}
  \xmlmapvalue{fo:font-style}{italic}{\em}

  \xmlmapvalue{fo:color}{#ff0000}{\colored[h=ff0000]}
  \setvalue{fo:color}#1{\expandafter\colored\expandafter[h=#1]}
  %\setvalue{fo:color}#1{\edef\temp{\noexpand\ctxlua{document.commands.somehexcolor("\letterhash\uppercase{#1}")}}\temp}

  \catcode`\%=11
  \xmlmapvalue{style:text-position}{sub 58%}  {\def\leftofspan##1\rightofspan{\low {##1}}}
  \xmlmapvalue{style:text-position}{super 58%}{\def\leftofspan##1\rightofspan{\high{##1}}}
  \catcode`\%=14

  \definetextbackground
    [underline]
    [location=text,
     alternative=1,
     background=,
     framecolor=black,
     frame=off]

  %\xmlmapvalue{style:text-underline-style}{solid}{\def\leftofspan##1\rightofspan{\startunderline##1\stopunderline}}
  \xmlmapvalue{style:text-underline-style}{solid}{\let\leftofspan\startunderline\let\rightofspan\stopunderline}

  \setupcolors[state=start]
  
  \starttext
    %\xmlprocess{main}{zip:///\inputfilename.odt?name=content.xml}{}
    \usezipfile[\inputfilename.odt]
    \xmlprocess{main}{*/content.xml}{}
  \stoptext
  
\stopenvironment



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to