Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: LaTeX / Metafont was Re: Arabic transliteration

From:Christophe Grandsire <christophe.grandsire@...>
Date:Saturday, November 16, 2002, 15:44
En réponse à Peter Clark <peter-clark@...>:

> On Friday 15 November 2002 04:10 pm, Christophe Grandsire wrote: > > En réponse à Peter Clark <peter-clark@...>: > > But once compiled, will the DVI show vertical text? The only package I > see > > on my installation with vertical text abilities is MonTeX, and it's > far > > from complete... > > Yes and no; for some odd reason, it doesn't show correctly in > DVI format but > just fine in PS or PDF format.
Sorry, but it doesn't work either in PS format :(( . I get the place for the vertical text OK, but they stay empty (at compilation, it says it doesn't manage to create the Mongolian fonts :(( ).
> ... > \usepackage{rotating} > ... > Some text here > ... > \begin{turn}{-90} \begin{minipage}{5cm} ... Long text here ... > \end{minipage} > \end{turn} > ... > etc. > > Again, this doesn't work in DVI form, but exporting it to PS and viewing > it > with 'gv' looks just fine. Of course, I haven't quite figured out how to > make > the text flow exactly as I would like (top-bottom AND left-right, rather > than > top-bottom, right-left), but I'm sure there must be a way to do so. >
Is the TeX-XeT package compatible? If so, by combining rotation and right-to- left writing direction, you should manage what you want.
> > Hmph. I spent half the day today trying to piece together some > idea of how it > works, and came to the conclusion that I'm going to need a rather > in-depth > tutorial to explain all this convoluted syntax.
I really don't see what's convoluted in the METAFONT syntax. It looks pretty basic to me... You can certain tell
> that > Knuth was influenced by Algol. If someone could point me in the > direction of > a good tutorial ("Here's how to make a vertical line. Here's how to > cross the > line and make a 'T'. Here's how to shorten the second line and add a > third at > the middle to make an 'F'...) that would probably help immensely. >
You don't make lines in METAFONT. You define points and you connect them in some way. If you want simple lines, there's a command called "draw" which does exactly that. So, to make a vertical line, just do: z1=(50,100); z2=(50,0); draw z1..z2; Can it be simpler? (note that the coordinates are real Cartesian coordinates, absciss before ordinate, and the origin is on the left beginning point of the baseline) Now add the horizontal line for the T: z3=(0,100); z4=(100,100); draw z3..z4; And here it is, a big 'T' as wide as it is tall. You want an F instead? Here it is: z3=(100,100); z4=(80,50); draw z2..z3; draw 1/2[z1,z2]..z4; The seemingly complicated bit is in fact a shorthand to let METAFONT calculate itself coordinates of points. 1/2[z1,z2] means: take the line defined by the points z1 and z2, and take the point on this line half-way between z1 and z2 (more exactly, take the point at the distance half the length of the segment z1z2 from the point z1, and when you walk towards z2. It is easier to understand it than to describe it). So you don't have to calculate yourself the coordinates of a point when it is aligned with two other points. Just use the t [z1,z2] formula and choose t depending on the distance of the point from z1, and whether it is on the side of z2 or not. Make a drawing and you'll understand immediately what I mean :)) . The complication comes from when you want to use the full power of METAFONT, and create programs which can create all the different styles of fonts you want (regular, bold, italic, slanted, serif or sans serif, whatever size you want, etc...) by just changing a few parameters in the program! It's not the language itself which is complicated, but the high level of abstraction you must use to achieve that. The power of METAFONT is that it allows such a thing.
> > Which is of course why everybody uses TeX and doesn't dream of > using LaTeX, > right? :P >
Well, TeX is for text processing the equivalent of assembly for programming. It's powerful, but very low-level. LaTeX, as a group of macros for TeX (I know, it's a little more than that, but at the end LaTeX always uses TeX for the final compilation :)) ), is basically the equivalent of higher-level languages. Everybody uses them because somebody has already taken the step of making those macros and it would be stupid to reinvent the wheel each time you want to create a document or write a program, not because TeX is so difficult. METAFONT, unfortunately, doesn't have this set of macros (a job for anyone?).
> > Well, if it won't bomb my inbox, I wouldn't mind the DVI with > the figures.
Actually, I've put them on the web, since taliesin asked for them and I couldn't manage to attach them to my email. They are at http://christophe.grandsire.free.fr/autres, and names mfman (for the figures) and mfbook (for the manual). They are available in DVI and PS format.
> Although I have to wonder why they aren't together--seems a little odd > to > typeset and illustrate a book separately... >
Because I had only the sources (I had to hack the mfbook.tex to get it compiling) and although the manual is generated by TeX, the figures are made with METAFONT (the source is a metafont program mfman.mf). TeX cannot include figures (actually, neither can LaTeX. It uses postcript support to achieve that). It just leaves the place to insert the figures.
> > Well, at least I change the subject heading to indicate what the > message is > really about. :) Unlike, say, some 17th century French philosophers > who > hijack KuJomu threads... ;>
Call me lazy! :))) Christophe. http://rainbow.conlang.free.fr Take your life as a movie: do not let anybody else play the leading role.

Reply

Peter Clark <peter-clark@...>