Re: [NTG-context] Typesetting chess boards

2008-09-03 Thread Ulrich Dirr
 On Tue, Sep 2, 2008 at 8:16 PM, Maurício wrote:
 Hi,
 
 What is the easiest way to
 include chess boards in a
 Context document?
 
 Chessboards or chessboards with figures?
 
 Chessboards with figures (actually,
 chess studies sets).
 
the easiest way is to use a font for diagrams. Just copy and paste it
into your text editor (you will get a 8×8 matrix plus maybe chars for
rules and numbers around).
This description should be enclosed by a user command, e.g.
\dia{matrix}, which turns off interlineskip (in plain
\offinterlineskip). This should be enough for a quick and dirty
solution. High quality typesetting or generating diagrams out of
databases like chessbase or parsing of FEN strings is much more
difficult. You can take a look at LaTeX package chessboard or skak how
they do it ...

Ulrich

___
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] Strange font issue with LuaTeX on Linux

2008-09-03 Thread Hans Hagen
Mohamed Bana wrote:

 Sorry I didn't quiet understand that.  Given this;
 
 $ mtxrun --script fonts --list --pattern=warnock 
 warnockpro-bold WarnockPro-Bold WarnockPro-Bold.otf
 

looks like an old version, should be

warnockprobold WarnockPro-Bold fullpathifsystemfont/WarnockPro-Bold.otf

 which of the following are correct;
 
 1. \definefontsynonym [WarnockPro-Regular] [name:warnockpro-bold] 

best use

name:warnockprobold

although context will strip the - anyway

 2. \definefontsynonym [WarnockPro-Regular] [name:WarnockPro-Bold]
 3. \definefontsynonym [WarnockPro-Regular] [file:WarnockPro-Bold.otf]
 4. \definefontsynonym [WarnockPro-Regular] [file:WarnockPro-Bold]
 
 
 also, do you use the latest mtxrun, mtx-fonts and context? the first 
 entry in the list should show the stripped name
 
 I'm using cont-tmf.zip uploaded on 2008-08-05 18:50
 (http://www.pragma-ade.nl/download-1.htm) extracted to ~/texmf.  I need this
 because I use TeXLive 2007.

can you try the beta? something was fixed

 Hans, why does it compile fine when I copy the fonts over to the working
 directory?  There must be something wrong with the OSFONTDIR variable.  BTW, I
 think you should switch over to linux and make life easier for us :)

it has nothing to do with linux (and actually i run linux on the servers 
that serve tex processing for projects)

mtxrun --script fonts

operates on the tree and does not limit the search to the 'official' 
locations, while context, when a font is loaded, does obey those 
limitations

the current path is always taken as valid

Hans

ps. the latest beta really should work ok (tested at conference)


-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
  | www.pragma-pod.nl
-
___
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] Figures are misplaced with \pagedir TRT\bodydir TRT

2008-09-03 Thread Hans Hagen
Idris Samawi Hamid ادريس سماوي حامد wrote:
 On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen [EMAIL PROTECTED] wrote:
 
 i'm wondering ... why do we need pagedir and bodydir?
 
 =
 http://www.ctan.org/tex-archive/systems/omega/
 
 \pagedir  The direction for pages (\shipout).
 \bodydir  The direction for vboxes, including the main body of text.
 =
 
 Think of footnote numerals etc. IIRC: Without \pagedir TRT\bodydir TRT the  
 footnote numerals will appear on the left despite \pardir and \textdir.
 
 I still don't completely _separately_ understand \pagedir TRT\bodydir TRT,  
 but together they seem to make sense to me. Taco once started explainig  
 these two to Hans and I a few months back but that thread was never  
 completed... I'll look up where we left things off.

among the pending issues was 'where do we explicitly need to set it and 
when do we need to compensate for it'

for some reason inserts (the figure) are sensitive to it and it might be 
some interference as well as a missing explicit dir reversal

[omega provides these mechanisms but i think that there was never a full 
blown macro package using them, i.e. mixed direction support and such; 
there might be many places where we need to add dir-checking code to 
context; a few places already have it]


