More in lang-ger.tex and a MetaPost problem

Hi, I added som changes in lang-ger.tex some week ago. As I mentioned I forgot one headtext in lang-ger.tex. \setupheadtext [\s!sv] [\v!inhoud=Inneh\aring l] should have one more l, that is: \setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll] I also read in lang-ger.tex that there are some \definesortkey's for the norwegian language. I don't know why they are commented out (obsolete?). I tried to uncomment them and make a register that contains these additional letters (\aa,\ae,\o) but they still end up before A in the index. If they are correct for the norwegian language, then the swedish counterparts should look like this: %% SWEDISH % % These three letters (in this order) are the % last in the swedish alphabet (and hence should % come after z in the latin alphabet). % I'm not sure about the syntax for % \definesortkey so I left some of it open ... % % \startlanguagespecifics[\s!sv] % % \definesortkey {\aring}{z}{b}{\aring} % \definesortkey {\Aring}{z}{b}{\Aring} % \definesortkey {\aumlaut}{z}{c}{\aumlaut} % \definesortkey {\Aumlaut}{z}{c}{\Aumlaut} % \definesortkey {\oumlaut}{z}{d}{\oumlaut} % \definesortkey {\Oumlaut}{z}{d}{\Oumlaut} % % \stoplanguagespecifics I also saw this with activecharacters... The swedish counterpart should here be: % \startencoding[texnansi] % \startlanguagespecifics[\s!sv]% % \defineactivecharacter å {\aring{}} % \defineactivecharacter Å {\Aring{}} % \defineactivecharacter ä {\aumlaut{}} % \defineactivecharacter Ä {\Aumlaut{}} % \defineactivecharacter ö {\oumlaut{}} % \defineactivecharacter Ö {\Oumlaut{}} % \stoplanguagespecifics % \stopencoding At last, some questions: 1) How should I do to get Å,Ä,Ö last in the index? 2) I can't make the example on page 236 of the MetaFun manual (the one with a framed text with the Zapf (1) label). I use the following code: \startuseMPgraphic{FunnyFrame} picture p; numeric w, h, o; p:=textext.rt(\MPstring{FunnyFrame}) ; w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize; p:=p shifted (2o,h-ypart center p); draw p; drawoptions (widhpen pencircle scaled 1pt); draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h); draw boundingbox p; setbounds currentpicture to unitsquare xyscaled(w,h); \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame,width=fit] \def\StartFrame{\startFunnyText} \def\StopFrame{\stopFunnyText} \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{}% Initiate. Instead of the text in the label box I get the text "unknown". I type \FrameTitle{Test} \StartFrame This is just a test. \StopFrame Regards, Micke P

On Wednesday 08 January 2003 13:15, Mikael Persson wrote:
Hi,
I added som changes in lang-ger.tex some week ago. As I mentioned I forgot one headtext in lang-ger.tex.
\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring l] should have one more l, that is: \setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll]
I also read in lang-ger.tex that there are some \definesortkey's for the norwegian language. I don't know why they are commented out (obsolete?). I tried to uncomment them and make a register that contains these additional letters (\aa,\ae,\o) but they still end up before A in the index.
If they are correct for the norwegian language, then the swedish counterparts should look like this:
%% SWEDISH % % These three letters (in this order) are the % last in the swedish alphabet (and hence should % come after z in the latin alphabet). % I'm not sure about the syntax for % \definesortkey so I left some of it open ... % % \startlanguagespecifics[\s!sv] % % \definesortkey {\aring}{z}{b}{\aring} % \definesortkey {\Aring}{z}{b}{\Aring} % \definesortkey {\aumlaut}{z}{c}{\aumlaut} % \definesortkey {\Aumlaut}{z}{c}{\Aumlaut} % \definesortkey {\oumlaut}{z}{d}{\oumlaut} % \definesortkey {\Oumlaut}{z}{d}{\Oumlaut} % % \stoplanguagespecifics
I also saw this with activecharacters... The swedish counterpart should here be:
% \startencoding[texnansi] % \startlanguagespecifics[\s!sv]% % \defineactivecharacter å {\aring{}} % \defineactivecharacter Å {\Aring{}} % \defineactivecharacter ä {\aumlaut{}} % \defineactivecharacter Ä {\Aumlaut{}} % \defineactivecharacter ö {\oumlaut{}} % \defineactivecharacter Ö {\Oumlaut{}} % \stoplanguagespecifics % \stopencoding
At last, some questions:
1) How should I do to get Å,Ä,Ö last in the index?
For what purpose do you seek a new sort order? If for an index then Xindy has some superior tools for accomplishing this. But how to use Xindy in a Context run? I used the sort macro package from the TeXsis macros. The particular file is called index.tex. There are some name conflicts between this package and Context so I modified some names in the macro package, e.g., index becomes indexx. Then one can embed the commands in your pdfetex or Context file, run Context, run a couple of programs from the Xindy suite (one to convert from makeindex format and then Xindy itself) and rerun Context to produce the index in the proper place. If Context can be made to do this with equal or greater facility then there is no problem. But if not, Xindy was designed specifically to handle indexes with various alphabets; indeed the tutorial deals with accented words and the Hungarian "Ny" which is sorted as a separate letter. All the situations you describe above are easily handled. HTH -- John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com

