Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Taco Hoekwater
Aditya Mahajan wrote:
 Hi Taco,
 
 Is it possible to sort by the bibliography list by authors? The manual 
 says that sorttype=cite|bib?

No, because there is no reasonable way to do alphabetic sorting
in TeX.

 Also, why does bibl-ams not define 'conference'? This can have the 
 exact same definition as 'inproceedings'.

That is just an oversight, I all it in the next update.

Best, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Footnotes lost in Natural Tables

2007-02-04 Thread Steffen Wolfrum
Hi,

once again I ran into a dead-end where I never dreamt it could be a 
problem: using footnotes in tables.

For my current project I have to use 16 tables, spread over the whole 
text (about 400 pages).
Some of these tables also need footnotes (sometimes quite large). But 
they should be numbered and placed within the regular footnotes at the 
end of the page.

Trying the minimal below I saw the table's footnotes got lost:

\starttext

First paragraph\footnote{One}.

 \bTABLE
  \bTR 
\bTD Cell\footnote{Two} \eTD 
\bTD Cell\footnote{Three} \eTD 
  \eTR  
\eTABLE
Next paragraph\footnote{Four}.

\stoptext


As I have to weave 31 footnotes in these 16 tables I hope I don't need 
to place fake notes by hand, do I?

Steffen
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Sanjoy Mahajan
 Is it possible to sort by the bibliography list by authors? The manual 
 says that sorttype=cite|bib?
 No, because there is no reasonable way to do alphabetic sorting
 in TeX.

Perhaps I will reveal my own fundamental confusion about bibtex but: 

What about letting bibtex (the C program) do the miserable work of
alphabetic sorting?  Then ConTeXt could typeset (the necessary subset
of) bib items in that order.

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] linking words and graphics

2007-02-04 Thread Alan Bowen
I should like to make occurrences of the the string “Figure p” appear  
as links in my document that will take the reader to Figure p  
elsewhere in the same document. Is there a way to do this using ConTeXt?

Alan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Taco Hoekwater
Sanjoy Mahajan wrote:
Is it possible to sort by the bibliography list by authors? The manual 
says that sorttype=cite|bib?

No, because there is no reasonable way to do alphabetic sorting
in TeX.
 
 
 Perhaps I will reveal my own fundamental confusion about bibtex but: 
 
 What about letting bibtex (the C program) do the miserable work of
 alphabetic sorting?  Then ConTeXt could typeset (the necessary subset
 of) bib items in that order.

That functionality is there already \setupbibtex[sort=author]

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and CMYK

2007-02-04 Thread Peter Rolf
Hans Hagen wrote:
 Peter Rolf wrote:
 luigi scarso wrote:
   
 On 2/2/07, Peter Rolf [EMAIL PROTECTED] wrote:
 
 Hi all,

 I have some questions about cmyk in combination with Metapost. Just by 
 using

 \setupcolors[state=start,
   cmyk=yes,
   mpcmyk=yes,
   rgb=no,
 ]

 I get cmy(k=0) graphics, although all used colors are still defined in
 the rgb color space.
 This is really a nice feature and the automatic color conversion works
 relative good. Only (so far I have seen) gray tones have a noticeable
 tendency to brown (Acroreader 7.09). I have tested one of those gray
   
 beware, without black component, on paper one indeed get brownish 
 colors. acrobat reader tries to mimick paper (can be configured) so this 
 is why you don't get gray on screen

Yes, I remember playing around with this feature some time ago.
Excuse my ignorance as I have no experience with other color space than
RGB. ;)
But the problem here is, that the conversion is not true RGBtoCMYK, but
only RGBtoCMY (k is always sero).

All of my graphics are in RGB, but for printing I surely need CMYK.
A solution would be to define all used colors in the CMYK color space
(although the origin of these colors is RGB).

But to my surprise ConTeXt automatically converts my RGB colors (even
the MP defined ones), except that the final colors are in the CMY
instead of CMYK color space. All I want is a true RGBtoCMYK conversion.
I know about the calculating limitations in TeX, so I can wait for an
implemetation of that macro in LuaTeX.