-
   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] Figures are misplaced with \pagedir TRT\bodydir TRT

2008-09-03 Thread Hans Hagen
Khaled Hosny wrote:
 On Tue, Sep 02, 2008 at 08:33:50PM +0200, Khaled Hosny wrote:
 Figures are shifted to the right (the left edge is where right edge
 should) when I set \pagedir TRT\bodydir TRT.

 See the attached example.
 
 When I make the figure \framed the frame gets in the prober place, but
 not the image, may be this is a LuaTeX bug?

we need to look into it next week (when taco is back from vacation) 
because it might as well be some problem in luatex itself (when/where 
inject those dir nodes)


-
   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] Helping Mac users with the Bourne-again shell

2008-09-03 Thread Martin Schröder
2008/9/2 Charles P. Schaum [EMAIL PROTECTED]:
 Seems that this could be a time saver for all concerned. My problem is
 keeping straight what idiosyncratically does what on the given *nix I
 happen to be using. They all differ just enough...

http://bhami.com/rosetta.html :-)

Best
   Martin
___
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] MKIV textext problem.

2008-09-03 Thread Yue Wang
Hi, Hans,

the code works for MKII but not for MKIV. known issue or bug?

Yue Wang

On Wed, Sep 3, 2008 at 3:13 PM, Yue Wang [EMAIL PROTECTED] wrote:
 some weird error

___
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] Figures are misplaced with \pagedir TRT\bodydir TRT

2008-09-03 Thread Hans Hagen
Idris Samawi Hamid ادريس سماوي حامد wrote:
 On Tue, 02 Sep 2008 15:58:21 -0600, Hans Hagen [EMAIL PROTECTED] wrote:
 
 i'm wondering ... why do we need pagedir and bodydir?
 
 =
 http://www.ctan.org/tex-archive/systems/omega/
 
 \pagedir  The direction for pages (\shipout).
 \bodydir  The direction for vboxes, including the main body of text.
 =
 
 Think of footnote numerals etc. IIRC: Without \pagedir TRT\bodydir TRT the  
 footnote numerals will appear on the left despite \pardir and \textdir.

sure, but we might as well deal with them in a special r-l aware mode 
(probably easier)

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] MKIV textext problem.

2008-09-03 Thread Yue Wang
oh, my god, forgot to send the attachment...

On Wed, Sep 3, 2008 at 4:08 PM, Yue Wang [EMAIL PROTECTED] wrote:
 Hi, Hans,

 the code works for MKII but not for MKIV. known issue or bug?

 Yue Wang

 On Wed, Sep 3, 2008 at 3:13 PM, Yue Wang [EMAIL PROTECTED] wrote:
 some weird error




per.tex
Description: TeX document
___
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] MKIV textext problem.

2008-09-03 Thread Wolfgang Schuster
On Wed, Sep 3, 2008 at 10:08 AM, Yue Wang [EMAIL PROTECTED] wrote:
 Hi, Hans,

 the code works for MKII but not for MKIV. known issue or bug?

 Yue Wang


and here comes the file.

Wolfgang


per.tex
Description: TeX document
___
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] interactionbuttons

2008-09-03 Thread Alan Stone
What's missing for this to work ?

\definereference[GoToToC][\goto{ToC}[myToC]]

\def\myButtons
{\interactionbuttons[width=1cm][
GoToToC,CloseDocument]}

\setupinteraction[state=start]

\setupfooter[state=start]
\setupfootertexts
[\hfill \myButtons \hfill]
%[\hfill test \hfill]

\showframe
%\showsetups

\starttext
\reference[myToC]{}
\placecontent

\chapter{Chapter 1}
\input knuth
\stoptext

Thx,
Alan
___
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] Formula number in right2left direction

