Re: [NTG-context] Chapter name in new line

2011-06-04 Thread Wolfgang Schuster

Am 04.06.2011 um 16:24 schrieb Marco:

 How can I get the chapter name in a new line, like:
 
 Chapter 1
 Foo Bar
 
 The following yields to “Chapter1Foo Bar”.
 
 \setuplabeltext [en] [chapter=Chapter~]
 \def\MyChapter#1#2{#1\blank#2}

\define[2]\MyChapter
  {\framed[frame=off,width=broad,align=flushleft]{#1\\#2}}

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] Chapter name in new line

2011-06-04 Thread luigi scarso
On Sat, Jun 4, 2011 at 4:24 PM, Marco net...@lavabit.com wrote:
 How can I get the chapter name in a new line, like:

 Chapter 1
 Foo Bar

 The following yields to “Chapter1Foo Bar”.

 \setuplabeltext [en] [chapter=Chapter~]
 \def\MyChapter#1#2{#1\blank#2}
 \setuphead [chapter] [command=\MyChapter]

 \starttext
 \chapter{Foo Bar}
 \stoptext

 Marco
If you don't want to use framedtext (cfr wolfgang)
\setuplabeltext [en] [chapter=Chapter~]
\def\MyChapter#1#2{\vbox{#1\blank#2}}
\setuphead [chapter] [command=\MyChapter]

\starttext
\chapter{Foo Bar}
\stoptext




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



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

Re: [NTG-context] Chapter name in new line

2011-06-04 Thread Marco
 If you don't want to use framedtext (cfr wolfgang)
 \setuplabeltext [en] [chapter=Chapter~]
 \def\MyChapter#1#2{\vbox{#1\blank#2}}
 \setuphead [chapter] [command=\MyChapter]
 
 \starttext
 \chapter{Foo Bar}
 \stoptext

Thanks to both of you. Added to the wiki.

Marco


___
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] [t-rst] inclusion into Minimals, i. e. installation using `./first-setup.sh --extras='t-rst'`

2011-05-08 Thread Marco
On 2011-05-07 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote:

 On Fri, May 6, 2011 at 21:08, Marco wrote:

  On 2011-05-06 Mojca Miklavec wrote:
 
   Looks like context needs a package manager.
 
  [...]  but I  admit that  I miss  some GUI  (but then
  again I have no idea how to write a portable GUI).
 
  There   are  several   possibilities,  GTK+   is  well
  documented,  ported to  many  platforms and  operating
  systems (However, maybe not  to all, ConTeXt supports)
  and has Lua bindings.

 If you can prepare a very simple example and explain how
 to compile it on windows, mac and windows ...

A simple example  of a GUI is attached and  may serve as a
starting  point (questions  to  the  example maybe  better
off-list, since it's not at all ConTeXt related).

I don't  know which  packages are  required on  windows or
macos. On  linux and solaris  it is sufficient  to install
GTK and the lua-gtk bindings.


Marco
#! /usr/bin/env lua

Mainwin = {}
Mainwin.__index = Mainwin

List = {
'Just',
'some',
'random',
'stuff',
'for',
'demonstration',
}

local function UpdateProgressBar(bar)
local oldFrac = gtk.progress_bar_get_fraction(bar)
local frac= 1/#List

if (oldFrac + frac = 1)
then
frac = 0
oldFrac = 1
gtk.main_quit()
end

gtk.progress_bar_set_fraction(bar, oldFrac + frac)
end

function Progressbar()
local progress = gtk.progress_bar_new()
gtk.progress_bar_set_text(progress, Processing…)
gtk.progress_bar_set_fraction(progress, 0)
return progress
end

function Mainwin.new()
local self = {}
setmetatable(self, Mainwin)

-- Set main window size, title, …
self.w = gtk.window_new(gtk.WINDOW_TOPLEVEL)
self.w:set_title(My Program)
self.w:connect('destroy', gtk.main_quit)
self.w:set_default_size(400, 400)

-- Vertical box
local vbox = gtk.vbox_new(false, 10)
vbox:set_border_width(5)
self.w:add(vbox)

-- Tool bar
local toolbar = gtk.toolbar_new()
vbox:pack_start(toolbar, false, true, 0)

-- Tool bar: items
local items = {
{ gtk-go-forward,  StartProcessing },
{ SEPARATOR, nil },
{ gtk-quit, gtk.main_quit } }

-- Tool bar: add items to tool bar
for _, item in pairs(items) do
local stock   = item[1]
local handler = item[2]
local button, id

if stock == 'SEPARATOR' then
button = gtk.separator_tool_item_new()
else
button = gtk.tool_button_new_from_stock(stock)
id = button:connect(clicked, handler, self)
end
toolbar:insert(button, -1)
end

-- Progress bar
progressbar = Progressbar()
vbox:pack_start(progressbar, false, true, 0)

-- Scroll window
local scrollwindow = gtk.scrolled_window_new(nil, nil)
vbox:pack_start(scrollwindow, true, true, 0)

-- Tree view
local treeview = gtk.tree_view_new()
scrollwindow:add(treeview)

-- create store
local store = gtk.tree_store_new(3,
glib.TYPE_INT,  -- [0] some ID
glib.TYPE_STRING,   -- [1] path / file name
glib.TYPE_STRING)   -- [2] Status
treeview:set_model(store)

-- column with text
local r, c
r = gtk.cell_renderer_text_new()

c = gtk.tree_view_column_new_with_attributes(File, r, text, 1, nil)
treeview:append_column(c)

c = gtk.tree_view_column_new_with_attributes(Status, r, text, 2, nil)
treeview:append_column(c)

-- add some items
local iter1 = gtk.new TreeIter

for i = 1, #List
do
store:append(iter1, nil)
store:set(iter1, 0, i, 1, List[i], -1)
end

self.w:show_all()
return self
end



function StartProcessing()
DoStartProcessing_c = gnome.closure(DoStartProcessing)
glib.timeout_add(200,
 DoStartProcessing_c,
 DoStartProcessing)
end

function DoStartProcessing()
UpdateProgressBar(progressbar)
return true
end


--
-- Main Program --
--

require gtk
mainwin = Mainwin.new()
gtk.main()
___
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] \cdots not displayed in latest beta

2011-04-20 Thread Cedric Mauclair
Hi,

Still missing in beta from 2011-04-20 15:05:01.

Regards.

-- Cédric



On Sun, Apr 17, 2011 at 01:09, Mathieu Boespflug 0xbadc...@gmail.com wrote:
 Hi,

 in the latest beta (211.04.13), the cdots in the following, display as a 
 blank:

 \starttext
 foo $x \cdots y$ bar.
 \stoptext

 ldots, however, work fine.

 Regards,

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

___
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] section headings

2011-04-19 Thread Willi Egger
Herbert,

I tried to find out. I remembered that there was this discussion already 
earlier on this list.

on  2010-08-30 Hans Hagen wrote the following:

...
 while it should keep A.1 instead of 1.1 for the section numbering. 

The new way is: 

\definestructureconversionset[MySet][numbers,Characters][numbers] % [per 
level] [default] 

\setupsection 
[chapter] 
[sectionconversionset=MySet] 

\starttext 

\chapter{first} 
\section{subfirst} 

\stoptext
...

I thought that it must be found along these lines. However I could not get the 
example working properly.

Willi

(This is LuaTeX, Version beta-0.66.0-2011041318 (rev 4144) 
/Users/willi/Documents/TEXdata/TEST/test-sectionnumbeconversion.tex}




test-sectionnumbeconversion.tex
Description: Binary data


On 18 Apr 2011, at 11:05, Herbert Voss wrote:

 no one has an idea?
 
 Am 09.04.2011 20:55, schrieb Herbert Voss:
 With the following code I get
 
 1. Teil foo
 § 1 1 bar
 i baz
 
 but I need
 
 1. Teil foo
 § 1 A. bar
 I. baz
 
 I cannot get the needed information from the wiki and the documentation.
 
 \def\PartNo#1{#1.\,Teil}
 \def\ChapterNo#1{§ \headnumber[part]
 \determineheadnumber[chapter]\currentheadnumber}
 \def\SectionNo#1{\determineheadnumber[section]\romannumeral\currentheadnumber}
 
 \setuphead[part][number=yes,after=\blank,numbercommand=\PartNo,
 style={\tfc\ss\bf},placehead=yes]
 \setuphead[chapter][before=\blank,after=\blank,conversion=Characters,
 numbercommand=\ChapterNo,
 continue=yes,style={\tfb\ss\bf}]
 \setuphead[section][conversion=Romannumerals,
 numbercommand=\SectionNo,style={\tfb\ss\bf}]
 
 \starttext
 
 \part{foo}
 \chapter{bar}
 \section{baz}
 \stoptext
 
 
 Herbert
 ___
 
 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
 ___
 
 ___
 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
 ___

___
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] section headings

2011-04-18 Thread Herbert Voss

no one has an idea?

Am 09.04.2011 20:55, schrieb Herbert Voss:

With the following code I get

1. Teil foo
§ 1 1 bar
i baz

but I need

1. Teil foo
§ 1 A. bar
I. baz

I cannot get the needed information from the wiki and the documentation.

\def\PartNo#1{#1.\,Teil}
\def\ChapterNo#1{§ \headnumber[part]
\determineheadnumber[chapter]\currentheadnumber}
\def\SectionNo#1{\determineheadnumber[section]\romannumeral\currentheadnumber}

\setuphead[part][number=yes,after=\blank,numbercommand=\PartNo,
style={\tfc\ss\bf},placehead=yes]
\setuphead[chapter][before=\blank,after=\blank,conversion=Characters,
numbercommand=\ChapterNo,
continue=yes,style={\tfb\ss\bf}]
\setuphead[section][conversion=Romannumerals,
numbercommand=\SectionNo,style={\tfb\ss\bf}]

\starttext

\part{foo}
\chapter{bar}
\section{baz}
\stoptext


Herbert
___

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
___


___
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] \cdots not displayed in latest beta

2011-04-16 Thread Mathieu Boespflug
Hi,

in the latest beta (211.04.13), the cdots in the following, display as a blank:

\starttext
foo $x \cdots y$ bar.
\stoptext

ldots, however, work fine.

Regards,

Mathieu
___
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] Alignment of arrows and spacing of indices

2011-04-16 Thread Mathieu Boespflug
Hi,

in the following document,

\starttext
foo $a \longrightarrow_\sigma b$ bar.
\stoptext

the arrow doesn't look right and the spacing of the \sigma is wrong.
Latest beta (2011.04.13).

Regards,

Mathieu
___
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] section headings

2011-04-09 Thread Herbert Voss

With the following code I get

1. Teil foo
§ 1 1 bar
i baz

but I need

1. Teil foo
§ 1 A. bar
I. baz

I cannot get the needed information from the wiki and the documentation.

\def\PartNo#1{#1.\,Teil}
\def\ChapterNo#1{§ \headnumber[part]
   \determineheadnumber[chapter]\currentheadnumber}
\def\SectionNo#1{\determineheadnumber[section]\romannumeral\currentheadnumber}
\setuphead[part][number=yes,after=\blank,numbercommand=\PartNo,
style={\tfc\ss\bf},placehead=yes]
\setuphead[chapter][before=\blank,after=\blank,conversion=Characters,
numbercommand=\ChapterNo,
continue=yes,style={\tfb\ss\bf}]
\setuphead[section][conversion=Romannumerals,
numbercommand=\SectionNo,style={\tfb\ss\bf}]

\starttext

\part{foo}
\chapter{bar}
\section{baz}
\stoptext


Herbert
___
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] Error with \section

2011-04-08 Thread Herbert Voss

I have no idea what's going wrong ...

When I uncomment the last line I'll get the following error.
Latest minimal

\setuparranging[doublesided]
\setuppagenumbering [alternative=doublesided]
\setupheads[alternative=margin,align=outer]
\setupnumbering[alternative=doublesided]

\starttext

\chapter{Foo}
\section{A long title} \input knuth \section{A long title} \input knuth
\section{A long title} \input knuth
\chapter{Bar}
\startitemize \item one  \item two \item three \stopitemize
\section{A long title} \input knuth \section{A long title} \input knuth
%\section{A long title} \input knuth \section{A long title} \input knuth

\stoptext


Herbert

[ ... ]
structuresectioning  section @ level 3 : 0.2.4 - A long title
! Extra \else.

system   tex  error on line 14 in file 08-02-9.ctxcrop: Extra  ...

 4 \setupnumbering[alternative=doublesided]
 5
 6 \starttext
 7
 8 \chapter{Foo}
 9 \section{A long title} \input knuth \section{A long title} 
\input knuth

10 \section{A long title} \input knuth
11 \chapter{Bar}
12 \startitemize \item one  \item two \item three \stopitemize
13 \section{A long title} \input knuth \section{A long title} \input 
knuth
14   \section{A long title} \input knuth \section{A long title} \input 
knuth

15
16 \stoptext
17
18
19
20
21 %\definepapersize[card][width=792pt,height=612pt]
22 %\setuppapersize[card][card]
23
24


\dohandlestructurehead ...ureheadnumbertext \else

\placestructureheadtext \f...
l.14 ...title} \input knuth \section{A long title}
   \input knuth
?
___
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] \blank[...]

2011-04-07 Thread Herbert Voss

From the source of the manual:

\starttext
bar\par
\blank[2\bodyfontsize]
bar
\stoptext

with latest minimal I get:

