Transition from ConTeXt mark II to mark IV
Hallo. I need some help. I have all my teaching materials (slides, worksheets, and everything, including many MetaPost figures) in ConTeXt mark II. After the transition to Ubuntu 24.10, I found that the texexec is not a part of the ConTeXt distribution anymore. I tried to compile my stuff with context instead and failed. This is probably because the macros in my old modules (created by myself many years ago) are not compatible with mark IV. Hence my question: Is there any document on the transition from mark II to mark IV? Many thanks for your kind help. Best wishes, Michal
On 12/6/2024 1:56 PM, Michal Kvasnička wrote:
Hallo.
I need some help. I have all my teaching materials (slides, worksheets, and everything, including many MetaPost figures) in ConTeXt mark II. After the transition to Ubuntu 24.10, I found that the texexec is not a part of the ConTeXt distribution anymore. I tried to compile my stuff with context instead and failed. This is probably because the macros in my old modules (created by myself many years ago) are not compatible with mark IV. Hence my question:
Is there any document on the transition from mark II to mark IV?
You can just unzip mkii into the tree and it should work. Anyway, what is failing? The main difference is in fonts (opentype) and encodings (should work). I assume your macros don't hack low level mechanisms. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hallo. Many thanks for a fast reply. Honestly, I'm not certain what isn't working. With my slides, it seems that my macros are not loaded from my modules. With figures, I may not know how to compile them. Slides: I created three modules many years ago: m-lect.tex, s-pre-mi.tex, and s-pre-qq.tex. I load them in the slides to set the presentation style and to produce several versions of the slides (slides, handouts, teacher's notes, etc.). In these modules, I define \TitlePage macro. In mark ii, texexec finds the macro. In mark iv, context doesn't. I ran the slides with texexec --pdf --nomprun mic-slide01.tex; I tried context --pdf --nomprun mic-slide01.tex. I included the modules and one slide (not the figures included). Figures: I have my figures in .mp files where I include my style in figuremac.mp and use verbatimtex ... etex. Therefore, I compile it with texexec --mptex charts01.mp. For some reason, when I try context --mptex charts01.mp, no figures are created. (I have many chart files like this, most with very many relatively complex figures.) I include a sample figure with the TeX and MP macros used. I have similar problems with the handouts and the rest of the stuff, but if you can hint me how to proceed, I might find the way for the rest. (I didn't follow the progress of the ConTeXt, and now I'm stuck with the old version of the old Ubuntu in a virtual machine. I definitely have to upgrade my knowledge over Christmas. Hence any transition guide would be most appreciated, too.) Many thanks for your kind help. Best wishes, Michal pá 6. 12. 2024 v 14:22 odesílatel Hans Hagen via ntg-context < ntg-context@ntg.nl> napsal:
On 12/6/2024 1:56 PM, Michal Kvasnička wrote:
Hallo.
I need some help. I have all my teaching materials (slides, worksheets, and everything, including many MetaPost figures) in ConTeXt mark II. After the transition to Ubuntu 24.10, I found that the texexec is not a part of the ConTeXt distribution anymore. I tried to compile my stuff with context instead and failed. This is probably because the macros in my old modules (created by myself many years ago) are not compatible with mark IV. Hence my question:
Is there any document on the transition from mark II to mark IV?
You can just unzip mkii into the tree and it should work.
Anyway, what is failing? The main difference is in fonts (opentype) and encodings (should work). I assume your macros don't hack low level mechanisms.
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
Michal Kvasnička schrieb am 06.12.2024 um 15:58:
Hallo.
Many thanks for a fast reply.
Honestly, I'm not certain what isn't working. With my slides, it seems that my macros are not loaded from my modules. With figures, I may not know how to compile them.
Slides: I created three modules many years ago: m-lect.tex, s-pre-mi.tex, and s-pre-qq.tex. I load them in the slides to set the presentation style and to produce several versions of the slides (slides, handouts, teacher's notes, etc.). In these modules, I define \TitlePage macro. In mark ii, texexec finds the macro. In mark iv, context doesn't. I ran the slides with texexec --pdf --nomprun mic-slide01.tex; I tried context --pdf --nomprun mic-slide01.tex. I included the modules and one slide (not the figures included).
1. When you apply a custom section style with the command key, e.g. \setuphead [section] [command=\MyTopic] you have to use either the \protected prefix for \def or use \define instead, this means you should use \protected\def\MyTopic#1#2% {...} or \define[2]\MyTopic {...} 2. \color expects an argument. You use \color at the begin of your title page \def\StartTitlePage[#1]% {\bgroup ... \startalignment[right,broad] \TitleFont\color[LightColor]\ss\bfc\setupinterlinespace[big]} which doesn't work anymore, the correct method is to use \startcolor[...] at the begin and \stopcolor at the end. \def\StartTitlePage[#1]% {\bgroup ... \startalignment[right,broad] \TitleFont\startcolor[LightColor]\ss\bfc\setupinterlinespace[big]} \def\StopTitlePage {\stopcolor \stopalignment ...} 3. \setupinteraction fails when you pass \currentdate to the date key. \setupinteraction[date=\currentdate] 4. Active characters for quotation marks. To get proper quotation marks use direct input with the correct symbol or use \quotation{...} which add the quotation marks set for the current language. Wolfgang
participants (3)
-
Hans Hagen
-
Michal Kvasnička
-
Wolfgang Schuster