On Wed, 8 Jan 2003 12:51:42 +0000
John Culleton
On Wednesday 08 January 2003 13:15, Mikael Persson wrote:
Hi,
I added som changes in lang-ger.tex some week ago. As I mentioned I forgot one headtext in lang-ger.tex.
\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring l] should have one more l, that is: \setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll]
I also read in lang-ger.tex that there are some \definesortkey's for the norwegian language. I don't know why they are commented out (obsolete?). I tried to uncomment them and make a register that contains these additional letters (\aa,\ae,\o) but they still end up before A in the index.
If they are correct for the norwegian language, then the swedish counterparts should look like this:
%% SWEDISH % % These three letters (in this order) are the % last in the swedish alphabet (and hence should % come after z in the latin alphabet). % I'm not sure about the syntax for % \definesortkey so I left some of it open ... % % \startlanguagespecifics[\s!sv] % % \definesortkey {\aring}{z}{b}{\aring} % \definesortkey {\Aring}{z}{b}{\Aring} % \definesortkey {\aumlaut}{z}{c}{\aumlaut} % \definesortkey {\Aumlaut}{z}{c}{\Aumlaut} % \definesortkey {\oumlaut}{z}{d}{\oumlaut} % \definesortkey {\Oumlaut}{z}{d}{\Oumlaut} % % \stoplanguagespecifics
I also saw this with activecharacters... The swedish counterpart should here be:
% \startencoding[texnansi] % \startlanguagespecifics[\s!sv]% % \defineactivecharacter å {\aring{}} % \defineactivecharacter Å {\Aring{}} % \defineactivecharacter ä {\aumlaut{}} % \defineactivecharacter Ä {\Aumlaut{}} % \defineactivecharacter ö {\oumlaut{}} % \defineactivecharacter Ö {\Oumlaut{}} % \stoplanguagespecifics % \stopencoding
At last, some questions:
1) How should I do to get Å,Ä,Ö last in the index?
For what purpose do you seek a new sort order? If for an index then Xindy has some superior tools for accomplishing this. But how to use Xindy in a Context run? I used the sort macro package from the TeXsis macros. The particular file is called index.tex. There are some name conflicts between this package and Context so I modified some names in the macro package, e.g., index becomes indexx. Then one can embed the commands in your pdfetex or Context file, run Context, run a couple of programs from the Xindy suite (one to convert from makeindex format and then Xindy itself) and rerun Context to produce the index in the proper place.
If Context can be made to do this with equal or greater facility then there is no problem. But if not, Xindy was designed specifically to handle indexes with various alphabets; indeed the tutorial deals with accented words and the Hungarian "Ny" which is sorted as a separate letter. All the situations you describe above are easily handled.
HTH --
John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Thanks for your answer John! I want to be able to sort the swedish letters, å,ä and ö. (the order is ... u,v,x,y,z,å,ä,ö). When I add words now that begin with those letters they end up before all other letters. Example. Adding zebra, åsna, älg and ödla gives something like ödla älg åsna Z zebra while I want it to be Z zebra Å åsna Ä älg Ö ödla ============ I have used xindy in LaTeX and liked it alot. Do I read your text correct between the lines when I read that ConTeXt uses makeindex as default but there is a way to use xindy instead to sort things? Or does ConTeXt sort things in another way? Regards, Micke P