[...]
system   tex  error on line 8 in file zz.tex: Illegal unit of 
measure (pt inserted) ...


1 \starttext
2 bar\par
3 \blank[2\bodyfontsize]
4 bar
5 \stoptext
6

to be read again
   ^^H
argument 2^^H
 odyfontsize
\addaskedblankskip ...nce \blankskip #1\dimexpr #2
  \relax
l.8 }

\dovspacingyes ...#1\else \currentvspacing \fi )}
  \fi
l.3 \blank[2\bodyfontsize]
[...]

Herbert
___
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] \definepalet ignores transparency (mkiv)

2011-03-30 Thread Peter Rolf
Hi,

the subject says it all. The question left is if this is a bug or a
feature :-)

Example:

\starttext

\definecolor[foo] [s=0,a=1,t=.5]

\definepalet[bar]
  [foobar=foo]

\blackrule[width=3cm,height=3cm,color=foo] % transparent black
\blackrule[width=3cm,height=3cm,color=foobar] % pure black

\stoptext


Tested with ConTeXt beta from 26.01.2011. Sorry if this has been solved
in the meantime. I still haven't found the time to adapt my 'specials'.


Regards,  Peter
___
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] focus=standard not respected

2011-03-29 Thread Marco
On 2011-03-28 Marco net...@lavabit.com wrote:

 In  the following  example the  page focus  jumps back  to
 »fit«  after  clicking  on  the  footnote  number  after
 »Foo«, although »focus=standard« is set.

 \setupinteraction [state=start, focus=standard] \starttext
 Foo \startfootnote Bar \stopfootnote \stoptext

 How to respect the users scaling factor?

Maybe  it was  a bit  unclear what  the problem  is. When  I
select the zoom to fit the  page width and click on the link
to footnote, the zoom factor  changed to »fit«, that means
that the whole page fits on the screen, not just the width.


Marco


 BTW: Is there a particular reason why »focus=fit« is the
 default? Why  should the  page scaling change  because the
 user clicked on a hyperlink?


___
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] Reference jump location

2011-03-28 Thread Marco
I have the feeling that this issue is well known, but I cannot find a solution
at the moment.

When clicking on a reference the jump goes underneath the heading making it
invisible. How to make the jump to a position that the heading stays visible?
Example:

\setupinteraction [state=start, focus=width]
\starttext
\completecontent [interaction=all]
\startchapter [title=Foo]
\stopchapter
\page
\startchapter [title=Bar]
\stopchapter
\stoptext


Marco


___
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] focus=standard not respected

2011-03-27 Thread Marco
In the following example the page focus jumps back to »fit« after clicking on
the footnote number after »Foo«, although »focus=standard« is set.

\setupinteraction  [state=start, focus=standard]
\starttext
Foo
\startfootnote
Bar
\stopfootnote
\stoptext

How to respect the users scaling factor?

BTW: Is there a particular reason why »focus=fit« is the default? Why should
the page scaling change because the user clicked on a hyperlink?


Marco


___
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] header entries semi-wrong

2011-03-10 Thread Wolfgang Schuster

Am 10.03.2011 um 15:48 schrieb Steffen Wolfrum:

 Sure, but why does TeX write 1.2 one? The second part one is correct ... 
 Why can't both parts be synchronized (correctly of course!)??

It’s because \headnumber is macro expansion which happens when TeX collects
material for the page and \getmarking use TeX’s mark mechanism which is
meant for elements which are added after the page is finished.

Here is a example which shows a problem with expansion:

\setuplayout[lines=10]
\def\foo{foo}
\appendtoks\gdef\foo{bar}\to\everyaftershipout
\starttext
\dorecurse{20}{\foo\par}
\stoptext

What you can do is to create a new mark with \definemarking where
you set \headnumber and which you then use in the header.

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] playing colors more

2011-03-01 Thread Taco Hoekwater

On 03/01/2011 03:43 PM, Hans van der Meer wrote:

Oeps, I must have been spoiled by the \startxmlsetups where spaces at line end 
seem to be harmless.

By the way, how can one get rid of the black bar under the color bars? It looks 
like a black background that has been shifted down somewhat.


I don't know (and yes, I get that bottom bar as well).

Best wishes,
Taco
___
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] attachment attaches twice - more research

2011-02-23 Thread Michail Vidiassov

Dear Hans,

On Mon, 21 Feb 2011, Hans Hagen wrote:

i'll patch lpdf-wid but somehow I get the impression that it's more a viewer 
issue (the list shown seems to be a merge of filename as well as symbolic 
names while a clever list builder should look at the referred objects) ... 
but maybe no one else usesvdifferent symbolic names (we had similar issues 
with fields in the past and even now advanced field support is somewhat 
bugged one or the other way, depending on the viewer version, esp chained 
ones)


to say the truth I do not understand what are you talking about :(
The issues I have in mind - separating global attachments and attachments 
linked to icons on pages, additional descriptions for attached files -

are addressed in the attached patches.
I am not sure about using attachment lebel as T key, that is indended for 
following:
The text label that shall be displayed in the title bar of the annotation’s 
pop-up window when open and active. This entry shall identify the user who 
added the annotation.

and shows as the upper line when mouse pointer is above attachment icon.
Did not try to have file size and time information added to file stream -
but it'd be nice to have.

Sincerely, Michail
PS. Patches show what I want done, not how it is to be done.
Just hope that my lua may be more clear than my English.--- back-ini.lua.org2011-02-16 01:53:17.0 +0300
+++ back-ini.lua2011-02-23 09:17:50.0 +0300
@@ -67,6 +67,7 @@
 registercomment= nothing,
 
 embedfile  = nothing,
+globattachfile = nothing,
 attachfile = nothing,
 attachmentid   = nothing,
 
--- scrn-int.mkiv.org   2011-01-31 13:26:23.0 +0300
+++ scrn-int.mkiv   2011-02-23 12:34:22.0 +0300
@@ -405,6 +405,25 @@
 % % \setupattachments[\c!symbol={symbol-normal,symbol-down}]
 %
 % \starttext \attachment[whatever] \stoptext
+%
+% \globattachment[test.tex]
+% \globattachment[description][test.tex]
+% \globattachment[description][newname.tex][test.tex]
+
+\def\globattachment
+  {\dotripleempty\doglobattachment}
+
+\def\doglobattachment[#1][#2][#3]% description newfilename filename
+  {\ifthirdargument
+ \dodoglobattachment{#1}{#2}{#3}%
+   \else\ifsecondargument
+ \dodoglobattachment{#1}{}{#2}%
+   \else
+ \dodoglobattachment{}{}{#1}%
+   \fi\fi}
+
+\def\dodoglobattachment#1#2#3% description newfilename filename
+  
{\ctxlua{backends.codeinjections.globattachfile{description=#1,newname=#2,filename=#3}}}
 
 \def\useattachment
   {\doquadrupleempty\douseattachment}
--- lpdf-wid.lua.org2011-02-08 22:41:44.0 +0300
+++ lpdf-wid.lua2011-02-23 12:27:53.0 +0300
@@ -160,14 +160,14 @@
 
 --
 
-local nofattachments, attachments, filestreams = 0, { }, { }
+local nofattachments, attachments, filestreams, globfilestreams = 0, { }, { }, 
{ }
 
 -- todo: hash and embed once
 
 local function flushembeddedfiles()
-if next(filestreams) then
+if next(globfilestreams) then
 local e = pdfarray()
-for name, reference in next, filestreams do
+for name, reference in next, globfilestreams do
 if reference then
 e[#e+1] = pdfstring(name)
 e[#e+1] = reference -- already a reference
@@ -181,7 +181,7 @@
 
 lpdf.registerdocumentfinalizer(flushembeddedfiles,embeddedfiles)
 
-function codeinjections.embedfile(filename)
+function codeinjections.embedfile(filename,newname,description)
 local r = filestreams[filename]
 if r == false then
 return nil
@@ -201,12 +201,28 @@
 UF   = pdfstring(newname or basename),
 EF   = pdfdictionary { F = pdfreference(f) },
 }
+if description then
+d[Desc] = pdfstring(description)
+end
 local r = pdfreference(pdfflushobject(d))
 filestreams[filename] = r
 return r
 end
 end
 
+function codeinjections.globattachfile(specification)
+local filename = specification.filename
+if not filename or filename ==  then
+-- todo: message
+return
+end
+local description = specification.description or 
+local newname = specification.newname or 
+if description ==  then description = nil end
+if newname ==  then newname = nil end
+globfilestreams[filename] = 
codeinjections.embedfile(filename,newname,description)
+end
+
 function codeinjections.attachfile(specification)
 local attachment = interactions.attachments.attachment(specification.label)
 if not attachment then
@@ -239,6 +255,7 @@
 AP   = appearance,
 OC   = analyzelayer(specification.layer),
 C= 
pdfcolorspec(specification.colormodel,specification.colorvalue),
+T= pdfstring(label),
 }
 -- as soon as we can ask for the dimensions of an xform we can
 -- use them here

Re: [NTG-context] \useattachment: Embedding files in PDFs - was attachment attaches twice - more research

2011-02-21 Thread Michail Vidiassov

Dear Hans,

I'd like to remind you about an old problem report
--
From: Tobias Burnus
Date: 2008-01-04 16:01 +300

I can use \useattachment to embed/attach files in a PDF file. I can use:

\useattachment[whatever][title][newname][test.tex]
\attachment[whatever]

This creates an attachment with the description title and the name
test.tex. However, how can I set the author/subject? (Shown in tool
tip of the annotation symbol; it is shown above the description;
actually subject is enough for me.)

Additionally, I miss the file size and possibly the modification date
for the attachments; they are often handy to have.

Is is possible to associate an embedded file stream with the document
itself without creating an annotation symbol as with \attachment in
ConTeXt? (The PDF spec allows this; cf. e.g. 3.10.3 in the PDF spec and
http://www.microtype.com/showcase/EmbedFiles.pdf for an example PDF file.)

---

what he names author/subject is the T entry in annotation dictionary 
(the same where /Subtype /FileAttachment goes), that is described as
The text label that shall be displayed in the title bar of the 
annotation’s pop-up window when open and active. This entry shall identify the user who 
added the annotation.
It appears as the upper of the two lines that are shown when the mouse 
pointer is over file attachment annotation icon (the lower one is the 
description mentioned above).


And for file size and modification date to show up file stream has to 
look like

8 0 obj /Params  /ModDate (20050217) /Size 2048 /Length 1218stream
not just
15 0 obj /Length 144stream
as it is now.

   Sincerely, Michail

___
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] math: `\overbar` with fractions and subscripts

2011-02-07 Thread Paul Menzel
Dear Otared,


Am Freitag, den 04.02.2011, 20:45 +0100 schrieb Otared Kavian:

 I think one should use \overline instead of \overbar in your example. For me 
 the following works fine with mkiv:
   \starttext
\startformula
\overline{q} = \frac{\overline{q}}{\overline{α_0}}
\stopformula
In text $\overline{q} = \frac{\overline{q}}{\overline{α_0}}$.
\startformula
\overline{q_0} = \frac{\overline{q}}{\overline α}
\stopformula
\stoptext
 (one gets as expected the « conjugate » of α_0, for instance).

thank you for your answer. `\overline` works as you say, but it looks
typographically different in the respect that the bar is closer to the
letter, which of course solves the issue for the inline fraction. For α
this looks quite strange in my eyes. But I do not know a lot about
typography.

Please find the PDF-output attached with the following ConTeXt version.

MTXrun | current version: 2011.02.04 10:01


Thanks,

Paul


test.pdf
Description: Adobe PDF document


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
___


Re: [NTG-context] math: `\overbar` with fractions and subscripts

2011-02-07 Thread Aditya Mahajan

On Mon, 7 Feb 2011, Paul Menzel wrote:


thank you for your answer. `\overline` works as you say, but it looks
typographically different in the respect that the bar is closer to the
letter, which of course solves the issue for the inline fraction. For α
this looks quite strange in my eyes. But I do not know a lot about
typography.


IIRC, \overline is meant for long entities, like \overline{(a+b)}. For 
single letters, it is better to use the accent \bar.


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
___


[NTG-context] math: `\overbar` with fractions and subscripts

2011-02-04 Thread Paul Menzel
Dear ConTeXt folks,


I do have some problem with the following example (also attached,
executed with `context test`).

\starttext
\startformula
\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}
\stopformula
In text $\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}$.
\startformula
\overbar{q_0} = \frac{\overbar{q}}{\overbar α}
\stopformula
\stoptext

I am using the latest ConTeXt Minimals distribution.

$ context --version

MTXrun | main context file: 
/opt/context/tex/texmf-context/tex/context/base/context.mkiv
MTXrun | current version: 2011.02.04 10:01

1. The bar divides for subscripts/indices.
2. If you look at the first fraction, the bar is as long as the stroke
from the fraction and therefore I think too long.
3. When inlining the fraction in text the bar fuses with the stroke from
the fraction.

Are these know problems or do I just use the wrong commands?


Thanks,

Paul


test.pdf
Description: Adobe PDF document
\starttext
\startformula
\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}
\stopformula
In text $\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}$.
\startformula
\overbar{q_0} = \frac{\overbar{q}}{\overbar α}
\stopformula
\stoptext


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
___


Re: [NTG-context] math: `\overbar` with fractions and subscripts

2011-02-04 Thread Otared Kavian
Hi Paul,

I think one should use \overline instead of \overbar in your example. For me 
the following works fine with mkiv:
  \starttext
   \startformula
   \overline{q} = \frac{\overline{q}}{\overline{α_0}}
   \stopformula
   In text $\overline{q} = \frac{\overline{q}}{\overline{α_0}}$.
   \startformula
   \overline{q_0} = \frac{\overline{q}}{\overline α}
   \stopformula
   \stoptext
(one gets as expected the « conjugate » of α_0, for instance).

Best regards: OK
On 4 févr. 2011, at 12:14, Paul Menzel wrote:

 Dear ConTeXt folks,
 
 
 I do have some problem with the following example (also attached,
 executed with `context test`).
 
\starttext
\startformula
\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}
\stopformula
In text $\overbar{q} = \frac{\overbar{q}}{\overbar{α_0}}$.
\startformula
\overbar{q_0} = \frac{\overbar{q}}{\overbar α}
\stopformula
\stoptext
 
 I am using the latest ConTeXt Minimals distribution.
 
$ context --version
 
MTXrun | main context file: 
 /opt/context/tex/texmf-context/tex/context/base/context.mkiv
MTXrun | current version: 2011.02.04 10:01
 
 1. The bar divides for subscripts/indices.
 2. If you look at the first fraction, the bar is as long as the stroke
 from the fraction and therefore I think too long.
 3. When inlining the fraction in text the bar fuses with the stroke from
 the fraction.
 
 Are these know problems or do I just use the wrong commands?
 
 
 Thanks,
 
 Paul
 test.pdftest.tex___
 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
 ___


___
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] Differences for \Vert in mkii and mkiv

2011-02-02 Thread Otared Kavian
Dear Aditya,

I am sorry I overlooked you answer… I just saw that you have answered my 
message regarding the \Vert symbol.
Thank you and please pardon me.

I tried to modify the mapping of  0x2016 to 0xFF605, but since I don't 
understand the way or where 0xFF605 is constructed, I didn't get any result.
0x2016 is described in char-def.lua, and in font-agl.lua.
FF605 is referred to only in math-vfu.lua.

Maybe if Hans has a little time, he can explain where the double vertical bar 
is constructed: the problem is that these bars are scaled swelled (or English) 
rules rather than bars as in Latin Modern.
Since more and more people are going to use only mkiv, this issue can be 
annoying for mathematical typesetting.

Best regards: OK

On 19 janv. 2011, at 17:44, Aditya Mahajan wrote:

 On Tue, 18 Jan 2011, Otared Kavian wrote:
 
 Dear Aditya, dear Hans,
 
 I noticed a serious difference between what one gets for \left\Vert in mkii 
 and in mkiv.
 Probably this is due to the fact that in mkiv the glyph for \Vert is 
 constructed in a different manner, but as far as I know from what I see in 
 the mathematical printed materials, the correct one, or the expected one, is 
 the output from mkii.
 
 I don't know why the glyphs are different. In MkIV, the virtual font is 
 mapping 0x2016 to 0xFF605, but I don't know how FF605 is created.
 
 Is there a way to redefine locally \Vert (or \|) so that in mkiv one gets 
 the same output as with mkii?
 
 Not locally. You could change math-vfu.lua to change the mapping, but I don't 
 completely understand how those work (with the virtual glyphs like FF605)
 
 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
 ___


___
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] Pipe symbol

2011-01-25 Thread Khaled Hosny
On Tue, Jan 25, 2011 at 09:31:06AM +0100, Wolfgang Schuster wrote:
 
 Am 24.01.2011 um 13:44 schrieb Khaled Hosny:
 
  On Mon, Jan 24, 2011 at 01:01:10PM +0100, Wolfgang Schuster wrote:
  
  Am 24.01.2011 um 12:47 schrieb Khaled Hosny:
  
  
 Just wondering, what is special about | now we can even have ^ and $
 in text mode?
  
  
  http://wiki.contextgarden.net/Composed_words
  
  I see, but it is a feature I'd never need (not when typesetting Arabic
  at least), is there a way to switch it off and get regular | instead?
 
 \asciimode
 \starttext
 a $ b % c _ d ^ e | f \formula{a^2}
 \stoptext

