From: Johannes Graumann <johannes_graumann@web.de>
To: ntg-context@ntg.nl
Subject: Re: Minimals - problems with format: metafun.mp
Date: Mon, 03 Nov 2008 20:51:27 +0100 [thread overview]
Message-ID: <genknp$flc$1@ger.gmane.org> (raw)
In-Reply-To: <fe8d59da0811021158m293f38e2qd80dc3d0ec6f2dfa@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 916 bytes --]
No changes in error message. I attach the code that doesn't work like so:
context --ctx=t-openoffice Attempt.odt
luigi scarso wrote:
> On Sun, Nov 2, 2008 at 7:53 PM, Johannes Graumann
> <johannes_graumann@web.de>wrote:
>
>> Hello,
>>
>> In a bit to finally get Wolfgang's present to me (see XML thread
>> somewhere) finally compiled, I update my minimals via the
>> first-install.sh script and
>> run "luatools --generat && context --make" afterwards. Now I get the
>> error below. Where might I err?
>>
> Can you try these steps ?
> 1) cd /opt/ConTeXtMinimals
> 2) ./first-install.sh
> 3) cd tex
> 4) . setuptex
> 5) context --generate
> 6) context --make
>
> Here minimals is ok
> minimals
> 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
[-- Attachment #2: Attempt.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9324 bytes --]
[-- Attachment #3: t-openoffice.ctx --]
[-- Type: application/xml, Size: 386 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: t-openoffice.tex --]
[-- Type: text/x-tex; name="t-openoffice.tex", Size: 2651 bytes --]
%context --ctx=t-openoffice BoldAndItalicContent.xml
\startenvironment t-openoffice.tex
\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:style[@style: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
[-- Attachment #5: Type: text/plain, Size: 487 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-11-03 19:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 18:53 Johannes Graumann
2008-11-02 19:58 ` luigi scarso
2008-11-03 19:51 ` Johannes Graumann [this message]
2008-11-03 20:34 ` luigi scarso
2008-11-03 20:57 ` luigi scarso
2008-11-04 12:28 ` Hans Hagen
2008-11-04 20:30 ` luigi scarso
2008-11-05 11:24 ` Taco Hoekwater
2008-11-05 14:26 ` luigi scarso
2008-11-02 20:33 ` Peter Rolf
2008-11-03 9:30 ` Hans Hagen
2008-11-03 10:29 ` Peter Rolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='genknp$flc$1@ger.gmane.org' \
--to=johannes_graumann@web.de \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).