Re: [NTG-context] Rotating jpeg image gives weird output

2022-06-14 Thread Max Chernoff via ntg-context

Any other ideas? (I tend to think the image is corrupted in one way or the 
other, but I have no clue how to fix that.)


You could try making a new image with the same content. Assuming you're 
on Windows 10/11, install Image Magick


winget install -e --id ImageMagick.ImageMagick

then run

magick convert -strip image.jpg temp.tga
magick convert -strip temp.tga new-image.jpg
del temp.tga

which should give you a new image "new-image.jpg" that shouldn't be 
corrupt. If you are still having problems with this new image, then the 
issue is likely with ConTeXt itself, and this specific image is just 
triggering it somehow.


-- Max
___
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] Custom engine settings in AUCTEX

2022-06-14 Thread fv leung via ntg-context
I changed the value for ConTeXt-Mark-version from "II" to "IV" in
context.el file.
There are more than one such entry.

In the Windows platform, I added the following to the .emacs file:
(load "context.el" nil t t)
(add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode))
(eval-after-load 'tex
'(add-to-list
 'TeX-command-list
 '("LuaMetaTeX"
"C:\\Users\\Leung\\AppData\\Local\\Programs\\ConTeXt\\tex\\texmf-win64\\bin\\mtxrun.exe
--autogenerate --script context --autopdf %t"
   TeX-run-command nil (context-mode) :help "Run LuaMetaTeX")))

Maybe it's similar in the OSX platform.

Jan-Erik Hägglöf via ntg-context  於 2022年6月15日 週三
清晨5:36寫道:

> HI!
>
> I’ve been trying out Doom-Emacs and when I open a ConTeXt file i want the
> engine point to my LMTX installation.
>
> /Users/jan-erikhagglof/context/context-osx-64/tex/texmf-osx-64/bin/ is the
> path to my install on my Macos Monterey.
>
> How can this been customized?
>
> Its a bit confusing reading the AUCTEX manual so maybe someone has a
> working config already?
>
> Thanks in advance
>
> Jan-Erik
>
> ___
> 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] Custom engine settings in AUCTEX

2022-06-14 Thread Jan-Erik Hägglöf via ntg-context
HI!

I’ve been trying out Doom-Emacs and when I open a ConTeXt file i want the 
engine point to my LMTX installation.

/Users/jan-erikhagglof/context/context-osx-64/tex/texmf-osx-64/bin/ is the path 
to my install on my Macos Monterey.

How can this been customized?

Its a bit confusing reading the AUCTEX manual so maybe someone has a working 
config already?

Thanks in advance

Jan-Erik
___
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] lmtx installation paths not working

2022-06-14 Thread Alain Delmotte via ntg-context

  
  
Hello,
I do not understand what you did!
I went to "http://www.pragma-ade.com/install.htm"
downlaoded the 64 bit Microsoft Windows file
"context-win64.zip".
I did create a folder c:\data\context
wher I did put the .zip file and unzipped it.
I got 
  
c:\data\context\bin
  c:\data\context\context-win64.zip
  c:\data\context\install.bat
  c:\data\context\installation.pdf
  c:\data\context\setpath.bat
Double-cliquing the install.bat it did
install all the structure; it took some time to fetch and unzip
texmf.zip and texmf-context.zip. After this doubleclic
setpath.bat ad everything was ok!
Hope this help.
Alain

Le 14/06/2022 à 13:20, Jano Kula via
  ntg-context a écrit :


  
  Hello list,


I cannot make fresh install of lmtx to work. The structure
  after unzipping:

  C:\data\context\bin\beta
  
  C:\data\context\bin\beta\bin
  
  C:\data\context\bin\beta\tex
  
  C:\data\context\bin\beta\tex\texmf
  
  C:\data\context\bin\beta\tex\texmf-cache
  
  C:\data\context\bin\beta\tex\texmf-context

etc.


First compilation of texfile is not working, so mtxrun --generate is the friend.



  C:\data>mtxrun --generate
  
  
  These paths contain probably
  correct path (watch /beta):
  