Just in time! exactly what I was googling for a second ago (apart from
the bar, I wanted the others too!)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] Vertical rules in multiple column mode

2011-01-23 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

the following code generates 3column pages:

---
\starttext
  \startcolumns[n=3,rule=on]
\dorecurse{5}{\section{\recurselevel}\input knuth}
  \stopcolumns
\stoptext
---

You can see that the vertical bars on the page 1 don't reach the real bottom of the 
text height, whilst they do on the next page.

It seems that the length (or range) of the vertical bar is given by the 
height of the FIRST column.

It seems to me that the rule height should rather be given as (or related to):

1) MAXIMUM of height of all columns

2) or height of i-th rule as maximum of height of i- and (i+1)-th column (each 
two ADJACENT columns).

Is there a way how to effect this?

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Cols.mkiv
Description: Binary data


t-Cols.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] \e!start in lua

2011-01-16 Thread Wolfgang Schuster

Am 15.01.2011 um 23:57 schrieb Aditya Mahajan:

 What is the best way to define the equivalent of
 
\setvalue{\e!start\NAME}{...}
 
 in lua.
 
e_start = ??
context.setvalue(e_start .. name, ...)

\startluacode
context.setvalue(foo,\\framedtext)
context.setvalue(table.concat({start,foo}),\\startframedtext)
context.setvalue(table.concat({stop ,foo}),\\stopframedtext )
\stopluacode

\starttext
\foo{foo}
\startfoo bar\stopfoo
\stoptext

You can also write “context.setvalue(start..foo,…)” but table.concat
looks better but the question is why don’t you use just tex
to create the start/stop commands.

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] \e!start in lua

2011-01-16 Thread Aditya Mahajan

On Sun, 16 Jan 2011, Wolfgang Schuster wrote:



Am 15.01.2011 um 23:57 schrieb Aditya Mahajan:


What is the best way to define the equivalent of

   \setvalue{\e!start\NAME}{...}

in lua.

   e_start = ??
   context.setvalue(e_start .. name, ...)


\startluacode
context.setvalue(foo,\\framedtext)
context.setvalue(table.concat({start,foo}),\\startframedtext)
context.setvalue(table.concat({stop ,foo}),\\stopframedtext )
\stopluacode

\starttext
\foo{foo}
\startfoo bar\stopfoo
\stoptext

This would just create \startfoo. \setvalue{\e!start foo} creates a 
interface specific command. The code that Hans posted does that. I am 
sorry that this was not clear in the question.



You can also write “context.setvalue(start..foo,…)” but table.concat
looks better


OK.


but the question is why don’t you use just tex
to create the start/stop commands.


Because I find it much easier to understand expansion at lua level than at 
TeX level.


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


Re: [NTG-context] Error with \placetable ... \starttable

2011-01-11 Thread Aditya Mahajan

On Thu, 6 Jan 2011, Khaled Hosny wrote:


Looks like \stattable ... \stoptable no longer do grouping, the
following is broken unless \stattable ... \stoptable is grouped.

\starttext
\placetable[here,nonumber]{foo}
\starttable[|r|r|]
\NC foo \NC bar \AR
\stoptable
\stoptext


This is still present in the latest beta.

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
___


[NTG-context] Error with \placetable ... \starttable

2011-01-05 Thread Khaled Hosny
Looks like \stattable ... \stoptable no longer do grouping, the
following is broken unless \stattable ... \stoptable is grouped.

\starttext
\placetable[here,nonumber]{foo}
\starttable[|r|r|]
\NC foo \NC bar \AR
\stoptable
\stoptext

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___
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] Help: tweaking bibliography style

2010-12-15 Thread Nicola
In article nvitacolonna-f968f4.10292114122...@news.gmane.org,
 Nicola nvitacolo...@gmail.com wrote:

 Hi,
 currently, in my document, an article reference looks like this:
 
 [1] Thor, A. U. (2010). ConTeXt is great. My Own Publishing, 2(4), 23-34.
 
 with the title in italics. How to make the year appear at the end and 
 how to make the publisher in italics, too? I would like such changes to 
 apply to other types of references as well (books, inproceedings, etc...)
 
 Second, \cite[Thor:2010,Bar:2009] produces something like [6 and 9]. How 
 do I get rid of 'and' and get simply [6,9]?

Sorry for the noise: somehow, I hadn't noticed that a fairly complete 
bib manual exists. Now I realise how flexible the module is.

As for bibltx, I assume that it is deprecated.

Nicola

___
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] Help: tweaking bibliography style

2010-12-14 Thread Nicola
Hi,
currently, in my document, an article reference looks like this:

[1] Thor, A. U. (2010). ConTeXt is great. My Own Publishing, 2(4), 23-34.

with the title in italics. How to make the year appear at the end and 
how to make the publisher in italics, too? I would like such changes to 
apply to other types of references as well (books, inproceedings, etc...)

Second, \cite[Thor:2010,Bar:2009] produces something like [6 and 9]. How 
do I get rid of 'and' and get simply [6,9]?

This is my current setup (mainly code copied from the Wiki):