2008-09-03 Thread Mehdi Omidali
Hi,
There is a problem in formula numbers in RL direction. I mean in a formula the
direction of the number of formula is from left to right. I tried \mathdir TRT
and this problem disappeared but two new problems appeared. First, the hole
formula typesetted from right to left which shouldn't be. Second, the prantesis
arround the formula number get reversed like )a.b(. It would be nice if \mathdir
TRT only changes the direction of the formula number (with correct prantesis)
not hole the formula.
Thanks

___
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] Formula number in right2left direction

2008-09-03 Thread Khaled Hosny
On Wed, Sep 03, 2008 at 10:21:10AM +, Mehdi Omidali wrote:
 Hi,
 There is a problem in formula numbers in RL direction. I mean in a formula the
 direction of the number of formula is from left to right. I tried \mathdir TRT
 and this problem disappeared but two new problems appeared. First, the hole
 formula typesetted from right to left which shouldn't be. Second, the 
 prantesis
 arround the formula number get reversed like )a.b(. It would be nice if 
 \mathdir
 TRT only changes the direction of the formula number (with correct prantesis)
 not hole the formula.

In Arabic countries where math is RTL, it is totally RTL.

-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team


signature.asc
Description: Digital signature
___
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] Typesetting chess boards

2008-09-03 Thread Maurí­cio
  Hi,
 
  What is the easiest way to
  include chess boards in a
  Context document? (...)

  Nobody has written a package for that yet, but
  if you are patient, it's easy enough that people
  will be ready to help you. (...)
 
  (...) Maybe it's easy enough to make a general
  TikZ module that would then work equally well on
  all engines and all flavours of TeX (but I don't
  know TikZ well enough).

I like that idea. Just subscribed to TikZ list.

Thanks,
Maurício

___
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] interactionbuttons

2008-09-03 Thread Alan Stone
The correct question was what's too much to make it work...

\definereference[GoToToC][myToC]

The button contains the text GoToToC. How do you assign
a symbol to it instead ?

Thx,
Alan
___
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] system macros/doquadrupleemtpy

2008-09-03 Thread Thomas A. Schmitz
Hi all,

I'm trying to define a macro \Command which can either have four or  
five arguments. If it has five, I want to define them as

\Command1[#1][#2][#3][#4]{#5}

if it has four, as

\Command2[#1][#2][#3]{4#}

I thought this would be the way to go:

\def\Command{%
\doquadrupleempty\doCommand}

\def\doCommand{%
\iffifthargument%
\doquadrupleargument\Command1%
\else%
\dotripleargument\Command2%
\fi}

but that gives me errors about too many }s. So I'm wondering: am I  
on the wrong track? Can this be done at all?

Thanks, and best

Thomas
___
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] synctex support for ConTeXt fixed

2008-09-03 Thread Mojca Miklavec
(from the thread Installing ConTeXt Minimals on a Mac)

On Mon, Sep 1, 2008 at 9:16 AM, Mojca Miklavec wrote:

 (c) establishing synchronization between  PDF output and its ConTeXt source.
 Currently, it does not seem to work (with TeXShop at least)
 Note, in the latest TeXShop there is
 Added support for SyncTeX. SyncTeX is new synchronization technology by
 Jerome Laurens which is included in TeX Live 2008 (but not earlier TeX
 distributions). The technology is built directly into pdfTeX and XeTeX. In
 modern TeX distributions, most typesetting actually calls pdfetex (even if
 using latex to output a dvi file), and thus the technology is available for
 such typesetting. To use the technology, add the flag --synctex=1
 Any advice on how to do (a), (b), and (c) will be much appreciated.

 You can try