resolvers       | resolving | variable 'SELFAUTOLOC' set to
'C:/data/context/bin/beta/bin'
resolvers       | resolving | variable 'SELFAUTODIR' set to
'C:/data/context/bin/beta'
resolvers       | resolving | variable 'SELFAUTOPARENT' set
to 'C:/data/context/bin'
resolvers       | resolving | variable 'TEXMFCNF' set to ''
resolvers       | resolving | variable 'TEXMF' set to ''
resolvers       | resolving | variable 'TEXOS' set to 'beta'
resolvers       | resolving |
  
  
  and the paths bellow have no /beta from
  above, they are derived from selfautoparent C:/data/context/bin
(without /beta), so no surprise
  they cannot be found.
  
resolvers       | resolving | using configuration
specification
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers       | resolving |
resolvers       | resolving | looking for regular
'texmfcnf.lua' on given path 'C:/Users/jano/texmf/web2c'
from specification 'home:texmf/web2c'
resolvers       | resolving | looking for regular
'texmfcnf.lua' on given path 'C:/data/context/bin/texmf-local/web2c'
from specification 'selfautoparent:/texmf-local/web2c'
resolvers       | resolving | looking for regular
'texmfcnf.lua' on given path 'C:/data/context/bin/texmf-context/web2c' from
specification 'selfautoparent:/texmf-context/web2c'
resolvers       | resolving | looking for regular
'texmfcnf.lua' on given path 'C:/data/context/bin/texmf-dist/web2c'
from specification 'selfautoparent:/texmf-dist/web2c'
  [... skip ...]
resolvers       | resolving | looking for regular
'texmfcnf.lua' on given path 
resolvers       | resolving |
resolvers       | resolving | warning: no lua configuration
files found
resolvers       | resolving | no texmf paths are defined
(using TEXMF)
resolvers       | resolving |
mtxrun          |
mtxrun          | elapsed lua time: 0.026 seconds

 
Do you have an idea how to fix problem?
I will be thankful for an advice, it is quite urgent
  (everything was working yesterday).


Thank you,
Jano


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

Re: [NTG-context] lmtx installation paths not working

2022-06-14 Thread Aditya Mahajan via ntg-context
On Tue, 14 Jun 2022, Jano Kula via ntg-context wrote:

> Hello list,
> 
> I cannot make fresh install of lmtx to work. The structure after unzipping:
> C:\data\context\bin\beta
> C:\data\context\bin\beta\bin
> C:\data\context\bin\beta\tex
> C:\data\context\bin\beta\tex\texmf
> C:\data\context\bin\beta\tex\texmf-cache
> C:\data\context\bin\beta\tex\texmf-context
> etc.
> 
> First compilation of texfile is not working, so mtxrun --generate is the
> friend.
> 
> C:\data>mtxrun --generate

It appears that you are running the wrong mtxrun. There should be mtxrun in 
C:\data\context\beta\texmf-win64\bin (the texmf-win64 directory might be named 
slightly differently, I haven't used windows in a while). If you add that to 
your path, then mtxrun --generate should work.

Aditya
___
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] lmtx installation paths not working

2022-06-14 Thread Jano Kula via ntg-context
Hello,

I didn't mention the platform: context-setup-win64.

Thank you,
Jano

On Tue, Jun 14, 2022 at 1:20 PM Jano Kula  wrote:

