Re: [NTG-context] Uppercase headings
> \setuphead[title] >[deeptextcommand=\WORD] > > Does that work? It does, it does You just saved my night. Can I send you a pint of beer somewhere? --- I tried finding more information about deeptextcommand, but all I found was a brief comment about deep hooks in the release notes (19-Jan-06). I can write something about this into Wiki, but that requires me to understand a bit more. Where do I start looking for? Thanks again, - Ville <>___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Uppercase headings
> it's nearly impossible to get this working for all features > (keep in mind that tex has no real feature to map font chars > to other font chars) esp those with special chars. I know this is not a trivial question due to the number of encodings and languages. However, what makes me a bit puzzled is that the following works fine: \title{\WORD{Text with åäö etc.} } So, the mechanism behind \WORD works well. It is just that I cannot figure out how to use it. I emphasize that it used to work fine even in the \setuphead definition, but that was with an old version (April '05). --- > works ok here (can you try the latest version - beta?) The version I am trying to use is rather a fresh one: TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006 tex : unknown context : ver: 2006.03.25 13:21 cont-en : unknown cont-nl : unknown Has there been any change after that? If not, I could brew up a minimal example to illustrate the problem. BR, - Ville <>___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Uppercase headings
Title: Uppercase headings I started to edit an old document with capitalized headings. Making the headings was rather difficult (as can be seen on this list about a year ago), and now it seems to have broken again. I have: \setuphead[title] [page=yes, before={\strut\blank[5*big]}, after={\textrule\blank}, align=middle, style=\tfb, textcommand=\WORD ] This worked fine in the past. Not anymore: 8<--- ! You can't use `\relax' after \the. [EMAIL PROTECTED]@\@@pnstate \pushmacro ...ame [EMAIL PROTECTED]@ \@@pushedmacro \endcsname \@@pushedmacro \endcsname #1 \makesectionformat ...macro \@@shortsectionnumber \let \@@shortsectionnumber... \rawreference ...veryreference \makesectionformat \writereference {#2} {\sec... ...\finalsectionnumber }{\asciititle }} }\fi \executeifdefi! Missing \endcsname inserted. \let \@@shortsectionnumber [EMAIL PROTECTED] \ifx \csname \??se #1 \c!ownnumber \endcsname \r... \makesectionformat ... \@@shortsectionnumber \let \@@shortsectionnumber \@@s... \rawreference ...veryreference \makesectionformat \writereference {#2} {\sec... ...\finalsectionnumber }{\asciititle }} }\fi \executeifdefined {\?... \douppercase ...rstoftwoarguments \edef \ascii {#1 }\edef \ascii {\expandafte... ... 8<--- Using the trivial solution (\uppercase) does not work because with a non-il1 regime it does not handle the accented characters (A umlat, O umlaut) correctly. I use UTF, as it contains all the characters I need. So, what has changed in the \WORD? It works \WORD{fine} within text but not in the headings. TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Typesetting chemical reaction equations
> \usemodule[chemic] > > \placeformula[-] > \startformula >\chemical{NH_3(g),+,H^+(aq.),+,Cl^-(aq.),->,NH_4^+(aq.),+,Cl^-(aq.)} > \stopformula Dank u! - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Typesetting chemical reaction equations
> And how do I switch off the equation numbering for the chemical > reactions (I'd like to have the mathematical formulae still numbered)? Stupid me. Just by leaving the \placeformula out. (Maybe I should go and get something to eat, my brain seems to be in some sort of energy-saving mode.) By the way, is there a simple way to have two separate numbering schemes? If I wanted to have chemical formulae numbered with 1,2,3,4... and maths with i, ii, iii, iv, ... , how should I do it? It must be documented with \placeformula, but is \placeformula documented anywhere apart from the code itself? (Yes, I am lazy.) - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Typesetting chemical reaction equations
I would need to typeset some rather simple reaction equations. I do not need the structural capabilities of PPCHTeX, just something simpler. The thing I am writing has something to do with physical chemistry, so I need mathematical equations, as well. Of course, the natural way to do this: \placeformula \startformula \rm NH_3(g) + H^+(aq.) + Cl^-(aq.) \rightarrow NH_4^+(aq.) + Cl^-(aq.) \stopformula This gives rather pleasant-looking results. However, is this the right (i.e. kosher) way of doing things, or do I run into trouble at some later point with this? What are you chemists using? And how do I switch off the equation numbering for the chemical reactions (I'd like to have the mathematical formulae still numbered)? TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] SVG images
> Skencil http://www.skencil.org can open and save SVG and exports to PDF via > reportlab. As I have not worked with transparency yet I do not know if that > works all the way from SVG to PDF. Could you post me a little sample image to > run it through Skencil? All right. I sent some files to Tobias (above), and he very kindly made some experiments. Skencil could not do this (alas!) but Scribus did it almost correctly. Scribus seems to have some problem with alpha channel gradients, but the problem looks like a problem with some color correction/conversion, not a real SVG/PDF issue. I will go on experimenting and report here if I find out something more. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] SVG images
I would need to embed some SVG images into a ConTeXt document. I have done some research on the topic, and the seemingly trivial task seems all but impossible. I found a few solutions, but none of them fits my needs: - I want to have my vector images in vector format (i.e., no Inkscape-to-PNG) - alpha-channel transparency is used in the images, and it should be present in the PDF file, as well (i.e., no Inkscape-to-EPS) - if I used commercial products, I would not use SVG (i.e., the converter should be open source) The images have been (will be) created with Inkscape. While being otherwise a surprisingly nice piece of software, Inkscape does not seem to export PDF for some reason or another (licencing, time, etc.). I have the impression I just ran out of luck. Did I? - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] \startalignment etc. require text immediately after
One phenomenon I have repeatedly come accross but not quite understood... If I have \startalignment, \startnarrower, etc., then there has to be text immediately after the start command. As small example: \startalignment[center] \bTABLE \bTR \bTD something \eTD \eTR \eTABLE \stopalignment This should create a single-cell table in the middle of the page. It does not, the text is in the left. If I add something small (a strut), then everything works fine: \startalignment[center] \strut \bTABLE \bTR \bTD something \eTD \eTR \eTABLE \stopalignment Any text has the same effect as the strut. If the text is added to the end, it does not have any effect, i.e. the start has no effect. After some quick experimenting it seems evident that there has to be text after the start command. A figure or a table won't do. Why? And does this occur with any start-stop pair (sounds odd) or just with a few? And what is the kosher way of solving this problem? This must be a FAQ, but I could not find the search terms to find an answer. TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Units -- a few things
There seems to be a small glitch in m-units.tex. The unit \Bit typesets "Bit". This is wrong, as bits are always in lowercase first letter: a single bit: bit a byte: B It is also possible to use b (for bit) and Byte (for B). However, bits are always small and Bytes large. The best practice seems to be to spell bits out (bit) and use abbreviation for Bytes (B). This minimizes confusion. I fixed this problem in my ConTeXt installation by tweaking rows 664 and 666. For more discussion, see: http://en.wikipedia.org/wiki/Byte It might be worth it to implement the octet (o), as well. It is a good unit (more precise and descriptive than byte) but the abbreviation is horrible. --- Another related thing is whether ConTeXt should implement IEC 60027-2 binary prefices (Ki, Mi, Gi, Ti). More info on this: http://www.iec.ch/zone/si/si_bytes.htm --- Well, then to a more practical thing... This is a very trivial question, but still. When writing a number and the unit, it would be nice to have automatic formatting. What I mean is that when I have a million two hundred thousand kilograms, I would like it to be typeset: 1(small space)200(small space)000(small space)kg Everything on a single row despite where it is. Now I write: 1\,200\,000\,\Kilo\Gram It would be more legible, if I could just write: \unit{120}{\Kilo\Gram} Taking care of all the fancy small spaces should be computer's problem. not mine... (Or does this mechanism already exist?) - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] palatino fonts
Wolfgang Zillig wrote: I just had a look the the Gentium fonts and I like them. Did anybody start to make them available in Context? You might be interested in this: http://wiki.contextgarden.net/Installing_a_TrueType_font%2C_step_by_step - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Text wrapping in SciTE
I was wondering what is the correct way of wrapping text while typing in SciTE. SciTE can wrap the text, but it is basically a virtual wrap, it is a long line tailored to the view of your editing window. On the other hand you can wrap the lines yourself by pressing enter wherever you think it is necessary. Which one of these methods is better? Or maybe there are better alternatives? I use the "one long line per paragraph" approach. The reason is simple: it is fairly simple to wrap the lines afterwards. It is far from simple to unwrap them if you have the hard line breaks. Also, with soft (or virtual) wrapping you can add or remove text without any hassle. So, I cannot figure out any common situation where hard formatting would be significantly better. Just my two eurocents. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Stand alone Context editing environment
Henning Hraban Ramm wrote: Thank you, I'm wikifying that. see http://wiki.contextgarden.net/Windows_Installation Oh, great if you do it (then I don't need to). Thanks. Greetlings from Lake Constance! Greetings from slightly cool (-22 'C at the moment) Finland. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] A font problem with the stand-alone Windows distribution
Try the next two lines instead of those three lines: \usetypescript[postscript][\defaultencoding] \setupbodyfont[postscript,11pt] Thank you, thank you, thank you! The problem was not the difference between pos and postscript (they seem to be synonyms, both work) but the magic row: \usetypescript[adobekb][\defaultencoding] This one seems to instruct ConTeXt to use the real Adobe fonts. I tried almost every other combination but did not remove the row which says "Adobe". Stupid me. However, the magic row with "adobekb" is present in almost all examples I've seen. And yet very few people have the real Adobe fonts. So, possibly this should be noted somewhere. (Anyway, what is the \usetypescript[adobekb] supposed to do?) - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Stand alone Context editing environment
Can someone explain to me what this is? If it is downloaded and unzipped, is it ready to go? Is there documentation of this particular zip? Is there an editor in this zip configured and ready to go? Here is a step by step of how it should go (i.e. what I did with success): 1. Get perl and install it. I use ActivePerl: http://www.activestate.com/Products/ActivePerl/?mp=1 2. Get ruby and install it. I used: http://rubyinstaller.rubyforge.org/ 3. Check that perl and ruby work. Go to the command prompt (Start -> Run... "cmd") and execute the two commands: ruby --version perl --version These should give some information on ruby and perl. It really does not matter what they say, as long as the interpreters are found. 4. Download mswincontext.zip 5. Unzip the contents under c:\temp. You should get c:\temp\isoimage. 6. Create a new folder c:\context 7. Copy everything under c:\temp\isoimage into c:\context. There should be one folder (/usr) and a few files. 8. Open the folder c:\context and double-click cdemo.bat 9. Now you should see the editor open with a few files. Press F7 to compile one of the files. If everything goes smoothly, you are done. If not, read these instructions again carefully. If you cannot get it work, mail the list. A few notes on the procedure above: - perl and ruby per se have nothing to do with ConTeXt, ConTeXt just needs them. So, if you have another perl and ruby (e.g. through cygwin), they are fine as long as they are in the system path. If you can get through step #3 without doing #1 and #2, fine. - It is up to you to choose the location where you unzip the file in step #5, no magic there. Just that you know where the files are. - The actual location of the ConTeXt in step #6 tree does not matter. I use c:\context, but you might use something else. However, I would not use anything with a space in the name (e.g. c:\Program Files\context), as that may confuse things. (Has anybody tried lately?) - After you have verified everything works in step #9, you can toss cdemo.bat away and use cstart.bat to start everything. Make a link to it somewhere so that you can start the system by a shortcut or through the Start menu. Do not move the batch script anywhere, it has to be run in the root directory of the distribution (e.g. c:\context). - Make sure you have something Acrobatish installed, otherwise you won't see the results in step #9. Good luck! - Ville P.S. Is this information already in the Wiki? I found only some short notes, but this might be somehow important for beginners. I can put it there if neeeded. ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] A font problem with the stand-alone Windows distribution
A font problem -- again. I am so sorry. I try to use the URW postscript fonts with the stand-alone mswincontext.zip distribution. Everything else seems to work fine, but when I say: \usetypescript[adobekb][\defaultencoding] \usetypescript[pos][\defaultencoding] \setupbodyfont[pos,11pt] I get a bunch of complaints from Acroread, and it uses Helvetica everywhere. (The same happens with Postscript instead of pos.) The reason is rather clear, the log has the following rows: Warning: pdfetex.exe (file ptmb8y): Font ptmb8y at 79 not found Warning: pdfetex.exe (file pcrr8y): Font pcrr8y at 55 not found Warning: pdfetex.exe (file pcrr8y): Font pcrr8y at 86 not found etc. So, the system tries to find the Adobe fonts which I do not have. Their URW counterparts are included in the stand-alone distribution, but the system does not seem to look for the u* fonts. I do not claim to understand the complete font mess, but ConTeXt seems to get the right map files: fonts : resetting map file list fonts : using map file: original-base fonts : using map file: ec-public-lm fonts : using map file: ec-base fonts : using map file: original-ams-base fonts : using map file: original-public-lm fonts : using map file: texnansi-base fonts : using map file: texnansi-urw-times fonts : using map file: original-youngryu-tx fonts : using map file: texnansi-urw-helvetica fonts : using map file: texnansi-urw-courier What goes wrong? I am using the newest mswincontext.zip downloaded just a half an hour ago, the log says: ConTeXt ver: 2006.01.09 fmt: 2006.1.9 int: english mes: english Thanks for all hints. And once again, sorry for spamming the list with YAFP (Yet Another Font Problem). - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] PSNFSS in new ConTeXt?
\usetypescript [adobekb][\defaultencoding] \setupbodyfont[pos] which used to work before doesn't work neither on my Mac nor at live @ contextgarden.net. How does one access these fonts? (And sorry for blaming gwTeX for this!) It is really not Gerben's fault! At some point the pos-typescript has been deprecated (at least according to the comments in tex/context/base/type-pre.tex). However, the typescript file is now enclosed in \starttypescriptcollection[previous] ... \stoptypescriptcollection These might give you some hint about how to proceed. --- The more modern way of solving this problem is to forget about the old pos collection and leverage the user value by embracing the novel typescript paradigm. (Oops, sorry, my marketing-bs-generator seems to be breaking in.) The modern way to get to use the free URW fonts is to run context/data/type-tmf.dat (or, rather, run texfont and give type-tmf.dat as a batch file). This will enable using a lot of nice fonts in the URW collection. However, there are two gotchas: 1. With gwTeX, running the command texfont --encoding=ec --batch type-tmf.dat at least previously resulted in some errors about unknown files. They may be fixed with an ugly hack: replace all occurences of TEXMFMAIN by TEXMFTE in type-tmf.dat. 2. After the fonts are installed, you have the fonts. Nice. But no typescripts. Not so nice. I have made some typescripts for Palatino/Helvetica/Courier and SchoolBook/Helvetica/Courier combinations. There might be something already done in the ConTeXt distribution, but I have not found anything that useful. (I can Wiki them if someone finds it useful.) Good luck! - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] Context, LaTeX, or an XML for academic writing?
> I've also seen the MS thesis of Han The Thanh. It's good. But I would > need something more suited for natural sciences that accomodates > plenty of figures and references. Also I would like to "cloak" my > thesis by avoiding Computer Modern. LaTeX is developed for mathematical sciences by a mathematician. It works beautifully with complex equations and embedding maths into text. Everything in it -- including the CM fonts -- screams "mathematics!". ConTeXt is developed for typesetting manuals. Some requirements are the same, for example the need for very solid and reliable cross-references. Some requirements are different. Manuals and other documentation require more control over the layout and a very good support for illustrations. Writing a thesis in science falls somewhere in between. If you are writing something about quantum mechanics, I'd say you should use LaTeX. If you are living on the fringe and doing something more computer-oriented (or even chemical), the intentions of ConTeXt developers and you converge better than with LaTeX. I wrote my PhD thesis with LaTeX, because that was the only viable alternative back then (four years ago). Now I think I'd use ConTeXt due to its better layout handling. [For the curious: the thesis is available at http://lib.tkk.fi/Diss/2001/isbn9512257270/ I can supply the LaTeX sources plus a document telling about the tools and rationale behind, if someone needs it. But be warned, it is not up-to-date information.] --- Someone suggested using a ready-made template. Sure, if you can get one somewhere with all the bells and whistles suitable for your academic institution, take it. Be it ConTeXt or LaTeX, you'll save a lot of trouble using a proven platform. Beautiful documents with minimal effort. That's exactly what the universities should supply. Very unfortunately, there are seldom any good templates around. Very often there are no *TeX templates around, regardless of quality. There may be some half-hearted Word templates around, but at that point ducking or running -- whichever is more convenient -- is a good alternative. And if there are no good templates around, then you'll need to roll your own. One which fulfills all requirements set by the administrators (all those lovely forms) and is easy-to-read and looks nice. One of the mixed blessings (=curses) brought about by computers is that now you need to be an academic writer, a typesetter, and a graphic artist at the same time. At this point the number of should-knows explodes. On the typography side you have to know a million small things. What kind of quotes to use, when to use en dash, when to use em dash, how to hyphenate, how to type numbers and units. Then you need to decide on the typefaces to use, and the general layout of the page. After all this is understood, then the technical problems have to be overcome. You will need to find the fonts you want to use, and you will need to be able to explain all this to the type- setting system in use. Also, you have to be able to draw the illustrations, with the requirement that they are both aesthetically pleasing and help to convey the message they carry. To do this, you need the software to draw the illustrations and the file formats to transfer the drawings to the typesetting system. After all this is done, you can try to produce the printed book. This may sound trivial, but is far away from that. There may be problems with file formats (with an old version of pdfLaTeX I managed to make a file which crashed a commercial RIP system, this happened a few days before a big deadline), or at least with color matching if nothing else. --- Does the above sound easy? Not for me. Still, you are expected to make a professional-looking document in a situation where you need to know half a dozen professions completely unrelated to your own scientific field. The result is that most people resort to using the Word and a lot of other four-letter words. The documents range from hideous to just slightly ugly, and are extremely fragile and difficult to maintain. --- What I am trying to say is that choosing the tool is only one part of the project. Whichever tool you choose, you'll end up in trouble at some point. With some tools (WYSIWYG) you'll end up in worse trouble, but even with *TeX the road is bumpy at best, unless you really have a tested and proven templates which you can use. The bumpiness has (IMO) slightly different nature in LaTeX than in ConTeXt. In LaTeX there are a lot of great packages and a lot of documentation. Books, web resources, mailing lists, etc. The huge user base makes all this available. However, finding the right packages and debugging some odd interactions and conflicts between packages may be very difficult. ConTeXt gives a lot more control over layout in itself without any packages or modules. And if you want something more exotic, take metapost and do it. But the downside of this is that as ConTeXt is a new syste
Re: [NTG-context] Context, LaTeX, or an XML for academic writing?
Actually your comment here might suggest how far we have to go then, as I'd consider my wishlist a very roughly stated but really quite minimal set of requirements for academic writing. Well, if you drop the RTF part, then your wishlist is not that difficult. However, there are some requirements which look trivial at first but are rather difficult to make well. The most important of these is the difference between HTML and a printed book. As long as you use only running text (no illustrations, graphs, images, formulae, tables), there is no problem. By making suitable templates the text may be typeset well and it works as a web page (or a collection of web pages). In HTML you have less control over the layout, but as the user has the control, everything is well. Some problems arise when you add any special elements to the text. Formulae are a good example. Even though you might in principle use MathML or equivalent, the browser support is not built-in, so most users cannot read the formulae. You'll need to use images, but then the best resolution is hard to find. The same goes with images, SVG is not ready yet, so resolution problems are really difficult. Illustrations which print well at high resolution do not necessarily look good at screen resolution. But the real problems start with floats. Where do you put a picture with its captions on a web page? Or a footnote? One common solution is to put them behind a link. However, some people (yours truly included) find that following the links back and forth is clumsy. Another solution would be to place the figures within the text, but then we have all sorts of typesetting problems without having a typesetting engine. Of course, you can make miracles with XHTML/CSS. You can make something that looks laike pages from a book, for example. But then, why not really use PDF instead? Because then you can be sure of the layout. The hyperlink navigation paradigm of HTML is a good one for many purposes. It is not a good one for a book. If I have a book (or a PDF), I can easily verify I've read it to the last comma. With a more complicated (even a simple tree without loops) HTML document trying the same reminds me of the "Maze all different" in the old "Adventure" game (Colossal Cave Adventure by Will Growther). I am not saying HTML is bad and PDF good. HTML is extremely good for many purposes. Wiki is a good example of this, and so are many web pages. But as HTML is not necessarily a good form for a book, concentrating on PDF is probably a better idea. --- Since posting I've thought a bit more about why I wanted RTF, and realised it wouldn't do what I wanted anyway. The 'inter-operation with Word users' I was referring to is primarily this: it's common amongst academics I know here in Australia to use some of the collaboration features of Word (marginal comments and revision control, particularly). RTF wouldn't actually help with those anyway. So there's really no way around this without using Word, which I will only do at gunpoint. Well, if everyone around you is using Word and requires you to collaborate by using Word, you are up to your lower back in alligators. On the other hand, there are ways around this. What I use when commenting on other people's texts, I want to have the texts as PDF. Then I just simply write a mail with my comments: "p. 123, paragraph 2: Not so. Dr. Frankenstein proved this to be wrong in 1974, see Journal of Unlikely Science, 1865, pp. 1456-1505" p.127, figure 2.13: I don't get it." Exactly same thing as scribbling things into the margin. This method is independent of the programs used and does not really take any more time. I have found only two shortcomings with this method: 1. it is difficult to combine comments from several reviewers, 2. you cannot edit the text yourself even if you wanted to. The first one is a problem with Word documents, as well, and the second one is not always so desirable, anyway. Really, I hate it when people send me their Word files. I am quite convinced I am not the only one. The annotation mechanism in Word is similar to almost everything else in the program: looks easy, feels easy at first, makes you run circles on the walls in the end. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Context, LaTeX, or an XML for academic writing?
or an XML dtd (tbook or DocBook?) plus appropriate tools. I'm ruling out Word (having wrestled with it at work), and am reluctant to use anything similar like OpenOffice. I have used LaTeX for some things in the past. I was in a similar situation a few years ago (writing my PhD thesis). I think you are absolutely right when you avoid Word and everything Wordish. Making a big document with Word requires a lot of knowledge about what you should avoid. And in the end you'll still spend your nights wondering why the the crossreferences or page numbers go wrong. I ended up using LaTeX. I didn't know much about ConTeXt by that time, and also had a lot of maths in the book. I am not sure which one I'd take, if I could choose right now. I think your choice is one of the following: LaTeX, DocBook, ConTeXt, ConTeXt+XML. However, your wishlist looks a bit difficult. A few comments: 1) future-proofing. LaTeX is more common. On the other hand, you can (and should) take a snapshot of your working environment when you've finished what you're doing. All TeX variants (and XML stuff) are future-proof in the sense that all text and images are easy to recover if needed. Use only PDF, JPG, and PNG for images to be on the safe side. Reproducing the same layout depends on many other issues, even small changes in font metrics may change things. It is also well possible that 30 years from now nobody remembers ConTeXt (or DocBook or LaTeX or TeX). XML is in a way a safe bet, but even there you're up to some programming if the tools disappear. 2) semantic rather than layout-oriented markup as much as possible. I think this is something you can do with all alternatives. In a typical ConTeXt (and LaTeX) file there is a lot of layout stuff in the beginning, but in the document itself the tagging is really independent from layout, if you've done the preliminary work right. At least I consider it bad style, if you use explicit font switches or equivalent in a document. However, even if you think the layout is not that important, you'll need to do a lot of things with it before having a printable book. In this sense ConTeXt seems to give a lot of possibilities, but the documentation is not very complete. LaTeX is a bit more difficult, and you need to do more TeXing, but in practice you don't as someone else has done it before (packages). Fonts are difficult in any case :) I am not a DocBook specialist, but my impression is that it is really not so much geared towards printable layout. This, of course, makes the markup separate from the layout. This is the key in making successful documents with any system: The content and the layout are two different layers. Word processing programs mix them into a sorry mess, but for the smoothest workflow they should be separated. It should even be possible for different people do do carry out the two different tasks. 3) relatively easy integration with some form of bibliographic database(ish) system (bibtex would do). (.*)TeX will do. 4) ability to produce pdf's, html, and rtf versions (for interoperation with Word-users) at least. PDF is a must. HTML can be reproduced from (.*)TeX, but DocBook is the only one designed with HTML in mind. On the other hand this may reflect to the print quality; TeX is a real typesetting system. There are ways to make TeX out of DocBook (e.g. passiveTeX), but the quality is not always as good as with other alternatives. HTML is more a matter of taste. A nicely working PDF is -- IMHO -- much easier to use. It is easy to search from the complete document, and links from the index and ToC make the use straightforward. Modern displays are sufficiently high-res for PDF to be read on-screen. Also, printing a complete PDF document is easy. The situation becomes much more complicated if you need RTF. It is a completely different story, a word processor editable format. I guess you don't really want to distribute your work in editable format, and PDF can be read with virtually any computer. So, I'd concentrate on making a visually pleasing high-quality PDF with working links in it. That will make most readers happy. 5) no need for me to write any code. I used to be a programmer, and when I left, promised myself, my wife, and my cat that I would never write a line of code again. I don't mind a bit of TeXish fiddling if *absolutely* necessary. All alternatives are equivalent in this sense. Of course, if you plan on doing something with ConTeXt/XML, that requires some work, but not really programming. And all layout stuff with (.*)TeX requires some serious head scratching in the beginning, anyway. ConTeXt seems to fit the bill for 1,3 and 5. I'm not sure about 4 (html? rtf?) or 2 (I haven't had a proper look at the nature of the available macros yet) . I'd say it'll fill number 2, as well. But RTF, no. There may be kludges to make it kind of, you know, a bit like, errr, RTFish, but nothing really good. The re
RE: [NTG-context] Capitalized headings
> The bad news is that now I have a lot more questions concerning the It really seems that I do... I played around with the capitalization commands and got some interesting results. My test file is (works in live.contextgarden.net if required): --- \enableregime[il1] \starttext abcABCåäöÅÄÖ \cap{abcABCåäöÅÄÖ} \uppercased{abcABCåäöÅÄÖ} \WORD{abcABCåäöÅÄÖ} \uppercase{abcABCåäöÅÄÖ} \stoptext --- So, the test string is: abcABC\aumlaut\aring\oumlaut\Aumlaut\Aring\Oumlaut (just in case it does not display correctly). It gives: \cap -> ABCABCÅÄÖÅÄÖ (in \tfx size), just as expected \uppercased -> ABCABCåäöÅÄÖ (ABC's in \tfx, rest untouched) \WORD -> ABCABCÅÄÖxxx (where xxx's are gibberish) \uppercase -> ABCABCÅÄÖxxx The plain TeX \uppercase seems to be known for its nasty behaviour with anything else than US characters. \WORD seems to be a thin wrapper around it, so similar behaviour is to be expected. \uppercased makes interesting things, as it does uppercase the abc's well but does not touch the accented characters in any way. Only \cap seems to do exactly what it should. --- Things become even stranger, when the regime is switched to UTF-8. Then \WORD and \uppercase give some errors and refuse to compile. \uppercased and \cap work as described above. --- As \uppercase is a plain TeX macro, fixing it is not a good choice, especially because it is known to be bad. However, if \WORD could be built on \cap but without the font size changing, it would work fine. The odd behaviour of \uppercased (and the reasons to use it instead of the other choices) remains unclear to me. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] Capitalized headings
> However, this is a workaround, another way of attacking it (it can be > better, too, stylistically, as you can change the font independently): > \setuphead [title] [textcommand=\uppercase] And that works, thanks! --- The bad news is that now I have a lot more questions concerning the heading formatting. There are several parameters which can be used: style textstyle textcommand numberstyle numbercommand This is how I understand those (please, correct me when I am wrong). Let us assume we have a chapter heading saying "Chapter 1. Title" in the following examples: style=\bf -> {\bf Chapter 1.}{\bf Title} textstyle=\bf -> {Chapter 1.}{\bf Title} numberstyle=\bf -> {\bf Chapter 1.}{\bf Title} If I got it right this far, then I think I get these. The relevant parts of the heading are prepended with the given commands (whatever they then may be). But this mechanism does work only with the commands which change the style from that point onwards (e.g., \it, \tfx). What about the commands which take the text as a parameter (such as \cap{text})? And what are textcommand and numbercommand? I tried playing a bit with them. For example, \it or \bf can be put either as textstyle=\it or textcommand=\it. On the other hand, the \uppercase can be used only with textstyle. So, there is a difference as the name suggests (my initial guess was that the difference is exactly what I ask above, but doesn't seem to be so). Where on Earth is \uppercase explained? I tried looking for it in the manual -- in vain. I found some references to \uppercased which seems to be another beast. Thank you for your patience. If the stuff is not explained in other places, I can Wiki it once I understand it. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] Two hyphens do not give en dash
> Try adding the --afmpl switch to your texfont command. It switches over > to the afmpl utility, which does better with preserving ligatures and > kerns. Thank you! Now it works. I added this onto the Wiki page, as well. I did a few other changes there, as well (mostly according to your suggestions). - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Two hyphens do not give en dash
I installed a new font (Gentium, TrueType). Everything went relatively smoothly except for one thing: When I type -- I really get two hyphens instead of the expected en dash. I have been able to work around this by using UTF regime and typing the en dash into the source file. However, it would be easier to use -- and ---. What should I do? (Yeah, I know, forget it and be happy that the UTF works :) TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Capitalized headings
I've been trying to make capitalized (uppercase) headings with little success. I'd like to have the titles simply capitalized as with \cap or \WORD. A minimal example: --- \setuphead[title][style=WORD] \starttext \title{This is a title} The title should be \cap{capitalized} or \WORD{capitalized}. \stoptext --- What should I give as the style? I have tried the following: style=WORD -> no effect style=Caps -> no effect style=uppercased -> no effect style=CAP -> no effect style=Cap -> no effect style=cap -> error style=kap -> error style=smallcaps -> small caps (when the font supports) It is interesting to get an error message for the "style=cap", because this is one of the listed options in the definition of \setuphead in the manual. What did a do wrong? - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] TEXMFMAIN problem in gwTeX (font installation)
> Just for my understanding. Does texfont.pl only > read in TEXMFMAIN or does it also write (can it > be a search path or does it require for TEXMFMAIN > to be just one directory)? texfont.pl checks several places. By a very quick look at the sources, it looks for the following: TEXMFMAIN TEXMFLOCAL TEXMFEXTRA TEXMFFONTS It does not look for TEXMFTE, but by specifying the switch --rootlist, it can be given a list of trees, which it then browses through. Ok, it might be useful to add a few here, such as TEXMFTE (for us gwTeX users), but maybe that's an endless road. But the real problem is really in a font installation script which explicitly overrides the default settings and gives a wrong tree. --- The problem is easy to pinpoint into type-tfm.dat. Unfortunately, just removing the explicit definitions does not seem to solve the problem. The non-standard root seems to be difficult to be told to the system. For encodings, texfont.pl can be force-fed a value which is passed to all scripts in a batch file (using a special --en=? switch). However, no such mechanism exists for other parameters (such as the --ro). Tweaking the TEXMFFONTS to point to TEXMFTE is one possibility, but then the fonts will also be installed into TEXMFFONTS instead of TEXMFLOCAL. Ideally, it would be nice to be able to tell the script that the source fonts are in TEXMFWHATEVER and they are going into TEXMFSOMETHINGELSE. I haven't been able to figure out how to achieve that without tailoring the batch file. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] TEXMFMAIN problem in gwTeX (font installation)
generated fonts metrics are put in a given path: And this is not the problem. I have to apologise for the bad wording of my previous message. I am not saying there would be anything wrong with the Perl script. The only slight annoyance there is the error message, which states: "unknown subpath ../fonts/afm/$vendor/$collection" At least to my eye this seems to refer to the parent directory (..), whereas it really doesn't. It just says that something/something/fonts/afm/$vendor/$collection is missing. Full path in that message would've gotten me to the goal a bit faster. The problem is really in the font installation script (type-tmf.dat). There the root (i.e. the source tree for the fonts) is explicitly given as TEXMFMAIN. And this does not work in gwTeX, because if something is given, it has to be TEXMFTE. As a summary: - texfont.pl is fine - gwTeX is fine - type-tmf.dat is not fine, but I really don't know how to reliably fix it (yes, patching is simple, but then it does not work in other distros) --- But am I doing something stupid (again)? I think I have some kind of understanding of the ConTeXt font mechanisms. However, I am still a bit confused about this mess. So, what is the easy, standard, newbie way to install the TeX Live font collection to be used with ConTeXt? Is it still using the type-tmf.dat batch file? - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] TEXMFMAIN problem in gwTeX (font installation)
I have spent some very interesting time trying to install the TeXlive fonts by using texfont type-tmf.dat. What happened was that a lot of complaints about "unknown subpath ../afm/public/urw" were given even though the path should have been there. This is a known problem, has been on several mailing lists, as well. After a lot of thinking it became clear that texfont was really unable to find any font files. By browsing through the texfont.pl, the reason became evident: In gwTeX the root variables are: TEXMFMAIN = /usr/local/teTeX/share/texmf TEXMFTE = /usr/local/teTeX/share/texmf.tetex The problem here is that all the TeXlive fonts (and almost everthing else) is really in the TEXMFTE tree. My quick'n'dirty was to make new file type-tmf-gwtex.dat by replacing all occurrences of TEXMFMAIN by TEXMFTE. Running that one in batch mode works fine. Problem solved -- this time. But the solution is not a beautiful one. Could someone suggest something cleaner? Or has this been solved already (I tried googling after the answer without success)? - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Right way to load hyphenation patterns
I want to use a non-standard hyphenation pattern (Finnish) in some of my documents. I have been able to make it work by: editing cont-usr.tex (removing a % from the \installlanguage) remaking formats (texexec --make) copying the format wile to the .../web2c directory This works. However, I read in the Wiki that "It is generally better to add local settings to a run-time included file like cont-sys.tex instead, so unless your stuff does absolutely have to become part of the format file, you are better off leaving this file well alone." So, where should I put the \installlanguage directive for it to be in the right place? Is it something that really has to be there when the formats are being built, or could it be loaded afterwards (i.e. at run-time)? Could it be put in the cont-sys.tex? TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Postscript fonts (was: gwTeX and missing PS fonts)
> However, something else broke when I upgraded. I cannot get the > Postscript fonts working anymore. Here is what I have in the file: > >\usetypescript[adobekb][\defaultencoding] >\setupbodyfont[pos,11pt] By some grepping into the sources I found the problem. It seems that the file type-pre.tex has changed between the versions I have been using. Now there is the extra line: \starttypescriptcollection[previous] which seems to cause the problem of "unknown variant: pos". Without knowing anything more, a simple "usetypescriptcollection" or something similar would be my guess. However, I am a bit afraid of the word "previous" and the comments in the beginning of the file. So, a question follows: I want to make documents with Times/Helvetica/Courier combination (as was done with "pos"). I do not have the commercial fonts, but I do have the TeX Live (or teTeX) distribution. What is the right way to get to use the fonts? I'm sorry but I do not like the Computer Modern in my reports and brochures. I want to have something else, and that something should be easy to use in any distribution. TIA, - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] gwTeX and missing PS fonts
I had a smoothly working gwTeX with the exception of a few hyphenation patterns. Before debugging that problem any further, I decided to get the newest beta (texexec 5.3.1, context 2005.04.19). I got the hyphenation problem fixed. It had nothing to do with the distribution or version, just my lack of thinking. Editing cont-usr.tex and then 'texexec --make --all', and ConTeXt was hyphenating Finnish beautifully. However, something else broke when I upgraded. I cannot get the Postscript fonts working anymore. Here is what I have in the file: \usetypescript[adobekb][\defaultencoding] \setupbodyfont[pos,11pt] Everything goes relatively smoothly, except for the fact that I get everything typeset in Computer Modern. A small error message is in the output: bodyfont : unknown variant pos What went wrong? I cannot find the file font-pos.tex on my machine, but as I cannot find it in the source tree, either, it seems to have been embedded somewhere. How should I debug this problem? Where is the actual definition for "pos"? - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Figure formats
them to the picture itself. I also turn my CorelDraw pics into pdf before adding them to ConTeXt based text, that inserts them nicely and makes it easy for me to share any graphics at request (I'm occasionally asked to send just graphic 3.1 from manual x, so it is a good thing to have all of them as pdf). An interesting thing is that sometimes some programs make stupid mistakes when exporting to PDF. For example, I have had some bounding box problems when exporting to PDF. The bounding box tends to be the size of a page, which is really not a nice thing. (This happens with CorelDraw 11 in OS X and with older CDR versions in other OSes.) Illustrator should be safe, as PDF is one of its "home" formats. A workaround which I've been using for years is to export in EPS. All graphics programs I've come across have been able to do that reliably. Then the EPS can be converted into a PDF by using one of the following: a) Adobe Distiller b) Ghostscript (epstopdf, eps2pdf, or equivalent) c) Preview in OS X. I have found it very useful to have all illustrations in PDF format in the right size (i.e., clipped to the right size, correct bounding box). Then it is easy to play around with them. Even though vector graphics is -- in theory -- infinitely scalable, in practice it is much better to try and draw the pictures 1:1. If the images are scaled, line widths and annotations are scaled, too. Especially when there are several similar pictures with different scale factor, the result looks odd. So, the final size of the illustration should be known before drawing the actual picture! It is also a good idea to scale the bitmaps down (or up) to the final size and resolution before inserting them. This avoids a number of strange problems when rendering the images. For photographs, 200 dpi should be enough almost always, line art requires 300 dpi. (And a very important exception is that all screen captures should be taken "as is" without any operations on them.) Too large a resolution makes the files unnecessarily large and slow, so even that should be gotten rid of. Graphics packages have different resizeing algorithms, and getting to know all of them takes some experimenting, but it is well worth the trouble. What comes to the figure formats, PNG is good for lossless images (screen captures) or images requiring alpha channel. JPG is best for photographs and other continuous-tone real-world images (and some visualizations). But, whenever possible, use PDF, if there is any choice. - Ville ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context