Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Rik Kabel via ntg-context


On 2022-03-20 17:07, Wolfgang Schuster via ntg-context wrote:

Bruce Horrocks via ntg-context schrieb am 20.03.2022 um 21:10:
I'm editing a book that will be printed, however the authors have 
included URLs which will no doubt suffer from "bit rot" in no time at 
all. I think it will make the main text cleaner if I use endnotes 
rather than include the URL in-line in the text or as a (distracting) 
footnote. So when the author writes "See my video at URL>" I will print "See my video at link 1". At the back of the book, 
in an appendix somewhere, I then use \placenotes to display a table 
of the actual URLs for any readers that want to type them in.


I want the "link 1" bit to be normal text rather than superscript so 
it's more visible. Using the \setupnote[textstyle=...] command I can 
change the style of the number but not the superscript placing.


Is there a way to remove the superscript placing, please?


\starttext

First\footnote{Footnote one}

\setupnote[footnote][textcommand=]

First\footnote{Footnote two}

\stoptext

Wolfgang

You might want to define a separate set of notes, for example, 
linknotes, defined as Wolfgang suggests, so


   \setupnote[linknote][textcommand=]

so that they are a separate sequence. These would be used exclusively 
for the url links you describe and regular footnotes would continue to 
be superscript (or however else you choose to treat them). You can 
define multiple streams of footnotes and endnotes.


--
Rik
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Wolfgang Schuster via ntg-context

Bruce Horrocks via ntg-context schrieb am 20.03.2022 um 21:10:

I'm editing a book that will be printed, however the authors have included URLs which will no doubt suffer from 
"bit rot" in no time at all. I think it will make the main text cleaner if I use endnotes rather than 
include the URL in-line in the text or as a (distracting) footnote. So when the author writes "See my video at 
" I will print "See my video at link 1". At the back of the book, in an 
appendix somewhere, I then use \placenotes to display a table of the actual URLs for any readers that want to type 
them in.

I want the "link 1" bit to be normal text rather than superscript so it's more 
visible. Using the \setupnote[textstyle=...] command I can change the style of the number 
but not the superscript placing.

Is there a way to remove the superscript placing, please?


\starttext

First\footnote{Footnote one}

\setupnote[footnote][textcommand=]

First\footnote{Footnote two}

\stoptext

Wolfgang
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread jbf via ntg-context
Bruce, I suppose one way to achieve your aim, if there is no easy way to 
prevent superscript, would be to put your reference in parentheses: (See 
my video at link 1), followed by the normal superscript number for 
footnote anchors. You can still go with the endnotes.


The other thing, and I know this because I am often having to deal with 
long URLs, is to remember to use \hyphenatedurl{}, and you can determine 
separately where the breaks occur if the default is not to your liking.


I know it is not quite what you were looking for, but it would be a 
simple solution and not to distracting.


Julian

On 21/3/22 07:10, Bruce Horrocks via ntg-context wrote:

I'm editing a book that will be printed, however the authors have included URLs which will no doubt suffer from 
"bit rot" in no time at all. I think it will make the main text cleaner if I use endnotes rather than 
include the URL in-line in the text or as a (distracting) footnote. So when the author writes "See my video at 
" I will print "See my video at link 1". At the back of the book, in an 
appendix somewhere, I then use \placenotes to display a table of the actual URLs for any readers that want to type 
them in.

I want the "link 1" bit to be normal text rather than superscript so it's more 
visible. Using the \setupnote[textstyle=...] command I can change the style of the number 
but not the superscript placing.

Is there a way to remove the superscript placing, please?

Alternative solutions welcome: the URLs printed in the book will be mirrored on 
a web page associated with the book for as long as possible so that content 
that vanishes over time can be replaced with Internet Archive links as they are 
discovered. However the order of the book isn't finalised yet so I'd like the 
numbering to be sequential regardless of whether I move a chapter around later 
on. This is partly the reason for using \endnote because I can use a reference 
elsewhere in the text if necessary.

Thanks in advance.
—
Bruce Horrocks
Hampshire, UK

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Make footnote/endnote number not superscript?

2022-03-20 Thread Bruce Horrocks via ntg-context
I'm editing a book that will be printed, however the authors have included URLs 
which will no doubt suffer from "bit rot" in no time at all. I think it will 
make the main text cleaner if I use endnotes rather than include the URL 
in-line in the text or as a (distracting) footnote. So when the author writes 
"See my video at " I will print "See my video at link 1". At 
the back of the book, in an appendix somewhere, I then use \placenotes to 
display a table of the actual URLs for any readers that want to type them in. 

