Re: [NTG-context] New header

2014-01-23 Thread Fabrice Couvreur
Hi,
I lacked precision in my post, I forgot to say that the header is an idea of
Hans with Metapost.
I would like to have:
p: = textext (\footnotesize \itshape \quad # where \space \endash \space \
time [# d = day, m = month #, # y = year] \quad and

  \ framed [
 width = \hsize,
 height = 5em,
 foregroundstyle = \Large \scshape \bf,
 background = whatever,
 frame = off,
 ]
Thank you.


2014/1/22 Aditya Mahajan adit...@umich.edu

 On Wed, 22 Jan 2014, Fabrice Couvreur wrote:

  Thank you Wolfgang.
 With LuaLaTeX, for my header, I use the commands \footnotesize\itshape
 and \Large\scshape.
 Is there an equivalent with ConTeXt ?


 \setupheader[style={\switchtobodyfont[small]\italic}]
 \setupfooter[style={\switchtobodyfont[big]\smallcaps}]

 You can also try

 style=\itx\setupinterlinespace (or \itxx)

 or

 style=\scb\setupinterlinespace (or \sca \scc etc.)

 See:

 http://wiki.contextgarden.net/Font_Switching
 http://wiki.contextgarden.net/Style_Alternatives


 Aditya

 
 ___
 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
 
 ___



attachment.tex
Description: TeX document
___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Rudolf Bahr
On Wed, Jan 22, 2014 at 11:20:45PM +0100, Wolfgang Schuster wrote:
 
 Hi Rudolf,  
 
 what you try doesn’t work because the narrower environment and the list 
 alternative you use try to change the same internal register for the distance 
 from the left margin. What you have to do is to write your own layout for the 
 section entries in the TOC because this way you don’t reset the margins added 
 by \startnarrower.  
 
 Wolfgang
 

Hello Wolfgang,

ok, I shall look for a workaround. Thank you for your explanation!

Rudolf

___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/22/2014 11:20 PM, Wolfgang Schuster wrote:


Hi Rudolf,

what you try doesn’t work because the narrower environment and the list
alternative you use try to change the same internal register for the
distance from the left margin. What you have to do is to write your own
layout for the section entries in the TOC because this way you don’t
reset the margins added by \startnarrower.

Wolfgang




we can do this:

\startsetups[\??listrenderings:abc]
\endgraf % are we grouped?
\advance\leftskip\listparameter\c!margin % after \endgraf !

but it needs testing

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] mkiv bibtex

2014-01-23 Thread john Culleton
Is the ISBN field supported yet? 

How about the url field?

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at
http://www.booklocker.com/books/4055.html
___
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] Tabulator in database file not passed to Lua

2014-01-23 Thread Joshua Krämer
Dear list,

I use the database module to load the lines of a file with some
data.  The lines are then separated with a lua script.  I use lua,
because I need to do some other things with the data (rounding
numbers, combining some fields etc.)  Please consider the following
minimal working example:

\usemodule[database]
\defineseparatedlist [Data]
[
before=,
after=,
separator={},
commentchar=\letterpercent,
command=\Tabrow,
]

\startluacode
function explode(sep,str)
if (sep==) then return false end
  local pos,arr = 0,{}
  -- for each separator found
  for st,sp in function() return string.find(str,sep,pos,true) end do
-- Attach chars left of current separator 
table.insert(arr,string.sub(str,pos,st-1))
-- Jump past current separator
pos = sp + 1
  end
  -- Attach chars right of last separator
  table.insert(arr,string.sub(str,pos))
return arr
end

function tabrow(fileline)
local tabarray = explode(;,fileline)
local tabline = 
for index,value in ipairs(tabarray) do
tabline = tabline ..  /  .. value
end
return tabline
end
\stopluacode