texexec --passon=-synctex=1 filename
 but I didn't manage to make it work - it always pointed back to
 \stoptext or \page, just as it pointed to the end of minipage in
 LaTeX. Apart from the fact that I wasn't sure which tool to use to
 make rsync work (when I was testing, TeXShop didn't support synctex
 yet, TeXWorks behaved weird, and one would need to write support for
 TextMate first, but when Patrick tried it, he have up after
 discovering that it didn't work anyway).

 While answering you I just got a reply from Jérôme:

 The problem comes from the synctex parser.
 I made different experiments and forgot to test the latest one with context.
 I will upload the new versions soon but I am afraid the various viewers must 
 be updated.
 You will have to wait a little longer...

Today a new package has been uploaded to CTAN:
(http://www.tex.ac.uk/tex-archive/support/synctex-parser/README)

History:

1.2: Tue Sep  2 10:28:32 UTC 2008
- Correction for ConTeXt support in the edit query.
  The previous method was assuming that TeX boxes do not overlap,
  which is reasonable for LaTeX but not for ConTeXt.
  This assumption is no longer considered.

Once Martin and Jonathan fix pdfTeX  XeTeX sources, you'll have a
chance to experiment further :) :) :)

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
___


[NTG-context] Still missing some farsi characters

2008-09-03 Thread Mehdi Omidali
Hi Idris and others,
In the latest font-otf.lua some farsi characters are not included in isol_final
and isol_final_medi_init functions. Here they are

isol_final: 0698

isol_final_medi_init: 06AF 06A9 06CC

Thanks

___
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] Installing ConTeXt Minimals on a Mac

2008-09-03 Thread Mojca Miklavec
On Tue, Sep 2, 2008 at 9:34 PM, Alan Bowen wrote:

 On Sep 2, 2008, at 14;54,40 , Mojca Miklavec wrote:

 setuptex should already be executable and no TeX file (the best way to
 do the change would be to use cp setuptex mysetuptex and then modify
 the latter), but if you want to make sure ... do
chmod a+x mysetuptex (or however your file is called)
 ls -l should show you the status of file (you should be able to see
 if the file is executable).

 Thanks. What confused me was that on my Mac the icon for the setuptex
 changed after I edited it.

 Anyway, the revised setuptex works perfectly with the
 ConTeXtMinimals.engine. Thank you again.

 But the question now is, which solution do you recommend? As a user,
 my preference is for the one that leaves setuptex alone and focuses on
 the engines that TeXShop uses, since it makes switching form MKII to
 MKIV very easy to do. (I would add that, as things stand now, I also
 have easy access to my Texlive 2007 setup.) However, I am much more
 interested in keeping my setup in line with development path that you,
 Hans, and the others set for the minimals, since, as I gather, they
 are the future of ConTeXt.

If *.engine works for you, feel free to use that one. You don't need
to bother about setuptex, really, unless you need to use TeX in bash.
And TeXWorks might be the new future of TeXShop anyway ...

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
___


[NTG-context] error message

2008-09-03 Thread Alan Bowen
I am trying to process a file using the ConTeXt minimals and MK II  
that now complains:

.
.
.
{/Users/alancbowen/Library/texmf/fonts/map/pdftex/context/tasgreek.map}
! Argument of \next has an extra }.
inserted text
\par
to be read again
   }
argument ...{,\CCC:4:124 \CCC:4:126 \CCC:4:124 }
  \hskip \datesignal  
\def \b...


\p!compareprocessaction ...commalistelement {#3}#2
  \fi \fi
\next2 #1,-\p!doprocessaction {#1}
   \doprocesscommaitem
\processnextcommalist ...odoprocesscommaitem #4#5,
  ]\relax \global  
\advance \...

...
l.29 F
  inally, I have supplied extensive footnotes and comments  
explicating t...


I have tried various things to locate the error but without success.  
Can anyone tell me what this error message means and where I should  
look to solve the problem?


I do have

\definetext[ArticleTitlePage][footer]
[\tfx\AuthorName\hfill\currentdate\hfill{\tf 1}]

in my environment file, but this seems to be OK.

Many thanks in  advance.

Alan___
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] system macros/doquadrupleemtpy

