[XeTeX] Change fonts for different environment/commands

Wilfred van Rooijen wvanrooijen at yahoo.com
Wed Sep 8 08:33:35 CEST 2010


Hi,

Maybe my answer is a littlebit late, but I hope it might provide the original poster with some insight.

Tex by itself is a rather stupid program, in the sense that it will read a stream of input commands and text and then put the corresponding font elements (glyphs) on some location in space. That space may correspond to a4 paper, or letterpaper, or whatever. So if you want to have a fancy layout in TeX, it is a lot of work to define commands to make headers, sections, etc. Xetex is really nothing else than a modern version of TeX, but basically it does the same: read input, make output.

To make life easier for users, some brave people decided to make so-called "formats", where a lot of the ugly programming is hidden into easy-to-use commands. For instance latex (Leslie Lamport tex). Xelatex is basically the latex format using the xetex program "under the hood".

The latex format was made with a specific idea of the type of document it was expected to be used for: scientific publications, books, etc. Over the years the format has been extended using so-called stylefiles to achieve a more customizable layout. But in the basis, it is still targeting rather "serious" work.

Another format is called ConTeXt. This was developed using TeX but much more focusing on DTP-type applications. ConTeXt provides a superbly customizable layout, but at the expense of a burden on the user to program everything. If you know what you're doing, it is a superb system. If you're just starting, it may be a bit of a downer.

If you inform us a littlebit more about the type of document you want to make, we may be able to point to the relevant stylefiles etc. But be aware of the following: strangely enough, most latex users do not care much about the layout. When I type my manuscript, I worry about the contents. I don't want to worry about the numbering of footnotes, references, which font to use in which type of header. All of that is left to latex - I don't care. If you want to create a document with a distinctive visual layout, you may be better of using something else than latex. Also be aware that much of the layout settings in latex are the result of years of practical use, and incorporate a lot of "rules of thumb" about what is good and what is bad. See the memoir manual for a nice discussion. A document with many fonts in many different colors on one page is, in my opinion and in the opinion of many latex gurus, evil. Therefore, latex is usually setup in a way to avoid
 those things. If you want to use those things, you'll have to redefine and reset a lot of things in latex.

Cheerio,
Wilfred

many commands and macros may be programmed into so-called class files and style files.




--- On Thu, 2/9/10, Marcin Grotomirski <grotos at gmail.com> wrote:

> From: Marcin Grotomirski <grotos at gmail.com>
> Subject: Re: [XeTeX] Change fonts for different environment/commands
> To: "Unicode-based TeX for Mac OS X and other platforms" <xetex at tug.org>
> Date: Thursday, 2 September, 2010, 4:20 AM
> 2010/9/1 Arthur Reutenauer <arthur.reutenauer at normalesup.org>:
> >>                                
>  except for the number in footnote -
> >> it stays black
> >
> >  Yes.  This is to be expected (as I said, I didn't
> test the macro, but
> > this behaviour is obvious now you say it): the
> footnote number is not
> > part of the footnote text, but is instead managed
> automatically by the
> > (original) \footnote macro.  If you want to use color
> for the number
> > too, you need to copy the entire definition of
> \footnote and modify it
> > so that it sets the number in color as well the text;
> or, better yet,
> > use a more customizable document class like memoir, as
> was suggested.
> >
> >        Arthur
> >
> >
> > --------------------------------------------------
> > Subscriptions, Archive, and List information, etc.:
> >  http://tug.org/mailman/listinfo/xetex
> >
> 
> I'm starting reading;)
> I see it's guite complicated. So I have the last question.
> How do you
> create xetex documents that don't look like classic LaTeX
> document. I
> mean modern-looking pdfs (created mainly in InDesign) with
> for example
> headings in Helvetica in fancy colours. Of course with use
> of OpenType
> fonts.
> 
> Marcin
> 
> 
> 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>   http://tug.org/mailman/listinfo/xetex
> 






More information about the XeTeX mailing list