\usemodule[bib]
\setupbibtex[database=my-biblio,sort=author]
\def\bracketed#1{\hbox to 20pt{\hfill [{#1}]}}
\setuppublications[
   sorttype=bib,
   numbering=yes,
   numbercommand=\bracketed
]
\unprotect\def\UCauthor#1#2#3#4#5%
{\bf\bibdoif{#2}{#2\bibalternative\c!vonsep}%
   #3\bibalternative\c!surnamesep
\bibdoif{#5}{#5\bibalternative\c!juniorsep}%
\bibdoif{#4}{#4\unskip}}
\protect
\setuppublicationlist[
   artauthor=\UCauthor,
   editor=\UCauthor,
   author=\UCauthor,
   namesep={, },
   lastnamesep={, },
   finalnamesep={, }
]

A last, less important, question: the Wiki suggests to 
\usemodule[bibltx]. If I do so, I get the warning “module bibltx not 
found”. It seems that omitting that module has no consequences. Is it 
needed at all? If so, for what?

Nicola

___
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] TEI - conTeXt

2010-12-10 Thread Jon Crump
Thomas,

Thanks for responding. Yes, thanks to some help from Idris, Khaled, et
alia, I've got an ara-sty.tex environment file that sets up the
Scheherezade font and am getting very nice looking arabic text. I'm
now trying to get my arms around some basic elements of the conTeXt
system for dealing with xml.

Thanks to your TEI tutorial, I've got some good results for flushing
elements identified by tag name and by named attribute like this:

\xmlsetsetup{#1}{he...@type='chapter']}{xml:head:chapter}
\xmlsetsetup{#1}{p}{xml:p}

and the like. I'm now trying to figure out how to address elements in
the tei more precisely, like how to address the content nodes in the
div xml:id=notes, like note xml:id=N012-10,  in order to use
their contents while setting elements like ref target=#N012-10
with a \footnote command (though we may, in fact, need to put these
elsewhere in an 'endnotes' section.).

I've sought in vain for the answers to simple questions like how to
address nodes identified by xml:id. In setting up a minimal example,
I've tried to do this:

with the xml:

?xml version=1.0 encoding=utf-8?
body
text
div xml:id=a
foo
/div
div xml:id=b
bar
/div
/text
/body

set foo and not bar. This, for example, does not work:

\startxmlsetups xml:minimalsetups
\xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{body|text|div}{xml:*}
\xmlsetsetup{#1}{d...@xml:id='a']}{xml:div}
\stopxmlsetups

context complaining that xml:id='a' is not a valid lpath expression.
As you can see, I'm not getting some basic things about how to specify
and traverse the xml, much less applying the correct context commands
to get the content and formatting I need.

Another thing I'm going to need to do is to parse the text of certain
element attributes. For example, divs to be set in arabic are
distinguished from divs to be set in latin only by their xml:lang
attributes. I will need to be able to distinguish between ar-Arab,
en-Latn, and possibly also ar-Latn and more complex subtags like
az-Arab-IR as specified in
http://www.rfc-editor.org/rfc/bcp/bcp47.txt

Any clues you might care to offer, or examples that you know of, would
be gratefully received. I hesitate to attach the xml and tex files I'm
working with here, being unfamiliar with the protocols of the list,
but if it would help to see what I'm trying to work with, I could
certainly do that. More than this, I will certainly post on the wiki
some documentation and examples from this current project once I have
something to contribute that works. I'd like to extend your tutorial
for others who have TEI texts that they would like to typeset; indeed,
making public such documentation in their appropriate fora is part of
the remit of our project.

All at sea in Seattle,
Jon

On Fri, Dec 10, 2010 at 9:57 AM, Thomas Schmitz tschm...@uni-bonn.de wrote:
 On Thu, 9 Dec 2010 15:20:06 -0800
  Jon Crump jjcr...@uw.edu wrote:

 All,

 More naive questions about xml and context. I'm finding this slow
 going and documentation opaque or just thin on the ground.

 Before I try and help you with your question: you posted another problem on
 Nov 24 and got replies. Has this issue been solved?

 More practical examples of TEI (or other xml texts)- ConTeXt - PDF
 would sure come in handy.

 You're more than welcome to contribute such examples. Remember, this is a
 volunteer effort.

 Thomas
___
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] TEI - conTeXt

2010-12-10 Thread Thomas Schmitz

On Fri, 10 Dec 2010 12:00:59 -0800
 Jon Crump jjcr...@uw.edu wrote:

Jon,

OK, good to know. I'll need a bit more leisure to look at 
your example; here are just a few points:


processing an attribute with the 'xml:' namespace has been 
fixed by Hans very recently (last weekend), so if you 
haven't updated to the latest beta version, please do and 
try again; your syntax \xmlsetsetup{#1}{d...@xml:id='a']} 
is basically right.


Addressing content that has been set in xml anchors is 
possible, but not quite easy. I wouldn't have been able to 
figure it out without Hans. Just to show you an example: 
here's code that in my TEI document will fetch the content 
of a witness list:


\xmlfirst{#1}{root::/TEI/text/front/d...@type=='sigla']/listWit/witne...@xml:id==string.sub('\xmlatt{#1}{wit}',2)]}

The (for you) relevant part is root::/: this is the 
topmost level of your TEI xml document. You then traverse 
all the elements and drill down to a witness element 
whose xml:id attribute is identical to the wit attribute 
of your current element. So element wit=#foo will pick 
up the content of witness xml:id=foobar/witness and 
print bar. This should get you going.


Last point: I don't want to sound negative, but what 
you're attempting is not straightforward and certainly not 
easy stuff. I am currently planning on doing a long-term 
project on editing texts in this manner, and I'm quite 
optimistic that all problems can eventually be solved. But 
if you need short-term solutions, a perfectly typeset 
edition within a matter of weeks, this may not be possible 
right away. E.g., I don't think we really have a solid 
framework yet for a bilingual edition as you envisage it. 
It is possible, but not easy, Hans needs the time and many 
test cases to make the code work. There is a research 
group here in Germany (with public funding) who are 
currently working on xml printing of material of exactly 
this type. I can assure you that for the time being, 
there's nothing out there which comes even close to 
ConTeXt in this area, but we're still at the beginning. 
So: if you want to help and test and be part of this, you 
are more than welcome, but none of us has a magic bullet; 
this is work in progress, not drop-in solutions.


All best

Thomas
___
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] enumeration counters, way=bysection

2010-11-25 Thread Yury G. Kudryashov
Hi!

I want to have the following (Theorems and Lemmas share the counter, 
way=bysection):

Section 1. Foo

Theorem 1.1 Bar
Lemma 1.2 Baz

Section 2. Foo

Theorem 2.1 Bar
Lemma 2.2 Baz

The following used to work about a month or two ago.

\setupenumerations[way=bysection]
\newcounter\theorems
\defineenumeration[thm]
[text=Theorem,prefix=yes,prefixsegments=section,counter=theorems]
\defineenumeration[lem]
[text=Lemma,prefix=yes,prefixsegments=section,counter=theorems]
\starttext
\dorecurse{5}{
\section{Foo}
\startthm
Bar
\stopthm
\startlem
Baz
\stoplem
}
\stoptext

Today the counter doesn't reset, i.e. I get Theorem 2.3, Lemma 2.4, Theorem 
3.5 etc. How can I fix it?


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

2010-11-20 Thread Herbert Voss
this worked some days ago:

\starttext

\starttabulate[|p(3cm)|p|]
\NC foo \NC bar \NC
\stoptabulate

\stoptext

minimal mkiv

Herbert


systems : begin file 09-02-15.ctxcrop at line 1
! Undefined control sequence.
\bskip ...bulatehook \ifconditional \autotabulate
  \hsize \tabulatewidth
\fi ...
template ...l \empty \dotagtabulatealign \bskip
  \ifnum \tabulatetype
=\plu...
to be read again
   f
\tabulatecontent -\NC f
oo \NC bar \NC
\fulltabulatecontent ...dcontent \tabulatecontent
  \tabulatetailcontent
\remo...
\processtabulate ...le \crcr \fulltabulatecontent
  \crcr }\dostoptagged
\dost...
l.5 \stoptabulate
___
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] tabulate

2010-11-20 Thread Hans Hagen

On 20-11-2010 9:27, Herbert Voss wrote:

this worked some days ago:

\starttext

\starttabulate[|p(3cm)|p|]
\NC foo \NC bar \NC
\stoptabulate

\stoptext

minimal mkiv


I'll check it ... I did some cleanup + added color support. For the 
moment add \NR to end the row



-
  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] tabulate font setting

2010-11-20 Thread Herbert Voss
trhe documentation says, that this should work:

\starttext

{\bs bold slanted}
{\bi bold italic}

\starttabulate[||f\bs|f\bi|]
\NC foo\NC bar\NC baz\NC
\stoptabulate

\stoptext

I get a foo bar baz in the default font setting

Herbert
___
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] tabulate

2010-11-20 Thread Herbert Voss
Am 20.11.2010 14:10, schrieb Herbert Voss:
 Am 20.11.2010 12:39, schrieb Hans Hagen:
 
 in tabl-tbl.mkiv:

 \newconditional  \ifautotabulate

 should be

 \newconditional  \autotabulate
 
 Hans,
 thanks, but that produces a new problem.
 http://perce.de/temp/x.png

forgot the code:

\starttext

\starttabulate[|p(0.35\textwidth)|p(0.125\textwidth)|p|]\HL
\NC foo \NC bar \NC baz \NC\NR
\stoptabulate

\stoptext

Herbert
___
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] Numbering chapters from an arbitrary number

2010-11-16 Thread Herbert Voss
Am 16.11.2010 11:48, schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

 \starttext
 
   \setuphead[chapter][ownnumber=yes]
   \chapter{3}{AAA} % Gives 3. AAA, that's OK
 
   \setuphead[chapter][ownnumber=no]
   \chapter{BBB} % Gives 2. BBB - this is unwanted - I'd need to get
 3. BBB...
 \stoptext
 ---
 
 So it seems I'd need to reset an internal counter... The question remains.

\starttext

\setupheadnumber[chapter][2]
\chapter{foo}
bar
\chapter{bar}
baz
\stoptext


Herbert
___
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] Numbering chapters from an arbitrary number

2010-11-16 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... How easy!

Thanks.

Lukas


\setupheadnumber[chapter][2]
\chapter{foo}
bar
\chapter{bar}
baz
\stoptext


Herbert


___
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] Grabbing first letter of a sentence

2010-11-15 Thread Mathieu Boespflug
Hi,

I'd like to get access to the first letter of a chapter for the
purpose of laying out the chapter heading, but I'm having difficulty
with expansion.

Here's my attempt:

\def\MyChapterTitle#1#2{%
  \def\doMyChapterTitle##1##2^{%
  {\tfb ##1}##2
  }
  #1 \doMyChapterTitle#2^
}

setuphead[chapter][command=\MyChapterTitle]

\starttext

\chapter{Foo}

bar

\stoptext

This doesn't work because the chapter title isn't expanded out before
passing it to \MyChapterTitle. I know there is deeptextcommand but I
need the chapter title during the layout of chapter number + title, so
I need to use command instead of deeptextcommand. I attempted to get
hold of the chapter title using the following

\def\MyChapterTitle#1#2{%
  \def\doMyChapterTitle##1##2^{%
  {\tfb ##1}##2
  }
  #1 \expandafter\doMyChapterTitle\expandafter{\fetchmark[chapter][first]}^
}

but that doesn't seem to work either. Any ideas?

Many thanks,

M
___
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] typescripts

2010-11-12 Thread Herbert Voss
I am still playing with typescripts...
In this example I get sans serif and mono
but for the roman libertine I get the lm mono. What
is wrong?

Herbert


name type  emb sub uni object ID
 - --- --- --- -
QNOYJG+LMMonoProp10-Regular  Type 1yes yes no  18  0
IGFPZR+LinBiolinumO  CID Type 0C   yes yes yes 19  0
JNFQZG+BeraSansMono-RomanCID Type 0C   yes yes yes 20  0




\setuppagenumbering[location={}]
\starttypescriptcollection[mylibertine]

\starttypescript[serif][libertine][name]
\definefontsynonym [Serif]   [name:linlibertineo]
[features=default]
\definefontsynonym [SerifItalic] [name:linlibertineoi]
[features=default]
\definefontsynonym [SerifBold]   [name:linlibertineob]
[features=default]
\definefontsynonym [SerifBoldItalic]
[name:linlibertineobi][features=default]
\definefontsynonym [SerifSlanted][name:linlibertineoi]
[features=default]
\definefontsynonym
[SerifSlantedBold][name:linlibertineobi][features=default]
%\definefontsynonym [SerifCaps]   [name:linlibertineoc]
[features=SmallCaps]
\stoptypescript

\starttypescript[sans][biolinum][name]
\definefontsynonym [Sans]   [name:linbiolinumo]
[features=default]
\definefontsynonym [SansItalic] [name:linbiolinumoi]
[features=default]
\definefontsynonym [SansBold]   [name:linbiolinumob]
[features=default]
\definefontsynonym [SansSlanted][name:linbiolinumosl]
[features=default]
\stoptypescript
\starttypescript[mono][bera][name]
\definefontsynonym [Mono] [file:fvmr8a.afm]
\stoptypescript

\starttypescript[mylibertine]
   \definetypeface[mylibertine][rm][serif][libertine][default]
   \definetypeface[mylibertine][ss][sans] [biolinum] [default]
   \definetypeface[mylibertine][tt][mono] [bera] [default][rscale=0.85]
   \definetypeface[mylibertine][mm][math] [modern]   [default]
\stoptypescript
\stoptypescriptcollection

\starttext
\setupbodyfont[mylibertine,12pt,rm]
foo bar baz

\ss
foo bar baz

\tt
foo bar baz

%\showbodyfont
\stoptext
___
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] Lucida

2010-11-08 Thread Herbert Voss
Am 08.11.2010 14:42, schrieb Mojca Miklavec:
 2010/11/8 Herbert Voss wrote:
 Has someone a working typescript file for the Lucida
 from TUG?
 
 Lucida should work out of the box (since beginning of 2010) if you
 have the files from TUG installed:
 
 % \usetypescript[lucida][ec] % for MKII
 \setupbodyfont[lucida]
 
 If you have any problems setting up the font, please ask. (See also
 the beginning of http://wiki.contextgarden.net/Lucida, ignoring the
 old instructions.)
 
 If you find any problems with the math part, please report.

load otf preprocessing and caching took 0.057 seconds
define fonts source file 'lbr' is not found
define fonts unable to determine font format for ''
define fonts source file 'lbd' is not found
...


it looks for the yy filenames, but I have only the TUG ones.
In which file is this defined?

\setupbodyfont[lucida]

\starttext
foo \ss bar
\stoptext

context-minimal

Herbert
___
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] Lucida

2010-11-08 Thread Hans Hagen

On 8-11-2010 4:58, Herbert Voss wrote:

Am 08.11.2010 14:42, schrieb Mojca Miklavec:

2010/11/8 Herbert Voss wrote:

Has someone a working typescript file for the Lucida
from TUG?


Lucida should work out of the box (since beginning of 2010) if you
have the files from TUG installed:

% \usetypescript[lucida][ec] % for MKII
\setupbodyfont[lucida]

If you have any problems setting up the font, please ask. (See also
the beginning of http://wiki.contextgarden.net/Lucida, ignoring the
old instructions.)

If you find any problems with the math part, please report.


load otf  preprocessing and caching took 0.057 seconds
define fonts  source file 'lbr' is not found
define fonts  unable to determine font format for ''
define fonts  source file 'lbd' is not found



it looks for the yy filenames, but I have only the TUG ones.
In which file is this defined?

\setupbodyfont[lucida]

\starttext
foo \ss bar
\stoptext

context-minimal


Lucida is somewhat special. Context has always supported lucida but used 
the original lucida names (lbr.* etc). However, when tig took over from 
yandy it decided not to ship those files and as a result lucida became 
unuseable. Recently we adapted the typescripts to mkiv (and mkii). Math 
was also done again (lucida had its own math vector but the files that 
tug shipped were tuned for latex.).


So, for mkiv you need the latest typescript files for lucida 
(type-otf.mkiv etc), there should also be a lucida-math.flg file that 
defines the virtual open type math variant).


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
___


Re: [NTG-context] \Cap

2010-11-07 Thread Herbert Voss
Am 07.11.2010 22:22, schrieb Herbert Voss:
 The documentation says, that \cap converts the first
 letter of the word into a capital letter ...
 But it didn't
 
 \starttext
 \Cap{foo}
 \stoptext
 
 TeXLive and TLContrib

using the code from core-fnt.mkii it works with mkiv:

\unexpanded\def\CAPPED#1%
  {{\def\\##1{\smallcapped{##1}}#1}}
\unexpanded\def\SmallCapped#1%
  {\CAPPED{\\#1}}
\def\Cap{\mathortext\normalCap\SmallCapped}

\starttext
\Cap{foo bar baz}

\CAP{foo \\bar \\baz}
\stoptext

Herbert
___
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] \margintext

2010-11-06 Thread Herbert Voss
The documentation says, that this should work, but it didn't:

\starttext
\margintext{foo}bar baz
\stoptext

However, in the documentation the example also didn't show the
margin text (p 64).

Herbert
___
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] \margintext

2010-11-06 Thread Aditya Mahajan

On Sat, 6 Nov 2010, Herbert Voss wrote:


The documentation says, that this should work, but it didn't:

\starttext
\margintext{foo}bar baz
\stoptext

However, in the documentation the example also didn't show the
margin text (p 64).


There was an email about it yesterday with a fix. Did you see that?

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
___


Re: [NTG-context] \margintext

2010-11-06 Thread Herbert Voss
Am 06.11.2010 22:28, schrieb Aditya Mahajan:
 On Sat, 6 Nov 2010, Herbert Voss wrote:
 
 The documentation says, that this should work, but it didn't:

 \starttext
 \margintext{foo}bar baz
 \stoptext

 However, in the documentation the example also didn't show the
 margin text (p 64).
 
 There was an email about it yesterday with a fix. Did you see that?

yes, but forget it ...

thanks
Herbert
___
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] greek letters in itemize

2010-10-31 Thread Herbert Voss
Do I need some additional settings to get lower
greek letters in the example? I get only a dot for g

\starttext

\startitemize[g]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\startitemize[G]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\stoptext


MTXrun | current version: 2010.10.29 18:15

Herbert
___
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] greek letters in itemize

