Re: [NTG-context] texexec ignores file order
Aditya Mahajan wrote: On Mon, 8 Dec 2008, Ben Barrowes wrote: exexec --pdfarrange --result=yujo_insurance.pdf yujo_insurance1.pdf yujo_insurance2.pdf yujo_insurance3.pdf yujo_insurance4.pdf yujo_insurance5.pdf yujo_insurance6.pdf yujo_insurance7.pdf yujo_insurance8.pdf yujo_insurance9.pdf yujo_insurance10.pdf yujo_insurance11.pdf yujo_insurance12.pdf After upgrading recently, I found that texexec no longer preserves the order of files passed to it. When I concatenate files with texexec, I often have more than 10 files I want to pass to texexec names filename1.pdf, filename2.pdf, ... filename12.pdf, etc. In the past, the following has worked to concatenate these in the correct order: texexec --pdfarrange --result=filename.pdf `ls -a -v filename*.pdf` Now, even if I pass filename10.pdf after filename2.pdf on the command line, texexec ingores this and puts filename10.pdf before filename2.pdf in the resulting concatenated file. Is there a fix for this, or is there a better way to concatenate pdf files? the latest version should preserve unless --sort if given - 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [dev-context] Luatex beta 0.31 update warning
On Tue, Dec 9, 2008 at 12:39 PM, Taco Hoekwater wrote: Hi all, Quick warning from me: if you update from the minimals this week, be prepared for some potential problems with opentype fonts in luatex. Because of the update of the embedded fontforge, there are some differences in the font table format that Hans and I have yet to sort out. No problem. LuaTeX did not compile on most platforms anyway, so it couldn't have affected too many people :) :) :) (We only have the linux freebsd binary there; in case of serious problems it's no problem to revert back to the old version of LuaTeX for those two platforms as well.) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with fonts
$ luatex --version This is LuaTeX, Version snapshot-0.31.0-2008120715, build unknown Taco Hoekwater wrote: Mohamed Bana wrote: i just updated the minimals and I can no longer typeset, even though $ mtxrun --script fonts --list shows the font ! LuaTeX error Are you running luatex 0.31 ? Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [dev-context] Luatex beta 0.31 update warning
On Tue, Dec 9, 2008 at 7:54 PM, Mojca Miklavec [EMAIL PROTECTED] wrote: On Tue, Dec 9, 2008 at 12:39 PM, Taco Hoekwater wrote: Hi all, Quick warning from me: if you update from the minimals this week, be prepared for some potential problems with opentype fonts in luatex. Because of the update of the embedded fontforge, there are some differences in the font table format that Hans and I have yet to sort out. No problem. LuaTeX did not compile on most platforms anyway, so it couldn't have affected too many people :) :) :) (We only have the linux freebsd binary there; in case of serious problems it's no problem to revert back to the old version of LuaTeX for those two platforms as well.) and in fact my old documents compiled fine here^_^ Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [dev-context] Luatex beta 0.31 update warning
Mojca Miklavec wrote: No problem. LuaTeX did not compile on most platforms anyway, so it couldn't have affected too many people :) :) :) (We only have the linux freebsd binary there; in case of serious problems it's no problem to revert back to the old version of LuaTeX for those two platforms as well.) ok, just rollback then till we can do a synced mkiv/luatex update 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Luatex beta 0.31 update warning
Hi all, Quick warning from me: if you update from the minimals this week, be prepared for some potential problems with opentype fonts in luatex. Because of the update of the embedded fontforge, there are some differences in the font table format that Hans and I have yet to sort out. While that will not take long, it will still mean the beginning of next week at the earliest (because Hans is teaching in Brno). Best wishes, Taco Taco Hoekwater wrote: Hi, I have just uploaded luatex 0.31.1, hopefully fixing a bunch of compilation errors on various platforms, but with no other visible changes. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Gentium package (was: minimals and greek font)
On Tue, Dec 9, 2008 at 2:29 PM, Alan Bowen wrote: Mojca— Just to confirm: Is Gentium now included with the minimals Yes. (The ttf file is a bit broken, but it theoretically works OK in TeX.) and, if so, what is the date of these minimals. (The latest version of the minimals that I can get running ./first-setup.sh are those which have ConTeXt 2008.11.10.) You should get Gentium installed independent on what version of ConTeXt you use. \usetypescriptfile[type-gentium] \usetypescript[gentium][ec] % or whatever other encoding you might want to use \setupbodyfont[gentium] Should work fine. Well, I just figured out that there's a typo in type in type-gentium (gentim-basic should be replaced with gentiumbasic). I also forgot to include the agr encoding, but it's there now. I have no idea how Greek-specific stuff like \usemodule[greek] was supposed to work (and no patch to fix that has been added as far as I know). But you should be able to use Old Greek encoding. Mojca On Nov 13, 2008, at 08;21,39 , Mojca Miklavec wrote: On Wed, Oct 29, 2008 at 3:05 PM, Alan BRASLAU wrote: Hello, What needs to be done to include greek fonts on top of the minimal installation? Thank you. example: \usemodule[greek] \starttext \greek{kalamos} \stoptext Hello, Thomas has just prepared a new font package (before leaving for a few days) with support for Gentium: http://tug.ctan.org/tex-archive/fonts/gentium/ I'll add it to minimals, but you may play with it already. The contents of Greek module will be adapted once he comes back, but you can use it in standard ways. \usetypescriptfile[type-gentium] \usetypescript[gentium][agr] \setupbodyfont[gentium] \enableregime[...] \starttext ... greek text ... \stoptext Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [dev-context] Luatex beta 0.31 update warning
Taco Hoekwater wrote: Hi all, Quick warning from me: if you update from the minimals this week, be prepared for some potential problems with opentype fonts in luatex. Because of the update of the embedded fontforge, there are some differences in the font table format that Hans and I have yet to sort out. While that will not take long, it will still mean the beginning of next week at the earliest (because Hans is teaching in Brno). we just found that out here! can we use the old binary for a while? 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Gentium package (was: minimals and greek font)
Mojca— Just to confirm: Is Gentium now included with the minimals and, if so, what is the date of these minimals. (The latest version of the minimals that I can get running ./first-setup.sh are those which have ConTeXt 2008.11.10.) Alan On Nov 13, 2008, at 08;21,39 , Mojca Miklavec wrote: On Wed, Oct 29, 2008 at 3:05 PM, Alan BRASLAU wrote: Hello, What needs to be done to include greek fonts on top of the minimal installation? Thank you. example: \usemodule[greek] \starttext \greek{kalamos} \stoptext Hello, Thomas has just prepared a new font package (before leaving for a few days) with support for Gentium: http://tug.ctan.org/tex-archive/fonts/gentium/ I'll add it to minimals, but you may play with it already. The contents of Greek module will be adapted once he comes back, but you can use it in standard ways. \usetypescriptfile[type-gentium] \usetypescript[gentium][agr] \setupbodyfont[gentium] \enableregime[...] \starttext ... greek text ... \stoptext Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] PDF page numbers
In latex + book/memoir + hyperref, if \frontmatter \mainmatter are used, the pdf files generated use the roman numbers in the pdf itself. It appears as ii (2 of 500) in the pdfviewer. Is it possible to do the same with ConTeXt? Is there any introduction to using fonts(typefaces) in ConTeXt? I find myself stumbling on simple things(I'm a beginner). For example, the following works fine. \usetypescriptfile[type-gyr] \usetypescript[palatino] \setupbodyfont[palatino,11pt] but the following does not work. \usetypescriptfile[type-gyr] \usetypescript[schoolbook][ec] \setupbodyfont[schoolbook,11pt] I have tried with and older distribution of ConTeXt which comes along with Fedora 10 as well as with ConTeXt minimals. Incidentally if I use \definetypeface[schola][rm][serif][schola][default][encoding=t5] it works fine. What am I doing wrong? Regards, Derek ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Building tables at runtime via --mode= option
I'm trying to build a table in a project that will be built based on a commandline parameter. Currently, I'd like to use the --mode= command. However, I've run into a number of snags that I have attempted to solve without any luck. I've included some sample code of what I would like to do. I can do all of what I need using \doifmodeelse, etc. However, I'm looking for a more elegeant solution. Any hints/solutions are welcomed! Problems: 1) \currentmode: I cannot use this variable in my file, but it works in the source code. Question: Is the mode option okay, or is there a better way? 2) CellWidth (below) needs to be a floating point dimension, based the size of the paper. So I need to divide the size of the paper (\textwidth) by a number and make sure it stays as a dimension. 3) I tried to use \getnumber[Rounds] to span a number of columns ( \bTD[nc=\getnumber[Rounds]]) but this would not compile. Here's the error: Runaway argument? Rounds=\plusone \ifnum \tblny =\plusone \ifnum \currentcol \maximumcol \ETC. ! Paragraph ended before \getnumber was complete. Sample: \definenumber[Rounds] \setnumber[Rounds]{6} % desire: \setupnumber[Rounds]{\currentmode} % and verify that it's a number between a given range. % \currentmode comes back as undefined \definenumber[TotalCol] \setnumber[TotalCol]{\getnumber[Rounds] + 2} \def\CellWidth{0.625in} % desire: based on textwidth: \textwidth / \getnumber[TotalCol] % Needs to be floating point \starttext Rounds: \getnumber[Rounds]\crlf TotalCol: \getnumber[TotalCol]\crlf CellWidth: \CellWidth\crlf \bTABLE[align={middle,lohi},strut=no,width=\CellWidth] % Row 1 \bTR[frame=off] \bTD\eTD \bTD[nc=6] Title\eTD %desire: \bTD[nc=\getnumber[Rounds]] Title\eTD \eTR %Row 2 \bTR \bTD\eTD \dorecurse{\getnumber[Rounds]}{\expanded{\bTD\recurselevel\eTD}} \bTD\eTD \eTR %Row 3 \bTR \dorecurse{\getnumber[TotalCol]}{\expanded{\bTD\recurselevel\eTD}} \eTR \eTABLE \stoptext Thanks! Bart ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with fonts
Mohamed Bana wrote: $ luatex --version This is LuaTeX, Version snapshot-0.31.0-2008120715, build unknown Mojca has just reverted the linux minimals to the previous version of luatex, so after you re-update all should be well again. Sorry, all my fault. Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Experience on writing a thesis with MKIV
On Tue, Dec 9, 2008 at 3:59 AM, Mohamed Bana wrote: No the citations aren't working. Am I the only one who thinks ConTeXt needs a extensive set of regression tests? No, you aren't. But you could be the first one to start worknig on it :) :) :) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF page numbers
Hello Derek, On Tue, Dec 9, 2008 at 11:53 AM, Derek CORDEIRO wrote: I find myself stumbling on simple things(I'm a beginner). For example, the following works fine. \usetypescriptfile[type-gyr] \usetypescript[palatino] \setupbodyfont[palatino,11pt] but the following does not work. \usetypescriptfile[type-gyr] \usetypescript[schoolbook][ec] \setupbodyfont[schoolbook,11pt] Some definitions/mappings are missing in the core. This should work in next version of ConTeXt and you will not need \usetypescriptfile[type-gyr] any more. I have tried with and older distribution of ConTeXt which comes along with Fedora 10 as well as with ConTeXt minimals. Incidentally if I use \definetypeface[schola][rm][serif][schola][default][encoding=t5] it works fine. What am I doing wrong? Nothing. You are just using an ancient version of ConTeXt ... and you should not take my comment too seriously :) :) :) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] PDF page numbers
On Tue, 9 Dec 2008, Derek CORDEIRO wrote: In latex + book/memoir + hyperref, if \frontmatter \mainmatter are used, the pdf files generated use the roman numbers in the pdf itself. It appears as ii (2 of 500) in the pdfviewer. Is it possible to do the same with ConTeXt? AFAIK, ConTeXt cannot do this out of the box right now. It would be nice feature to have. Is there any introduction to using fonts(typefaces) in ConTeXt? Have a look at the new manual, which explains how to use fonts in detail. http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf I find myself stumbling on simple things(I'm a beginner). Also have a look at http://www.pragma-ade.com/general/manuals/showfont.pdf which is old, but gives an overview of many fonts. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] how to get thick and thin borders working in tables (ConTeXt)
Hello, We are using ConTeXt (with XeTeX engine) to typeset some tables that have borders (rules) between cells. In the previous edition of the book (which was not done in TeX), some of the lines between table cells were double, others single. This was done to show grouping of columns and rows. We have been told that in TeX, or at least in ConTeXt, you can't do double rules (we'd be happy to be corrected on that point), so we have been trying to use thick and thin lines to show grouping. Thick or thin lines work fine if applied to whole tables or whole cells, but when there are cells with thick rules on some sides and thin rules on other sides, it gets confused. For example, we tried (a) \setupTABLE[c][4][leftframe=on,rulethickness=0.5mm] to set the left border of the fourth column to be thick. This worked. But then if we use (b) \setupTABLE[c][4][rightframe=on,rulethickness=0.25mm] to set the right border of the same column to be thin, it overrides the thickness of both left and right borders, so setting (a) is lost. In other words, we can't seem to get a given cell to have a thick border on one side and a thin border on the other side. (Well, we could fake it in some cases by setting rulethickness for an adjacent cell, but that adjacent cell would then have to have thick borders on all sides.) Does anybody know if it's possible to do this in ConTeXt? or in TeX? Thanks for any ideas, Lars P.S. Incidentally, if you set the bottom border of row 1 and the top border of row 2 each to be thick, the result is additive: you get a doubly-thick border. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Experience on writing a thesis with MKIV
sorry about the late reply, my minimals broke so i had to wait for a fix. t-bib-2008.12.01.zip $ luatex --version This is LuaTeX, Version snapshot-0.30.3-2008112812, build unknown $ context --version MtxRun | main context file: /home/mbana/context-minimals/tex/texmf-context/tex/context/base/context.tex MtxRun | current version: 2008.11.10 21:40 http://filebin.ca/jqqekq/thesis.pdf or http://filebin.ca/jqqekq http://filebin.ca/uhvgex/thesis.log or http://filebin.ca/uhvgex Aditya Mahajan wrote: On Tue, 9 Dec 2008, Mohamed Bana wrote: No the citations aren't working. This is really strange. It is working at my end with the latest version of t-bib. Can you send me your log and pdf file. Am I the only one who thinks ConTeXt needs a extensive set of regression tests? No. We have discussed this extensively in the past. There is also a context-test svn repository with a script that can automatically check if the pdf output changed with different version. However, it has been dormat for about a year now. For more info see http://wiki.contextgarden.net/Test and add more tests. Adiyta, you shouldn't have hard-coded: ./frontmatter.tex:\startcolor[darkred]\titlefont \hskip 1.5em Chapters \stopcolor} Yeah, I know. This was just a quick change, so I did not bother with elegance. The proper way of doing it would be to define a titlecolor and use that. Changing L191 env-thesis.tex, has no effect, such as: \setuplist [chapter][color=darkblue] \setuplist [Title] [color=darkblue] Chapters still comes out as darkred. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] texexec (and context) stops when using \externalocp
Trying to get some sort of 'implicit' bidi with luatex, I though of using an (extenal) OCP filter as it is much easier than messing with luatex nodes, and it respects TeX grouping. The attached example loads the do_bidi.py script as an \externalocp, it works fine with plain luatex, but not with 'texexec', using 'context' I get: MtxRun | fatal error, message: luatex: execution interrupted Any ideas? Is there a lua equivalent to \externalocp ? Regards, Khaled -- Khaled Hosny Arabic localizer and member of Arabeyes.org team % engine=luatex \externalocp\OCPbidi=do_bidi.py {} \ocplist\bidi= \addbeforeocplist 100 \OCPbidi \nullocplist \pushocplist\bidi \pardir TRT \textdir TRT Hello world. % this should appear LTR despite \textdir \bye #!/usr/bin/env python # subflip - Prepare subtitle files for non-bidi-aware players. # Copyright (C) 2006 Noam Raphael spam.noam at gmail.com # Copyright (C) 2008 Khaled Hosny [EMAIL PROTECTED] # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA This class defines the function tag_text, which tags a text for directionality, by using the relevant part of the Unicode BIDI algorithm (see http://unicode.org/reports/tr9/). It defines the function tag_text, which gets an iterator over characters, and return an iterator over characters and the constants OPEN_L, CLOSE_L, OPEN_R and CLOSE_R. These constants are inserted between the given characters, to give the directionality structure of the text. This module currently doesn't implement the algorithm for arabic characters, since those require some special treatment. __all__ = ['tag_text', 'OPEN_L', 'CLOSE_L', 'OPEN_R', 'CLOSE_R'] from collections import deque from unicodedata import bidirectional def dir(c): types = { 'ON' : 'N', 'B' : 'N', 'BN' : 'N', 'S' : 'N', 'WS' : 'N', 'R' : 'R', 'NSM' : 'R', 'AL' : 'R', 'L' : 'L', 'EN' : 'EN', 'AN' : 'EN','ET' : 'T', 'ES' : 'S', 'CS' : 'S', } d = bidirectional(c) return types[d] class StateMachine(object): ''' This class is the base class for the state machine classes defined here. The state machine implemented has a state, which is a string. In each step, the machine gets two arguments, and according to these and the state, it produces some output and changes the state. In this implementation, the input is taken from one iterable, and the output is given using the iterable protocol. When output is requested, by a call to the next() method, the given iterable's next() method is called to produce the two input arguments (arg1, arg2). Then, the method named %s_%s % (current_state, arg1) is called with arg2 as its argument. The method is expected to return an iterable over output elements, which will be given upon subsequent calls to the instance's next() method. ''' def __init__(self, iterable): if not hasattr(self, 'state'): raise NotImplementedError, \ 'You must implement an __init__ method that will initialize '\ 'self.state.' self._input_source = iter(iterable) self._current_output_generator = iter([]) self._finishing = False def next(self): while True: try: return self._current_output_generator.next() except StopIteration: if self._finishing: raise # Make another call to the appropriate method. try: letter, input = self._input_source.next() except StopIteration: self._finishing = True self._current_output_generator = \ getattr(self, '%s_END' % self.state)() if self._current_output_generator is None: self._current_output_generator = iter([]) continue self._current_output_generator = \ getattr(self, '%s_%s' % (self.state, letter))(input) if self._current_output_generator is None: self._current_output_generator = iter([]) def __iter__(self): return self # For us, there are six types of chars: # # L - strong left-to-right # R - strong right-to-left # N - neutral # EN -
Re: [NTG-context] Experience on writing a thesis with MKIV
Aditya Mahajan wrote: On Tue, 9 Dec 2008, Mohamed Bana wrote: sorry about the late reply, my minimals broke so i had to wait for a fix. t-bib-2008.12.01.zip $ luatex --version This is LuaTeX, Version snapshot-0.30.3-2008112812, build unknown $ context --version MtxRun | main context file: /home/mbana/context-minimals/tex/texmf-context/tex/context/base/context.tex MtxRun | current version: 2008.11.10 21:40 http://filebin.ca/jqqekq/thesis.pdf or http://filebin.ca/jqqekq http://filebin.ca/uhvgex/thesis.log or http://filebin.ca/uhvgex How are you compiling your files? Use context thesis and not texexec --lua thesis (texexec will run bibtex which will overwrite the existing bbl file, since you do not have any bib file, the bbl file will be empty). Please note that my latest upload to modules.contextgarden runs bibtex itself, in mkiv mode. Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Experience on writing a thesis with MKIV
On Tue, 9 Dec 2008, Taco Hoekwater wrote: Aditya Mahajan wrote: On Tue, 9 Dec 2008, Mohamed Bana wrote: sorry about the late reply, my minimals broke so i had to wait for a fix. t-bib-2008.12.01.zip $ luatex --version This is LuaTeX, Version snapshot-0.30.3-2008112812, build unknown $ context --version MtxRun | main context file: /home/mbana/context-minimals/tex/texmf-context/tex/context/base/context.tex MtxRun | current version: 2008.11.10 21:40 http://filebin.ca/jqqekq/thesis.pdf or http://filebin.ca/jqqekq http://filebin.ca/uhvgex/thesis.log or http://filebin.ca/uhvgex How are you compiling your files? Use context thesis and not texexec --lua thesis (texexec will run bibtex which will overwrite the existing bbl file, since you do not have any bib file, the bbl file will be empty). Please note that my latest upload to modules.contextgarden runs bibtex itself, in mkiv mode. Ah, so that explains why Mohamed is not getting any citations. I was using latest minimals from yesterday which still have t-bib from 2008.10.27. Taco, I also have a feature request for the bib module. Currently, \setupcite is defined as \def\dosetupcite[#1][#2]% {\ifsecondargument \def\dodosetupcite##1{\getparameters[\??pv##1][#2]}% \processcommalist[#1]\dodosetupcite \else % default case \getparameters[\??pv\@@citedefault][#1]% \fi } This means that if I say \setupcite[compress=no], this option is only passed to the default cite command. This means that when interaction is enabled, (and the bibl-* file says compress=yes), we get no styles for other cite styles. Does it make sense to add a keyword all so that \setupcite[all][...] is equal to \setupcite [author,authoryear,authoryears, year,serial,authornum,page,short,type,doi,url,num] [...] Also, can we add style and color options to \cite. These can be either passed to \setupinteraction in \docite or simply added using attributes in the output of \cite. Mohamed, to get the references to work comment \setupbibtex [database={IEEEfull,../collection}, sort=author] in macros.tex and add \dousepublications[thesis] You can also use the official way: \usepublications[thesis], but I think that this will cause warnings about redefined labels. Perhaps a better way would be to change thesis.bbl to say thesis-ref.bbl and then use \usepublications[thesis-ref]. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] help with a latex - context conversion
Hello: I am intending to write my masters thesis using context. My university publishes a style guide in addition to a latex cls file. I am trying to reproduce the titlepage. I have been using the wiki (specifically http://wiki.contextgarden.net/Document_Titles#In_ConTeXt:_A_more_ advanced_solution). But I have not been able to add addition fields beyond the present title, author, date. Here is the relevant portion on the latex file. %%-define command in the titlepage \newcommand{\submittext}{A THESIS SUBMITTED IN PARTIAL FULFILLMENT% OF THE REQUIREMENTS FOR THE DEGREE OF} \newcommand{\thesisnote}{by} \newcommand{\gaunote}{In the Graduate Academic Unit of } \newcommand{\acceptnote}{This thesis is accepted} \newcommand{\dean}{Dean of Graduate Studies} \newcommand{\school}{THE UNIVERSITY OF NEW BRUNSWICK} % % % DECLARATIONS % % These macros are used to declare arguments needed for the % construction of the title page and other preamble. % % candidate's previous degree [EMAIL PROTECTED] % % The full (unabbreviated) name of the degree [EMAIL PROTECTED] % % The name of your Graduate Academic Unit(eg. Computer Science, Maths, Physics) [EMAIL PROTECTED] % %your supervisor including name, degree department or field [EMAIL PROTECTED] % %examining board including name, degree department or field starting from Chair [EMAIL PROTECTED] % %external examiner including name, degree, department or field and Institution [EMAIL PROTECTED] % %copyright including name of candiate and year of graduation [EMAIL PROTECTED] %define title page layout % \newcommand{\unbtitlepage}{% \thispagestyle{empty}% \begin{center} [EMAIL PROTECTED] \vskip 1em \normalfont\normalsize\thesisnote\\ \vskip 1em [EMAIL PROTECTED] \vskip 1em [EMAIL PROTECTED] \vskip 2em \normalfont\normalsize\bfseries\submittext\\ \vskip 2em [EMAIL PROTECTED] \vskip 1em \normalfont\normalsize\gaunote [EMAIL PROTECTED] \vskip 1em \end{center} \begin{table}[!h] \begin{tabular}{l l} Supervisor(s): [EMAIL PROTECTED] \\ Examining Board: [EMAIL PROTECTED] \\ External Examiner: [EMAIL PROTECTED] [EMAIL PROTECTED] \end{tabular} \end{table} \begin{center} \normalfont\normalsize\acceptnote\\ \vskip 2em \normalfont\normalsize\dean\\ \vskip 1em \normalfont\normalsize\bfseries\school\\ \vskip 0.5em [EMAIL PROTECTED] \vskip 0.5em \normalfont\normalsize\copyright [EMAIL PROTECTED], [EMAIL PROTECTED] \end{center}} %---end of Title page Any hints? Thank you for your time, Brent ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to get thick and thin borders working in tables (ConTeXt)
On 12/9/2008 2:01 PM, Lars Huttar wrote: On 12/9/2008 12:04 PM, Wolfgang Schuster wrote: We applied your example to our document, and were able to get it working with thick and thin lines. Thanks very much! Now since you included double lines in your example, I've been aspiring to use that instead of just thick lines... \startuseMPgraphic{table:frame:double} draw OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; % outer frame draw OverlayBox enlarged -2pt ;% inner frame setbounds currentpicture to OverlayBox ; \stopuseMPgraphic OK... the above results in triple lines between cells, so I modified the draw OverlayBox lines as follows: draw OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; % outer frame draw OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ; % inner frame This was mainly experimental, as I don't fully understand the model. (I looked up some Metapost references but couldn't find a definition of enlarged.) But it seems to work: the double lines between two cells overlap exactly, so you get a consistent look. However, when I try to mix double frames with single frames, I'm having trouble. Here is what I tried, in order to get a cell with double frame on the left, and single frame everywhere else: \startuseMPgraphic{table:frame:Lrtb} % left border is double draw leftboundary OverlayBox enlarged \the\dimexpr\linewidth*1\relax ; % outer frame draw leftboundary OverlayBox enlarged -\the\dimexpr\linewidth*2\relax ; % inner frame draw rightboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; draw topboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; draw bottomboundary OverlayBox enlarged -\the\dimexpr\linewidth/2\relax ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic Now the graphic has double line on the left and a single line elsewhere. However, the lines are thicker than in the previous one... about twice as thick, too heavy for our requirements. And I can't tell why. This is true on all four sides. See http://www.huttar.net/lars-kathy/tmp/test-mp-tableframe.pdf, second table. Also, on the side that has double lines, the double lines don't go all the way to the top and bottom (see same pdf, second table), so that the double line is not continuous across multiple rows. Any suggestions? The above graphic is used as follows... \start \setupTABLE[c][first][background={table:frame:Lrtb}] \getbuffer \stop Thanks, Lars ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___