[NTG-context] Re: How to input first n lines from file?

2023-12-16 Thread Henning Hraban Ramm

Am 16.12.23 um 22:30 schrieb Joel via ntg-context:
With the command `\input file`, I can input the entire contents of 
`file.tex`. Is there a way to limit it to the first n lines, for 
instance, something like `\input[10]` file would only input the first 10 
lines from `file.tex` and ignore the rest of the lines.


With \typebuffer you can define a "range", see 
https://wiki.contextgarden.net/Command/typebuffer


But I guess you should write a Lua function that suits your use case.

Hraban

___
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
___


[NTG-context] Re: APA 7 and https

2023-12-16 Thread Alan Braslau via ntg-context
A "better" solution is to put

doi = {https://doi.org/__doi__},

in your bibtex database

but I would actually use

url = {https://doi.org/__doi__},

Not all editors want the complete url for the doi, but some do.
The current scheme lets the user define url= and doi= as they wish (and
even both) and does not impose a particular format.

Alan



On Fri, 15 Dec 2023 22:07:25 -
rauricast...@gmail.com wrote:

> Hi
> 
> I found a solution to reach APA7 list and links.
> 
> Using
> $PATH/ConTeXtPATH/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi
> in line 1306-1312,  where \starttexdefinition mutable protected
> btx:apa:doi \texdefinition {btx:format:goto} {
> url(https://doi.org/\btxflush{doi})
> } {
>\hyphenatedurl{https://\btxflush{doi}}
> }
> \stoptexdefinition
> 
> Change:
> url(http://dx.doi.org/\btxflush{doi}) to
> url(https://doi.org/\btxflush{doi}) and 
> \hyphenatedurl{doi:\btxflush{doi}} to
> \hyphenatedurl{https://\btxflush{doi}}. 
> 
> With this two changes the correct format in the list of publications
> is shown according apa7 and as well https links instead of http links
> will be generated, which is also needed in apa7. Not all apa7
> definitions are yet reach with this changes, but its a small step
> towards.
> 
> Merry Christmas.
> 
> Oliver
___
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
___


[NTG-context] How to input first n lines from file?

2023-12-16 Thread Joel via ntg-context
With the command `\input file`, I can input the entire contents of `file.tex`. 
Is there a way to limit it to the first n lines, for instance, something like 
`\input[10]` file would only input the first 10 lines from `file.tex` and 
ignore the rest of the lines.
--Joel
___
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
___


[NTG-context] Re: error with definestartstop and startmode

2023-12-16 Thread Hans Hagen via ntg-context

On 12/16/2023 9:17 AM, Peter Münster wrote:

Hi,

I get an "runaway error" with the following example:

--8<---cut here---start->8---
\definestartstop[H][color=blue, before={\startmode[h]}, after={\stopmode}]
\starttext
test
\startH
   TEST
\stopH
\stoptext
--8<---cut here---end--->8---

How could I create such start-stop pair please?

doesn't work because \stopmode is a delimiter when shipped

\usemodule[abbreviations-logos]

\defineblock [H] [before=\startcolor[blue],after=\stopcolor]
\keepblocks[H]

\starttext
test

\beginH
   TEST
\endH

test
\stoptext


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
___


[NTG-context] error with definestartstop and startmode

2023-12-16 Thread Peter Münster
Hi,

I get an "runaway error" with the following example:

--8<---cut here---start->8---
\definestartstop[H][color=blue, before={\startmode[h]}, after={\stopmode}]
\starttext
test
\startH
  TEST
\stopH
\stoptext
--8<---cut here---end--->8---

How could I create such start-stop pair please?

TIA for any hints,
-- 
   Peter
___
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
___