Best, Peter

 when converting colors to gray context does weighted conversion (as with 
 b/w televisions) so 1,0,0 and 0,1,0 give different grays
 
 tones by defining it as cmyk and the result looks ok.

 RGB(223,223,227)
 CMY(0.12548, 0.12547, 0.10980)
 CMYK(0.01762, 0.01760, 0, 0.10980)

 So is there a way to get cymk instead of cmy?

   
 hmm,
 can you post an example ?

 
 Mojca has pointed me to the definition of

 \convertRGBtoCMYK (colo-ini.tex)

 and (if I understand it right) this is only a
 RGB-CMY conversion.

 The algorithm for the missing CMY-CMYK conversion is simple (see
 http://www.easyrgb.com/math.php?MATH=M13#text13 ),
 but exact calculation in TeX is no fun at all (at least not for me).
 I have tried to implement it, but yet without success. In the worst case
 I have to wait for luatex, which will solve all calculation problems.
 So think twice, before you waste your time... ;)

 Maybe I should add this color conversion to the feature request list, so
 that it will not be forgotten?

 Peter

   
 luigi
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
   
 
 

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread John R. Culleton
On Sunday 04 February 2007 06:51, Sanjoy Mahajan wrote:
  Is it possible to sort by the bibliography list by authors? The manual
  says that sorttype=cite|bib?
 
  No, because there is no reasonable way to do alphabetic sorting
  in TeX.

 Perhaps I will reveal my own fundamental confusion about bibtex but:

 What about letting bibtex (the C program) do the miserable work of
 alphabetic sorting?  Then ConTeXt could typeset (the necessary subset
 of) bib items in that order.

 -Sanjoy

 `Not all those who wander are lost.' (J.R.R. Tolkien)
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

The examples of makeindex (romance language indexing) and Xindy (non-
romance indexing) are pertinent here. All TeX has to do is provide the 
unsorted items at the front end. The external program sorts, summarizes 
provides alphabetic headers etc.  Then TeX reads it in and does the final 
typesetting. A bibtexish program could operate the same way. 
-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] including pdf and using the entire page

2007-02-04 Thread Johan Sandblom
In my document I want to include a few published pdf files. I have
accomplished this with

\chapter{File 1}
\copypages[file1.pdf][scale=800] % 20 pages
\chapter{File 2}
\copypages[file1.pdf][scale=650] % 16 pages

However, the included pages obey the layout of the rest of the
document, and even if the paper in my document could allow a larger
scale, I cannot use it since some part of the included file falls off
the page.

Is it possible to include pdf files and allow each page to use the
entire page (possibly with room left for a page number)?

I have tried several versions including using makeup (but that is only
one page?), pagefigure (also only one page at a time).

Regards, Johan

-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Problems with fonts

2007-02-04 Thread Kumar Appaiah
Dear ConTeXt users,

I am a Debian GNU/Linux user. I recently upgraded from an old teTeX to the
latest ConTeXt in Debian. With the upgrade, however, I got a missing
cont-en.fmt error (http://bugs.debian.org/409575) which I solved by doing a
texexec --make --all, and placing the cont-en.fmt from my .texmf-config into
/var/lib/texmf/web2c and ran texhash. Things seem to be OK.

But now, whenever I do texexec filename, I get a PDF with many mathematical
symbols missing. So, I do this:

texexec --dvi ee03b091.tex
dvips ee03b091.dvi
ps2pdf ee03b091.ps

Now, this seems to work, but the fonts are not rendered as well as they used
to in Acrobat.

And this also does not give the fonts, but causes the same math trouble again:

texexec --dvi ee03b091.tex  
dvips -o ee03b091.ps -Ppdf ee03b091.dvi 
ps2pdf ee03b091.ps

What could be wrong? Is my installation broken? Can I salvage it?

Thanks.

Kumar
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \nullfont fontdimen problem

2007-02-04 Thread Alan Bowen
I have just changed my TeX distribution from the old teTeX to the  
latest gwTeX.

When typesetting a document that used to process properly, I now get  
the error message:

[1.56] [2.57] [3.58] [4.59] [5.60]
references  : unknown reference [][fnt:t:1]
references  : unknown reference [][fnt:f:1]
! Font \nullfont has only 7 fontdimen parameters.
to be read again
\advance
\dohighlow ...#2\textfont 2\else #3ex\fi \advance
   \scratchdimen #4ex  
\kern 
argument ...ednote \v!nextpage \v!previouspage }
   }
\doifreferencefoundelse ...ferencefound #2\else #3
   \fi \egroup  
\doresetgotowh...

\gotobox ...2]} {\hbox {\unknownreference {#2}#1}}
   \referenceinfo {} 
{#2}\egr...
argument ...[\s!fnt :f:\internalfootreference ]}
   \fi \doifelse  
{\noteparame...
...
l.74 \footnote{
}

Any suggestions about what this means and how I might solve the  
problem will be very much appreciated. I note that the problem may  
concern Latin Modern: the same setup produces footnotes as expected  
when I use the gtmacfonts, for example.

Alan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Letters in ConTeXt

2007-02-04 Thread Rolf Marvin Bøe Lindgren


On 3. feb. 2007, at 3:10, Rolf Marvin Bøe Lindgren wrote:


On 2. feb. 2007, at 4:10, Wolfgang Schuster wrote:

where is the problem, the letter module can found by typing m- 
letter.tex in google

or whatever you like and you get the following link

http://www.ntg.nl/pipermail/ntg-context/2004/008068.html


the problem is stated in various messages sent to the list during  
the last few days and should be rather accurately assessed by  
reading them.  your messages added absolutely nothing to further a  
solution, but I appreciate the effort and expressed willingness to  
share.


sorry about the quip here – I just noticed you were the one I  
received a much appreciated and very helpful private message from.   
I'll dig into the matter now and quit bothering the list until I've  
figured this out or my confusion has reached a higher level.


--
Rolf Lindgren
[EMAIL PROTECTED]


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Footnotes lost in Natural Tables

2007-02-04 Thread Gerhard Kugler
Hi,

an addition: footnotes within blocks are lost too. Numbering goes on,
but the note does not appear.

Gerhard

-- 
Gerhard Kugler
Psychotherapeut
http://www.psychotherapie-kugler.de
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Aditya Mahajan
On Sun, 4 Feb 2007, Taco Hoekwater wrote:

 Sanjoy Mahajan wrote:
 Is it possible to sort by the bibliography list by authors? The manual
 says that sorttype=cite|bib?

 No, because there is no reasonable way to do alphabetic sorting
 in TeX.


 Perhaps I will reveal my own fundamental confusion about bibtex but:

 What about letting bibtex (the C program) do the miserable work of
 alphabetic sorting?  Then ConTeXt could typeset (the necessary subset
 of) bib items in that order.

 That functionality is there already \setupbibtex[sort=author]

Ah, that is exactly what I wanted. I misunderstood 
\setuppublications[sorttype=bib]. I thought that it will sort 
according to the bib file, when it actually sorts according to the bbl 
file. So

\setupbibtex[sort=author]
\setuppublications[sorttype=bib]

gives a bibliography sorted by author.

Thanks,
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problems with fonts

2007-02-04 Thread Mike Bird
On Sunday 04 February 2007 06:34, Kumar Appaiah wrote:
 But now, whenever I do texexec filename, I get a PDF with many
 mathematical symbols missing. So, I do this:

Hi Kumar,

FWIW, I've had better luck with a slightly earlier version of
context (before the big pdftex and lm changes):

http://www.tug.org/texlive/Debian/context/context_2007.01.12.2-1_all.deb

--Mike Bird
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Thomas A. Schmitz

On Feb 4, 2007, at 6:30 PM, Johan Sandblom wrote:

 But how does one make an edited book be sorted by editors in the  
 same list?

 Johan

That's done automatically; author and editor appear to be treated the  
same way for this sort option. I am wondering if there is a way to  
have edited books in the alphabetic order by title?

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Available fonts

2007-02-04 Thread Idris Samawi Hamid
Dear gang,

Is there a list somewhere of the immediately available fonts in ConTeXt?  
showfont.pdf has a few; is there an updated list of available fonts and  
how to access them?

Best
Idris

-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] including pdf and using the entire page

2007-02-04 Thread Aditya Mahajan
On Sun, 4 Feb 2007, Johan Sandblom wrote:

 In my document I want to include a few published pdf files. I have
 accomplished this with

 \chapter{File 1}
 \copypages[file1.pdf][scale=800] % 20 pages
 \chapter{File 2}
 \copypages[file1.pdf][scale=650] % 16 pages

 However, the included pages obey the layout of the rest of the
 document, and even if the paper in my document could allow a larger
 scale, I cannot use it since some part of the included file falls off
 the page.

Try without any value for scale, that is just \copypages[file1.pdf].


 Is it possible to include pdf files and allow each page to use the
 entire page (possibly with room left for a page number)?

See below.

 I have tried several versions including using makeup (but that is only
 one page?), pagefigure (also only one page at a time).

Basically you need to find out the number of pages of the file and 
then recursively include them one by one.

Recently, I wanted to print a collection of papers as a single pdf, 
with its own table of contents etc. The trouble was that some of the 
papers were printed on A4 paper and some were on letter paper. So, I 
modified the copypages macro to suit my needs. There is very little 
configuration options for the macro, it behaves the way I wanted it 
to. Maybe, you can modify it to your needs.

\unprotect

%D Usage \copyfullpages[filename.pdf]

\def\copyfullpages
   {\dodoubleempty\docopyfullpages}

\def\docopyfullpages[#1][#2]%
   {\bgroup
\getfiguredimensions[#1]%
\getparameters[\??ip]
  [\c!n=\noffigurepages,
   \c!marking=\v!off,
   \c!scale=\!!thousand,
   \c!offset=\!!zeropoint,
   #2]%
\dorecurse\@@ipn

{\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset]
\externalfigure
 [#1]

[\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2]
 \stopTEXpage
\incrementnumber[page]}
\egroup}

\protect

For page numbers, I had a separate layer, which printed on top of the 
included pdfs (some pdfs were scanned images). I can send you my 
module if you want.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Taco Hoekwater
Thomas A. Schmitz wrote:
 On Feb 4, 2007, at 6:30 PM, Johan Sandblom wrote:
 
 
But how does one make an edited book be sorted by editors in the  
same list?

Johan

 
 That's done automatically; author and editor appear to be treated the  
 same way for this sort option. I am wondering if there is a way to  
 have edited books in the alphabetic order by title?

What does \setupbibtex[sort=title] do ?

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] including pdf and using the entire page

2007-02-04 Thread Johan Sandblom
Thank you, now I have something to play with! And yes, please, I would
very much like to look at you module.

Johan

2007/2/4, Aditya Mahajan [EMAIL PROTECTED]:
 On Sun, 4 Feb 2007, Johan Sandblom wrote:

  In my document I want to include a few published pdf files. I have
  accomplished this with
 
  \chapter{File 1}
  \copypages[file1.pdf][scale=800] % 20 pages
  \chapter{File 2}
  \copypages[file1.pdf][scale=650] % 16 pages
 
  However, the included pages obey the layout of the rest of the
  document, and even if the paper in my document could allow a larger
  scale, I cannot use it since some part of the included file falls off
  the page.

 Try without any value for scale, that is just \copypages[file1.pdf].


  Is it possible to include pdf files and allow each page to use the
  entire page (possibly with room left for a page number)?

 See below.

  I have tried several versions including using makeup (but that is only
  one page?), pagefigure (also only one page at a time).

 Basically you need to find out the number of pages of the file and
 then recursively include them one by one.

 Recently, I wanted to print a collection of papers as a single pdf,
 with its own table of contents etc. The trouble was that some of the
 papers were printed on A4 paper and some were on letter paper. So, I
 modified the copypages macro to suit my needs. There is very little
 configuration options for the macro, it behaves the way I wanted it
 to. Maybe, you can modify it to your needs.

 \unprotect

 %D Usage \copyfullpages[filename.pdf]

 \def\copyfullpages
{\dodoubleempty\docopyfullpages}

 \def\docopyfullpages[#1][#2]%
{\bgroup
 \getfiguredimensions[#1]%
 \getparameters[\??ip]
   [\c!n=\noffigurepages,
\c!marking=\v!off,
\c!scale=\!!thousand,
\c!offset=\!!zeropoint,
#2]%
 \dorecurse\@@ipn

 {\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset]
 \externalfigure
  [#1]

 [\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2]
  \stopTEXpage
 \incrementnumber[page]}
 \egroup}

 \protect

 For page numbers, I had a separate layer, which printed on top of the
 included pdfs (some pdfs were scanned images). I can send you my
 module if you want.

 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context



-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Johan Sandblom
But how does one make an edited book be sorted by editors in the same list?

Johan

2007/2/4, Aditya Mahajan [EMAIL PROTECTED]:
 On Sun, 4 Feb 2007, Taco Hoekwater wrote:

  Sanjoy Mahajan wrote:
  Is it possible to sort by the bibliography list by authors? The manual
  says that sorttype=cite|bib?
 
  No, because there is no reasonable way to do alphabetic sorting
  in TeX.
 
 
  Perhaps I will reveal my own fundamental confusion about bibtex but:
 
  What about letting bibtex (the C program) do the miserable work of
  alphabetic sorting?  Then ConTeXt could typeset (the necessary subset
  of) bib items in that order.
 
  That functionality is there already \setupbibtex[sort=author]

 Ah, that is exactly what I wanted. I misunderstood
 \setuppublications[sorttype=bib]. I thought that it will sort
 according to the bib file, when it actually sorts according to the bbl
 file. So

 \setupbibtex[sort=author]
 \setuppublications[sorttype=bib]

 gives a bibliography sorted by author.

 Thanks,
 Aditya
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context



-- 
Johan Sandblom  N8, MRC, Karolinska sjh
t +46851776108  17176 Stockholm
m +46735521477  Sweden
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
- Bertrand Russell
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Sort bibliography by authors

2007-02-04 Thread Thomas A. Schmitz

On Feb 4, 2007, at 7:41 PM, Taco Hoekwater wrote:

 What does \setupbibtex[sort=title] do ?

 Taco

Hi Taco,

I wasn't precise enough: for German bibliographies, there's a  
convention to have works with an author sorted by the author's name  
and edited books by the first word of the title, like so:

[1] Hoekwater, Taco: Title...

[2] Das Xylophon, hrsg. von...% sorted under X!!!

sort=title sorts every book by title. I guess the only way to achieve  
this would be by cheating bibtex and putting some tokens in front of  
the author that will be effective for sorting but produce no visible  
output. I have a (very dim) recollection that something like this can  
be done in bibtex, but can't remember how and where, off the top of  
my head.

Best

Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and CMYK

2007-02-04 Thread Hans Hagen
Peter Rolf wrote:


 But to my surprise ConTeXt automatically converts my RGB colors (even
 the MP defined ones), except that the final colors are in the CMY
 instead of CMYK color space. All I want is a true RGBtoCMYK conversion.
 I know about the calculating limitations in TeX, so I can wait for an
 implemetation of that macro in LuaTeX.
   
but even then ... we need a formula ... 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and CMYK

2007-02-04 Thread Mojca Miklavec
On 2/4/07, Hans Hagen [EMAIL PROTECTED] wrote:
 Peter Rolf wrote:
 
 
  But to my surprise ConTeXt automatically converts my RGB colors (even
  the MP defined ones), except that the final colors are in the CMY
  instead of CMYK color space. All I want is a true RGBtoCMYK conversion.
  I know about the calculating limitations in TeX, so I can wait for an
  implemetation of that macro in LuaTeX.
 
 but even then ... we need a formula ...

Most pages on the internet list the following simple conversion formula:

C' = 1 - (R/range)  C = (C' - K') / (1 - K')
M' = 1 - (G/range)  M = (M' - K') / (1 - K')
Y' = 1 - (B/range)  Y = (Y' - K') / (1 - K')
K' = MIN(C',Y',M')  K = K'

In the special case of K'=1, use (0,0,0,1)

(I'm not a TeX guru, but I assume that conversion with current macros
should not be much more difficult than conversion with luaTeX.)

Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and CMYK

2007-02-04 Thread Hans Hagen
Mojca Miklavec wrote:
 On 2/4/07, Hans Hagen [EMAIL PROTECTED] wrote:
   
 Peter Rolf wrote:
 
 But to my surprise ConTeXt automatically converts my RGB colors (even
 the MP defined ones), except that the final colors are in the CMY
 instead of CMYK color space. All I want is a true RGBtoCMYK conversion.
 I know about the calculating limitations in TeX, so I can wait for an
 implemetation of that macro in LuaTeX.

   
 but even then ... we need a formula ...
 

 Most pages on the internet list the following simple conversion formula:

 C' = 1 - (R/range)  C = (C' - K') / (1 - K')
 M' = 1 - (G/range)  M = (M' - K') / (1 - K')
 Y' = 1 - (B/range)  Y = (Y' - K') / (1 - K')
 K' = MIN(C',Y',M')  K = K'

 In the special case of K'=1, use (0,0,0,1)

 (I'm not a TeX guru, but I assume that conversion with current macros
 should not be much more difficult than conversion with luaTeX.)

   
this is what we have now 

\def\doconvertRGBtoCMYK#1\to#2%
  {\colordimen#1\points
   \multiply\colordimen \plusthousand
   \colorcount\colordimen
   \advance\colorcount \medcard
   \divide\colorcount \maxcard
   \colorcount-\colorcount
   \advance\colorcount \plusthousand
   \edef#2{\realcolorvalue\colorcount}}

\def\convertRGBtoCMYK#1#2#3%
  {\doconvertRGBtoCMYK#1\to\@@cl@@c
   \doconvertRGBtoCMYK#2\to\@@cl@@m
   \doconvertRGBtoCMYK#3\to\@@cl@@y
   \let\@@cl@@k\@@cl@@z}

well, you can spent the rest of the evening writing an alternative 



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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Footnotes lost in Natural Tables

2007-02-04 Thread Hans Hagen
Gerhard Kugler wrote:
 Hi,

 an addition: footnotes within blocks are lost too. Numbering goes on,
 but the note does not appear.
   
has to do with inserts not possible and disappearing in boxes 

\postponefootnotes something tabular \flushfootnotes 

some structures have this built in 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] linking words and graphics

2007-02-04 Thread Hans Hagen
Alan Bowen wrote:
 I should like to make occurrences of the the string �Figure p� appear  
 as links in my document that will take the reader to Figure p  
 elsewhere in the same document. Is there a way to do this using ConTeXt?
   
\setupinteraction[state=start]

\placefigure[here][fig:whatever]{}{}

\in {figure} [fig:whatever] etc etc 

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

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Available fonts

2007-02-04 Thread Hans Hagen
Idris Samawi Hamid wrote:
 Dear gang,

 Is there a list somewhere of the immediately available fonts in ConTeXt?  
 showfont.pdf has a few; is there an updated list of available fonts and  
 how to access them?
   
depends on what is installed ... just look at type-syn and type-enc 

extra fonts may be defined in type-buy and type-ghz and files on the wiki 

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
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Problems with fonts

2007-02-04 Thread Kumar Appaiah
On Sun, Feb 04, 2007 at 09:35:40AM -0800, Mike Bird wrote:
 FWIW, I've had better luck with a slightly earlier version of
 context (before the big pdftex and lm changes):
 
 http://www.tug.org/texlive/Debian/context/context_2007.01.12.2-1_all.deb

I'll do the downgrade and get back to you. Thanks for the suggestion.

Kumar
-- 
Kumar Appaiah,
462, Jamuna Hostel,
Indian Institute of Technology Madras,
Chennai - 600 036

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Metapost and CMYK

2007-02-04 Thread Mojca Miklavec
On 2/4/07, Hans Hagen [EMAIL PROTECTED] wrote:
 Mojca Miklavec wrote:
  On 2/4/07, Hans Hagen [EMAIL PROTECTED] wrote:
 
  Peter Rolf wrote:
 
  But to my surprise ConTeXt automatically converts my RGB colors (even
  the MP defined ones), except that the final colors are in the CMY
  instead of CMYK color space. All I want is a true RGBtoCMYK conversion.
  I know about the calculating limitations in TeX, so I can wait for an
  implemetation of that macro in LuaTeX.
 
 
  but even then ... we need a formula ...
 
 
  Most pages on the internet list the following simple conversion formula:
 
  C' = 1 - (R/range)  C = (C' - K') / (1 - K')
  M' = 1 - (G/range)  M = (M' - K') / (1 - K')
  Y' = 1 - (B/range)  Y = (Y' - K') / (1 - K')
  K' = MIN(C',Y',M')  K = K'
 
  In the special case of K'=1, use (0,0,0,1)
 
  (I'm not a TeX guru, but I assume that conversion with current macros
  should not be much more difficult than conversion with luaTeX.)
 
 
 this is what we have now

 \def\doconvertRGBtoCMYK#1\to#2%
   {\colordimen#1\points
\multiply\colordimen \plusthousand
\colorcount\colordimen
\advance\colorcount \medcard
\divide\colorcount \maxcard
\colorcount-\colorcount
\advance\colorcount \plusthousand
\edef#2{\realcolorvalue\colorcount}}

 \def\convertRGBtoCMYK#1#2#3%
   {\doconvertRGBtoCMYK#1\to\@@cl@@c
\doconvertRGBtoCMYK#2\to\@@cl@@m
\doconvertRGBtoCMYK#3\to\@@cl@@y
\let\@@cl@@k\@@cl@@z}

 well, you can spent the rest of the evening writing an alternative

Since writing reports can sometimes be really boring, you can test if
the following works, but please don't ask me what it does ;)

I copy-pasted the code (which should be better written with e-TeX, I
suppose, or well ... lua is not that bad after all ;).

% RGB - CMYK
% c' = 1 - r
% m' = 1 - g
% y' = 1 - b
% k' = MIN(c',y',m')

% c = (c' - k') / (1 - k')
% m = (m' - k') / (1 - k')
% y = (y' - k') / (1 - k')
% k = k'

% CMYK - CMY
% c = (c * (1 - k) + k)
% m = (m * (1 - k) + k)
% y = (y * (1 - k) + k)

% CMY - CMYK
% k' = min(c,m,y)
% if (k==1)
%(0,0,0,1)
% else
%c = (c' - k') / (1 - k')
%m = (m' - k') / (1 - k')
%y = (y' - k') / (1 - k')
%k = k'

\unprotect

\def\doconvertRGBtoCMY#1\to#2%
  {\colordimen#1\points
   \multiply\colordimen \plusthousand
   \colorcount\colordimen
   \advance\colorcount \medcard
   \divide\colorcount \maxcard
   \colorcount-\colorcount
   \advance\colorcount \plusthousand
   \edef#2{\realcolorvalue\colorcount}}

\def\doconvertCMYtoCMYK#1\k#2\to#3%%
  {\colordimen#1\thousandpoint
   % \colorcount = 1000c
   \colorcount\colordimen
   % check if k1
   \colordimen#2\thousandpoint
   \ifdim\colordimen\thousandpoint
   % #3 = (#1-#2)/(1-#2)
  \advance\colorcount-\colordimen % \colorcount = 1000(c-k)
  \colordimen-\colordimen % \colordimen = -1000k
  \divide\colordimen \plusthousand % \colordimen = -k
  \advance\colordimen \onepoint % \colordimen = 1-k
  \divide\colorcount \colordimen % \colorcount = 1000(c-k)/(1-k)
  % TODO: rounding error!
  \edef#3{\realcolorvalue\colorcount}%
   \else
   % if k==1, the component is zero
  \let#3\@@cl@@z%
   \fi}

\def\convertRGBtoCMY#1#2#3%
  {\doconvertRGBtoCMY#1\to\@@cl@@c
   \doconvertRGBtoCMY#2\to\@@cl@@m
   \doconvertRGBtoCMY#3\to\@@cl@@y
   \let\@@cl@@k\@@cl@@z}

\def\convertRGBtoCMYK#1#2#3%
  {\edef\@@cl@@r{#1}\edef\@@cl@@g{#2}\edef\@@cl@@b{#3}%
   \convertRGBtoCMY\@@cl@@r\@@cl@@g\@@cl@@b%
   \convertCMYtoCMYK\@@cl@@c\@@cl@@m\@@cl@@y}

\def\convertCMYtoCMYK#1#2#3%
  {\edef\@@cl@@c{#1}\edef\@@cl@@m{#2}\edef\@@cl@@y{#3}%
   % calculate k = min(c,m,y)
   % k = 1
   \colordimen\onepoint
   \colorcount\colordimen
   % if (kc): k=c
   \ifdim\colordimen#1\points%
 \colordimen#1\points
   \fi
   % if (km): k=m
   \ifdim\colordimen#2\points%
 \colordimen#2\points
   \fi
   % if (ky): k=y
   \ifdim\colordimen#3\points%
 \colordimen#3\points
   \fi
   \multiply\colordimen \plusthousand
   \colorcount\colordimen
   \advance\colorcount \medcard
   \divide\colorcount \maxcard
   % z = min(c,m,y)
   \edef\@@cl@@k{\realcolorvalue\colorcount}%
   %
   \doconvertCMYtoCMYK#1\k\@@cl@@k\to\@@cl@@c
   \doconvertCMYtoCMYK#2\k\@@cl@@k\to\@@cl@@m
   \doconvertCMYtoCMYK#3\k\@@cl@@k\to\@@cl@@y
  }

\protect

\setupcolors[state=start,
 cmyk=yes,
 mpcmyk=yes,
 rgb=no,
]

\pdfcompresslevel=0

\starttext

\startMPcode
fill unitsquare scaled 3cm withcolor (223/255,223/255,227/255);
% CMY(0.12548, 0.12547, 0.10980)
% CMYK(0.01762, 0.01760, 0, 0.10980)
% results in (0.016, 0.016, 0, 0.110)
\stopMPcode

\stoptext


Mojca
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] regression testing: tests that don't compile

2007-02-04 Thread Sanjoy Mahajan
Here are the names of the test files that didn't build with the
2007.01.23 ConTeXt:

ERROR [exit code 1] tex/context/base/core-mat.tex/test-001.tex
ERROR [exit code 1] tex/context/base/unic-031.tex/test-001.tex
ERROR [exit code 5] metapost/context/base/mp-text.mp/test-001.tex
ERROR [exit code 5] tex/context/base/s-chi-00.tex/test-001.tex
ERROR [exit code 5] tex/context/base/s-jap-00.tex/test-001.tex
ERROR [exit code 5] tex/context/base/unic-003.tex/test-001.tex
ERROR [exit code 5] tex/context/base/unic-037.tex/test-001.tex
ERROR [exit code 6] tex/context/base/unic-002.tex/test-001.tex

exit code 1 is texexec's normal failure code, usually from an undefined
cseq.  Exit code 5 is from the run-it.py wrapper, which is saying that
time (60 sec) ran out, before the texexec process had to be killed.  And
exit code 6 says that the logfile grew too big (currently, beyond 1MB)
before the texexec process had to be killed.

If you don't find problems in the above files, let me know and I'll send
you the logs or pieces thereof.

-Sanjoy

`A nation of slaves is always prepared to applaud the clemency of their
 master who, in the abuse of absolute power, does not proceed to the
 last extremes of injustice and oppression.'  (Gibbon)  
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] regression testing: tests that don't compile

2007-02-04 Thread Aditya Mahajan
On Mon, 5 Feb 2007, Sanjoy Mahajan wrote:

 Here are the names of the test files that didn't build with the
 2007.01.23 ConTeXt:

 ERROR [exit code 1] tex/context/base/core-mat.tex/test-001.tex

The error was due to

\startformula \startalign
  \NC ... \NC ... \NC ...\NC ... \NR
\stopalign \stopformula

I added m=2 to startalign and it works now. Actually, it should have 
failed, and the fact that it worked in the past (when I created this 
file) was a bug.

Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context