2008-09-03 Thread Aditya Mahajan
On Wed, 3 Sep 2008, Thomas A. Schmitz wrote:

 Hi all,

 I'm trying to define a macro \Command which can either have four or
 five arguments. If it has five, I want to define them as

 \Command1[#1][#2][#3][#4]{#5}

 if it has four, as

 \Command2[#1][#2][#3]{4#}

 I thought this would be the way to go:

 \def\Command{%
   \doquadrupleempty\doCommand}

You need something with possibly five arguments so you should use quint 
rather than quad:

\def\Command%
{\doquintupleargument\doCommand}

 \def\doCommand{%
   \iffifthargument%
   \doquadrupleargument\Command1%
   \else%
   \dotripleargument\Command2%
   \fi}


The usual way is

\def\doCommand[#1][#2][#3][#4][#5]%
{\doifelsenothing{#5}%See below
 {\Command1[#1][#2][#3][#4][#5]}
 {\Command2[#1][#2][#3][#4]}}

I use \doifelsenothing rather than \doiffirthargument. If I give

\Command[...][...][...][...][] with \doifelsenothing \Commnad2 will be 
called while with \iffifthargument \Command1 will be called. Use whichever 
is more appropriate for your problem.


 but that gives me errors about too many }s. So I'm wondering: am I
 on the wrong track? Can this be done at all?

The above code is untested, but I am pretty sure that it will work.

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
___


Re: [NTG-context] system macros/doquadrupleemtpy

2008-09-03 Thread Peter Rolf
Thomas A. Schmitz schrieb:
 Hi all,
 
 I'm trying to define a macro \Command which can either have four or  
 five arguments. If it has five, I want to define them as
 
 \Command1[#1][#2][#3][#4]{#5}
 
 if it has four, as
 
 \Command2[#1][#2][#3]{4#}
 
 I thought this would be the way to go:
 
 \def\Command{%
   \doquadrupleempty\doCommand}
 
 \def\doCommand{%
   \iffifthargument%
   \doquadrupleargument\Command1%
   \else%
   \dotripleargument\Command2%
   \fi}
 
 but that gives me errors about too many }s. So I'm wondering: am I  
 on the wrong track? Can this be done at all?


Hi Thomas!

Hard to say for me whats wrong, but I think its a bad idea to use such
optional parameter commands in a nested way. Also there is no need for a
second parameter number check.

How about something like

\def\doCommand%
  {\iffifthargument
 \CommandA[#1][#2][#3][#4]{#5}%
   \else\iffourthargument
   \CommandB[#1][#2][#3]{#4}%
 \else
   % some error handling
 \fi
   \fi}


Best wishes, Peter

 Thanks, and best
 
 Thomas
 ___
 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] Strange font issue with LuaTeX on Linux

2008-09-03 Thread Mohamed Bana
Hans Hagen pragma at wxs.nl writes:

 
 Mohamed Bana wrote:
 
  Sorry I didn't quiet understand that.  Given this;
  
  $ mtxrun --script fonts --list --pattern=warnock 
  warnockpro-bold WarnockPro-Bold WarnockPro-Bold.otf
  
 
 looks like an old version, should be
 
 warnockprobold WarnockPro-Bold fullpathifsystemfont/WarnockPro-Bold.otf
 
  which of the following are correct;
  
  1. \definefontsynonym [WarnockPro-Regular] [name:warnockpro-bold] 
 
 best use
 
 name:warnockprobold
 
 although context will strip the - anyway
 

Thanks, I can confirm that both

\definefontsynonym [WarnockPro-Regular][name:warnockproregular]  
and
\definefontsynonym [WarnockPro-Regular][name:WarnockPro-Regular]

on my vista box, which is running a pretty update to ConTeXt install, it's
actually the mswincontext.zip.  And the output is as Hans described.

 
 can you try the beta? something was fixed
 

The lastest LuaTeX or ConTeXt?  Because if it's the ConTeXt beta then where's
the link, I generally just download the cont-tmf.zip from
http://www.pragma-ade.nl/download-1.htm, and the current one is dated at;
2008-08-05.

Or even better, how do I update a local ConTeXt install in $HOME/texmf

___
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] error message query

2008-09-03 Thread Thomas A. Schmitz

On Sep 3, 2008, at 9:48 PM, Alan Bowen wrote:

 It appears that the problem is my definition

 \def\ {|~|}

 Though this definition works in a simple test file, it apparently
 conflicts with something in my environment file and produces the error
 message reported previously. So, is there a “safer” way to define
 \space as {|~|}?

 Alan

Since you seem to be using Greek in your file: both | and ~ are made  
inactive in the Greek environment, so if you use '\ ' within Greek  
stuff, you're running into trouble. I don't see a solution within mkii  
if you want the nonbreakable space.

Thomas
___
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] error message query

2008-09-03 Thread Alan Bowen
It appears that the problem is my definition

\def\ {|~|}

Though this definition works in a simple test file, it apparently  
conflicts with something in my environment file and produces the error  
message reported previously. So, is there a “safer” way to define  
\space as {|~|}?

Alan
___
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] Strange font issue with LuaTeX on Linux

2008-09-03 Thread Mojca Miklavec
On Wed, Sep 3, 2008 at 7:10 PM, Mohamed Bana wrote:
 Hans Hagen writes:

 can you try the beta? something was fixed


 The lastest LuaTeX or ConTeXt?  Because if it's the ConTeXt beta then where's
 the link, I generally just download the cont-tmf.zip from
 http://www.pragma-ade.nl/download-1.htm, and the current one is dated at;
 2008-08-05.

http://www.pragma-ade.com/download-2.htm

 Or even better, how do I update a local ConTeXt install in $HOME/texmf

You don't really need to update locally. Update globally.

There is some update mechanism, but takes time to explain (read as: we
didn't take time to make it more user friendly yet), esp. on windows.

You could download
http://minimals.contextgarden.net/setup/context-setup-mswin.zip
unzip it and then run
   first-setup.bat --context=beta --texroot=path-to-your-context
where path-to-your-context must be the parent of texmf-xxx. You might
experience strange problems with uppercase letters and spaces in
folder names though. You need to use unix-like folder names (with
slashes, not backslashes).

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
___


[NTG-context] Bug in luatex?

2008-09-03 Thread Diego Depaoli
Hi all,
compiling this small file with luatex I get weird results.
All works fine with xetex.

\mainlanguage[it]
\setupcolors[state=start]
\setupinteraction[state=start, color=darkblue]
\useURL[54/92][http://arianna.consiglioregionale.piemonte.it/base/leggi/l1992054.html][][Legge
regionale 09 dicembre 1992, n. 54]
\useURL[1/90][http://www.italgiure.giustizia.it/nir/lexs/1990/lexs308762.html][][Legge
del 4 gennaio 1990 n. 1]
\useURL[40/07][http://www.parlamento.it/leggi/07040l.htm][][Legge 2
aprile 2007, n. 40]
\useURL[174/05][http://www.camera.it/parlam/leggi/05174l.htm][][Legge
17 agosto 2005, n. 174]
\useURL[1142/70][http://impresa.comune.belluno.it/pdffiles/1142_70.pdf][][Legge
23 dicembre 1970, n. 1142]
\useURL[161/63][http://www.regione.emilia-romagna.it/cra/pdf/161_63.pdf][][Legge
14 febbraio 1963, n. 161]
\useURL[735/84][http://www.italgiure.giustizia.it/nir/1984/lexs_106505.html][][Legge
29 ottobre 1984, n. 735]

\starttext
\startitemize[a,packed]
\item {\bf Attività di acconciatore:} riferimento normativo
\from[161/63], \from[1142/70], \from[174/05], \from[735/84] nelle
parti compatibili con la \from[174/05], \from[40/07], presente
regolamento.
\item {\bf Attività di estetista e affini:} riferimento normativo
\from[1/90], \from[54/92], \from[40/07], presente regolamento
\stopitemize
\stoptext

Many thanks

-- 
Diego Depaoli


exampleluatex.pdf
Description: Adobe PDF document


examplexetex.pdf
Description: Adobe PDF document
___
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] Verbatim with color background

2008-09-03 Thread B. Tommy Jensen
Hi,
I have a short question about verbatim areas (\starttyping):

I have been trying to define a background color to verbatim
areas in a document. My method so far is to define a
textbackground named verbatim and refer to this in the
setuptyping method:

\setuptyping[typing][margin=0.5cm,bodyfont=8.0pt,
before={\starttextbackground[verbatim]},
after={\stoptextbackground}]

This works only partly. For example, when using long
verbatim texts that spans over more than one page,
the background color disappears on the last page.

Is there any other easy way of controlling the background
color on verbatim areas?

Best regards,
Tommy Jensen
___
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] Still missing some farsi characters

2008-09-03 Thread Idris Samawi Hamid ادريس سماوي ح امد
Hi Mehdi,

On Wed, 03 Sep 2008 09:10:41 -0600, Mehdi Omidali [EMAIL PROTECTED]  
wrote:

 Hi Idris and others,
 In the latest font-otf.lua some farsi characters are not included in  
 isol_final
 and isol_final_medi_init functions. Here they are

 isol_final: 0698

 isol_final_medi_init: 06AF 06A9 06CC

I thought we had fixed this months ago... Hans, could you add this patch:

=
 local isol = {
  [0x0621] = true, [zwnj] = true,
 }

 local isol_fina = {
 [0x0622] = true, [0x0623] = true, [0x0624] = true, [0x0625] =  
true, [0x0627] = true, [0x062F] = true,
 [0x0630] = true, [0x0631] = true, [0x0632] = true,
 [0x0648] = true, [0x0698] = true,
 [0xFEF5] = true, [0xFEF7] = true, [0xFEF9] = true, [0xFEFB] = true,
 }

 local isol_fina_medi_init = {
 [0x0626] = true, [0x0628] = true, [0x0629] = true, [0x062A] =  
true, [0x062B] = true, [0x062C] = true, [0x062D] = true, [0x062E] = true,
 [0x0633] = true, [0x0634] = true, [0x0635] = true, [0x0636] =  
true, [0x0637] = true, [0x0638] = true, [0x0639] = true, [0x063A] = true,
 [0x0640] = true, -- tadwil
 [0x0641] = true, [0x0642] = true, [0x0643] = true, [0x0644] =  
true, [0x0645] = true, [0x0646] = true, [0x0647] = true, [0x0649] = true,  
[0x064A] = true,
 [0x067E] = true, [0x0686] = true, [0x06AF] = true, [0x06A9] =  
true, [0x06CC] = true,
[zwj] = true,
 }
=

Best wishes
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] error message query

2008-09-03 Thread Alan Bowen
Thomas—

The problem seems limited to one of my environments. With the one for  
the journal, MKII and \def\ {|~|} work when the Greek module is loaded  
and when real Greek is set. In short, the changes made in your Greek  
module seem happily restricted to text in \localgreek{...} and so on.

I am at a loss to see how \def\ {|~|} collides with the many macros in  
the problem environment right now, hence my query about a cleverer way  
to make the definition.

By the way, I use |~| to reduce stretch and to get the right spacing  
after any period within a sentence. It’s unbreakability is an  
undesirable side effect. (The string A.|~\E|~|Samuel”, for example,  
breaks with a hyphen as in  “A. E.-” which is certainly not good.)  
Apparently, we have lost the functionality of the old “\ ” when 
\mainlanguage[en].

Cheers, Alan

On Sep 3, 2008, at 17;44,35 , Thomas A. Schmitz wrote:


 On Sep 3, 2008, at 9:48 PM, Alan Bowen wrote:

 It appears that the problem is my definition

 \def\ {|~|}

 Though this definition works in a simple test file, it apparently
 conflicts with something in my environment file and produces the  
 error
 message reported previously. So, is there a “safer” way to define
 \space as {|~|}?

 Alan

 Since you seem to be using Greek in your file: both | and ~ are made
 inactive in the Greek environment, so if you use '\ ' within Greek
 stuff, you're running into trouble. I don't see a solution within mkii
 if you want the nonbreakable space.

 Thomas
 ___
 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
___