On Wednesday 08 January 2003 18:36, Mikael Persson wrote:
On Wed, 8 Jan 2003 12:51:42 +0000
John Culleton
wrote: I have used xindy in LaTeX and liked it alot. Do I read your text correct between the lines when I read that ConTeXt uses makeindex as default but there is a way to use xindy instead to sort things? Or does ConTeXt sort things in another way? Regards, Micke P _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Context has its own indexing and sorting routines. So substituting either makeindex or Xindy requires writing or adapting output routines and input routines, and probably an output filter as well for Xindy. I have played with the simple routines found in index.tex as found in the texsis distribution. My version is called indexx.tex and changes the command names to avoid conflict with Context macros. But that does not directly address your problem. So I will work on the three pieces in a generic sort of way, the output routine, the filter, and the input routines (the latter are relatively trivial.) In the process I will be borrowing from xindy.sty, eplain.tex, texsis and so on. I plan to use a simple macro which looks like \idx{a string of stuff} and outputs to a file \idx{a string of stuff}{folio} The string of stuff will have to include the keys, the formatting attributes for both keys and locator, and special indicators such as see and seealso. I like the xindy.sty convention which uses ordinary punctuation to separate keys, sort keys, locator attributes etc. (I like it because it simplifies macro writing :) The filter will have to break down the string into parts, and translate the parts into xindy raw format. So don't hold your breath for my work! But it all seems doable. And there is a frequent demand for language-specific sorting and categorization within Context. In the meantime one can perhaps use the makeindex4 conversion program and hand-modify the results. At some point I will have to adopt a xdy style file or write one. But each language will require its own xdy file or subfile that specifies the alphabet and sort order. -- John Culleton Able Indexers and Typesetters Rowse Reviews Culleton Editorial Services http://wexfordpress.com

At 12:51 PM 1/8/2003 +0000, John Culleton wrote:
If Context can be made to do this with equal or greater facility then there is no problem. But if not, Xindy was designed specifically to handle indexes with various alphabets; indeed the tutorial deals with accented words and the Hungarian "Ny" which is sorted as a separate letter. All the situations you describe above are easily handled.
i have no problem with providing support for xindy some day in the future (properly hooked into the index mechanism) but only if there are binaries available for windows/linux/macos-x that work out of the box; a few weeks ago i tried to run xindy on my win2k and it failed. Next time i meet Joachim S. i'll ask him about it. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------

At 02:15 PM 1/8/2003 +0100, you wrote:
I added som changes in lang-ger.tex some week ago. As I mentioned I forgot one headtext in lang-ger.tex.
\setupheadtext [\s!sv] [\v!inhoud=Inneh\aring l] should have one more l, that is: \setupheadtext [\s!sv] [\v!inhoud=Inneh\aring ll]
done ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------

At 02:15 PM 1/8/2003 +0100, you wrote:
2) I can't make the example on page 236 of the MetaFun manual (the one with a framed text with the Zapf (1) label). I use the following code:
\startuseMPgraphic{FunnyFrame} picture p; numeric w, h, o; p:=textext.rt(\MPstring{FunnyFrame}) ; w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize; p:=p shifted (2o,h-ypart center p); draw p; drawoptions (widhpen pencircle scaled 1pt);
^^^^^^^^^^^ withpen ^^^^^^^^^^^^^^^^^^^^
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h); draw boundingbox p; setbounds currentpicture to unitsquare xyscaled(w,h); \stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame,width=fit]
\def\StartFrame{\startFunnyText} \def\StopFrame{\stopFunnyText}
\def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{}% Initiate.
Instead of the text in the label box I get the text "unknown". I type
\FrameTitle{Test}
\StartFrame This is just a test. \StopFrame
Regards, Micke P
this works ok here, when corrected for the error, so it looks like your mp installation is not working ok Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------

