Having difficulty getting unicode characters to display in ConTeXT out put PDF
I am having difficulty getting Unicode characters to display correctly in PDF output using ConTeXT. Also, the PDF Bookmarks are not showing in this example. ConTeXt ver: 2014.12.11 12:02 MKIV beta fmt: 2014.12.15 int: english/english I am attaching a minimal example. Would you please give me some pointers and put a working multi-lingual example on the contextgarden.net website? Thanks much. David Boerschlein (214) 412-3275 home office land (585) 278-4687 cell www.linkedin.com/in/davidboerschlein ____________________________________________________________ Old School Yearbook Pics View Class Yearbooks Online Free. Search by School & Year. Look Now! http://thirdpartyoffers.juno.com/TGL3141/552424cca81e724cc01f5st02duc
Am 2015-04-08 um 00:40 schrieb david.boerschlein@juno.com:
I am having difficulty getting Unicode characters to display correctly in PDF output using ConTeXT. Also, the PDF Bookmarks are not showing in this example. Would you please give me some pointers and put a working multi-lingual example on the contextgarden.net website?
You don’t need the „regime“ stuff in ConTeXt MkIV, at least as long as you write in UTF-8. But you need fonts that support your desired glyphs. DejaVu supports Russian and Armenian, but not Punjabi, Arabic and Hebrew (at least in the version installed at my computer). I can’t help you with the PDF bookmarks, sorry; I tried different options, but the functionality is probably broken. \usetypescript[dejavu] \setupbodyfont[dejavu, 9pt] % Enables index in PDF document \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][force=yes] % Let us say hello in many languages \starttext \setupfooter [state=start] \page[1] \startfrontmatter {\midaligned {\tfc{\WORD{Hello World}}}} \placecontent[extras={22=page},alternative=c] \stopfrontmatter \page[yes] \startbodymatter \section{1. Russian: Привет мир!} Russian: Привет мир! \\ \section{2. Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ ਦੁਨਿਆ!} Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ ਦੁਨਿਆ! \\ \section{3. Arabic: مرحبا أيها العالم!} Arabic: مرحبا أيها العالم! \\ \section{4. Hebrew: שלום העולם!} Hebrew: שלום העולם! \\ \section{5. Armenian: Բարեւ աշխարհ!} Armenian: Բարեւ աշխարհ! \\ \stopbodymatter \stoptext Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
On 4/8/2015 9:28 AM, Henning Hraban Ramm wrote:
Am 2015-04-08 um 00:40 schrieb david.boerschlein@juno.com:
I am having difficulty getting Unicode characters to display correctly in PDF output using ConTeXT. Also, the PDF Bookmarks are not showing in this example. Would you please give me some pointers and put a working multi-lingual example on the contextgarden.net website?
You don’t need the „regime“ stuff in ConTeXt MkIV, at least as long as you write in UTF-8. But you need fonts that support your desired glyphs. DejaVu supports Russian and Armenian, but not Punjabi, Arabic and Hebrew (at least in the version installed at my computer).
I can’t help you with the PDF bookmarks, sorry; I tried different options, but the functionality is probably broken.
hm, your example shows unicode bookmarks here (in sumatra pdf at least) ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On 04/07/2015 08:40 PM, david.boerschlein@juno.com wrote:
I am having difficulty getting Unicode characters to display correctly in PDF output using ConTeXT. Also, the PDF Bookmarks are not showing inthis example.
ConTeXt ver: 2014.12.11 12:02 MKIV beta fmt: 2014.12.15 int: english/english
I am attaching a minimal example.
Would you please give me some pointers and put a working multi-lingual example on the contextgarden.net website?
Hi David, this sample (slightly modified from the one Hraban posted before) works fine with latest beta from 2015.04.08 14:19 (and stable version from 2014.01.03 00:40): \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] % Enables index in PDF document \setupinteraction[state=start] \setupinteractionscreen[option=bookmark] \placebookmarks[section][force=yes] % Let us say hello in many languages \starttext \setupfooter [state=start] \page[1] \startfrontmatter {\midaligned {\tfc{\WORD{Hello World}}}} \placecontent[extras={22=page},alternative=c] \stopfrontmatter \page[yes] \startbodymatter \section{1. Russian: Привет мир!} Russian: Привет мир! \\ \section{2. Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ ਦੁਨਿਆ!} Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ ਦੁਨਿਆ! \\ \section{3. Arabic: مرحبا أيها العالم!} Arabic: مرحبا أيها العالم! \\ \section{4. Hebrew: שלום העולם!} Hebrew: שלום העולם! \\ \section{5. Armenian: Բարեւ աշխարհ!} Armenian: Բարեւ աշխարհ! \\ \stopbodymatter \stoptext The FreeSerif font is available from https://ftp.gnu.org/gnu/freefont/. I hope it helps, Pablo -- http://www.ousia.tk
participants (4)
-
david.boerschlein@juno.com
-
Hans Hagen
-
Henning Hraban Ramm
-
Pablo Rodriguez