2010-10-31 Thread Hans Hagen

On 31-10-2010 12:11, Herbert Voss wrote:

Do I need some additional settings to get lower
greek letters in the example? I get only a dot for g

\starttext

\startitemize[g]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\startitemize[G]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\stoptext


does the font that you use have greek symbols?


-
  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] greek letters in itemize

2010-10-31 Thread luigi scarso
2010/10/31 Herbert Voss herbert.v...@fu-berlin.de:
 Do I need some additional settings to get lower
 greek letters in the example? I get only a dot for g

\setupbodyfont[dejavu]
\starttext

\startitemize[g]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\startitemize[G]
\item foo
\item bar
\item baz
\item baz
\stopitemize

\stoptext

It works ok wiht latest minimals  dejavu and cambria fonts; it shows
dots with lm

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


[NTG-context] \mar

2010-10-24 Thread Herbert Voss
The documentation and the wiki show the syntax for \mar

 1   2
\mar [...,...] {...}
  OPTIONAL
1  REFERENCE
2  CONTENT

When I use the optional argument, then the [ is taken
as an argument for the content, which is correct placed
into the margin, but the rest foo]{+}... is taken as
default text. I suppose, that \mar has no optional
argument?

\starttext

\startitemize
\item baz
\mar[foo]{+} bar baz
\item barbaz
\stopitemize

\stoptext

Herbert
___
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] header setting

2010-10-20 Thread Herbert Voss
in my example I have set the numbers in the margin.
In fact of using the twoside layout I get the
numbers only for odd pages in the margin.
Is this also possible for the even pages,
just like header 1.2 instead of 1.2 header?

Herbert

\definepapersize[DE][width=10cm,height=12cm]
\setuppapersize [DE][DE]
\setuplayout[width=8cm,height=10cm]
\setuparranging[doublesided]
\setuppagenumbering[alternative=doublesided]
\setupheads[alternative=margin,align=outer]

\starttext
\chapter{Foo}
\section{A long title} \input knuth
\section{A long title}
\section{A long title} \input knuth
\chapter{Bar}
\section{A long title} \input knuth \section{A long title} \input knuth
\section{A long title} \input knuth \section{A long title} \input knuth
\stoptext
___
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] header setting

2010-10-20 Thread Andreas Harder

Am 20.10.2010 um 20:32 schrieb Herbert Voss:

 in my example I have set the numbers in the margin.
 In fact of using the twoside layout I get the
 numbers only for odd pages in the margin.
 Is this also possible for the even pages,
 just like header 1.2 instead of 1.2 header?
 
 Herbert
 
 \definepapersize[DE][width=10cm,height=12cm]
 \setuppapersize   [DE][DE]
 \setuplayout[width=8cm,height=10cm]
 \setuparranging[doublesided]
 \setuppagenumbering[alternative=doublesided]
 % \setupheads[alternative=margin,align=outer]
\setupheads[command=\MyHeadCMD]

\def\MyHeadCMD#1#2%
  {\ininnermargin{#1}
   \inframed[width=broad,align=inner,frame=off,offset=none]{#2}}
 
 \starttext
 \chapter{Foo}
 \section{A long title} \input knuth
 \section{A long title}
 \section{A long title} \input knuth
 \chapter{Bar}
 \section{A long title} \input knuth \section{A long title} \input knuth
 \section{A long title} \input knuth \section{A long title} \input knuth
 \stoptext

Perhaps there is an easier solution, but the above should work too.

Regards
Andreas
___
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] offset for enumeration counter

2010-09-17 Thread Philipp Gesang
On 2010-09-17 12:31:41, Wolfgang Schuster wrote:
 \starttext
 
 \startitemize[n][start=30]
 \dorecurse{4}{\item text}
 \stopitemize
 
 \stoptext

Great, that's exactly what I was looking for. Now that we're at
it: actually the spec wants this on per-item basis. This would
amount to having another (apart from the reference) argument to
“\item”, e.g.

···8
\startitemize[n]
\item[n=1]  foo 
\item[n=2]  bar 
\item[n=3]  foo 
\item[n=5]  bar 
\item[n=8]  foo 
\item[n=13] bar 
\stopitemize
···8

Regardless of if there's a practical use for that: is this
possible as well without resorting  to repeated \setnumber'ing?

Philipp

 
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp7n9fmBRqg7.pgp
Description: PGP signature
___
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] offset for enumeration counter

2010-09-17 Thread Wolfgang Schuster

Am 17.09.2010 um 13:11 schrieb Philipp Gesang:

 On 2010-09-17 12:31:41, Wolfgang Schuster wrote:
 \starttext
 
 \startitemize[n][start=30]
 \dorecurse{4}{\item text}
 \stopitemize
 
 \stoptext
 
 Great, that's exactly what I was looking for. Now that we're at
 it: actually the spec wants this on per-item basis. This would
 amount to having another (apart from the reference) argument to
 “\item”, e.g.
 
 ···8
 \startitemize[n]
 \item[n=1]  foo 
 \item[n=2]  bar 
 \item[n=3]  foo 
 \item[n=5]  bar 
 \item[n=8]  foo 
 \item[n=13] bar 
 \stopitemize
 ···8
 
 Regardless of if there's a practical use for that: is this
 possible as well without resorting  to repeated \setnumber'ing?

\starttext
\startitemize
\sym{1.} text
\sym{2.} text
\sym{4.} text
\sym{7.} text
\sym{8.} text
\stopitemize
\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
___


[NTG-context] [***SPAM***] How to break lines with \type{}?

2010-08-26 Thread Peter Münster
Hello,

How can I teach \type{} to break lines just as \hyphenatedurl{} does?

\starttext
\hsize1pt
\type{C:bla/blub/foo/bar}
\hyphenatedurl{C:bla/blub/foo/bar}
\stoptext

TIA for any help!
Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] [***SPAM***] How to break lines with \type{}?

2010-08-26 Thread Hans Hagen

On 26-8-2010 11:02, Peter Münster wrote:

Hello,

How can I teach \type{} to break lines just as \hyphenatedurl{} does?

\starttext
\hsize1pt
\type{C:bla/blub/foo/bar}
\hyphenatedurl{C:bla/blub/foo/bar}
\stoptext


not, but there is \typ for normal text

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
___


Re: [NTG-context] How to break lines with \type{}?

2010-08-26 Thread Peter Münster
On Thu, Aug 26 2010, Hans Hagen wrote:

 On 26-8-2010 11:02, Peter Münster wrote:
 Hello,
 
 How can I teach \type{} to break lines just as \hyphenatedurl{} does?
 
 \starttext
 \hsize1pt
 \type{C:bla/blub/foo/bar}
 \hyphenatedurl{C:bla/blub/foo/bar}
 \stoptext
 
 not, but there is \typ for normal text

Hello Hans,

\typ does not break:

\starttext
\hsize1pt
\typ{c:bla/blub}
\stoptext


But I've found the solution:

% \definetype[Code][style=tt, color=darkblue, align=hyphenated] % not working
\def\Code#1{\bgroup\tt\color[darkblue]\hyphenatedurl{#1}\egroup}
\starttext
\hsize1pt
\Code{c:bla/blub}
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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] \setupcite[authornum][...] not working

2010-06-08 Thread Stefan Müller
Hi,

I'm using the ams-bibliography style and want to include authornum-cites in 
the document (so i want to input something like in the paper by 
\cite[authornum][doe] instead of in the paper by Doe \cite[num][doe].

The \cite command works as intended, but I'm not able to change the 
typesetting properties with \setupcite[authornum][...]. The others, like 
\setupcite[num][...] and \setupcite[author][...] seem to work as they should, 
though.

I provide a minimal example below, where to options set in line 4 are not used 
for typesetting the \cite[ref1]. I'm using the context minimals, MkIV.

\usemodule[bib]
\setupbibtex[database={test.bib}]
\setuppublications[alternative=ams, refcommand=authornum]
\setupcite[authornum][left={\}, andtext={ foo }, namesep={ bar }] % 
just 
some random options, none of them works

\starttext

\cite[ref1]

\completepublications[criterium=all]

\stoptext

I already tried apa style, the same there. In addition, the names of a 
citation placed with \cite[author] (e.g. Doe and Fisher) are not typesetted 
as those of a citation placed with \cite[authornum] (e.g. Doe,Fisher), 
although I think (from a short glimpse at bibl-ams.tex) they should.

Am I doing something wrong or is this a bug? Any help appreciated.

Stefan.
___
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] Please fill out the following form

2010-06-04 Thread Taco Hoekwater

Michael Saunders wrote:

more acrobat and initialization and so ... some of these things change
per version; which version of acrobat? test file?


I have Adobe Reader 9.3.2, which I think is the latest.  The following test:

\starttext
\dorecurse{1000}{\tooltip[middle]{test}{test}}
\stoptext

produces a pdf which opens up with the purple band at the top.  There
is a button (which doesn't look much like a button) on the left of
this band that will hide it when pressed.  Still I'd like to control
it.


In my Reader 8, there is a prefs setting:

Edit - Preferences - Forms - Always hide forms document message bar

Best wishes,
Taco
___
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] ConTeXt for TL 2010

2010-04-21 Thread Hans Hagen

On 21-4-2010 2:51, Mojca Miklavec wrote:

Dear Hans,

since the version of LuaTeX will be frozen to 0.60.0 in TeX Live (I
assume), would it make sense to put some effort into making sure that
the version of ConTeXt that will be shipped with TeX Live will be at
least compatible (and possibly free of some bugs that will be
discovered by the time of release) with the shipped LuaTeX or are you
already in the middle of some big rewriting project targeting at
luatex beta-0.6x/0.7x?


sure, i need to make a current one of these days (but not today as i'm 
in the middle of replacing our nas infrastructure)


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
___


Re: [NTG-context] code

2010-04-17 Thread R. Bastian
On Sat, 17 Apr 2010 06:37:02 +0200
Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:
[...]
  the sign | (vertical bar) seems to be a special char (context/mkiv)
  it is only compiled if present in pairs |text  |
 
  the message: File ended while use of \next
 
  \type{|} works
 
 To keep the current font use \| or \letterbar
 
 Wolfgang

what is the sense of | text | ?

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


-- 
René Bastian
www.pythoneon.org
www.musiques-rb.org
http://www.soundsurvey.org.uk/


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

2010-04-16 Thread R. Bastian
On Fri, 09 Apr 2010 12:00:05 +0200
Wolfgang Schuster schuster.wolfg...@googlemail.com scribit:

 \setuplines[space=on]
 
 \starttext
 \startlines\tt
 %\startlines[style=mono] % works only in MkIV

compiled by context (== mak iv ?)
\startlines[style=mono] prints [style=mono]


 {\bf def} ra():
  a = 3
  b = 4
 \stoplines
 \stoptext
 
 Wolfgang
 
-
the sign | (vertical bar) seems to be a special char (context/mkiv)
it is only compiled if present in pairs | text |

the message: File ended while use of \next

\type{|} works
-


-- 
René Bastian
www.pythoneon.org
www.musiques-rb.org
http://www.soundsurvey.org.uk/


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

2010-04-16 Thread Wolfgang Schuster

Am 16.04.10 23:41, schrieb R. Bastian:

%\startlines[style=mono] % works only in MkIV
   
compiled by context (== mak iv ?)

\startlines[style=mono] prints [style=mono]
   

Direct setups are now gone because they produced unwanted side effects.

What you can in Mark 4 (MkIV) is to define you own lines environment.

\definelines[code][style=mono,space=on]

\startcode
\bold{def} ra()
  ...
\stopcode

the sign | (vertical bar) seems to be a special char (context/mkiv)
it is only compiled if present in pairs |text  |

the message: File ended while use of \next

\type{|} works
   

To keep the current font use \| or \letterbar

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] Building a guitar chord using MP

2010-04-10 Thread Taco Hoekwater

Vyatcheslav Yatskovsky wrote:

I usually tackle this sort of thing by first drawing the entire image
in metapost code alone. Then, when that works, write a tex command
that fills in bits and pieces of the metapost image.


I understand your idea. Indeed, MP code draws underlying grid. How to 
overlay circles on it using TeX? Please, an example.


First, create a metapost macro to draw a dot on a bar using two 
arguments. Let's assume this is mark(a,b). I won't write that

metapost macro for you, you have to do that yourself.

\startuseMPgraphic{chordgrid}{e,B,G,D,A,E}
drawoptions(withpen pencircle scaled 0.4pt withcolor black) ;
draw hlingrid(0, 5, 1, 0.8cm, 1cm) ;
draw vlingrid(0, 4, 1, 1cm, 0.8cm) ;
draw mark(1,\MPvar{e});
draw mark(2,\MPvar{B});
draw mark(3,\MPvar{G});
draw mark(4,\MPvar{D});
draw mark(5,\MPvar{A});
draw mark(6,\MPvar{E});
\stopuseMPgraphic

