Hi all! I'm going to start using ConTeXt; I've been planning to do so for a few years, but now I finally have Internet access at home, so it's easier for me to look things up in the wiki (or ask here;)). I have two questions. The first one is connected with fonts. I can't understand ConTeXt's font mechanism, which seems way too complicated for me; could anyone just tell me how I can switch to, e.g., Antykwa Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella? Of course, I'd also like to be able to typeset Polish texts with them; will \enableregime[utf-8] \mainlanguage[pl] be enough (apart, of course, from adapting ConTeXt to Polish typography customs, like dots after chapter numbers etc.)? I think that that's what the wiki lacks: a beginner's guide on _using_ fonts (not _installing_ them or _messing_;) with them). If someone enlightens me on this, I could write something on the wiki about it. And the second, a bit "philosophical" question: the official manual is not so new. How do I learn ConTeXt best? I mean, are changes to the user interface since 2001 so big that I could run into troubles using the manual? Or are there some changes which make something easier/possible which was difficult/impossible at the time or writing the manual - how do I learn about these? And last but not least - Hans, thanks for such a great TeX macro package! Yours -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) It is impossible to split a cube into two cubes, a fourth power into two fourth powers and so on. I've found a remarkable proof of this fact, but unfortunately it's too long to fit into the signature.
Marcin Borkowski wrote:
Hi all!
I'm going to start using ConTeXt; I've been planning to do so for a few years, but now I finally have Internet access at home, so it's easier for me to look things up in the wiki (or ask here;)).
I have two questions. The first one is connected with fonts. I can't understand ConTeXt's font mechanism, which seems way too complicated for me; could anyone just tell me how I can switch to, e.g., Antykwa Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella? Of course, I'd also like to be able to typeset Polish texts with them; will
\usetypescriptfile[type-gyr] \usetypescript[palatino][qx] \setupbodyfont[palatino,10pt]
\enableregime[utf-8] \mainlanguage[pl]
be enough (apart, of course, from adapting ConTeXt to Polish typography customs, like dots after chapter numbers etc.)?
that should be set up already (\mainlanguage does that)
I think that that's what the wiki lacks: a beginner's guide on _using_ fonts (not _installing_ them or _messing_;) with them). If someone enlightens me on this, I could write something on the wiki about it.
most free fonts that ship with tex live are already set up (and you can make combinations of them, which is what typefaces is about) it mostly bpild down to choosing a proper font encoding (qx in your case)
And the second, a bit "philosophical" question: the official manual is not so new. How do I learn ConTeXt best? I mean, are changes to the user interface since 2001 so big that I could run into troubles using the manual? Or are there some changes which make something easier/possible which was difficult/impossible at the time or writing the manual - how do I learn about these?
no changes to the user interface, only additional features (often discussed in dedicated manuals) 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 -----------------------------------------------------------------
Dnia Fri, Feb 29, 2008 at 09:54:46PM +0100, Hans Hagen napisał(a):
Marcin Borkowski wrote:
Hi all!
I'm going to start using ConTeXt; I've been planning to do so for a few years, but now I finally have Internet access at home, so it's easier for me to look things up in the wiki (or ask here;)).
I have two questions. The first one is connected with fonts. I can't understand ConTeXt's font mechanism, which seems way too complicated for me; could anyone just tell me how I can switch to, e.g., Antykwa Poltawskiego (I'm Polish, so I'd like to use it;)) or, say, Pagella? Of course, I'd also like to be able to typeset Polish texts with them; will
\usetypescriptfile[type-gyr] \usetypescript[palatino][qx]
\setupbodyfont[palatino,10pt]
Thanks a lot - it works! But... 1) when I substituted pagella for palatino, it stopped working; 2) and I still don't understand what's going on... I assume that \usetypescriptfile takes one argument, the name of the file with definitions. I assume that \usetypescript somehow defines a typescript - but the syntax is unclear to me... Finally, \setupbodyfont seems clear - it actually "chooses" given font. Am I right? (Sorry for being a nuisance - I just want to understand what's happening, at least approximately, so that I can switch to whatever fonts I'd like to, assuming they are quite "standard" and hence pre-configured in ConTeXt.)
\enableregime[utf-8] \mainlanguage[pl]
be enough (apart, of course, from adapting ConTeXt to Polish typography customs, like dots after chapter numbers etc.)?
that should be set up already (\mainlanguage does that)
Well, dots after chapter numbers didn't appear (this should be easy to do with \setuphead etc., however). I'd have to experiment a bit to see what exactly is done by \mainlanguage. Or is there some place I could read about it?
I think that that's what the wiki lacks: a beginner's guide on _using_ fonts (not _installing_ them or _messing_;) with them). If someone enlightens me on this, I could write something on the wiki about it.
most free fonts that ship with tex live are already set up (and you can make combinations of them, which is what typefaces is about)
it mostly bpild down to choosing a proper font encoding (qx in your case)
I see. Still, there are amost no clues in the wiki on how to use them... I hope to grasp it some day and explain on the wiki then;). That makes my conscience more clear about asking you again;).
And the second, a bit "philosophical" question: the official manual is not so new. How do I learn ConTeXt best? I mean, are changes to the user interface since 2001 so big that I could run into troubles using the manual? Or are there some changes which make something easier/possible which was difficult/impossible at the time or writing the manual - how do I learn about these?
no changes to the user interface, only additional features (often discussed in dedicated manuals)
OK. That sounds good, especially that I'm planning to do some XML typesetting using ConTeXt soon - I hope that example.pdf will be enough for my purposes;). You see, I'm a kind of guy who has nothing against being said "RTFM"; but I couldn't understand the documentation on fonts... But I don't want to give up, and when I know what's going on I'll be happy to explain it somewhere in the wiki, partially for others and partially for myself, in case I forget something;)...
Hans
Thanks a lot for your help! -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) Jezus żyje NAPRAWDĘ. A Ty?
Marcin Borkowski wrote:
1) when I substituted pagella for palatino, it stopped working;
pagella has no typescripts, as long as gyre is not finished, we overload the traditional fonts (font file remapping)
2) and I still don't understand what's going on...
I assume that \usetypescriptfile takes one argument, the name of the file with definitions. I assume that \usetypescript somehow defines a
no, it filters ... see mfonts.pdf
typescript - but the syntax is unclear to me... Finally, \setupbodyfont seems clear - it actually "chooses" given font. Am I right?
inded, in this case, it selects a typeface (grep for palatino and ou will find a typeface definition)
OK. That sounds good, especially that I'm planning to do some XML typesetting using ConTeXt soon - I hope that example.pdf will be enough for my purposes;).
better consider switching to luatex/context mkiv then -) 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 -----------------------------------------------------------------
Dnia Fri, Feb 29, 2008 at 11:57:30PM +0100, Hans Hagen napisał(a):
Marcin Borkowski wrote:
1) when I substituted pagella for palatino, it stopped working;
pagella has no typescripts, as long as gyre is not finished, we overload the traditional fonts (font file remapping)
2) and I still don't understand what's going on...
I assume that \usetypescriptfile takes one argument, the name of the file with definitions. I assume that \usetypescript somehow defines a
no, it filters ... see mfonts.pdf
typescript - but the syntax is unclear to me... Finally, \setupbodyfont seems clear - it actually "chooses" given font. Am I right?
inded, in this case, it selects a typeface (grep for palatino and ou will find a typeface definition)
Thanks for your prompt answers, Hans! Things are starting to become clear to me, although there is much to be understood... I'll try to write something on the wiki soon; hopefully this will clarify things to other newcomers;).
OK. That sounds good, especially that I'm planning to do some XML typesetting using ConTeXt soon - I hope that example.pdf will be enough for my purposes;).
better consider switching to luatex/context mkiv then -)
Well, I'm a bit afraid of its experimental status..
Hans
Greets, -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) Najkrótszy dowcip matematyczny: Obierzmy epsilon ujemne.
Hi,
On Fri, 29 Feb 2008 17:17:23 -0700, Marcin Borkowski
better consider switching to luatex/context mkiv then -)
Well, I'm a bit afraid of its experimental status..
Don't be, its bark is worse than its bite... I use it for production purposes (opentype, bidirectionality, otp/ovf...). Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shi`i Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
Dnia Fri, Feb 29, 2008 at 05:22:18PM -0700, Idris Samawi Hamid napisał(a):
Hi,
On Fri, 29 Feb 2008 17:17:23 -0700, Marcin Borkowski
wrote: better consider switching to luatex/context mkiv then -)
Well, I'm a bit afraid of its experimental status..
Don't be, its bark is worse than its bite... I use it for production purposes (opentype, bidirectionality, otp/ovf...).
Thanks a lot - but I guess I'll stick with MkII and pdfetex. I can't see any advantages of using luatex myself now - I neither use OpenType fonts nor advanced macro programming. I guess I'll wait for a production release and switch to MkIV when it's the "official" version. (And I really don't know what advantages in terms of XML I would get...)
Best wishes Idris
Yours, -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) 888
On Sun, Mar 2, 2008 at 9:48 AM, Marcin Borkowski wrote:
(And I really don't know what advantages in terms of XML I would get...)
About 10 times easier to write definitions to "transform" XML into a valid ConTeXt document (to write definitions in such a way that ConTeXt will "understand" the XML) ... But it's true that XML parsing is not 100% stable yet. Mojca
On Sun, 2 Mar 2008 14:08:48 +0100
"Mojca Miklavec"
On Sun, Mar 2, 2008 at 9:48 AM, Marcin Borkowski wrote:
(And I really don't know what advantages in terms of XML I would get...)
About 10 times easier to write definitions to "transform" XML into a valid ConTeXt document (to write definitions in such a way that ConTeXt will "understand" the XML) ... But it's true that XML parsing is not 100% stable yet.
It is not always easier to write a conversion from XML to TeX, I have a module with delimited arguments and it was easy to transform the XMl code to TeX but this is very difficult for me to do this with MkIV code. The old conversion methos requires for simple commands also less lines than the new method. The real advandtage for me is to avoid dozen of \defineXMLsave commands with the new XML setups and option to access data from the tree without the need to save the whole file in TeX macros (\saveXMLdatainelement). Wolfgang
Dnia Sun, Mar 02, 2008 at 02:08:48PM +0100, Mojca Miklavec napisał(a):
On Sun, Mar 2, 2008 at 9:48 AM, Marcin Borkowski wrote:
(And I really don't know what advantages in terms of XML I would get...)
About 10 times easier to write definitions to "transform" XML into a valid ConTeXt document (to write definitions in such a way that ConTeXt will "understand" the XML) ... But it's true that XML parsing is not 100% stable yet.
And where is any documentation for that? (Or at least examples?)
Mojca
-- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) - Pod jednym przynajmniej względem wcale się nie zmieniłeś - powiedział Aragorn. - Mówisz zagadkami! - Co takiego? Zagadki? - odparł Gandalf. - Nie! Po prostu mówiłem głośno do siebie. Prastary zwyczaj kazał zwracać się do najmądrzejszej osoby wśród obecnych, bo długie wyjaśnienia, których by trzeba udzielać młodym, są nudne. J. R. R. Tolkien
On Tue, 4 Mar 2008 21:58:24 +0100
Marcin Borkowski
Dnia Sun, Mar 02, 2008 at 02:08:48PM +0100, Mojca Miklavec napisał(a):
On Sun, Mar 2, 2008 at 9:48 AM, Marcin Borkowski wrote:
(And I really don't know what advantages in terms of XML I would get...)
About 10 times easier to write definitions to "transform" XML into a valid ConTeXt document (to write definitions in such a way that ConTeXt will "understand" the XML) ... But it's true that XML parsing is not 100% stable yet.
And where is any documentation for that? (Or at least examples?)
The new xml handler is currently only described in the Mark manual [1], you could also find examples on the normal and the developer list. The rest is only documented in the source files and in modules. [1] http://pragma-ade.nl/show-man-41.htm Wolfgang
Dnia Tue, Mar 04, 2008 at 10:09:19PM +0100, Wolfgang Schuster napisał(a):
The new xml handler is currently only described in the Mark manual [1], you could also find examples on the normal and the developer list.
The rest is only documented in the source files and in modules.
[1] http://pragma-ade.nl/show-man-41.htm
Wolfgang
Thanks; I've skimmed through it and it seems it will be helpful. But first I'll have to learn something about XML... -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) People can be divided into two groups: those who believe that people can be divided into two groups and those who don't.
Marcin Borkowski wrote:
Dnia Sun, Mar 02, 2008 at 02:08:48PM +0100, Mojca Miklavec napisał(a):
On Sun, Mar 2, 2008 at 9:48 AM, Marcin Borkowski wrote:
(And I really don't know what advantages in terms of XML I would get....) About 10 times easier to write definitions to "transform" XML into a valid ConTeXt document (to write definitions in such a way that ConTeXt will "understand" the XML) ... But it's true that XML parsing is not 100% stable yet.
And where is any documentation for that? (Or at least examples?)
i hope to have that ready at the context conference ----------------------------------------------------------------- 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 -----------------------------------------------------------------
OK, so the first part of my questions about mfonts.pdf;) Thank you in advance for the answers; I'd like to stress that I'm not in a hurry, so please take your time! Also, as I said, I have nothing against being "redirected" to some other part of documentation in case it is easier than to write a full answer here. 1. Do I get it right when I think that \definefontsynonym takes 2 or 3 arguments, and: When given two, they mean: (1) the synonym being defined and (2) an earlier defined synonym being a "replacement text" for (1); When given three, (1) is as above, (2) is the filename of the font (tfm I guess?) and (3) contains some low-level options like the encoding (are there any other options available?) 2. What does exactly sa mean? Do I get it right when I think that it's the factor by which the "body font size" - i.e., some constant dimen parameter defined for the whole document (or environment) - is multiplied? Does the "laziness" of sa mean that the actual scaling will happen _after_ the definition of the body font size, which might be e.g. different for different components of a product within a project using a common environment? And what is mo? 3. What are the arguments to \definebodyfont? 4. What are the relations between \definefontsynonym, \definefont and \definebodyfont? 5. I can understand neither the paragraph right before the \definebodyfont example on page 4 of mfonts.pdf, nor the example itself. Any hints;)? CU, -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) Struktury grzechu jak złośliwy rak wżarły się w nasze życie, Wdarły się w ten świat. Ale patrz, jaka armia zbiera się u stóp Syjonu - policzone są już dni Babilonu! (Korzeń Z Kraju Melchizedeka)
On Mar 4, 2008, at 11:55 PM, Marcin Borkowski wrote:
OK, so the first part of my questions about mfonts.pdf;)
Thank you in advance for the answers; I'd like to stress that I'm not in a hurry, so please take your time! Also, as I said, I have nothing against being "redirected" to some other part of documentation in case it is easier than to write a full answer here.
1. Do I get it right when I think that \definefontsynonym takes 2 or 3 arguments, and:
When given two, they mean: (1) the synonym being defined and (2) an earlier defined synonym being a "replacement text" for (1);
When given three, (1) is as above, (2) is the filename of the font (tfm I guess?) and (3) contains some low-level options like the encoding (are there any other options available?)
2. What does exactly sa mean? Do I get it right when I think that it's the factor by which the "body font size" - i.e., some constant dimen parameter defined for the whole document (or environment) - is multiplied? Does the "laziness" of sa mean that the actual scaling will happen _after_ the definition of the body font size, which might be e.g. different for different components of a product within a project using a common environment? And what is mo?
3. What are the arguments to \definebodyfont?
4. What are the relations between \definefontsynonym, \definefont and \definebodyfont?
5. I can understand neither the paragraph right before the \definebodyfont example on page 4 of mfonts.pdf, nor the example itself. Any hints;)?
CU,
Most of your questions are answered in the fonts manual: http://www.pragma-ade.com/general/manuals/mfonts.pdf Thomas
Dnia Wed, Mar 05, 2008 at 07:55:42AM +0100, Thomas A. Schmitz napisał(a):
Most of your questions are answered in the fonts manual:
If this were true, I wouldn't bother you... But mfonts.pdf is too difficult for me to understand. My copy (I've even printed it!) is full of comments with question marks made by pencil... CU -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) This program is written in Perl. While stronger people find reading Perl code character-building, it should not be shown to people in their formative years. The author will not accept any responsibility for any moral grief caused. (The McKornik Jr. Public License)
Marcin Borkowski wrote:
OK, so the first part of my questions about mfonts.pdf;)
Thank you in advance for the answers; I'd like to stress that I'm not in a hurry, so please take your time! Also, as I said, I have nothing against being "redirected" to some other part of documentation in case it is easier than to write a full answer here.
1. Do I get it right when I think that \definefontsynonym takes 2 or 3 arguments, and:
When given two, they mean: (1) the synonym being defined and (2) an earlier defined synonym being a "replacement text" for (1);
When given three, (1) is as above, (2) is the filename of the font (tfm I guess?) and (3) contains some low-level options like the encoding
That sounds right.
(are there any other options available?)
I think you can also define: mapping % for xetex (?) handling % for an experimental pdftex font feature features % mostly for mkiv But all the first two are somewhat experimental, and features are only really useful for opentype fonts. All three are relatively new and not documented in mfont.pdf yet.
2. What does exactly sa mean? Do I get it right when I think that it's the factor by which the "body font size" - i.e., some constant dimen parameter defined for the whole document (or environment) - is multiplied? Does the "laziness" of sa mean that the actual scaling will happen _after_ the definition of the body font size, which might be e.g. different for different components of a product within a project using a common environment? And what is mo?
sa stands for "scaled at", mo stands for "mapped on". One of them (I think sa) is a multiple of the value you specify at \setupbodyfont[..] or \switchtobodyfont[..], the other is (I think) in relation to the actual current font size (so it is different whether \tfx or \tfa is in effect).
3. What are the arguments to \definebodyfont?
#1 size (5pt ... 12pt default) #2 family (rm ss tt mm hw cg) #3 font definitions (tf = ..., etc.)
4. What are the relations between \definefontsynonym, \definefont and \definebodyfont?
things defined with \definefontsynonym can be used in the right hand side of assignments in arg #3 of \definebodyfont, and in the #2 argument of \definefont. \definefont has no real relation to font switching, it is just a low-level shortcut for a specific font, much like a bare \font command in plain TeX, except that it allows synonyms and sa/mo. \definebodyfont is used to build up font collections
5. I can understand neither the paragraph right before the \definebodyfont example on page 4 of mfonts.pdf, nor the example itself.
That paragraph is a bit confusing to me as well. Browsing through type-siz.tex may help (in tex/context/base). Best wishes, Taco
Thanks for your answers! I've started a page on the wiki (http://wiki.contextgarden.net/Understanding_how_fonts_work_in_ConTeXt) devoted to ConTeXt fontology. I will put there things I was able to understand in ConTeXt's font mechanism. (Please be patient-I cannot devote more than about half an hour a day to this task...) I'd be thankful for correcting any mistakes I make there;). -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) This program is written in Perl. While stronger people find reading Perl code character-building, it should not be shown to people in their formative years. The author will not accept any responsibility for any moral grief caused. (The McKornik Jr. Public License)
Dnia Wed, Mar 05, 2008 at 10:17:33AM +0100, Taco Hoekwater napisał(a): Thanks for the answers; still, some things are not clear for me.
2. What does exactly sa mean? Do I get it right when I think that it's the factor by which the "body font size" - i.e., some constant dimen parameter defined for the whole document (or environment) - is multiplied? Does the "laziness" of sa mean that the actual scaling will happen _after_ the definition of the body font size, which might be e.g. different for different components of a product within a project using a common environment? And what is mo?
sa stands for "scaled at", mo stands for "mapped on".
One of them (I think sa) is a multiple of the value you specify at \setupbodyfont[..] or \switchtobodyfont[..], the other is (I think) in relation to the actual current font size (so it is different whether \tfx or \tfa is in effect).
Still don't get it. I tried the following example, just to see what happens (sorry, I know it looks terrible): \definefont [TitleFont] [Serif sa b] \definefont [TitleFontTwo] [Serif mo b] \starttext Hello World!\par {\TitleFont Hello world!\par} {\TitleFontTwo Hello world!\par} And with viii: {\viii Hello World!\par {\TitleFont Hello world!\par} {\TitleFontTwo Hello world!\par}} And with switchtobodyfont: {\switchtobodyfont[8pt] Hello World!\par {\TitleFont Hello world!\par} {\TitleFontTwo Hello world!\par}} \stoptext No difference between sa and mo using this example... (Right after looking at the results, I \show-ed \viii and noticed that \viii and \switchtobodyfont[8pt] do essentially the same. What's the use of having them both?)
4. What are the relations between \definefontsynonym, \definefont and \definebodyfont?
things defined with \definefontsynonym can be used in the right hand side of assignments in arg #3 of \definebodyfont, and in the #2 argument of \definefont.
So to be sure: I can use names defined by \definefontsynonym in place of font filenames?
\definefont has no real relation to font switching, it is just a low-level shortcut for a specific font, much like a bare \font command in plain TeX, except that it allows synonyms and sa/mo.
So it just _defines_ (what a surprise!) some command to be a font-switching macro?
\definebodyfont is used to build up font collections
Still, I have no idea about the relation between these three... Here's what I seem to understand now: \definebodyfont is a mystery to me; \definefontsynonym defines #1 to mean the same as #2, where #2 may be another "synonym" or a filename (and then you have - or may? - provide encoding informaction in #3). It doesn't support sa or mo, and that's ok, because its use is just fiddling with _names_; \definefont is similar to \definefontsynonym except that it allows scaling and does not allow filenames (only "synonyms"). How much of that is right?
5. I can understand neither the paragraph right before the \definebodyfont example on page 4 of mfonts.pdf, nor the example itself.
That paragraph is a bit confusing to me as well. Browsing through type-siz.tex may help (in tex/context/base).
I'll try that too soon...
Best wishes, Taco
Thanks in advance -- Marcin Borkowski (http://mbork.faculty.fmcs.amu.edu.pl) Nie wiesz nawet, jak cenny jesteś w Moich oczach! Jezus
participants (7)
-
Hans Hagen
-
Idris Samawi Hamid
-
Marcin Borkowski
-
Mojca Miklavec
-
Taco Hoekwater
-
Thomas A. Schmitz
-
Wolfgang Schuster