> Hello list,
>
> I cannot make fresh install of lmtx to work. The structure after unzipping:
> C:\data\context\bin\beta
> C:\data\context\bin\beta\bin
> C:\data\context\bin\beta\tex
> C:\data\context\bin\beta\tex\texmf
> C:\data\context\bin\beta\tex\texmf-cache
> C:\data\context\bin\beta\tex\texmf-context
> etc.
>
> First compilation of texfile is not working, so mtxrun --generate is the
> friend.
>
> C:\data>mtxrun --generate
>
> These paths contain probably correct path (watch /beta):
>
> resolvers   | resolving | variable 'SELFAUTOLOC' set to '
> *C:/data/context/bin/beta/bin*'
> resolvers   | resolving | variable 'SELFAUTODIR' set to '
> *C:/data/context/bin/beta*'
> resolvers   | resolving | variable 'SELFAUTOPARENT' set to '
> *C:/data/context/bin*'
> resolvers   | resolving | variable 'TEXMFCNF' set to ''
> resolvers   | resolving | variable 'TEXMF' set to ''
> resolvers   | resolving | variable 'TEXOS' set to 'beta'
> resolvers   | resolving |
>
> and the paths bellow have no */beta* from above, they are derived from
> selfautoparent *C:/data/context/bin *(without /beta), so no surprise they
> cannot be found.
>
> resolvers   | resolving | using configuration specification
> 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
> resolvers   | resolving |
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
> path 'C:/Users/jano/texmf/web2c' from specification 'home:texmf/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
> path *'C:/data/context/bin/texmf-local/web2c*' from specification
> 'selfautoparent:/texmf-local/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
> path '*C:/data/context/bin/texmf-context/web2c'* from specification
> 'selfautoparent:/texmf-context/web2c'
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
> path '*C:/data/context/bin/texmf-dist/web2c*' from specification
> 'selfautoparent:/texmf-dist/web2c'
> [... skip ...]
> resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
> path
> resolvers   | resolving |
> resolvers   | resolving | warning: no lua configuration files found
> resolvers   | resolving | no texmf paths are defined (using TEXMF)
> resolvers   | resolving |
> mtxrun  |
> mtxrun  | elapsed lua time: 0.026 seconds
>
> Do you have an idea how to fix problem?
> I will be thankful for an advice, it is quite urgent (everything was
> working yesterday).
>
> Thank you,
> Jano
>
>
___
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] lmtx installation paths not working

2022-06-14 Thread Jano Kula via ntg-context
Hello list,

I cannot make fresh install of lmtx to work. The structure after unzipping:
C:\data\context\bin\beta
C:\data\context\bin\beta\bin
C:\data\context\bin\beta\tex
C:\data\context\bin\beta\tex\texmf
C:\data\context\bin\beta\tex\texmf-cache
C:\data\context\bin\beta\tex\texmf-context
etc.

First compilation of texfile is not working, so mtxrun --generate is the
friend.

C:\data>mtxrun --generate

These paths contain probably correct path (watch /beta):

resolvers   | resolving | variable 'SELFAUTOLOC' set to '
*C:/data/context/bin/beta/bin*'
resolvers   | resolving | variable 'SELFAUTODIR' set to '
*C:/data/context/bin/beta*'
resolvers   | resolving | variable 'SELFAUTOPARENT' set to '
*C:/data/context/bin*'
resolvers   | resolving | variable 'TEXMFCNF' set to ''
resolvers   | resolving | variable 'TEXMF' set to ''
resolvers   | resolving | variable 'TEXOS' set to 'beta'
resolvers   | resolving |

and the paths bellow have no */beta* from above, they are derived from
selfautoparent *C:/data/context/bin *(without /beta), so no surprise they
cannot be found.

resolvers   | resolving | using configuration specification
'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c'
resolvers   | resolving |
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
path 'C:/Users/jano/texmf/web2c' from specification 'home:texmf/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
path *'C:/data/context/bin/texmf-local/web2c*' from specification
'selfautoparent:/texmf-local/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
path '*C:/data/context/bin/texmf-context/web2c'* from specification
'selfautoparent:/texmf-context/web2c'
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
path '*C:/data/context/bin/texmf-dist/web2c*' from specification
'selfautoparent:/texmf-dist/web2c'
[... skip ...]
resolvers   | resolving | looking for regular 'texmfcnf.lua' on given
path
resolvers   | resolving |
resolvers   | resolving | warning: no lua configuration files found
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  |
mtxrun  | elapsed lua time: 0.026 seconds