\define[6]\Ch
  {\dontleavehmode
   \useMPgraphic{chordgrid}{e={#1},B={#2},G={#3},D={#4},A={#5},E={#6}}}%
   \hskip2mm}

Best wishes,
Taco
___
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] InteractionsBar - another shot

2010-04-02 Thread Matthias Weber

Dear al,

let me try again:

The following works in mkii but all the buttons get squeezed together  
in mkiv. I have the hunch that I'm doing something that I am not  
supposed

to which just accidentally works in mkii. But I can't figure out what.


Thanks,
Matthias



\setupbodyfont  [10pt]

% Colors

\setupcolors[state=start]
\setupcolor [rgb]


\definecolor [HyperlinkColor] [r=.6,g=.1,b=.2] %Hyperlinks
\definecolor [ContrastColor] [r=.1,g=.2,b=.2] % ?
\definecolor [InteractionColor] [r=.1,g=.3,b=.2] %available actionbar  
bars

\definecolor [ContrastColor2][r=.1,g=.1,b=.4] %current actionbar bar


\setupinteraction   [   state=start,
menu=on,
page=yes,
color=HyperlinkColor,
contrastcolor=ContrastColor]

\setupinteractionmenu
  [bottom]
  [leftoffset=+10pt,
   rightoffset=-10pt]

\startinteractionmenu[bottom]
  \txt \InteractionButtons \\
\stopinteractionmenu

\def\InteractionButtons%
  {\interactionbuttons
 [width=40em,height=1em]
 [PreviousJump,NextJump,
  firstpage,
  firstsubpage,previouspage,nextpage,lastsubpage,
  lastpage,
  CloseDocument]}



\setupinteractionmenu   [   state=start]

% Page Layout

\setuppapersize [S6][S6]

\setuplayout[   bottomspace=.8cm,
bottom=12pt]

\starttext

\dorecurse{10}{\input knuth\par}

\stoptext

___
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] setupinmargin failing?

2010-03-24 Thread Wolfgang Schuster

Am 24.03.10 16:57, schrieb Hans van der Meer:
Must I really understand from your reply that \setupinmargin[x=y] is 
not equivalent to \setupinmargin[][x=y]? That is: an absent optional 
argument is not really optionally absent?

Your [] is not an absent optional argument at all, it is a given
optional argument (that is empty).
Point taken. But should that has the effect: ignore what follows in 
the second argument?

It’s a effect how the \setupinmargin command is implemented.

What you tried to do is similar to the effect of the second 
\processcommalist command.


\starttext

\processcommalist[foo,bar]\quotation

\processcommalist[]\quotation

\processcommalist[abc,xyz]\quotation

\stoptext

You expect to get

“foo”“bar”
“”
“abc”“xyz”

as output but what you really get is

“foo”“bar”
“abc”“xyz”

The empty argument is ignored and nothing happens.

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] beta: \underbar is broken (mkiv)

2010-03-23 Thread Taco Hoekwater


Hans Hagen wrote:
 On 22-3-2010 21:06, Peter Rolf wrote:
 Hi,

 the underbar line is drawn vertically here.

 \starttext
 sonder\underbar{bar}
 \stoptext

 MTXrun | current version: 2010.03.20 22:59
 This is LuaTeX, Version beta-0.53.0-2010032213 (rev 3535)
 
 looks like a but in luatex ... when i use a long word we get a rule with
 much ht/dp while in fact quite some wd is set; the node reports the
 right values ... i'll test it with taco tommorrow

Fixed in the luatex repository.

Best wishes,
Taco
___
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] beta: \underbar is broken (mkiv)

2010-03-23 Thread Peter Rolf
Am 23.03.2010 11:02, schrieb Taco Hoekwater:
 
 
 Hans Hagen wrote:
 On 22-3-2010 21:06, Peter Rolf wrote:
 Hi,

 the underbar line is drawn vertically here.

 \starttext
 sonder\underbar{bar}
 \stoptext

 MTXrun | current version: 2010.03.20 22:59
 This is LuaTeX, Version beta-0.53.0-2010032213 (rev 3535)

 looks like a but in luatex ... when i use a long word we get a rule with
 much ht/dp while in fact quite some wd is set; the node reports the
 right values ... i'll test it with taco tommorrow
 
 Fixed in the luatex repository.

yep, looks good again. thanks for the quick fix.

best wishes, Peter

___
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] beta: \underbar is broken (mkiv)

2010-03-22 Thread Peter Rolf
Hi,

the underbar line is drawn vertically here.

\starttext
sonder\underbar{bar}
\stoptext

MTXrun | current version: 2010.03.20 22:59
This is LuaTeX, Version beta-0.53.0-2010032213 (rev 3535)

Peter
___
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] beta: \underbar is broken (mkiv)

2010-03-22 Thread Hans van der Meer

Just checked here in
ConTeXt  ver: 2010.03.20 22:59 MKIV  fmt: 2010.3.21  int: english/ 
english

Can confirm that:

\starttext
sonder\underbar{bar}

gives vertical bar, but the following (note the blank line after  
starttext) does not.


\starttext

sonder\underbar{bar}

met vriendelijke groet
Hans van der Meer




On 22 mrt 2010, at 21:06, Peter Rolf wrote:


Hi,

the underbar line is drawn vertically here.

\starttext
sonder\underbar{bar}
\stoptext

MTXrun | current version: 2010.03.20 22:59
This is LuaTeX, Version beta-0.53.0-2010032213 (rev 3535)

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


___
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] beta: \underbar is broken (mkiv)

2010-03-22 Thread Hans Hagen

On 22-3-2010 21:06, Peter Rolf wrote:

Hi,

the underbar line is drawn vertically here.

\starttext
sonder\underbar{bar}
\stoptext

MTXrun | current version: 2010.03.20 22:59
This is LuaTeX, Version beta-0.53.0-2010032213 (rev 3535)


looks like a but in luatex ... when i use a long word we get a rule with 
much ht/dp while in fact quite some wd is set; the node reports the 
right values ... i'll test it with taco tommorrow


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] Page numbering and MkIV

2010-01-14 Thread Vedran Miletić
This code:

\enableregime[utf]

\starttext
\title{BLAH BLAH\\
BLAH}
\setuppagenumbering[state=stop]
\page
\setuppagenumbering[state=start,location={footer,center},conversion=romannumerals,style={\bf}]
\completecontent
\page
\setuppagenumbering[state=stop]
\chapter[chapter:foo]{Foo Bar}
\setuppagenumbering[state=start,location={footer,center},conversion=no,style={\ss\bf}]
\section[sect:evocation]{EVOCATION}
Lorem ipsum.
\stoptext

Produces what I expect with MkII (blank page, roman numbered page,
arabic numbered page), but MkIV produces PDF with arabic numbering on
every page.

Any ideas?

-- 
Vedran Miletić
___
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] XML - creating a list by hand (mkiv)

2010-01-12 Thread Peter Rolf
Hi,

after a (too short) vacation I'm again trying to make this run.
(btw: inserting in empty root still does not work here)

I have attached a more detailed example (ugly XMP), that shows my
current problems. The result of the operations is saved in xmp.xml.

And here are the problems...

