* Mixed Hebrew, Greek, English, with specific fonts for each? @ 2015-02-03 7:29 Mycroft Jones [not found] ` <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: Mycroft Jones @ 2015-02-03 7:29 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1.1: Type: text/plain, Size: 986 bytes --] I write documents that are mostly English, but that include Greek and Hebrew quotations. Since pandoc is UTF-8, that shouldn't be a problem. For the Hebrew, I sometimes want to use a paleoHebrew font. How can I tell pandoc to use a specific truetype font for a specific range of Unicode code points? Specifically, tell it that Hebrew characters should be rendered with myPhoenicianHebrewFont.ttf Mycroft -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/0d3df016-fefe-4024-9be5-d0b96cad9488%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 1423 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2015-02-03 16:56 ` John MacFarlane 2015-02-03 17:28 ` BP Jonsson 2015-02-03 19:46 ` Pablo Rodríguez 2 siblings, 0 replies; 13+ messages in thread From: John MacFarlane @ 2015-02-03 16:56 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw What output format? If you're targeting PDF via LaTeX, you should use --latex-engine=xelatex and then customize the latex template to set various font and polyglossia options. Hopefully someone on the list who is more expert than I about this can help further. +++ Mycroft Jones [Feb 02 15 23:29 ]: > I write documents that are mostly English, but that include Greek and > Hebrew quotations. Since pandoc is UTF-8, that shouldn't be a > problem. For the Hebrew, I sometimes want to use a paleoHebrew font. > How can I tell pandoc to use a specific truetype font for a specific > range of Unicode code points? Specifically, tell it that Hebrew > characters should be rendered with myPhoenicianHebrewFont.ttf > Mycroft > > -- > You received this message because you are subscribed to the Google > Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [3]https://groups.google.com/d/msgid/pandoc-discuss/0d3df016-fefe-4024- > 9be5-d0b96cad9488%40googlegroups.com. > For more options, visit [4]https://groups.google.com/d/optout. > >References > > 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 3. https://groups.google.com/d/msgid/pandoc-discuss/0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > 4. https://groups.google.com/d/optout ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-02-03 16:56 ` John MacFarlane @ 2015-02-03 17:28 ` BP Jonsson [not found] ` <54D10552.5010905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2015-02-03 19:46 ` Pablo Rodríguez 2 siblings, 1 reply; 13+ messages in thread From: BP Jonsson @ 2015-02-03 17:28 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Den 2015-02-03 08:29, Mycroft Jones skrev: > I write documents that are mostly English, but that include Greek and > Hebrew quotations. Since pandoc is UTF-8, that shouldn't be a problem. > For the Hebrew, I sometimes want to use a paleoHebrew font. How can I tell > pandoc to use a specific truetype font for a specific range of Unicode code > points? Specifically, tell it that Hebrew characters should be rendered > with myPhoenicianHebrewFont.ttf > > Mycroft > IT depends of what kind(s) of output you want. If you only want to produce HTML you can just wrap the pieces which need a special font in `<span>` and `<div>` tags with suitable classes and then style them with CSS. If you only wamt to produce LaTeX and don't need any special formatting inside the pieces needing a special font you can just put the prerequisite LaTeX commands and environments in your Markdown source. However if you use XeLaTeX and fontspec but not polyglossia be aware that you have to wrap your font change commands in commands with arguments: \newfontfamily\greekfont[Script=Greek]{GFS Neohellenic} \newcommand{\Greek}[1]{{\greekfont #1}} % Note the double braces! If you are producing LaTeX and want to use Markdown formatting inside your special-font text, or want to produce both LaTeX and HTML from the same source you can use my pandoc filter at <https://github.com/bpj/bpj-pandoc-scripts/raw/master/scripts/pandoc-span2cmd.pl> You can read the documentation at <https://github.com/bpj/bpj-pandoc-scripts/wiki/pandoc-span2cmd_pl> You need perl to run this filter. If you are on Windows and don't have perl installed, or need help with installing prerequisites you can find links to download and installation instructions (it isn't hard at all! :-) in the documentation: <https://github.com/bpj/bpj-pandoc-scripts/wiki/pandoc-span2cmd_pl#prerequisites> If you target other formats please tell us which and hopefully someone can help you. /bpj ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <54D10552.5010905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <54D10552.5010905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2015-02-04 0:19 ` DJ W [not found] ` <CA+nD0m5XHgDEbBwG-ySWkVUUT9cnUjDXC50keg6tra95mxswXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: DJ W @ 2015-02-04 0:19 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 3509 bytes --] Thank you for that perl script, I will try it. To answer you and Pablo: I am wanting to output HTML and PDF. So your script looks like the right thing. I will report my results here in this thread. Mycroft On Tue, Feb 3, 2015 at 9:28 AM, BP Jonsson <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> wrote: > Den 2015-02-03 08:29, Mycroft Jones skrev: > >> I write documents that are mostly English, but that include Greek and >> Hebrew quotations. Since pandoc is UTF-8, that shouldn't be a problem. >> For the Hebrew, I sometimes want to use a paleoHebrew font. How can I >> tell >> pandoc to use a specific truetype font for a specific range of Unicode >> code >> points? Specifically, tell it that Hebrew characters should be rendered >> with myPhoenicianHebrewFont.ttf >> >> Mycroft >> >> > IT depends of what kind(s) of output you want. > > If you only want to produce HTML you can just wrap the pieces which need a > special font in `<span>` and `<div>` tags with suitable classes and then > style them with CSS. > > If you only wamt to produce LaTeX and don't need any special formatting > inside the pieces needing a special font you can just put the prerequisite > LaTeX commands and environments in your Markdown source. However if you use > XeLaTeX and fontspec but not polyglossia be aware that you have to wrap > your font change commands in commands with arguments: > > \newfontfamily\greekfont[Script=Greek]{GFS Neohellenic} > \newcommand{\Greek}[1]{{\greekfont #1}} % Note the double braces! > > If you are producing LaTeX and want to use Markdown formatting inside your > special-font text, or want to produce both LaTeX and HTML from the same > source you can use my pandoc filter at > > <https://github.com/bpj/bpj-pandoc-scripts/raw/master/ > scripts/pandoc-span2cmd.pl> > > You can read the documentation at > > <https://github.com/bpj/bpj-pandoc-scripts/wiki/pandoc-span2cmd_pl> > > You need perl to run this filter. If you are on Windows and don't have > perl installed, or need help with installing prerequisites you can find > links to download and installation instructions (it isn't hard at all! :-) > in the documentation: > > <https://github.com/bpj/bpj-pandoc-scripts/wiki/pandoc- > span2cmd_pl#prerequisites> > > If you target other formats please tell us which and hopefully someone can > help you. > > /bpj > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/ > msgid/pandoc-discuss/54D10552.5010905%40gmail.com. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2BnD0m5XHgDEbBwG-ySWkVUUT9cnUjDXC50keg6tra95mxswXQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 5279 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <CA+nD0m5XHgDEbBwG-ySWkVUUT9cnUjDXC50keg6tra95mxswXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m5XHgDEbBwG-ySWkVUUT9cnUjDXC50keg6tra95mxswXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-04 5:09 ` Pablo Rodríguez [not found] ` <54D1A98D.2010508-S0/GAf8tV78@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-04 5:09 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/04/2015 01:19 AM, DJ W wrote: > Thank you for that perl script, I will try it. To answer you and Pablo: > I am wanting to output HTML and PDF. So your script looks like the > right thing. I will report my results here in this thread. At least in ConTeXt (but I guess you use LaTeX), it is possible to load more than one hyphenation pattern in a language. So you can have an English text with Greek and Hebrew (although I don’t know how Hebrew hyphenation works) passages without having to mark those Greek and Hebrew passages. A minimal sample in ConTeXt (it should work with TeX Live 2014 [invoking "context filename.tex]): \setuplanguage[en][patterns={en, agr}] \mainlanguage[en] \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] \starttext \hsize\zeropoint legible χαλεπα {\agr χαλεπα} \stoptext BTW, this works, because you only have single hyphenation patterns for each script. The difference in hyphenation from marked and unmarked Greek is not due to the patterns, but to the minimal number of characters after the hyphen in English (three, afaIk). Defining fallback fonts both in ConTeXt or in LaTeX should be an easy task. Language tagging in HTML would be only useful to automatically hyphenate words. But unless you are able to provide the hyphenation dictionaries for classical Hebrew and ancient Greek (which might not work in many browsers), you can safely ignore language tagging in your Markdown documents and use a font that has all glyphs defined (such as FreeSerif [https://www.gnu.org/software/freefont/]). I hope this might help, Pablo -- http://www.ousia.tk -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54D1A98D.2010508%40web.de. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <54D1A98D.2010508-S0/GAf8tV78@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <54D1A98D.2010508-S0/GAf8tV78@public.gmane.org> @ 2015-02-04 7:23 ` Mycroft Jones [not found] ` <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 13+ messages in thread From: Mycroft Jones @ 2015-02-04 7:23 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 3460 bytes --] Pablo, I'd prefer ConTeXt output to LaTeX. I'm not sure why LaTeX to PDF is the default. Once it is in ConTeXt format, it is easy to make a PDF, right? So actually, what I would most prefer, is HTML output, and ConTeXt output. I'm really not a fan of LaTeX. Is there a perl script or other solution so I can do mixed English Hebrew Greek in pandoc, with HTML and ConTeXt output? Mycroft On Tue, Feb 3, 2015 at 9:09 PM, Pablo Rodríguez <oinos-S0/GAf8tV78@public.gmane.org> wrote: > On 02/04/2015 01:19 AM, DJ W wrote: > > Thank you for that perl script, I will try it. To answer you and Pablo: > > I am wanting to output HTML and PDF. So your script looks like the > > right thing. I will report my results here in this thread. > > At least in ConTeXt (but I guess you use LaTeX), it is possible to load > more than one hyphenation pattern in a language. So you can have an > English text with Greek and Hebrew (although I don’t know how Hebrew > hyphenation works) passages without having to mark those Greek and > Hebrew passages. > > A minimal sample in ConTeXt (it should work with TeX Live 2014 [invoking > "context filename.tex]): > > \setuplanguage[en][patterns={en, agr}] > \mainlanguage[en] > \definefontfamily[mainface][rm][FreeSerif] > \setupbodyfont[mainface] > \starttext > \hsize\zeropoint > legible χαλεπα {\agr χαλεπα} > \stoptext > > BTW, this works, because you only have single hyphenation patterns for > each script. > > The difference in hyphenation from marked and unmarked Greek is not due > to the patterns, but to the minimal number of characters after the > hyphen in English (three, afaIk). > > Defining fallback fonts both in ConTeXt or in LaTeX should be an easy task. > > Language tagging in HTML would be only useful to automatically hyphenate > words. But unless you are able to provide the hyphenation dictionaries > for classical Hebrew and ancient Greek (which might not work in many > browsers), you can safely ignore language tagging in your Markdown > documents and use a font that has all glyphs defined (such as FreeSerif > [https://www.gnu.org/software/freefont/]). > > I hope this might help, > > > Pablo > -- > http://www.ousia.tk > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/54D1A98D.2010508%40web.de > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2BnD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 4851 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-04 7:28 ` Mycroft Jones [not found] ` <CA+nD0m5qvgwpB=mrG2tW1qXZiT2xPR_+Q+HwCfN38UD4ATg-ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-04 17:46 ` BPJ 2015-02-05 16:20 ` Pablo Rodríguez 2 siblings, 1 reply; 13+ messages in thread From: Mycroft Jones @ 2015-02-04 7:28 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 4607 bytes --] Pablo, in your ConTeXt example above, what if the desired font is in the file "myGreekFont.ttf", how do I incorporate that? I was formerly using DocBook, but I find XSLT and all the other XML stuff so baroque, it gives me a headache. Something simple like using a specific font file shouldn't be so hard that I can't figure it out after hours of reading the online manuals and documentation. That is why I'm hoping PanDoc is the answer. Instead of rolling my own custom one-off HTML+ConTeXt generator. Because then I would still have to learn ConTeXt, which is a time investment I can't make at the moment. With LaTeX, I pretty quickly got to a point that I realized, unless I read the WEB source code, I'm screwed for the types of custom things I want to do. I am looking seriously at pandoc because of the high praise that Eric Raymond gave it, even recommending that it replace the GNU "info" format. Mycroft On Tue, Feb 3, 2015 at 11:23 PM, Mycroft Jones <djwmohel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Pablo, I'd prefer ConTeXt output to LaTeX. I'm not sure why LaTeX to PDF > is the default. Once it is in ConTeXt format, it is easy to make a PDF, > right? > > So actually, what I would most prefer, is HTML output, and ConTeXt > output. I'm really not a fan of LaTeX. > > Is there a perl script or other solution so I can do mixed English Hebrew > Greek in pandoc, with HTML and ConTeXt output? > > Mycroft > > On Tue, Feb 3, 2015 at 9:09 PM, Pablo Rodríguez <oinos-S0/GAf8tV78@public.gmane.org> wrote: > >> On 02/04/2015 01:19 AM, DJ W wrote: >> > Thank you for that perl script, I will try it. To answer you and Pablo: >> > I am wanting to output HTML and PDF. So your script looks like the >> > right thing. I will report my results here in this thread. >> >> At least in ConTeXt (but I guess you use LaTeX), it is possible to load >> more than one hyphenation pattern in a language. So you can have an >> English text with Greek and Hebrew (although I don’t know how Hebrew >> hyphenation works) passages without having to mark those Greek and >> Hebrew passages. >> >> A minimal sample in ConTeXt (it should work with TeX Live 2014 [invoking >> "context filename.tex]): >> >> \setuplanguage[en][patterns={en, agr}] >> \mainlanguage[en] >> \definefontfamily[mainface][rm][FreeSerif] >> \setupbodyfont[mainface] >> \starttext >> \hsize\zeropoint >> legible χαλεπα {\agr χαλεπα} >> \stoptext >> >> BTW, this works, because you only have single hyphenation patterns for >> each script. >> >> The difference in hyphenation from marked and unmarked Greek is not due >> to the patterns, but to the minimal number of characters after the >> hyphen in English (three, afaIk). >> >> Defining fallback fonts both in ConTeXt or in LaTeX should be an easy >> task. >> >> Language tagging in HTML would be only useful to automatically hyphenate >> words. But unless you are able to provide the hyphenation dictionaries >> for classical Hebrew and ancient Greek (which might not work in many >> browsers), you can safely ignore language tagging in your Markdown >> documents and use a font that has all glyphs defined (such as FreeSerif >> [https://www.gnu.org/software/freefont/]). >> >> I hope this might help, >> >> >> Pablo >> -- >> http://www.ousia.tk >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/54D1A98D.2010508%40web.de >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CA%2BnD0m5qvgwpB%3DmrG2tW1qXZiT2xPR_%2BQ%2BHwCfN38UD4ATg-ag%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 6474 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <CA+nD0m5qvgwpB=mrG2tW1qXZiT2xPR_+Q+HwCfN38UD4ATg-ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m5qvgwpB=mrG2tW1qXZiT2xPR_+Q+HwCfN38UD4ATg-ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-05 17:29 ` Pablo Rodríguez 2015-02-20 18:32 ` Pablo Rodríguez 1 sibling, 0 replies; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-05 17:29 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/04/2015 08:28 AM, Mycroft Jones wrote: > Pablo, in your ConTeXt example above, what if the desired font is in the > file "myGreekFont.ttf", how do I incorporate that? Mycroft, the right way is: \setuplanguage[en][patterns={en, agr}] \mainlanguage[en] \definefallbackfamily[mainface][rm][][tf={file:myGreekFont.ttf}, preset=range:greek] % <- this is the novelty \definefontfamily[mainface][rm][FreeSerif] \setupbodyfont[mainface] \starttext \hsize\zeropoint legible χαλεπα {\agr χαλεπα} \stoptext Please, don’t forget the following issues: 1. A \definefallbackfamily should be *always placed before* the \definefontfamily it modifies. 2. hebrew is a different range for fallback fonts. Each range requires its own \definefallbackfamily. 3. Invoking font files by its name is the safest way to avoid issues in font naming. But it is also the most difficult to implement. Fonts aren’t typefaces or font families. Garamond italic and bold are two fonts, but only a typeface (or font family). Even if your Greek typeface has no other font than the regular one, invoking it by the system name (the name you’d select in a word processor). This makes the line above shorter (of course, I’m faking the name): \definefallbackfamily[mainface][rm][GreeekFont][preset=range:greek] > I was formerly using DocBook, but I find XSLT and all the other XML > stuff so baroque, it gives me a headache. Something simple like using a > specific font file shouldn't be so hard that I can't figure it out after > hours of reading the online manuals and documentation. XML is the way, but it is also the hard way. DocBook for technical documents that mix ancient Greek and classical Hebrew? Well, I guess this is something related to the humanities. In that case TEI would have been the XML (http://www.tei-c.org/). TEI is DocBook for the humanities (let’s put it that way). Or what am I missing here? > That is why I'm hoping PanDoc is the answer. Instead of rolling my own > custom one-off HTML+ConTeXt generator. Because then I would still have > to learn ConTeXt, which is a time investment I can't make at the > moment. With LaTeX, I pretty quickly got to a point that I realized, > unless I read the WEB source code, I'm screwed for the types of custom > things I want to do. Well, using ConTeXt with XML is (I guess) something easier than ConTeXt itself. pandoc may be the answer, but it entirely depends on your question. I wonder what do you expect from LaTeX when you need to read the WEB source code. pandoc isn’t the right tool to typeset a critical edition. TEI would be the right thing to use in that case. Which kind of features do you need for your things you want to do? > I am looking seriously at pandoc because of the high praise that Eric > Raymond gave it, even recommending that it replace the GNU "info" format. As written in my previous reply, there are two features that would help a lot in these documents. But first they need to be discussed. And then they need to be implemented. Just in case it helps, Pablo -- http://www.ousia.tk -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54D3A867.80306%40web.de. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m5qvgwpB=mrG2tW1qXZiT2xPR_+Q+HwCfN38UD4ATg-ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-05 17:29 ` Pablo Rodríguez @ 2015-02-20 18:32 ` Pablo Rodríguez 1 sibling, 0 replies; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-20 18:32 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/04/2015 08:28 AM, Mycroft Jones wrote: > [...] > I am looking seriously at pandoc because of the high praise that Eric > Raymond gave it, even recommending that it replace the GNU "info" format. Hi Mycroft and BPJ, just a comment on this issue. There is an specific issue at GitHub (https://github.com/jgm/pandoc/issues/895). Mixing languages requires a proper sytanx for the language attribute. Could you comment at the GH issue, so that the demand for it is visible? Many thanks for your help, Pablo -- http://www.ousia.tk ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-04 7:28 ` Mycroft Jones @ 2015-02-04 17:46 ` BPJ [not found] ` <CADAJKhDjgtrA5i77wj=1_FgWbEHkN7B+D2Z+PROcZbK8sLAGmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-05 16:20 ` Pablo Rodríguez 2 siblings, 1 reply; 13+ messages in thread From: BPJ @ 2015-02-04 17:46 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 4980 bytes --] Perhaps someone who is more familiar with ConTeXt than I am would be willing to provide a patch or pull request or some guidance so that I can add support for ConTeXt to my filter. I would like to learn ConTeXt but I don't have the time to tackle that at present. For my part I'm fundamentally uncomfortable with both TeX and HTML markup and with WYSIWYG -- that's why I love pandoc! -- but use them out of necessity. It might well be trivial to add ConTeXt support once I learn the syntax of the ConTeXt equivalent of a LaTeX environment! Den 4 feb 2015 08:23 skrev "Mycroft Jones" <djwmohel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > Pablo, I'd prefer ConTeXt output to LaTeX. I'm not sure why LaTeX to PDF > is the default. Once it is in ConTeXt format, it is easy to make a PDF, > right? > > So actually, what I would most prefer, is HTML output, and ConTeXt > output. I'm really not a fan of LaTeX. > > Is there a perl script or other solution so I can do mixed English Hebrew > Greek in pandoc, with HTML and ConTeXt output? > > Mycroft > > On Tue, Feb 3, 2015 at 9:09 PM, Pablo Rodríguez <oinos-S0/GAf8tV78@public.gmane.org> wrote: > >> On 02/04/2015 01:19 AM, DJ W wrote: >> > Thank you for that perl script, I will try it. To answer you and Pablo: >> > I am wanting to output HTML and PDF. So your script looks like the >> > right thing. I will report my results here in this thread. >> >> At least in ConTeXt (but I guess you use LaTeX), it is possible to load >> more than one hyphenation pattern in a language. So you can have an >> English text with Greek and Hebrew (although I don’t know how Hebrew >> hyphenation works) passages without having to mark those Greek and >> Hebrew passages. >> >> A minimal sample in ConTeXt (it should work with TeX Live 2014 [invoking >> "context filename.tex]): >> >> \setuplanguage[en][patterns={en, agr}] >> \mainlanguage[en] >> \definefontfamily[mainface][rm][FreeSerif] >> \setupbodyfont[mainface] >> \starttext >> \hsize\zeropoint >> legible χαλεπα {\agr χαλεπα} >> \stoptext >> >> BTW, this works, because you only have single hyphenation patterns for >> each script. >> >> The difference in hyphenation from marked and unmarked Greek is not due >> to the patterns, but to the minimal number of characters after the >> hyphen in English (three, afaIk). >> >> Defining fallback fonts both in ConTeXt or in LaTeX should be an easy >> task. >> >> Language tagging in HTML would be only useful to automatically hyphenate >> words. But unless you are able to provide the hyphenation dictionaries >> for classical Hebrew and ancient Greek (which might not work in many >> browsers), you can safely ignore language tagging in your Markdown >> documents and use a font that has all glyphs defined (such as FreeSerif >> [https://www.gnu.org/software/freefont/]). >> >> I hope this might help, >> >> >> Pablo >> -- >> http://www.ousia.tk >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/54D1A98D.2010508%40web.de >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/CA%2BnD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg%40mail.gmail.com > <https://groups.google.com/d/msgid/pandoc-discuss/CA%2BnD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDjgtrA5i77wj%3D1_FgWbEHkN7B%2BD2Z%2BPROcZbK8sLAGmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 6822 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <CADAJKhDjgtrA5i77wj=1_FgWbEHkN7B+D2Z+PROcZbK8sLAGmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CADAJKhDjgtrA5i77wj=1_FgWbEHkN7B+D2Z+PROcZbK8sLAGmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-05 17:50 ` Pablo Rodríguez 0 siblings, 0 replies; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-05 17:50 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/04/2015 06:46 PM, BPJ wrote: > Perhaps someone who is more familiar with ConTeXt than I am would be > willing to provide a patch or pull request or some guidance so that I > can add support for ConTeXt to my filter. I would like to learn > ConTeXt but I don't have the time to tackle that at present. For my > part I'm fundamentally uncomfortable with both TeX and HTML markup and > with WYSIWYG -- that's why I love pandoc! -- but use them out of > necessity. It might well be trivial to add ConTeXt support once I learn > the syntax of the ConTeXt equivalent of a LaTeX environment! Hi BPJ, I’m somehow familiar with ConTeXt. I thought of adapting the LaTeX reader to ConTeXt. But after having used ConTeXt to deal with XML natively, I think XHTML is the one and only way to typeset pandoc documents in ConTeXt. mardown is great, but it is only a source format. When the output is TeX, this is a new source format again that needs compilation. And unless you can tweak the source, you will only have a single layout for all your documents. Your filters are a great idea, but I guess we need proper syntax for divs and spans in extended markdown. And we also need the ability to add attributes (identifiers, classes and languages) to each element in markdown. But this needs to be implemented in pandoc’s internal document model first. Just in case it helps, Pablo PS: I opened an issue at your GitHub repo to talk about environments in ConTeXt. -- http://www.ousia.tk -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54D3AD83.6080305%40web.de. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-04 7:28 ` Mycroft Jones 2015-02-04 17:46 ` BPJ @ 2015-02-05 16:20 ` Pablo Rodríguez 2 siblings, 0 replies; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-05 16:20 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/04/2015 08:23 AM, Mycroft Jones wrote: > Pablo, I'd prefer ConTeXt output to LaTeX. I'm not sure why LaTeX to > PDF is the default. Once it is in ConTeXt format, it is easy to make a > PDF, right? > > So actually, what I would most prefer, is HTML output, and ConTeXt > output. I'm really not a fan of LaTeX. > > Is there a perl script or other solution so I can do mixed English > Hebrew Greek in pandoc, with HTML and ConTeXt output? Mycroft, sorry for the late reply. LaTeX is the default in for PDF in pandoc, because it is more widely used. The good news in ConTeXt is that you can copile XML code directly into PDF. This is done through an environment. So, unless you are a fan of Perl, ConTeXt deals with XML directly (http://pragma-ade.com/show-man-44.htm). I’m working on an environment for pandoc-xhtml at http://www.context-environments.tk. I have some details that need polishing and the minimal documentation is still to be written. I have typeset a full book with that method: this is the real one source that rules them all ;-). Two minor issues (but this is markdown and pandoc internal document model [not ConTeXt in any way]) are: that language hasn’t an special attribute and needs extra tagging (https://github.com/jgm/pandoc/issues/895), and that there isn’t a special syntax for divisions and spans (https://github.com/jgm/pandoc/pull/1791). BTW, could you post a minimal sample to the list that shows the language mixture? It would be important that (if classical Hebrew has something similar to hyphenation) the sample had Hebrew words containing potential hyphenation points. Sorry for the cryptic reference to the way ConTeXt deals with XML, but my pandoc-xhtml environment is on its way. I hope it helps, Pablo -- http://www.ousia.tk -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54D39830.8020300%40web.de. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Mixed Hebrew, Greek, English, with specific fonts for each? [not found] ` <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-02-03 16:56 ` John MacFarlane 2015-02-03 17:28 ` BP Jonsson @ 2015-02-03 19:46 ` Pablo Rodríguez 2 siblings, 0 replies; 13+ messages in thread From: Pablo Rodríguez @ 2015-02-03 19:46 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw On 02/03/2015 08:29 AM, Mycroft Jones wrote: > I write documents that are mostly English, but that include Greek and > Hebrew quotations. Since pandoc is UTF-8, that shouldn't be a problem. > For the Hebrew, I sometimes want to use a paleoHebrew font. How can I > tell pandoc to use a specific truetype font for a specific range of > Unicode code points? Specifically, tell it that Hebrew characters > should be rendered with myPhoenicianHebrewFont.ttf Hi Mycroft, could you give a more detailed description of what you intend? Using XeLaTeX and LuaLaTeX might help you to get a fallback font for Greek and Hebrew in LaTeX. If I’m not wrong, this is what you are trying to do. But there is another issue, that you cannot solve without marking language in spans and and divisions: hyphenation. Leaving Hebrew aside (I don’t know how it is hyphenated), English hyphenation patterns won’t work with Greek words. At least, it wasn’t possible with LaTeX some time ago. Knowing which are your target outputs will help to provide more proper advice. Just in case it helps, Pablo -- http://www.ousia.tk -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/54D12591.3030304%40web.de. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-02-20 18:32 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-02-03 7:29 Mixed Hebrew, Greek, English, with specific fonts for each? Mycroft Jones [not found] ` <0d3df016-fefe-4024-9be5-d0b96cad9488-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2015-02-03 16:56 ` John MacFarlane 2015-02-03 17:28 ` BP Jonsson [not found] ` <54D10552.5010905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2015-02-04 0:19 ` DJ W [not found] ` <CA+nD0m5XHgDEbBwG-ySWkVUUT9cnUjDXC50keg6tra95mxswXQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-04 5:09 ` Pablo Rodríguez [not found] ` <54D1A98D.2010508-S0/GAf8tV78@public.gmane.org> 2015-02-04 7:23 ` Mycroft Jones [not found] ` <CA+nD0m4RmDHWDiTjBF5up9gsAGiRY1kxUspxLJkuKPEHVwOBDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-04 7:28 ` Mycroft Jones [not found] ` <CA+nD0m5qvgwpB=mrG2tW1qXZiT2xPR_+Q+HwCfN38UD4ATg-ag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-05 17:29 ` Pablo Rodríguez 2015-02-20 18:32 ` Pablo Rodríguez 2015-02-04 17:46 ` BPJ [not found] ` <CADAJKhDjgtrA5i77wj=1_FgWbEHkN7B+D2Z+PROcZbK8sLAGmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-02-05 17:50 ` Pablo Rodríguez 2015-02-05 16:20 ` Pablo Rodríguez 2015-02-03 19:46 ` Pablo Rodríguez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).