Do you have an idea how to fix problem?
I will be thankful for an advice, it is quite urgent (everything was
working yesterday).

Thank you,
Jano
___
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] Rotating jpeg image gives weird output

2022-06-14 Thread Denis Maier via ntg-context
Thanks for your suggestions.

It probably is not EXIF-related. I've opened and saved the image with MS Paint, 
but that did not change anything (the increase in file size aside...).

Any other ideas? (I tend to think the image is corrupted in one way or the 
other, but I have no clue how to fix that.)

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: Max Chernoff 
> Gesendet: Dienstag, 14. Juni 2022 11:45
> An: ntg-context@ntg.nl
> Cc: Maier, Denis Christian (UB) 
> Betreff: Re: [NTG-context] Rotating jpeg image gives weird output
> 
> > So, I've rotated the image, but now two things happen:
> >
> > 1. there's a weird offset (the image is moved to the right)
> >
> > This seems to be somehow related to the particular file. With a
> > different file that does not happen.
> 
> This can sometimes happen if the image has an embedded EXIF "Orientation"
> tag and you're using a buggy viewer. Really old versions of Firefox/pdf.js had
> this bug. If this is the case, you should be able to reproduce it with the
> following bash commands:
> 
>  convert -size 64x256 canvas:grey -fill black -draw "circle 32,128 16,112"
> demo1.jpg
>  exiftool -Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg
> 
> Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
> \externalfigure. Both pictures should display as circles; if you get ovals, 
> then
> it's definitely EXIF-related.
> 
> > 2. The output contains this line
> > . location=local,global. location=local,global
> 
> Never seen this before, which makes me suspect that maybe this isn't EXIF-
> related. Maybe the image is just subtly corrupted?
> 
> Anyways, if the problem is EXIF-related, then opening and saving the image
> file with MS Paint (or any other non-EXIF-aware editor) should fix things.
> Otherwise, I have no suggestions.
> 
> -- Max
___
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] Rotating jpeg image gives weird output

2022-06-14 Thread Max Chernoff via ntg-context

So, I've rotated the image, but now two things happen:

1. there's a weird offset (the image is moved to the right)

This seems to be somehow related to the particular file. With a different
file that does not happen.


This can sometimes happen if the image has an embedded EXIF
"Orientation" tag and you're using a buggy viewer. Really old versions
of Firefox/pdf.js had this bug. If this is the case, you should be able
to reproduce it with the following bash commands:

convert -size 64x256 canvas:grey -fill black -draw "circle 32,128 16,112" 
demo1.jpg
exiftool -Orientation='Rotate 90 CW' demo1.jpg -o demo2.jpg

Then, include "demo1.jpg" and "demo2.jpg" in a ConTeXt file using
\externalfigure. Both pictures should display as circles; if you get
ovals, then it's definitely EXIF-related.


2. The output contains this line
. location=local,global. location=local,global


Never seen this before, which makes me suspect that maybe this isn't
EXIF-related. Maybe the image is just subtly corrupted?

Anyways, if the problem is EXIF-related, then opening and saving the image
file with MS Paint (or any other non-EXIF-aware editor) should fix things.
Otherwise, I have no suggestions.

-- Max
___
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] Rotating jpeg image gives weird output

2022-06-14 Thread Denis Maier via ntg-context
Hi,

I have a jpeg image that drives me crazy. The scanned image I have received 
from the author is in landscape. So, I've rotated the image, but now two things 
happen:

1. there's a weird offset (the image is moved to the right)
2. The output contains this line
. location=local,global. location=local,global

I'm not quite quite sure how I can produce a MWE that shows the problem, but 
has anyone ever seen something like this? Does anyone know what that < . 
location=local,global. location=local,global > stuff means?

Best,
Denis

P.S: I've performed the rotations using the standard picture editor on Windows 
and with GIMP. Happens with both tools.l
P.S.S.: This seems to be somehow related to the particular file. With a 
different file that does not happen.
___
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
___