[NTG-context] TextBackground bottomoffset / topoffset

2011-12-25 Thread Kip Warner
Hey list,

I am using the following to typeset a text box containing text.

\definetextbackground[GeneralDocument][
location=paragraph,
color=color_text,
background=color,
backgroundcolor=colour_page,
framecolor=colour_text,
topoffset=1.0cm,
bottomoffset=1.0cm,
leftoffset=1.0cm,
rightoffset=1.0cm,
before={
\blank[2*big]
},
after={
\blank[2*big]
},
style=small,
corner=round,
frame=on]

This seems to work, but I find a problem is that if the text box spans
multiple pages, bottomoffset / topoffset are ignored at the points where
the page breaks. Suggestions?

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] spaceskip in \framed bug

2011-12-25 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

The following used to work in mkiv, but no longer (works in mkii):

===
% stretchline.tex
\startsetups stretchline
  \spaceskip=0pt plus 2 fill \relax
\stopsetups
\setupframed[frame=on,width=\textwidth,setups=stretchline,
 offset=none,location=depth,align=l2r]
\showframe
\starttext
\framed{This is a test.}
\stoptext
===

This is LuaTeX, Version beta-0.71.0-2011071409 (rev 4332)
 \write18 enabled.
(stretchline.tex

ConTeXt  ver: 2011.11.25 21:29 MKIV  fmt: 2011.11.25

===

Is it a bug? Any workarounds?

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] context MathML2PDF

2011-12-25 Thread Mojca Miklavec
I'm forwarding this to the ConTeXt mailing list. (I'm not the author
of ConTeXt.)

But please include a complete minimal example (that is: you should
usually include the whole ConTeXt code and/or how you compile the
example, not just the MathML).

Mojca

On Sun, Dec 25, 2011 at 10:56, Mohamed Gad wrote:
>
> Dear sir,
>
> I really appreciate that you did the tool of converting MathML to PDF, but
> when I tried to convert MathML to pdf found problem in the following:
>
> 
>     
>         
>             
>                 1
>             
>             
>                 2
>             
>         
>         
>             
>                 3
>             
>             
>                 4
>             
>         
>     
> 
>
> the column line and row line is vanished in pdf. I think you didn't insert
> this case.
>
> Thanks
>
>
> --
> Muhammad Gad
> Production Developer
> Hindawi Publishing Corporation
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] CLD: setupheadertexts

2011-12-25 Thread Wolfgang Schuster

Am 24.12.2011 um 18:09 schrieb Willi Egger:

> Hi Wolfgang,
> 
> thank you.
> 
> The reason why I ask this question is, because \setupheadertexts has 4 
> arguments and I was curious about how this would be solved in 
> context/setupheadertexts.
> I will look into your solution. I am not sure whether it will fit into the 
> cld-project.


Can’t you do stuff like this in a style file where you can use TeX macros. A 
alternative to the \doifoddpageelse macro is to test whether the page counter 
is or even with the math.odd function.

\startluacode

userdata = userdata or { }

function userdata.myheadertext(rightpage,leftpage)
local rightpage = rightpage
local leftpage  = leftpage
if not leftpage or leftpage == "" then
leftpage = rightpage
end
context.setupheadertexts{
function()
if math.odd(tex.count["realpageno"]) then
context(rightpage)
else
context(leftpage)
end
return true
end
}
end   

\stopluacode

\starttext

\ctxlua{userdata.myheadertext("Right page")}

\dorecurse{4}{\dontleavehmode\page}

\ctxlua{userdata.myheadertext("Right page","Left page")}

\dorecurse{4}{\dontleavehmode\page}

\stoptext

Wolfgang

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___