Scale notation base on current font
Hi all, There's a problem when I want to define the note so that it's displayed according to the size and font of the text: this MWE change the notation size: \definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand=\tfb \raise 0.2ex\hbox, ] \starttext hello \Mynote{refrence} \placenotes[Mynote] \stoptext but i cannot set it for \tfxx. also it's relative to my main body font, and my current font and color doesn't apply to text. for example if my current text has color red with another font the note doesn't change according to it, and will display identical everywhere. And when I try to define it like this MWE: \definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox, ] \starttext hello \Mynote{refrence} \placenotes[Mynote] \stoptext it doesn't work. how i should define such notes?
On 6/8/24 13:16, seyal.zavira@gmail.com wrote:
Hi all,
There's a problem when I want to define the note so that it's displayed according to the size and font of the text:
Not sure I’m getting your point. But this should show a difference in font size: \definenote[Mynote] \starttext \color[green]{\tfd hello \Mynote{refrence} not really required} \switchtobodyfont[36pt] \color[green]{hello \Mynote{refrence} not really required} \stoptext
but i cannot set it for \tfxx. also it's relative to my main body font, and my current font andI color doesn't apply to text. for example if my current text has color red with another font the note doesn't change according to it, and will display identical everywhere.
Could you show how the second paragraph above doesn‘t inherit both size and color from the current font? Sorry, otherwise I simply don’t get it.
And when I try to define it like this MWE:
\definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox, ]
I don’t think the text command value is right. Besides, if you intend the second paragraph from the sample, this approach looks unnecessarily complex for me. I hope it might help, Pablo
On 08/06/2024 13:16, seyal.zavira@gmail.com wrote:
\definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox, ] \starttext hello \Mynote{refrence} \placenotes[Mynote] \stoptext
add {} this works: \setupnote[Mnote] [location=left, textcommand={\scale[height=0.7ex] \raise 0.2ex\hbox}, ]
Thanks
sorry for incomplete example
the code below shows the problem better:
\setupinteraction[state=start]
\definenote[Mynote][location=text,before={},]
\setupnote[Mynote]
[location=left,
textcommand={\tfa \raise 0.2ex\hbox},
]
\definefont[highfont][name:ibmplexsansbold*default at 10pt]
\definehighlight[newhigh][color=darkblue,style=highfont]
\starttext
\input{knuth} \Mynote{refrence}
\startitemize
\item \newhigh{\input{knuth}\Mynote{refrenceTwo}}
\stopitemize
\placenotes[Mynote]
\stoptext
as you can see the note number has same style all over the document.
but i want it to have style base on current font
and if the font changes, the style should change, while maintaining the
ratio of sizes(i.e., at the half of current font).
i attached the resulted pdf
On Sat, Jun 8, 2024 at 10:04 AM vm via ntg-context
On 08/06/2024 13:16, seyal.zavira@gmail.com wrote:
\definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand= \scale [height=0.7ex] \raise 0.2ex\hbox, ] \starttext hello \Mynote{refrence} \placenotes[Mynote] \stoptext
add {} this works:
\setupnote[Mnote] [location=left, textcommand={\scale[height=0.7ex] \raise 0.2ex\hbox}, ]
___________________________________________________________________________________ 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
___________________________________________________________________________________
seyal zavira schrieb am 08.06.2024 um 17:09:
Thanks
sorry for incomplete example the code below shows the problem better: \setupinteraction[state=start] \definenote[Mynote][location=text,before={},] \setupnote[Mynote] [location=left, textcommand={\tfa \raise 0.2ex\hbox}, ]
\definefont[highfont][name:ibmplexsansbold*default at 10pt] \definehighlight[newhigh][color=darkblue,style=highfont]
\starttext \input{knuth} \Mynote{refrence}
\startitemize \item \newhigh{\input{knuth}\Mynote{refrenceTwo}} \stopitemize
\placenotes[Mynote] \stoptext
as you can see the note number has same style all over the document. but i want it to have style base on current font and if the font changes, the style should change, while maintaining the ratio of sizes(i.e., at the half of current font). i attached the resulted pdf
1. You can use the \offset command to raise the footnote number. 2. Disable the value of the textstyle to ensure you get current style for the footnote number. %%%% begin example \define[1]\MyNoteTextcommand {\offset[y=-0.2ex]{#1}} \definenote [Mynote] \setupnote [Mynote] [location=text, textstyle=, textcommand=\MyNoteTextcommand] \starttext \input{knuth}\Mynote{First note.} \startstyle[style=\ss] \input{knuth}\Mynote{Second note.} \stopstyle \startstyle[style=\tt\bf] \input{knuth}\Mynote{Third note.} \stopstyle \placenotes[Mynote] \stoptext %%%% end example Wolfgang
On 6/8/24 17:09, seyal zavira wrote:
Thanks
sorry for incomplete example the code below shows the problem better: \setupinteraction[state=start]
As for the color, it is caused by \setupinteraction. You can remove it with: \setupinteraction[state=start, style=, color=, contrastcolor=,] This disables default style and color in links (footnote markers are links). I hope it helps, Pablo
participants (5)
-
Pablo Rodriguez
-
seyal zavira
-
seyal.zavira@gmail.com
-
vm
-
Wolfgang Schuster