ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Problem with context --extra=select
@ 2024-09-21 11:30 Michael Guravage
  2024-09-21 13:43 ` [NTG-context] " Pablo Rodriguez via ntg-context
  2024-09-21 14:00 ` Wolfgang Schuster
  0 siblings, 2 replies; 3+ messages in thread
From: Michael Guravage @ 2024-09-21 11:30 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 432 bytes --]

Greetings,

Regardless of the selection criteria, the select tool selects only the
first page. This feature works in my ConTeXt versions from 2024.05.17 and
2024.08.13. I'm running the latest version, i.e. 2024.09.17.

context --extra=select --selection=11:16 forexample.pdf

I've attached the output in a log file if anyone's interested.

Any suggestions?

-- 
With kind regards,

Michael Guravage


<http://literatesolutions.com>

[-- Attachment #1.2: Type: text/html, Size: 829 bytes --]

[-- Attachment #2: select-log.txt --]
[-- Type: text/plain, Size: 10492 bytes --]

context --extra=select --selection=11:12 forexample.pdf
mtx-context     | processing extra: /opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex

resolvers       | formats | executing runner 'run luametatex format': /opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="mtx-context-select" --socket --shell-escape --fmt=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui /opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex --c:currentrun=1 --c:extra="select" --c:files="forexample.pdf" --c:fulljobname="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex" --c:input="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:purgeall --c:result="context-extra" --c:selection="11:12" --c:texmfbinpath="/opt/lmtx/tex/texmf-linux-64/bin"
open source     > level 1, order 1, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
system          >
system          > ConTeXt  ver: 2024.09.17 13:15 LMTX  fmt: 2024.9.18  int: english/english
system          >
system          > 'cont-new.mkxl' loaded
open source     > level 2, order 2, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > files > jobname '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select', input '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex', result 'context-extra'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'mtx-context-common.tex'
close source    > level 2, order 3, name 'mtx-context-common.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern rm 12pt' is loaded
select          > forexample.pdf
graphics        > compactors > registered: preset : default | demo | merge | tikz | yes
graphics        > compactors > using: preset : default
pages           > flushing realpage 1, userpage 1, subpage 1
pages           > flushing realpage 2, userpage 2, subpage 2
close source    > level 1, order 3, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
backend         > xmp > using file '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable: '/home/michael/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
mkiv lua stats  > resource resolver: loadtime 0.004 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 15 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 525 modules (0.150 sec), 106 tables (0.008 sec), 631 chunks (0.158 sec)
mkiv lua stats  > traced context: maxstack: 1790, freed: 0, unreachable: 1790
mkiv lua stats  > cleaned up reserved nodes: 74 nodes, 8 lists of 438
mkiv lua stats  > node memory usage: 18 attribute, 2 glue, 132 gluespec, 1 hlist, 1 kern, 655 mathspec, 3 penalty, 5 specification, 2 temp
mkiv lua stats  > node list callback tasks: 16 unique task lists, 9 instances (re)created, 76 calls
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: file: 204, saved: 297, direct: 9, function: 712, value: 436, message: 0, bytecode: 631, late 0, total: 2289 (0 per page)
mkiv lua stats  > randomizer: initialized with value 0.1779564263647
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 3 files: latinmodernmath-companion.otf, latinmodern-math.otf, lmroman10-regular.otf
mkiv lua stats  > font engine: otf 3.144, afm 1.541, tfm 1.000, 13 instances, 8 shared in backend, 4 common vectors, 4 common hashes, load time 0.168 seconds
mkiv lua stats  > math tweaking time: 0.067 seconds, 18 math goodie tables
mkiv lua stats  > graphics processing time: 0.006 seconds including tex, 3 processed images, 1 unique asked, 0 bad names
mkiv lua stats  > pdf compacting: 0.000 seconds for 1 inclusions
mkiv lua stats  > result saved in file: context-extra.pdf, compresslevel 1, objectcompresslevel 3, 11 streams, 7 uncompressed, 1 compressed, 3 not compressed, threshold 40
mkiv lua stats  > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.11.05, functionality level: 20240916, format id: 708, compiler: gcc
mkiv lua stats  > tex properties: 807109 hash slots used of 2097152, 52259 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.5, used memory: 60 MB, ctx: 58 MB, max: 58 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.399 seconds, 2 processed pages, 2 shipped pages, 5.009 pages/second

resolvers       | formats | executing runner 'run luametatex format': /opt/lmtx/tex/texmf-linux-64/bin/luametatex --jobname="mtx-context-select" --socket --shell-escape --fmt=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/opt/lmtx/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui /opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex --c:currentrun=2 --c:extra="select" --c:files="forexample.pdf" --c:fulljobname="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex" --c:input="/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex" --c:kindofrun=2 --c:maxnofruns=9 --c:purgeall --c:result="context-extra" --c:selection="11:12" --c:texmfbinpath="/opt/lmtx/tex/texmf-linux-64/bin"
open source     > level 1, order 1, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
system          >
system          > ConTeXt  ver: 2024.09.17 13:15 LMTX  fmt: 2024.9.18  int: english/english
system          >
system          > 'cont-new.mkxl' loaded
open source     > level 2, order 2, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system          > files > jobname '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select', input '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex', result 'context-extra'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'mtx-context-common.tex'
close source    > level 2, order 3, name 'mtx-context-common.tex'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern rm 12pt' is loaded
select          > forexample.pdf
graphics        > compactors > registered: preset : default | demo | merge | tikz | yes
graphics        > compactors > using: preset : default
pages           > flushing realpage 1, userpage 1, subpage 1
pages           > flushing realpage 2, userpage 2, subpage 2
close source    > level 1, order 3, name '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/mtx-context-select.tex'
backend         > xmp > using file '/opt/lmtx/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable: '/home/michael/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e'
mkiv lua stats  > resource resolver: loadtime 0.003 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 15 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 525 modules (0.148 sec), 106 tables (0.009 sec), 631 chunks (0.157 sec)
mkiv lua stats  > traced context: maxstack: 1790, freed: 0, unreachable: 1790
mkiv lua stats  > cleaned up reserved nodes: 74 nodes, 8 lists of 438
mkiv lua stats  > node memory usage: 18 attribute, 2 glue, 132 gluespec, 1 hlist, 1 kern, 655 mathspec, 3 penalty, 5 specification, 2 temp
mkiv lua stats  > node list callback tasks: 16 unique task lists, 9 instances (re)created, 76 calls
mkiv lua stats  > used backend: pdf
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: file: 204, saved: 297, direct: 9, function: 712, value: 436, message: 0, bytecode: 631, late 0, total: 2289 (1145 per page)
mkiv lua stats  > randomizer: resumed with value 0.1779564263647
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 3 files: latinmodernmath-companion.otf, latinmodern-math.otf, lmroman10-regular.otf
mkiv lua stats  > font engine: otf 3.144, afm 1.541, tfm 1.000, 13 instances, 8 shared in backend, 4 common vectors, 4 common hashes, load time 0.168 seconds
mkiv lua stats  > math tweaking time: 0.066 seconds, 18 math goodie tables
mkiv lua stats  > graphics processing time: 0.006 seconds including tex, 3 processed images, 1 unique asked, 0 bad names
mkiv lua stats  > pdf compacting: 0.000 seconds for 1 inclusions
mkiv lua stats  > result saved in file: context-extra.pdf, compresslevel 1, objectcompresslevel 3, 11 streams, 7 uncompressed, 1 compressed, 3 not compressed, threshold 40
mkiv lua stats  > positions: 4 collected, 0 deltas, 0 shared partials, 0 partial entries
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: texmf-linux-64
mkiv lua stats  > used engine: luametatex version: 2.11.05, functionality level: 20240916, format id: 708, compiler: gcc
mkiv lua stats  > tex properties: 807109 hash slots used of 2097152, 52258 control sequences, approximate memory usage: 49 MB
mkiv lua stats  > lua properties: engine: lua 5.5, used memory: 60 MB, ctx: 58 MB, max: 58 MB, symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.392 seconds, 2 processed pages, 2 shipped pages, 5.108 pages/second
mtx-context     | purged files: mtx-context-select.log, mtx-context-select.tuc
mtx-context     | result renamed to: context-extra

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Problem with context --extra=select
  2024-09-21 11:30 [NTG-context] Problem with context --extra=select Michael Guravage
@ 2024-09-21 13:43 ` Pablo Rodriguez via ntg-context
  2024-09-21 14:00 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2024-09-21 13:43 UTC (permalink / raw)
  To: ntg-context; +Cc: Pablo Rodriguez

On 9/21/24 13:30, Michael Guravage wrote:
> [...]
> context --extra=select --selection=11:16 forexample.pdf

Hi Michael,

it works with --luatex.

A probably related issue might be
https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/QD6M5BSJW32D2J52ON25Y32FROKTEVAH/.

That being said, mutools from MuPDF (invoked as "mutools merge -o
output.pdf sample.pdf 11:16") only needs less that 5ms for a job that
takes about 2s with ConTeXt.

Just in case it might help,

Pablo
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [NTG-context] Re: Problem with context --extra=select
  2024-09-21 11:30 [NTG-context] Problem with context --extra=select Michael Guravage
  2024-09-21 13:43 ` [NTG-context] " Pablo Rodriguez via ntg-context
@ 2024-09-21 14:00 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2024-09-21 14:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1996 bytes --]

Am Sa., 21. Sept. 2024 um 13:31 Uhr schrieb Michael Guravage <
guravage@literatesolutions.com>:

> Greetings,
>
> Regardless of the selection criteria, the select tool selects only the
> first page. This feature works in my ConTeXt versions from 2024.05.17 and
> 2024.08.13. I'm running the latest version, i.e. 2024.09.17.
>
> context --extra=select --selection=11:16 forexample.pdf
>
> I've attached the output in a log file if anyone's interested.
>
> Any suggestions?
>


You have to patch syst-aux.mkxl (or wait for a new release by Hans).

1. Add \number in front of \numexpr.

2. Change "+\plusone" at the end to "-\plusone".

\def\syst_helpers_with_range_slice#1%

{\splitstring#1\at:\to\m_syst_helpers_range_from\and\m_syst_helpers_range_to
   \ifx\m_syst_helpers_range_from\wildcardsymbol
     \edef\m_syst_helpers_range_from{\number\c_helpers_range_min}%
   \fi
   \ifx\m_syst_helpers_range_to\wildcardsymbol
     \edef\m_syst_helpers_range_to{\number\c_helpers_range_max}%
   \fi
   \ifempty\m_syst_helpers_range_to
     \let\m_syst_helpers_range_to\m_syst_helpers_range_from
   \fi
   \ifnum\m_syst_helpers_range_from<\zerocount
     \dostepwiserecurse
       \m_syst_helpers_range_from
       \m_syst_helpers_range_to

 {\ifnum\m_syst_helpers_range_from>\m_syst_helpers_range_to\minusone\else\plusone\fi}
       {%(\the\numexpr\c_helpers_range_abs_max+##1+\plusone\relax)
-
\m_helpers_range_action{\numexpr\c_helpers_range_abs_max+##1+\plusone\relax}}%
+
\m_helpers_range_action{\number\numexpr\c_helpers_range_abs_max+##1+\plusone\relax}}%
   \else
     \dostepwiserecurse
       \m_syst_helpers_range_from
       \m_syst_helpers_range_to

 {\ifnum\m_syst_helpers_range_from>\m_syst_helpers_range_to\minusone\else\plusone\fi}
       {%(\the\numexpr\c_helpers_range_abs_min+##1-\plusone\relax)
-
\m_helpers_range_action{\numexpr\c_helpers_range_abs_min+##1+\plusone\relax}}%
+
\m_helpers_range_action{\number\numexpr\c_helpers_range_abs_min+##1-\plusone\relax}}%
   \fi}%

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2777 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-21 14:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-21 11:30 [NTG-context] Problem with context --extra=select Michael Guravage
2024-09-21 13:43 ` [NTG-context] " Pablo Rodriguez via ntg-context
2024-09-21 14:00 ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).