Re: [NTG-context] headers in PDF document

2005-08-30 Thread Hans Hagen

Mojca Miklavec wrote:


Hans Hagen wrote:
 


\PDFunicodetrue
   



How is it used?.

\enableregime[utf]
\PDFunicodetrue
\setupinteraction
   [state=start,
   title={Košček Železa}]
\starttext
x
\stoptext

doesn't help, it still results in Koscek Zeleza.
 

i'll look into it later (experimental code on my machine) 

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] headers in PDF document

2005-08-29 Thread Hans Hagen

Mojca Miklavec wrote:


Mojca Miklavec wrote:


VnPenguin wrote:


Mojca Miklavec wrote:


How can I add Author/Title/Creator/Keywords/... to PDF documents,
possibly with non-ascii characters?




Try:
\setupinteraction
[state=start,
title={...},
author={...},
keyword={...}]



Adobe seems to have some strange way of encoding those strings: I can 
use scaron in those fields (if I write something manually in 
Acrobat), but then the whole string becomes two-byte with some prefix 
and resembles unicode encoding.



For example, to get the Hàn Thế Thành's name in the Author's field of 
the PDF manual properly, one should probably write something like

/Author(feff  0048 00e0 006e  0054 0068 1ebf  0054 0068 00e0 006e 0068),
without the spaces and with characters instead of the corresponding 
hex-code. (Note: If someone writes ConTeXt support for it, be careful 
about escaping parenthesis for U+29xx - not that anyone would need 
those arrows in comments, but you never know.)


feff (byte order mark, whatever that means) at the beginning seems 
to be only a switch for multi byte encoding inside the parenthesis.



I didn't try this out yet, so perhaps I'm missing something else here 
as well. If anyone knows how to try it out, please report if it works. 
I guess that another encoding, similar to enco-pdf should be defined 
first and then used inside the \doPDFsetupidentity definition. If 
characters other than those present in one-byte pdf encoding are 
present in an argument (Author, Comment, ...), than this more advanced 
encoding should be used for that field.



\PDFunicodetrue

should do the trick (i need to look into the bookmarks since pdftex 
needed a fix for that)


Out of curiosity: can you manually write Vietnamese characters to 
those fields in Adobe? I have a feeling that they loose the second 
accent if I copy-paste some double-accented characters, but I don't 
know if this is just a visual effect/lack of proper fonts or if it 
really isn't supported.


in principle, it should be possible; the problem with cut and paste is that the operating system may do things with the buffer 

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] headers in PDF document

2005-08-29 Thread Mojca Miklavec
Hans Hagen wrote:
 \PDFunicodetrue

How is it used?.

\enableregime[utf]
\PDFunicodetrue
\setupinteraction
[state=start,
title={Košček Železa}]
\starttext
x
\stoptext

doesn't help, it still results in Koscek Zeleza.

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


Re: [NTG-context] headers in PDF document

2005-08-28 Thread Mojca Miklavec

Mojca Miklavec wrote:

VnPenguin wrote:


Mojca Miklavec wrote:


How can I add Author/Title/Creator/Keywords/... to PDF documents,
possibly with non-ascii characters?



Try:
\setupinteraction
[state=start,
title={...},
author={...},
keyword={...}]


Adobe seems to have some strange way of encoding those strings: I can 
use scaron in those fields (if I write something manually in Acrobat), 
but then the whole string becomes two-byte with some prefix and 
resembles unicode encoding.


For example, to get the Hàn Thế Thành's name in the Author's field of 
the PDF manual properly, one should probably write something like

/Author(feff  0048 00e0 006e  0054 0068 1ebf  0054 0068 00e0 006e 0068),
without the spaces and with characters instead of the corresponding 
hex-code. (Note: If someone writes ConTeXt support for it, be careful 
about escaping parenthesis for U+29xx - not that anyone would need those 
arrows in comments, but you never know.)


feff (byte order mark, whatever that means) at the beginning seems to 
be only a switch for multi byte encoding inside the parenthesis.



I didn't try this out yet, so perhaps I'm missing something else here as 
well. If anyone knows how to try it out, please report if it works. I 
guess that another encoding, similar to enco-pdf should be defined first 
and then used inside the \doPDFsetupidentity definition. If characters 
other than those present in one-byte pdf encoding are present in an 
argument (Author, Comment, ...), than this more advanced encoding should 
be used for that field.



Out of curiosity: can you manually write Vietnamese characters to those 
fields in Adobe? I have a feeling that they loose the second accent if I 
copy-paste some double-accented characters, but I don't know if this is 
just a visual effect/lack of proper fonts or if it really isn't supported.


Sorry, I checked once more and it *is* only a lack of proper fonts (or 
perhaps a visual effect). Numerical values of the characters seem to 
be OK.


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


[NTG-context] headers in PDF document

2005-08-27 Thread Mojca Miklavec
Hello,

How can I add Author/Title/Creator/Keywords/... to PDF documents,
possibly with non-ascii characters?
In LaTeX the hyperref package does the job (with help of
\pdfstringdef, which redefines a whole bunch of things). Most ConTeXt
documentation contains these headers, but I haven't seen any examples
in ConTeXt sources yet.

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