I want the "link 1" bit to be normal text rather than superscript so it's more 
visible. Using the \setupnote[textstyle=...] command I can change the style of 
the number but not the superscript placing.

Is there a way to remove the superscript placing, please?

Alternative solutions welcome: the URLs printed in the book will be mirrored on 
a web page associated with the book for as long as possible so that content 
that vanishes over time can be replaced with Internet Archive links as they are 
discovered. However the order of the book isn't finalised yet so I'd like the 
numbering to be sequential regardless of whether I move a chapter around later 
on. This is partly the reason for using \endnote because I can use a reference 
elsewhere in the text if necessary.

Thanks in advance.
—
Bruce Horrocks
Hampshire, UK

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 20.03.2022 um 17:05:

Hoi Wolfgang,

I tested both variants (bodymatter and bodypart. The compilation runs through, 
however without the thumb-picture in the margin and the metafun error is in the 
log.


1. Do you use \startfrontmatter and \startbodymatter in your document to 
create blocks?


2. Is you installation up-to-date?

Attached is a slightly modified version of your example, the only thing 
which has to be local to the bodypart is the background setting to 
enable the thumb pictures.


Wolfgang

\definecolor [chap_frame] [black]
\definecolor [textcolor]  [white]

\startuseMPgraphic{chapter-thumb}
path chap_frame ;
pair pos,a,b ;
picture Chap ;

if \somenamedheadnumber{chapter}{current} > 0 :
curr_chap := \somenamedheadnumber{chapter}{current} ;
else :
curr_chap := 1 ;
fi;
if \somenamedheadnumber{chapter}{last} > 0 :
last_chap := \somenamedheadnumber{chapter}{last} ;
else :
last_chap := 1 ;
fi;
if \somenamedheadnumber{section}{current} > 0 :
curr_sect := \somenamedheadnumber{section}{current} ;
else:
curr_sect := 1 ;
fi;
if \somenamedheadnumber{section}{last} > 0 :
last_sect := \somenamedheadnumber{section}{last} ;
else:
last_sect := 1;
fi;
if curr_chap < 11 :
skip := TextHeight * (curr_chap-1)/11 ;
elseif curr_chap < 21 :
skip := TextHeight * (curr_chap-11)/11 ;
else:
skip := TextHeight * (curr_chap-21)/11 ;
fi;

Chap := textext("\bfa\textcolor\getmarking[chapter]") ;

StartPage ;
chap_frame := lcircle xscaled (2*RightMarginWidth) yscaled 
(1.5*RightMarginWidth) ;

a := ulcorner chap_frame ;
b := urcorner chap_frame ;

pos := urcorner Field[Text][RightMarginSeparator] - ulcorner chap_frame 
- (-1mm,skip) ;

fill chap_frame shifted pos withcolor "chap_frame" ;
draw Chap rotated 90 shifted (xpart pos-4mm,ypart pos) ;
StopPage ;
\stopuseMPgraphic

\defineoverlay[chapter-thumb][\useMPgraphic{chapter-thumb}]

\startsectionblockenvironment[bodypart]
\setupbackgrounds[rightpage][background=chapter-thumb]
\stopsectionblockenvironment

\showframe

\starttext

\startfrontmatter

\startchapter[title=Test A]
\samplefile{ward}
\stopchapter

\stopfrontmatter

\startbodymatter

\startchapter[title=Test C]
\samplefile{ward}
\stopchapter

\stopbodymatter

\stoptext























% Global settings for all chapters
\setuphead[chapter][style=\ssc]

% Local settings for chapter in the bodymatter block
\startsectionblockenvironment[bodypart]
\setuphead[chapter][color=blue]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext





\starttext

a\texttilde b\lettertilde c\textasciitilde d

\stoptext




\definepageinjectionalternative
  [chapter:image]
  [renderingsetup=pageinjection:chapter:image]

\startsetups [pageinjection:chapter:image]
  \centerbox{\externalfigure[\dummyparameter{name}]}
\stopsetups

\definepageinjection
  [chapter:start]
  [empty]
  [page=left]

\definepageinjection
  [chapter:insert]
  [previouspage]
  [alternative=chapter:image,
   offset=1cm,
   pagestate=stop]

\setuphead
  [chapter]
  [beforesection={\pageinjection[chapter:start]},
   
insidesection={\pageinjection[chapter:insert][name={chapter-\namedheadnumber{chapter}}]}]

\setuppagenumbering
  [alternative=doublesided]

\setupexternalfigures
  [location=default]

\useexternalfigure [chapter-1] [mill]   [factor=max]
\useexternalfigure [chapter-2] [hacker] [orientation=90,scale=2000]
\useexternalfigure [chapter-3] [cow][orientation=90,height=\framedwidth]

\starttext

\startchapter [title={Mill}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\startchapter [title={Hacker}]
\dorecurse{11}{\samplefile{lorem}}
\stopchapter

\startchapter [title={cow}]
\dorecurse{7}{\samplefile{lorem}}
\stopchapter

\stoptext




\setupbodyfont[termes]

\starttext

plays \m{\frac{2}{3} A}, \m{\frac{1}{3} D}.

\stoptext






\definefallbackfamily[story][serif][notoserif][range={greekandcoptic,greekextended},force=yes]
\definefontfamily[story][serif][TeX Gyre Schola]

\definefontfamily [story] [sans] [Latin Modern Sans]
\definefontfamily [story] [mono] [Latin Modern Mono] [features=none]

\definetypeface [story] [ss] [sans] [modern] [default]
\definetypeface [story] [ss] [mono] [modern] [default]

\definetypeface [story] [ss] [sans] [modern-designsize] [default]
\definetypeface [story] [ss] [mono] [modern-designsize] [default]

\definefontfamily[story][mm][TeX Gyre Pagella Math]

\definetypeface [story] [mm] [math] [pagella] [default]

\setupbodyfont[story,11pt]

\usebodyfont[termes]

\showframe

\startsetups [blockquote:style]
\switchtobodyfont[termes]
\setupwhitespace[2pt]
\stopsetups


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang,

I tested both variants (bodymatter and bodypart. The compilation runs through, 
however without the thumb-picture in the margin and the metafun error is in the 
log.

Gruß!
Willi

> On 20 Mar 2022, at 17:00, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> Willi Egger via ntg-context schrieb am 20.03.2022 um 16:53:
>> Hoi Wolfgang!
>> 
>> thank you for your suggestion. Your example indeed works. However if I apply 
>> this to my situation, which is
>> 
>> \startsectionblockenvironment[bodymatter]
> 
> You use the wrong name for the argument:
> 
> \startsectionblockenvironment[bodypart]
> 
> Wolfgang
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 20.03.2022 um 16:53:

Hoi Wolfgang!

thank you for your suggestion. Your example indeed works. However if I apply 
this to my situation, which is

\startsectionblockenvironment[bodymatter]


You use the wrong name for the argument:

\startsectionblockenvironment[bodypart]

Wolfgang

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hoi Wolfgang!

thank you for your suggestion. Your example indeed works. However if I apply 
this to my situation, which is

\startsectionblockenvironment[bodymatter]
\setups{Thumb-pictures}
\stopsectionblockenvironment

nothing happens. I.e. I get no error, but also no picture, indicating, that the 
\setups command is not executed..

Kind regards

Willi

> On 20 Mar 2022, at 11:28, Wolfgang Schuster via ntg-context 
>  wrote:
> 
> Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42:
>> Hello Otared,
>> thanks so much for your testing and comments. — Tthe problem is, that this 
>> thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
>> sections. In the case of this book however there are the title pages and 
>> quite some text including the TOC in the 
>> \startfrontmatter..\stopfrontmatter. SO I end up with being forced to invoke 
>> the setups at the beginning of the bodymatter.
> 
> Use sectionblockenvironment to set value which are only applied in the 
> frontmatter, bodymatter etc.
> 
>  begin example
> % Global settings for all chapters
> \setuphead[chapter][style=\ssc]
> 
> % Local settings for chapter in the bodymatter block
> \startsectionblockenvironment[bodypart]
> \setuphead[chapter][color=blue]
> \stopsectionblockenvironment
> 
> \starttext
> 
> \startfrontmatter
> 
> \title{Table of content}
> 
> \placecontent
> 
> \stopfrontmatter
> 
> \startbodymatter
> 
> \chapter{Knuth}
> 
> \input knuth
> 
> \chapter{Zapf}
> 
> \input zapf
> 
> \stopbodymatter
> 
> \stoptext
>  end example
> 
> Wolfgang
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Willi Egger via ntg-context
Hi Otared,

thank you for your help. — I tried your approach aswel on my Mac as also on 
Linux. Unfortunately neither installation did give me a positive result. The 
error remains.

Kind regards

Willi

> On 19 Mar 2022, at 23:39, Otared Kavian via ntg-context  
> wrote:
> 
> Hi Willi,
> 
> How about invoking the command \setups{Thumb-pictures} between a \start \stop 
> pair as in the following:
> 
> \showframe
> 
> \starttext
> 
> \startfrontmatter
> \startchapter[title=Test A]
>   \samplefile{knuth}
> \stopchapter
> 
> \stopfrontmatter
> 
> %\page[yes]
> 
> \start
> \setups{Thumb-pictures}
> 
> \startbodymatter
> \startchapter[title=Test B]
>   \samplefile{ward}
> \stopchapter
> 
> \startchapter[title=Test C]
>   \samplefile{ward}
> \stopchapter
> 
> \startchapter[title=Test D]
>   \samplefile{ward}
> \stopchapter
> 
> 
> \stopbodymatter
> \stop
> 
> \startbackmatter
> \dorecurse{5}{\startchapter[title=Test #1]
>   \samplefile{thuan}
>   \stopchapter}
>   
> \stopbackmatter
> 
> \stoptext
>   
> 
>> On 19 Mar 2022, at 21:42, Willi Egger via ntg-context  
>> wrote:
>> 
>> Hello Otared,
>> 
>> thanks so much for your testing and comments. — Tthe problem is, that this 
>> thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
>> sections. In the case of this book however there are the title pages and 
>> quite some text including the TOC in the 
>> \startfrontmatter..\stopfrontmatter. SO I end up with being forced to invoke 
>> the setups at the beginning of the bodymatter.
>> 
>> Thanks!
>> Kind regards
>> 
>> Willi
>> 
>>> On 19 Mar 2022, at 16:52, Otared Kavian via ntg-context 
>>>  wrote:
>>> 
>>> Hi Willi,
>>> 
>>> Your test file works fine if I place 
>>> \setups{Thumb-pictures}
>>> before \starttext (using version 2022.03.12 17:56 LMTX).
>>> However in the file you sent the choice of the command
>>> \setups{Thumb-pictures}
>>> is between chapter A and B, which seems starnge to me...
>>> 
>>> Best regards: Otared K.
>>> 
 On 18 Mar 2022, at 20:29, Willi Egger via ntg-context  
 wrote:
 
 Good evening!
 
 I have a dictionary where I would like to include thumb-pictures in the 
 margin. — When I use the attached code with a single 
 \startchapter...\stopchapter, it works. However if I add another 
 \startchapter…\stopchapter before loading the setups for the thumb-picture 
 metafun throws an error about not having complete information for 
 performing a transformation.
 
 I am currently using the before last version of LMTX-ConTeXT (January 21st 
 2022).
 
 Could someone try to compile?
 
 Thanks, kind regards
 
 Willi___
 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://context.aanhet.net
 archive  : https://bitbucket.org/phg/context-mirror/commits/
 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://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> 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://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
If your question is of interest to others as well, please add an entry 

Re: [NTG-context] Metafun, difficulty with graphical element in the margin

2022-03-20 Thread Wolfgang Schuster via ntg-context

Willi Egger via ntg-context schrieb am 19.03.2022 um 21:42:

Hello Otared,

thanks so much for your testing and comments. — Tthe problem is, that this 
thumb-picture should only be placed in the \startboydmatter..\stopbodymatter 
sections. In the case of this book however there are the title pages and quite 
some text including the TOC in the \startfrontmatter..\stopfrontmatter. SO I 
end up with being forced to invoke the setups at the beginning of the 
bodymatter.


Use sectionblockenvironment to set value which are only applied in the 
frontmatter, bodymatter etc.


 begin example
% Global settings for all chapters
\setuphead[chapter][style=\ssc]

% Local settings for chapter in the bodymatter block
\startsectionblockenvironment[bodypart]
\setuphead[chapter][color=blue]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\title{Table of content}

\placecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\input knuth

\chapter{Zapf}

\input zapf

\stopbodymatter

\stoptext
 end example

Wolfgang
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___