\define[1]\Tabrow{\ctxlua{context(tabrow(#1))}}

\starttext
\processseparatedfile[Data][Test.dat]
\stoptext

This is the content of the file Test.dat:
Eins;zwei;drei;vier


Of course the line separation could be done easier with the database
module.  However, I thought this way I could use the tabulator as the
separator in my file.  But when I change the separator from ; to
\\t, it doesn't work.  I suppose this is because the tabulators are
passed to Lua as spaces.  Or is \\t the wrong code?  Would it be
possible to use tabulators as separators, if I load the file with lua
and not with the database module?

Kind regards,
Joshua Krämer


___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Wolfgang Schuster
2014/1/23 Hans Hagen pra...@wxs.nl


 we can do this:

 \startsetups[\??listrenderings:abc]
 \endgraf % are we grouped?
 \advance\leftskip\listparameter\c!margin % after \endgraf !

 but it needs testing



I don’t think this is an option because it will change the layout of the
TOC in many existing documents.

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
___

Re: [NTG-context] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl


we can do this:

\startsetups[\??__listrenderings:abc]
 \endgraf % are we grouped?
 \advance\leftskip\__listparameter\c!margin % after \endgraf !

but it needs testing


I don’t think this is an option because it will change the layout of the
TOC in many existing documents.


i wonder how many people have narrower around it ...

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/23/2014 10:24 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl

On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl
mailto:pra...@wxs.nl mailto:pra...@wxs.nl


 we can do this:

 \startsetups[\??listrenderings:abc]

  \endgraf % are we grouped?
  \advance\leftskip\listparameter\c!margin % after
\endgraf !


 but it needs testing


I don’t think this is an option because it will change the
layout of the
TOC in many existing documents.


i wonder how many people have narrower around it ...



The layout will also change when you have chapter, sections etc. with
alternative a–c
because each new entry in the list will increase the left margin.


hm, we can catch that if needed, but indeed it needs thinking / checking

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Wolfgang Schuster
2014/1/23 Hans Hagen pra...@wxs.nl

 On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

 2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl


 we can do this:

 \startsetups[\??__listrenderings:abc]

  \endgraf % are we grouped?
  \advance\leftskip\__listparameter\c!margin % after \endgraf !


 but it needs testing


 I don’t think this is an option because it will change the layout of the
 TOC in many existing documents.


 i wonder how many people have narrower around it ...



The layout will also change when you have chapter, sections etc. with
alternative a–c
because each new entry in the list will increase the left margin.

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
___

[NTG-context] Misplaced \widehat and \widetilde in mkiv?

2014-01-23 Thread Otared Kavian
Hi Hans,

It seems that with the latest beta mkiv, version

ConTeXt  ver: 2014.01.23 01:55 MKIV beta  fmt: 2014.1.23  

\widetilde and \widehat in mathmode are misplaced (and this is so in any of the 
fonts I tried).
Please compare the result of the following in mkii (where everything is 
correct) and in mkiv:
 begin tilde-hat.tex
\starttext

We set ${\widetilde n}(t) := n(1 - t)$, and ${\widehat u}(\xi) := \int_{{\Bbb 
R}}\exp(-{\rm i}x\xi)f(x)dx$.

\stoptext
 end tilde-hat.tex
The attached PDF is obtained with mkiv.
Best regards: OK



bug-widetilde.pdf
Description: Adobe PDF document
___
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] Tabulator in database file not passed to Lua

2014-01-23 Thread Hans Hagen

On 1/23/2014 9:43 PM, Joshua Krämer wrote:

Dear list,

I use the database module to load the lines of a file with some
data.  The lines are then separated with a lua script.  I use lua,
because I need to do some other things with the data (rounding
numbers, combining some fields etc.)  Please consider the following
minimal working example:

\usemodule[database]
\defineseparatedlist [Data]
[
before=,
after=,
separator={},
commentchar=\letterpercent,
command=\Tabrow,
]

\startluacode
function explode(sep,str)
if (sep==) then return false end
   local pos,arr = 0,{}
   -- for each separator found
   for st,sp in function() return string.find(str,sep,pos,true) end do
 -- Attach chars left of current separator
 table.insert(arr,string.sub(str,pos,st-1))
 -- Jump past current separator
 pos = sp + 1
   end
   -- Attach chars right of last separator
   table.insert(arr,string.sub(str,pos))
return arr
end

function tabrow(fileline)
local tabarray = explode(;,fileline)
local tabline = 
for index,value in ipairs(tabarray) do
tabline = tabline ..  /  .. value
end
return tabline
end
\stopluacode

\define[1]\Tabrow{\ctxlua{context(tabrow(#1))}}

\starttext
\processseparatedfile[Data][Test.dat]
\stoptext

This is the content of the file Test.dat:
Eins;zwei;drei;vier


Of course the line separation could be done easier with the database
module.  However, I thought this way I could use the tabulator as the
separator in my file.  But when I change the separator from ; to
\\t, it doesn't work.  I suppose this is because the tabulators are
passed to Lua as spaces.  Or is \\t the wrong code?  Would it be
possible to use tabulators as separators, if I load the file with lua
and not with the database module?


\starttext

\startluacode

local f = io.open(test.dat)

for line in f:lines() do
local t = string.split(line,;) -- or \t for tabs
context(% /t,t) -- context(table.concat(t, / )
context.par()
end

\stopluacode

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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] MPpositiongraphic: I don't know when it's going to work and when it's not.

2014-01-23 Thread Elspeth McGullicuddy
Hi Hans,

The tip you gave me (wandering spaces), worked for the previous
example, the one where the overlay was attached to the background of
the paper.
For the other example, where the overlay is attached to the background
of a \framed, I haven't been able to make it work. The extra spaces
there, were in fact added during the mail process but weren't in my
file.

I put the file that doesn't work in attached files, so there are no
risk it collects extra spaces.
There is probably an obvious and silly mistake but I can't find it:
for me it's quite similar to the examples in metafun-p.pdf, p. 127:
\framed[background=demo circle]{This text is overlayed.}, but mine
refuses to work.

Chris


On Mon, Jan 20, 2014 at 6:57 PM, Hans Hagen pra...@wxs.nl wrote:
 On 1/19/2014 8:00 AM, Elspeth McGullicuddy wrote:

 \framed [ background=my first overlay,my fourth

The line break here wasn't in my file.

 overlay,align=middle,width=7cm] {
have attached it: \hpos{three}{{\em here}}, the}


 here

 background=my first overlay

 and

 my fourth overlay

 a key without value

 so: be careful with spaces and commas

 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | www.pragma-pod.nl
 -
 ___
 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
 ___


test-012_02.tex
Description: TeX document
___
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
___