On Sun, 12 Jan 2003 21:47:18 +0100
Hans Hagen
At 02:15 PM 1/8/2003 +0100, you wrote:
2) I can't make the example on page 236 of the MetaFun manual (the one with a framed text with the Zapf (1) label). I use the following code:
\startuseMPgraphic{FunnyFrame} picture p; numeric w, h, o; p:=textext.rt(\MPstring{FunnyFrame}) ; w:=OverlayWidth; h:=OverlayHeight; o:=BodyFontSize; p:=p shifted (2o,h-ypart center p); draw p; drawoptions (widhpen pencircle scaled 1pt);
^^^^^^^^^^^ withpen ^^^^^^^^^^^^^^^^^^^^
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h); draw boundingbox p; setbounds currentpicture to unitsquare xyscaled(w,h); \stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame,width=f it]
\def\StartFrame{\startFunnyText} \def\StopFrame{\stopFunnyText}
\def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{}% Initiate.
Instead of the text in the label box I get the text "unknown". I type
\FrameTitle{Test}
\StartFrame This is just a test. \StopFrame
Regards, Micke P
this works ok here, when corrected for the error, so it looks like your mp installation is not working ok
Hans
Hi again, thanks for your correction Hans! I still get the same error
after reinstalling tetex and ConTeXt. The only "unknown" I can find in
the logs is a line:
(unknown) cmr10 11.95514 fshow
in mpgraph.4000
Maybe someone has a clue what is going on? I have not edited some
I'm on a Red Hat 8.0 system with tetex-1.0.7-63 and the ConTeXt beta
from today. I have done texexec --make metafun. Should I do something
more? (I have done another document with a metapost image as background
image, and it works very well)
I have done all files available at
http://lillpelle.hemmet.chalmers.se/~micke/contextprob/
I include the (corrected) tex file again:
============ start file ==============
\startuseMPgraphic{FunnyFrame}
picture p;
numeric w, h, o;
p:=textext.rt(\MPstring{FunnyFrame}) ;
w:=OverlayWidth;
h:=OverlayHeight;
o:=BodyFontSize;
p:=p shifted (2o,h-ypart center p);
draw p;
drawoptions (withpen pencircle scaled 1pt);
draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h);
draw boundingbox p;
setbounds currentpicture to unitsquare xyscaled(w,h);
\stopuseMPgraphic
\defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
\defineframedtext[FunnyText][frame=off,background=FunnyFrame,width=fit]
\def\StartFrame{\startFunnyText}
\def\StopFrame{\stopFunnyText}
\def\FrameTitle#1%
{\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{}% Initiate.
\starttext
\FrameTitle{Test}
\StartFrame
This is just a test.
\StopFrame
\stoptext
============ stop file =============
Below is shown what I see in the prompt when I run texexec.
Best Regards, Micke P
[contextprob]$ texexec --pdf enkel.tex
TeXExec 3.1 - ConTeXt / PRAGMA ADE 1997-2002
executable : pdfetex
format : cont-en
inputfile : enkel
output : pdftex
interface : en
current mode : none
TeX run : 1
This is pdfeTeX, Version 3.14159-14h-released-20010417-2.1 (Web2C
7.3.3.1)
entering extended mode
(./enkel.tex{/usr/share/texmf/pdftex/config/pdftex.cfg}
ConTeXt ver: 2003.1.10 fmt: 2003.1.13 int: english mes: english
language : language en is active

At 06:41 PM 1/13/2003 +0100, Mikael Persson wrote:
Hi again, thanks for your correction Hans! I still get the same error after reinstalling tetex and ConTeXt. The only "unknown" I can find in the logs is a line:
(unknown) cmr10 11.95514 fshow
in mpgraph.4000
Maybe someone has a clue what is going on? I have not edited some
does draw btex oeps etex ; work ? [maybe some other tolls is not working; the problem is that mp uses a few dvi->mp tools and tempfiles/logs get lost in the process] Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------

At 02:15 PM 1/8/2003 +0100, you wrote:
%% SWEDISH % % These three letters (in this order) are the % last in the swedish alphabet (and hence should % come after z in the latin alphabet). % I'm not sure about the syntax for % \definesortkey so I left some of it open ... % % \startlanguagespecifics[\s!sv] % % \definesortkey {\aring}{z}{b}{\aring} % \definesortkey {\Aring}{z}{b}{\Aring} % \definesortkey {\aumlaut}{z}{c}{\aumlaut} % \definesortkey {\Aumlaut}{z}{c}{\Aumlaut} % \definesortkey {\oumlaut}{z}{d}{\oumlaut} % \definesortkey {\Oumlaut}{z}{d}{\Oumlaut} % % \stoplanguagespecifics
the problem with sorting is that there are a lot of things to handle : \ecircumflex \^{e} \^ e \char246 byte I just found out (well, it took me a while) that there's a bug in texutil with regards to creating a separate entry in the index. \definesortkey {\aring}{z}{b}{\aring} \definesortkey {\Aring}{z}{b}{\aring} this will create (patched texutil) an entry \aring, while \definesortkey {\aring}{z}{b}{} \definesortkey {\Aring}{z}{b}{} this only determines the sort order. Currently the mechanisms in texutil are obscured by some xml cleanup, tcx remapping (polish needs this), general cleanup, etc. Also, since there is an encoding issue involved, redundant info is written to the tuo file. So, in order to sort out this mess, some coordinated effort is needed to clean it up. (1) if possible only vectors with named glyphs (this prevents mixed encoding problems) (2) example files (3) a simplified texutil (currently ignores the named glyphs) (4) other mappings, say \^{a} -> \acircumflex can be automized or shared (i'll probably make a new mechanism and remove the old one later) a more manual selection (by default related to a language) for choosing the sort vector (one per document), wih vectors no longer going in language specifics (is also faster) Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (4)
-
Hans Hagen
-
John Culleton
-
Mikael Persson
-
Mikael Persson