Lettrine module not working?!
Dear ConTeXt-user,
Have been using ConTeXt for quite some time now and did a fresh
standalone install today:
mtx-context | ConTeXt Process Management 1.04
mtx-context |
mtx-context | main context file:
/home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2023.02.14 17:44
mtx-context | main context file:
/home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2023.02.14 17:44
However the *lettrine* module doesn't seem to work anymore!
I use it like this:
*\usemodule[lettrine]*
*\setuplettrine[Lines=3,Image=no,Findent=0.7em,Nindent=0pt,FontHook={\MyColor}]*
These two commands are in my setup file.
Following error:
tex error > tex error on line 36 in file deel3/hfdst1.tex: Control
sequence expected instead of undefined
<macro> \m_syst_parameter_n
... \the \LettrineHeight ] X}}\scratchcounter = \numexpr
(100*\LettrineHeight )/(\ht \Lettrinetbox /100) - 9999\relax \ifnum
\scratchcounter >0 \def \tempa {1.\the \scratchcounter }\else \def
\tempa {1}\fi \LettrineFontHook \!!dimena
= \tempa \Let ...
<macro> \dolettrine
...\Lettrinefindent =\LettrineFindent \relax \Lettrinelines
=\LettrineLines \relax \setbox \Lettrinelbox \hbox {{\ifx \LettrineImage
\v!yes \doLettrineEPS {#2}\else \ifx \LettrineImage \v!true
\doLettrineEPS {#2}\else \doLettrineFont
#2\fi \fi }}\ ...
In mkiv and mkxl, we use
\placeinitial
rather than the obsolete (mkii) lettrine module.
See also \setupinitial.
Alan
On Sun, 19 Feb 2023 17:12:45 +0100
"G.C.H.M. Verhaag via ntg-context"
Dear ConTeXt-user,
Have been using ConTeXt for quite some time now and did a fresh standalone install today:
mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2023.02.14 17:44 mtx-context | main context file: /home/gverhaag/ConTeXtInstallation/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2023.02.14 17:44
However the *lettrine* module doesn't seem to work anymore!
I use it like this:
*\usemodule[lettrine]*
*\setuplettrine[Lines=3,Image=no,Findent=0.7em,Nindent=0pt,FontHook={\MyColor}]*
These two commands are in my setup file.
Following error:
tex error > tex error on line 36 in file deel3/hfdst1.tex: Control sequence expected instead of undefined
<macro> \m_syst_parameter_n ... \the \LettrineHeight ] X}}\scratchcounter = \numexpr (100*\LettrineHeight )/(\ht \Lettrinetbox /100) - 9999\relax \ifnum \scratchcounter >0 \def \tempa {1.\the \scratchcounter }\else \def \tempa {1}\fi \LettrineFontHook \!!dimena = \tempa \Let ... <macro> \dolettrine ...\Lettrinefindent =\LettrineFindent \relax \Lettrinelines =\LettrineLines \relax \setbox \Lettrinelbox \hbox {{\ifx \LettrineImage \v!yes \doLettrineEPS {#2}\else \ifx \LettrineImage \v!true \doLettrineEPS {#2}\else \doLettrineFont #2\fi \fi }}\ ...
\lettrine{H}{et begin} van ... Any hint on this would be much of a help! Thanks in advance!
Regards,
Geert Verhaag
Hi, Thanks for your suggestion Alan! I've been using lettrine all the time, without knowing it was actually obsolete, sorry! I'm now trying the \placeinitial command but coloring like: *\definecolor[MyColor] [r=.76,g=.72,b=.48]** **\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]* doesn't seem to work! Is this as expected behaviour or a possible issue? Regards, Gerard Verhaag
Would state=start within \setupinitial[...] help? Best Wishes Keith McKay On 20/02/2023 09:39, G.C.H.M. Verhaag via ntg-context wrote:
Hi,
Thanks for your suggestion Alan! I've been using lettrine all the time, without knowing it was actually obsolete, sorry!
I'm now trying the \placeinitial command but coloring like:
*\definecolor[MyColor] [r=.76,g=.72,b=.48]** **\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]*
doesn't seem to work! Is this as expected behaviour or a possible issue?
Regards,
Gerard Verhaag
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist :ntg-context@ntg.nl /https://www.ntg.nl/mailman/listinfo/ntg-context webpage :https://www.pragma-ade.nl /http://context.aanhet.net archive :https://bitbucket.org/phg/context-mirror/commits/ wiki :https://contextgarden.net ___________________________________________________________________________________
Hi, Unfortunately it doesn't help Keith, sorry! I tried to solve it like this: *\color[MyColor]{\placeinitial{K}}* A bit overkill but it works! Anyway, thanks for your suggestion! Regards, Gerard Verhaag
Am 20.02.23 um 10:39 schrieb G.C.H.M. Verhaag via ntg-context:
*\definecolor[MyColor] [r=.76,g=.72,b=.48]** **\setupinitial[color=\MyColor,font=Bold sa 4,distance=0pt,n=3]*
doesn't seem to work! Is this as expected behaviour or a possible issue?
The color key generally takes color _names_, i.e. color=MyColor I didn’t check if it works with \setupinitial. Hraban
Hi, Yes Hraban that worked! Thanks! My next issue is adapting the font-family, because a want to use the *Antykwa-Poltawskiego* font|| as my initial. I tried the following: *\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]* *\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]* Has anybody any idea why this doesn't work? Regards, Geert Verhaag
Am 20.02.23 um 15:30 schrieb G.C.H.M. Verhaag via ntg-context:
Hi,
Yes Hraban that worked! Thanks!
My next issue is adapting the font-family, because a want to use the *Antykwa-Poltawskiego* font|| as my initial. I tried the following:
*\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]*
*\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*
Has anybody any idea why this doesn't work?
Did you confirm that \InitialCapFont works outside of that setup? I recently used initials with a simple "font=Serif at 37pt,", and that worked. Maybe the operator "sa" doesn’t work in this context? (IDK) Hraban
Hi, Yes Hraban it works outside in normal text flow. When I do e.g. *{\InitialCapFont test in normal text flow}* the text '/test in normal text flow/' is rendered correctly in the Antykwa-Poltawskiego font. Found out that the following does work with the *\placeinitial* command: *\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default sa 4]* So something weird is happening I suppose! Regards, Geert Verhaag
On 2/20/23 16:02, G.C.H.M. Verhaag via ntg-context wrote:
[...] Found out that the following does work with the *\placeinitial* command:
*\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default sa 4]*
So something weird is happening I suppose!
Hi Geert, if you only provide commands, it is really hard to tell what is going on. Please, always provide complete samples (otherwise, most of the help is figuring out what the issue is really about). Best, Pablo
On Mon, 20 Feb 2023 16:02:30 +0100
"G.C.H.M. Verhaag via ntg-context"
Hi,
Yes Hraban it works outside in normal text flow. When I do e.g. *{\InitialCapFont test in normal text flow}* the text '/test in normal text flow/' is rendered correctly in the Antykwa-Poltawskiego font.
Found out that the following does work with the *\placeinitial* command:
*\setupinitial[color=MyColor,distance=6pt,n=3,font=name:antpoltcondregular*default sa 4]*
So something weird is happening I suppose!
Regards, Geert Verhaag
I use: \setupinitial [font=Normal cp \measure{initial:n}] Alan
On 2/20/23 15:30, G.C.H.M. Verhaag via ntg-context wrote:
Hi,
Yes Hraban that worked! Thanks!
My next issue is adapting the font-family, because a want to use the *Antykwa-Poltawskiego* font|| as my initial. I tried the following:
*\definefont[InitialCapFont][name:antpoltcondregular*default sa 4]* *\setupinitial[color=MyColor,distance=6pt,n=3,font=InitialCapFont]*
Has anybody any idea why this doesn't work?
Hi Geert, this works for me: \definefont[InitialCapFont][name:antpoltcondregular*default sa 4] %\setupinitial[style={\switchtobodyfont[helvetica]}] \setupinitial[color=red,distance=6pt,n=3, style=\InitialCapFont] \starttext \setinitial\input zapf \stoptext BTW, I think there is an issue (that might be a bug), when either style or font are in use, size is not automatically adapted. Could anyone confirm with the commented line? Many thanks for your help, Pablo
Hi all, Alan, Pablo, many thanks for your help concerning the \placeinitial command. Next time I'll try a minimal example so that anyone might be able to quickly test it with their current ConTeXt installation! Sorry for any inconvenience! Regards, Geert Verhaag
participants (5)
-
Alan Braslau
-
G.C.H.M. Verhaag
-
Henning Hraban Ramm
-
Keith McKay
-
Pablo Rodriguez