1.
xml.replace(xmp,xml://rdf:Description/dc:creator/rdf:Seq/rdf:li,rdf:lidc:CREATOR1/rdf:li)

wanted:  .. rdf:Seq rdf:lidc:CREATOR1/rdf:li /rdf:Seq ..
I get :  .. rdf:Seq dc:CREATOR1 /rdf:Seq ..

2.
How can I inject a piece of XML (file or text sequence) into the
existing XML tree? I have managed to get a valid lpath expression
(xml://rdf:... does not work), but nothing is inserted.

3.
xml.insert(xmp,xml://rdf:Description/dc:creator/rdf:Seq,rdf:lidc:CREATOR2/rdf:li)

works only, if another (even empty) rdf:li element already exists. If
I delete this element beforehand, the string is inserted after rdf:Seq.

What does
 [comment]={ auto-child replaced by auto-descendant }
mean here?

---
The problems must be examined exclusively (comment other problems to test).

This is all very confusing, aside from the fact, that I'm used to think
in xpath and not lpath. So I'm quite unsure, if this is a ConTeXt
problem or just my ignorance of lpath. Anyhow, no fun ;)


Greetings, Peter

MTXrun | current version: 2010.01.11 14:57
This is LuaTeX, Version beta-0.50.0-201008



Am 22.12.2009 14:33, schrieb Hans Hagen:
 Peter Rolf wrote:
 Am 22.12.2009 14:04, schrieb Hans Hagen:
 Peter Rolf wrote:
 Hi,

 can someone give me a helping hand with the following example. I still
 have no general survey over the XML related code in ConTeXt (donno
 what functions to use). The last time I played with it is one and a
 half year ago and many things have changed (meaning that the old
 examples no longer work).
 http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf

 oeps, how could I missed that one... :(


 I simply want to create a XML document and insert some elements. My
 main problem is to insert an element at root level. I can insert an
 element before and after another element, but not into the element.
 I'm not sure, if I have understood the meaning of the pattern
 parameter correctly. Is this equal to XPath?


 %-
 \starttext

 \startluacode

 local xmp = xml.convert(?xml version='1.0'
 standalone='yes'?\nroot\nbarbla/bar\n/root)
 --xml.before(xmp,/root/bar,subfoo/sub)

 --xml.delete(xmp,bar)
 --xml.inject(xmp,/sub,subbar/sub)-- only for xml-files?

 xml.insert(xmp,/root/bar,sub/)
 --xml.inject(xmp,/*/bar,sub/)
 this works

 sub/sub

 Mhh, not here. When I look into the saved file (test.xml) I get
 
 add some content (i need to look into the empty case (root only))
 
 ?xml version='1.0' standalone='yes'?
 root
 barbla/barerrorinvalid xml file - unparsed text/error
 /root


 But I guess that the linked PDF will give all the answers I need.
 
 the most important change is that we now can have many handlers; when
 you are inside tex and want to manipulate xml without piping to tex, you
 need the xml:// path prefix but the manual mentions this
 
 also, there are some tracing options that can be handy
 
 Hans
 
 
 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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
 ___
 
 

\starttext

\enabletrackers[xml.parse]
%\enabletrackers[xml.path] 
%\enabletrackers[xml.profile] -- exclusive
%\enabletrackers[xml.entities]

\startluacode

local xmp = xml.load(xmp-default.xml)

-- 1. replace empty rdf:li/; (results in dc:CREATOR1 without rdf:li tags)
xml.replace(xmp,xml://rdf:Description/dc:creator/rdf:Seq/rdf:li,rdf:lidc:CREATOR1/rdf:li)
-- 2. inject XML sequence; (how?)
--xml.inject 
(xmp,xml:///rdf:Description/dc:creator/rdf:Seq,rdf:lidc:CREATOR1/rdf:li)

-- delete the first rdf:li entry
--xml.delete(xmp,xml://rdf:Description/dc:creator/rdf:Seq/rdf:li)
-- 3. insert element into rdf:Seq; (only after/before, but not into empty)
--xml.insert 
(xmp,xml:///rdf:Description/dc:creator/rdf:Seq,rdf:lidc:CREATOR2/rdf:li)


xml.save(xmp,xmp.xml)

\stopluacode
\null

\stoptext
x:xmpmeta xmlns:x=adobe:ns:meta/
rdf:RDF xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
rdf:Description rdf:about= xmlns:dc=http

Re: [NTG-context] Pretty Printing Python code

2009-12-29 Thread luigi scarso
On Tue, Dec 29, 2009 at 12:03 PM, Erik Margraf
erik.marg...@googlemail.com wrote:
 Hello all,
 I wanted to typeset some Python code and stumbled across the
 pretty printing feature of ConTeXt. So far, I think I've learned the
 following:

    -- There's no pretty printer for python. Neither in MKII nor in MKIV
    -- The wiki has an example implementation for a python pretty printer
   for MKII, i guess.

 I decided to play a little bit with pretty printing (maybe implement a
 Python pretty printer on my own) and failed at the start ;-)
 I tried the following:
   -- Copied the filename pret-lua.lua to pret-py.lua
   -- Added a print statement to verify that the respective lua
     code (pret-lua.lua, pret-py.lua) is actually called.
 When I ran context on the file below, I could see that pret-lua.lua
 had been called, but pret-py.lua had not.  I guess, I did wrong something
 very fundamental.

 Thanks in advance for any hint

 Erik Margraf
First, I have made some changes to  pret-py.lua

 if not modules then modules = { } end modules ['pret-lua'] = {
---
 if not modules then modules = { } end modules ['pret-py'] = {
17c17
 local visualizer = buffers.newvisualizer(lua)
---
 local visualizer = buffers.newvisualizer(py)
105c105
 local function flush_lua_word(state, word)
---
 local function flush_python_word(state, word)
196c196
 state = flush_lua_word(state,word)
---
 state = flush_python_word(state,word)
234c234
 state = flush_lua_word(state,word)
---
 state = flush_python_word(state,word)
242c242
 state = flush_lua_word(state,word)
---
 state = flush_python_word(state,word)

but  *no*  other changes related to python's grammar

Next I believe that PYTHON is better than PY

\setupcolors[state=start]
\definecolor[colorprettyone]  [r=.9, g=.0, b=.0] % red
\definecolor[colorprettytwo]  [r=.0, g=.8, b=.0] % green
\definecolor[colorprettythree][r=.0, g=.0, b=.9] % blue
\definecolor[colorprettyfour] [s=0.60]   % gray
\definecolor[colorprettyfive] [orange]


\definepalet[colorpretty]
[prettyone=colorprettyone,
prettytwo=colorprettytwo,
prettythree=colorprettythree,
prettyfour=colorprettyfour,
prettyfive=colorprettyfive]
% Python listings

\definepalet  [PYcolorpretty] [colorpretty]
\setuptyping  [PYTHON][bodyfont=10pt,option=color]
\installprettytype[PYTHON]  [PY]
\definetyping [PYTHON][option=PYTHON]


\starttext
\section{Python sample}
\startPYTHON
#!/usr/local/bin/python

import os.path, sys

# Just a comment
foo = os.environ.get('FOO')
bar = os.environ.get('BAR')

if foo:
foo = os.path.realpath(foobar)
elif bar:
bar = os.path.realpath(bar)
else:
print  sys.stderr, '''
FOO or BAR need to be set!
'''
\stopPYTHON
\stoptext

It seems the option=color  is setted by default to TEX

\setvalue{\??tp:\c!option:\v!color}{\setupprettiesintype{TEX}%
\let\obeycharacters\setupprettytype
\let\obeytabs\ignoretabs}



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


Re: [NTG-context] XML - creating a list by hand (mkiv)

2009-12-22 Thread Hans Hagen

Peter Rolf wrote:

Hi,

can someone give me a helping hand with the following example. I still 
have no general survey over the XML related code in ConTeXt (donno what 
functions to use). The last time I played with it is one and a half year 
ago and many things have changed (meaning that the old examples no 
longer work).


http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf

I simply want to create a XML document and insert some elements. My main 
problem is to insert an element at root level. I can insert an element 
before and after another element, but not into the element. I'm not 
sure, if I have understood the meaning of the pattern parameter 
correctly. Is this equal to XPath?



%-
\starttext

\startluacode

local xmp = xml.convert(?xml version='1.0' 
standalone='yes'?\nroot\nbarbla/bar\n/root)

--xml.before(xmp,/root/bar,subfoo/sub)

--xml.delete(xmp,bar)
--xml.inject(xmp,/sub,subbar/sub)-- only for xml-files?

xml.insert(xmp,/root/bar,sub/)
--xml.inject(xmp,/*/bar,sub/)


this works

sub/sub


--xml.sprint(xml.filter(xmp,/root/sub))

xml.save(xmp,test.xml)

\stopluacode

\stoptext
%-


Best wishes,  Peter
___ 

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
___ 




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] XML - creating a list by hand (mkiv)

2009-12-22 Thread Peter Rolf
Am 22.12.2009 14:04, schrieb Hans Hagen:
 Peter Rolf wrote:
 Hi,

 can someone give me a helping hand with the following example. I still
 have no general survey over the XML related code in ConTeXt (donno
 what functions to use). The last time I played with it is one and a
 half year ago and many things have changed (meaning that the old
 examples no longer work).
 
 http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf
 
oeps, how could I missed that one... :(


 I simply want to create a XML document and insert some elements. My
 main problem is to insert an element at root level. I can insert an
 element before and after another element, but not into the element.
 I'm not sure, if I have understood the meaning of the pattern
 parameter correctly. Is this equal to XPath?


 %-
 \starttext

 \startluacode

 local xmp = xml.convert(?xml version='1.0'
 standalone='yes'?\nroot\nbarbla/bar\n/root)
 --xml.before(xmp,/root/bar,subfoo/sub)

 --xml.delete(xmp,bar)
 --xml.inject(xmp,/sub,subbar/sub)-- only for xml-files?

 xml.insert(xmp,/root/bar,sub/)
 --xml.inject(xmp,/*/bar,sub/)
 
 this works
 
 sub/sub
 
Mhh, not here. When I look into the saved file (test.xml) I get

?xml version='1.0' standalone='yes'?
root
barbla/barerrorinvalid xml file - unparsed text/error
/root


But I guess that the linked PDF will give all the answers I need.

Thanks Hans!


 --xml.sprint(xml.filter(xmp,/root/sub))

 xml.save(xmp,test.xml)

 \stopluacode

 \stoptext
 %-


 Best wishes,  Peter
 ___

 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
 ___

 
 

___
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] XML - creating a list by hand (mkiv)

2009-12-22 Thread Hans Hagen

Peter Rolf wrote:

Am 22.12.2009 14:04, schrieb Hans Hagen:

Peter Rolf wrote:

Hi,

can someone give me a helping hand with the following example. I still
have no general survey over the XML related code in ConTeXt (donno
what functions to use). The last time I played with it is one and a
half year ago and many things have changed (meaning that the old
examples no longer work).

http://www.pragma-ade.com/general/manuals/xml-mkiv.pdf


oeps, how could I missed that one... :(



I simply want to create a XML document and insert some elements. My
main problem is to insert an element at root level. I can insert an
element before and after another element, but not into the element.
I'm not sure, if I have understood the meaning of the pattern
parameter correctly. Is this equal to XPath?


%-
\starttext

\startluacode

local xmp = xml.convert(?xml version='1.0'
standalone='yes'?\nroot\nbarbla/bar\n/root)
--xml.before(xmp,/root/bar,subfoo/sub)

--xml.delete(xmp,bar)
--xml.inject(xmp,/sub,subbar/sub)-- only for xml-files?

xml.insert(xmp,/root/bar,sub/)
--xml.inject(xmp,/*/bar,sub/)

this works

sub/sub


Mhh, not here. When I look into the saved file (test.xml) I get


add some content (i need to look into the empty case (root only))


?xml version='1.0' standalone='yes'?
root
barbla/barerrorinvalid xml file - unparsed text/error
/root


But I guess that the linked PDF will give all the answers I need.


the most important change is that we now can have many handlers; when 
you are inside tex and want to manipulate xml without piping to tex, you 
need the xml:// path prefix but the manual mentions this


also, there are some tracing options that can be handy

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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] XML - creating a list by hand (mkiv)

2009-12-21 Thread Peter Rolf

Hi,

can someone give me a helping hand with the following example. I still 
have no general survey over the XML related code in ConTeXt (donno what 
functions to use). The last time I played with it is one and a half year 
ago and many things have changed (meaning that the old examples no 
longer work).


I simply want to create a XML document and insert some elements. My main 
problem is to insert an element at root level. I can insert an element 
before and after another element, but not into the element. I'm not 
sure, if I have understood the meaning of the pattern parameter 
correctly. Is this equal to XPath?



%-
\starttext

\startluacode

local xmp = xml.convert(?xml version='1.0' 
standalone='yes'?\nroot\nbarbla/bar\n/root)

--xml.before(xmp,/root/bar,subfoo/sub)

--xml.delete(xmp,bar)
--xml.inject(xmp,/sub,subbar/sub)-- only for xml-files?

xml.insert(xmp,/root/bar,sub/)
--xml.inject(xmp,/*/bar,sub/)

--xml.sprint(xml.filter(xmp,/root/sub))

xml.save(xmp,test.xml)

\stopluacode

\stoptext
%-


Best wishes,  Peter
___
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] Biblography list does not show numbers

2009-12-05 Thread Matthijs Kooijman
Hey all,

I'm trying to use a bibliography, but it seems no numbers are show in the
biblography that is generated. The following example:

Test.tex:
=
\usemodule[bib]
\setupbibtex[database=Test] 
 
\starttext 
\section{foo}
Blaa \cite[foo] Bar 
\completepublications
\stoptext

Test.bib:
==
@article{foo,
 author = {Bar},
 title = {Foo},
 year = {2009},
}

generates the following text:

  1 foo

Blaa [1] Bar

  1 References

Bar (2009). Foo. .

So, the citation gets a number as it should, is referenced by the number, but
the list of references does not list that number. This makes the bibliography
pretty useless :-) This also happens with MkII (though the reference doesn't
get a number, but uses the author name and year: (Bar, 2009).

Am I missing something, or is this a bug?

On a related note, if I remove the \section, no reference will be generated.
This is probably not a problem in real documents, though.

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
W00ps, forgot to include the testcase I made:

\starttext
Foo \inmargin{Blerf} Bar \inmargin {Baz}
\stoptext


signature.asc
Description: Digital signature
___
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] inothermargin overlaps

2009-12-02 Thread luigi scarso
On Wed, Dec 2, 2009 at 11:47 AM, Matthijs Kooijman matth...@stdin.nl wrote:
 W00ps, forgot to include the testcase I made:

 \starttext
 Foo \inmargin{Blerf} Bar \inmargin {Baz}
 \stoptext
Your code is ok

Try
\starttext
Foo Baz \inmargin {Blerf \\ Baz}
\stoptext

\starttext
Foo Baz \inmargin {Blerf  Baz}
\stoptext


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


Re: [NTG-context] inothermargin overlaps

2009-12-02 Thread Matthijs Kooijman
 Try
 \starttext
 Foo Baz \inmargin {Blerf \\ Baz}
 \stoptext
Hmm, that might work, but my real case is slightly more complicated. I have
the \inmargin wrapped in a \refdef command, that references some topic on some
page. So I say \refdef{foo} and it looks up both the text and page number for
foo and puts that into the margin.

I could probably complicate my \refdef command into taking multiple references
at the same time. However, that will still require me to merge those commands
when they are close together, which might mean some of the rerefences are not
in their logical place anymore. For example:

  Some short paragraph referencing foo. \refdef{foo}

  And another paragraph refering bar. \refdef{bar}

This has the references in the logical places. With your suggestions, I must
change this to:

  Some short paragraph referencing foo. \refdef{foo,bar}

  And another paragraph refering bar.

Which is more error prone when I start moving around text... So, it's a
workable solution, but it's not quite ideal yet...

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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] Bib/bibtex duplicate entries

2009-10-21 Thread Émilien Tlapale

Taco Hoekwater wrote:

Émilien Tlapale wrote:
  

Hi!

I am new to ConTeXt and juste created my first document, however
there seems to be a strange behaviour in the output. Indeed I see
a lot of duplicated bibliography entries. Moreover using sort=author
did not sort the list.

My document layout is as follows:



That did not help, we will need an actual small test file.

Best wishes,
Taco
Here comes too small context and bibtex files with the same problem, 
i.e. the bibliography

lists every occurence of a bib entry, even if they were already listed.
Best,
Émilien

\usemodule[bib]
\setupbibtex[database=ctx-tx]

\starttext
\startbodymatter

\chapter{Chapter X}

\cite[bar]

\cite[bar]

\stopbodymatter
\startappendices
\chapter{Bibliography}
\placepublications
\stopappendices

\stoptext

@article{bar,
   author={Bar, K.},
   title={Hello world},
   journal={Super Smurfs},
   year={1986}
}
___
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] Cambria integral operator

2009-10-15 Thread Taco Hoekwater


Sebastian Sturm wrote:
 Hi all,
 
 I have been playing around a bit with the new ConTeXt Minimals and
 especially Cambria Math. I couldn't figure out, however, why the
 integral operator always comes out at about half the size of \sum or
 \prod. I couldn't find any relevant threads on the mailing list, but
 surely this is not the way it's supposed to be?

No, that is clearly not right. I will investigate and report back.

On the \widehat: it scales as far as the font allows it to. If that
is not wide enough, I guess you could send a bug report to Microsoft.

 Is there some list on the web showing what parts of math have been
 implemented, what still needs to be done (and, where someone with
 limited TeX knowledge could provide some assistance)?

No, not on the web. But there are only a few known MATH issues in the
core/mkiv that I know of:

* Latin Modern Math (and other old math font) virtual definitions are
  far from perfect (but that should not affect you, as you are using
  CambriaMath).
* There is no support for skewed (text-style, with a diagonal bar,
  like in the frac feature) fractions yet in luatex.
* The traditional TeX commands \atopwithdelims, \overwithdelims, and
  \abovewithdelims do not work properly because there is no matching
  MATH parameter at all.

The real problem though, is that we do not have massive math tests:
neither Hans nor me do any math typesetting in daily practise.

Best wishes,
Taco
___
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] \setupquotation affecting \quote

2009-10-09 Thread Matthijs Kooijman
Hi,

I've been trying to use \setupquotation, but it seems it doesn't just affect
\quotation, but also \quote. In particular, setting style to tfb enlarges the
font used by \quote and somehow removes the quotes from around it.

Seeing that there is also a \setupquote, and from looking at the code, I think
this is not supposed to happen. This happens with MkII as well as MkIV, it
seems.

The following example shows the problem:

  \starttext
  \quote{Foo}
  \setupquotation[style=tfb]
  \quote{Bar}
  \stoptext


Gr.

Matthijs


signature.asc
Description: Digital signature
___
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] overprint bug (mkiv)

2009-09-16 Thread Peter Rolf

Hi Hans,

overprinting is broken under very special conditions. You need to add 
framed content with a defined mp overlay as background and *deactivated 
frame* to a layer (last of the four pairs in the example). The text of 
the last pair is written in the same \GSoverprint group (in this case 
the \GSknockout is even missing). Very obscure.


Have fun,

Peter

\setupcolors[state=start]
\setuppagenumber[state=stop]

\pdfcompresslevel=0
\pdfobjcompresslevel=0

\startuniqueMPgraphic{FOO}
fill OverlayBox withcolor lightgray;
\stopuniqueMPgraphic

\defineoverlay[FOO][\uniqueMPgraphic{FOO}]
\definelayer[BAR]



\starttext

% OK
\setlayer[BAR][x=0mm,y=0mm]
{\framed[background=color,backgroundcolor=lightgray,frame=off]
{\startoverprint first one\stopoverprint}}
\setlayer[BAR][x=50mm,y=0mm]
{\framed[background=color,backgroundcolor=lightgray,frame=off]
{\startoverprint second one\stopoverprint}}

% OK
\setlayer[BAR][x=0mm,y=15mm]
{\framed[background=color,backgroundcolor=lightgray,frame=on]
{\startoverprint first one\stopoverprint}}
\setlayer[BAR][x=50mm,y=15mm]
{\framed[background=color,backgroundcolor=lightgray,frame=on]
{\startoverprint second one\stopoverprint}}

% OK
\setlayer[BAR][x=0mm,y=30mm]
{\framed[background=FOO,frame=on]
{\startoverprint first one\stopoverprint}}
\setlayer[BAR][x=50mm,y=30mm]
{\framed[background=FOO,frame=on]
{\startoverprint second one\stopoverprint}}

% ( layer + overlay + frame=off ) is buggy
\setlayer[BAR][x=0mm,y=45mm]
{\framed[background=FOO,frame=off]
{\startoverprint first one\stopoverprint}}
\setlayer[BAR][x=50mm,y=45mm]
{\framed[background=FOO,frame=off]
{\startoverprint second one\stopoverprint}}


\flushlayer[BAR]

\stoptext


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


Re: [NTG-context] How can I start wiith 2 in itemize?

2009-09-13 Thread Peter Rolf

Hi Hans,

this is not fixed yet...


Peter Rolf schrieb:

Xan schrieb:

Hi,

I want to start itemize with 2.
I put \startitemize[n][start=2] but it does not work.


third and hopefully last try :D

[strc-itm.mkii]

\def\setitemlevel#1%
 {\ifnum\currentitemlevel\zerocount
\settrue\firstlistitem
%
% \expanded{\setitemparameter{\currentitemlevel}{\c!start}{1}}% ***
\doifinset{0}{#1}{\setitemparameter\currentitemlevel\c!start{0}}%

\setcounter{\@@itemcounter\currentitemlevel}{\the\numexpr\getitemparameter\currentitemlevel\c!start-1\relax}% 
***

\doifelsenothing{\getitemparameter\currentitemlevel\c!start}
  {\def\currentitemoffset{1}}
  
{\def\currentitemoffset{\getitemparameter\currentitemlevel\c!start}%

   \letitemparameter\currentitemlevel\c!start\empty}%
%
\def\tempnumber
  {\countervalue{\@@itemcounter\currentitemlevel}}%
\doifelse{\getitemparameter\currentitemlevel\c!placestopper}\v!yes
  {\def\tempsymbol{\getitemparameter\currentitemlevel\c!stopper}}
  {\let\tempsymbol\empty}%
  \fi}


I get the correct numbers with the following example.

\starttext

\startitemize[n][start=2]
\item foo
\item bar
\stopitemize


\startitemize[n]
\item foo
\item bar
\stopitemize

\stoptext



Strange?

Xan.
___ 

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
___ 





___ 

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
___ 





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


Re: [NTG-context] How can I start wiith 2 in itemize?

2009-09-03 Thread Peter Rolf

Xan schrieb:

Hi,

I want to start itemize with 2.
I put \startitemize[n][start=2] but it does not work.


third and hopefully last try :D

[strc-itm.mkii]

\def\setitemlevel#1%
 {\ifnum\currentitemlevel\zerocount
\settrue\firstlistitem
%
% \expanded{\setitemparameter{\currentitemlevel}{\c!start}{1}}% ***
\doifinset{0}{#1}{\setitemparameter\currentitemlevel\c!start{0}}%

\setcounter{\@@itemcounter\currentitemlevel}{\the\numexpr\getitemparameter\currentitemlevel\c!start-1\relax}% 
***

\doifelsenothing{\getitemparameter\currentitemlevel\c!start}
  {\def\currentitemoffset{1}}
  {\def\currentitemoffset{\getitemparameter\currentitemlevel\c!start}%
   \letitemparameter\currentitemlevel\c!start\empty}%
%
\def\tempnumber
  {\countervalue{\@@itemcounter\currentitemlevel}}%
\doifelse{\getitemparameter\currentitemlevel\c!placestopper}\v!yes
  {\def\tempsymbol{\getitemparameter\currentitemlevel\c!stopper}}
  {\let\tempsymbol\empty}%
  \fi}


I get the correct numbers with the following example.

\starttext

\startitemize[n][start=2]
\item foo
\item bar
\stopitemize


\startitemize[n]
\item foo
\item bar
\stopitemize

\stoptext



Strange?

Xan.
___ 

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
___ 





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


Re: [NTG-context] How can I start wiith 2 in itemize?

2009-09-03 Thread Xan

En/na Peter Rolf ha escrit:

Xan schrieb:

Hi,

I want to start itemize with 2.
I put \startitemize[n][start=2] but it does not work.


third and hopefully last try :D

[strc-itm.mkii]

\def\setitemlevel#1%
 {\ifnum\currentitemlevel\zerocount
\settrue\firstlistitem
%
% \expanded{\setitemparameter{\currentitemlevel}{\c!start}{1}}% ***
\doifinset{0}{#1}{\setitemparameter\currentitemlevel\c!start{0}}%

\setcounter{\@@itemcounter\currentitemlevel}{\the\numexpr\getitemparameter\currentitemlevel\c!start-1\relax}% 
***

\doifelsenothing{\getitemparameter\currentitemlevel\c!start}
  {\def\currentitemoffset{1}}
  
{\def\currentitemoffset{\getitemparameter\currentitemlevel\c!start}%

   \letitemparameter\currentitemlevel\c!start\empty}%
%
\def\tempnumber
  {\countervalue{\@@itemcounter\currentitemlevel}}%
\doifelse{\getitemparameter\currentitemlevel\c!placestopper}\v!yes
  {\def\tempsymbol{\getitemparameter\currentitemlevel\c!stopper}}
  {\let\tempsymbol\empty}%
  \fi}


I get the correct numbers with the following example.

\starttext

\startitemize[n][start=2]
\item foo
\item bar
\stopitemize


\startitemize[n]
\item foo
\item bar
\stopitemize

\stoptext




Thank you very much, Peter, very much.
But one second: the code you put here, I suppose I have to copy-paste to 
this file. Is it correct? The *** are correct or is html bold (I read in 
plain text).? Can you clear me


Now the strange is the by default the startitemize crazies at that 
point and before all were fine 8-D. Joke. At least I'm useful for 
detecting errors. Taco knows it ;-) Another joke.


Regards,
Xan.





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


[NTG-context] Using \startalign outside of math mode?

2009-08-28 Thread Matthijs Kooijman
Hi,

I'm using a custom pretty printer to apply some formatting to a buffer.
However, I'm not using a monospaced font, but some sans serif font to display
the result. In the original text, I have some lines that are nicely aligned
using leading spaces. For example:

  foo = bar
  | baz

Obviously, when using a non monospaced font for this, the alignment is lost.
When in math mode, I can use \startalign to force alignment, like: 

  \startalign
  foo \NC= bar
  \NC| baz
  \stopalgin

However, I haven't manage to switch to math mode inside pretty printed text.
Also, even if I would, I would get my text rendered in math mode, which
probably won't work.

So, I'm wondering if there is anything like \startalign to use outside of math
mode? I've been looking at the implementation of \startalign, but couldn't
find it...

Some way to insert spacing until some fixed point (e.g. tab-stop like) would
probably work, if I can define the tabstop on a case by case basis?

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] Using \startalign outside of math mode?

2009-08-28 Thread Matthijs Kooijman
Hi all,

foo = bar
| baz

it seems I found some sort of a solution. Using the \setwidthof I found at
[1], I wrote the following:


  \def\setwidthof#1\to#2%
  {\bgroup
  \setbox\scratchbox\hbox{#1}%
  \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

  foo = bar
  \setwidthof{foo }\to\alignwidth
  \hskip\alignwidth| baz

This works, but is not so pretty, obviously. Since I'm using a custom pretty
printer, I can probably hack something up that generates this from the more
natural form automatically. Still, I'm wondering if there are more pretty
methods to do this. In particular, this method is completely limited to
indents at the start of a line (e.g., aligning the b's of bar and baz isn't
possible, though I could perhs do more complicated math using the width of
| , but that will become even more hideous...

Any other suggestions?

Gr.

Matthijs

[1]: http://www.ntg.nl/pipermail/ntg-context/2009/037404.html


signature.asc
Description: Digital signature
___
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
___


Re: [NTG-context] Using \startalign outside of math mode?

2009-08-28 Thread Aditya Mahajan

On Fri, 28 Aug 2009, Matthijs Kooijman wrote:


Hi,

I'm using a custom pretty printer to apply some formatting to a buffer.
However, I'm not using a monospaced font, but some sans serif font to display
the result. In the original text, I have some lines that are nicely aligned
using leading spaces. For example:

 foo = bar
 | baz

Obviously, when using a non monospaced font for this, the alignment is lost.
When in math mode, I can use \startalign to force alignment, like:

 \startalign
 foo \NC= bar
 \NC| baz
 \stopalgin

However, I haven't manage to switch to math mode inside pretty printed text.
Also, even if I would, I would get my text rendered in math mode, which
probably won't work.

So, I'm wondering if there is anything like \startalign to use outside of math
mode? I've been looking at the implementation of \startalign, but couldn't
find it...


Startalign is essentially a table with some predefined defaults. You can 
try something like (untested)


\starttable[|rs(0.2em)|cs(0.2em)|l|]
 \NC foo \NC = \NC bar \NC \AR
 \NC \NC | \NC baz \NC \AR
\stoptable

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


Re: [NTG-context] PDF x1a:2001 and Context

2009-08-27 Thread John Culleton
On Wednesday 26 August 2009 17:29:20 Hans Hagen wrote:
 John Culleton wrote:
  PDF X/1a:2001 is an old pdf standard still required by some
  important American printers. Han The Thanh et al. has created a
  package for pdfLatex.  I wonder if there is a route to this
  output using Context?

 it depends ... what do validators report?

 Hans

To satisfy some US printers (e.g., LSI) the file must actually meet 
the pdf/X1a:2001 standard and the file must be labeled as such 
internally.  It is not difficult to modify the file to pdf 1.3 format 
which is essentially the same thing as pdf/X1a. But the internal 
labeling is the problem.  The standard solution is to run the file 
through Acrobat Distiller. But that is not an Open Source product. 

If the file, typically a cover layout, does not meet the above 
requirements then it is pre-rasterized by the printer prior to 
prepress in some product or other which degrades the quality of both 
type and  especially bar codes. 

It is perhaps not a problem that you choose to address in Context.  
But I am trying all avenues looking for an Open Source solution that 
can meet these draconian requirements. 

-- 
John Culleton
Able Indexers and Typesetters
___
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
___


Re: [NTG-context] PDF x1a:2001 and Context

2009-08-27 Thread luigi scarso
On Thu, Aug 27, 2009 at 3:22 PM, John Culletonj...@wexfordpress.com wrote:
 On Wednesday 26 August 2009 17:29:20 Hans Hagen wrote:
 John Culleton wrote:
  PDF X/1a:2001 is an old pdf standard still required by some
  important American printers. Han The Thanh et al. has created a
  package for pdfLatex.  I wonder if there is a route to this
  output using Context?

 it depends ... what do validators report?

 Hans

 To satisfy some US printers (e.g., LSI) the file must actually meet
 the pdf/X1a:2001 standard and the file must be labeled as such
 internally.  It is not difficult to modify the file to pdf 1.3 format
 which is essentially the same thing as pdf/X1a. But the internal
 labeling is the problem.  The standard solution is to run the file
 through Acrobat Distiller. But that is not an Open Source product.
http://www.ghostscript.com/
http://www.pstill.com/


 If the file, typically a cover layout, does not meet the above
 requirements then it is pre-rasterized by the printer prior to
 prepress in some product or other which degrades the quality of both
 type and  especially bar codes.
It shouldn't. You should use vector type and vector barcode, not bitmap
(ie gnu barcode  makes eps output) .
Eventually you can convert a pdf to a TIFF by yourself with ghostscript

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


Re: [NTG-context] \overbar in math mode

2009-08-16 Thread Aditya Mahajan

On Sun, 16 Aug 2009, Xan wrote:


Hi,

Just a question: what's the equivalent of \overbar in math mode. \underbar 
works in math mode, but \overbar does not.


\bar or \overline

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


Re: [NTG-context] git repository

2009-08-11 Thread Matthijs Kooijman
 well, such messages would not help much unless they would be detailed  
 (and then should be done for each file); as i work on all files at the  
 same time it would cost me way to much time and it gains me nothing;  
 looking at the diff in a git gui is more informative
A git commit contains changes to multiple files, with a single message, so if
you work on one logical change at a time, this should not be a problem.
Perhaps you are thinking of CVS, which (AFAIK) provides only per-file
versioning?

Also, even short messages like, Added \foo command, or Fixed \bar
alignment would probably be helpful.

Then again, you are completely correct that there is some effort to be
invested to properly use a versioning system, especially if you're not used to
working with one. In my experience, having a versioning system like git (or
mercurial seems to be good as well) does pay off in the long run, but only if
you tune your development flow to work well with it.

Gr.

Matthijs


signature.asc
Description: Digital signature
___
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
___


<    5   6   7   8   9   10   11   12   13   >