bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2024-03-04 Thread Arash Esbati
David Kastrup  writes:

> jfbu  writes:
>
>> Le 02/08/2018 à 15:06, jfbu a écrit :
>>> There is a problem here with xetex error logs.
>>
>> I opened an upstream ticket
>>
>> https://sourceforge.net/p/xetex/bugs/154/
>
> I guess that's the best bet.  preview-latex has special code to deal
> with 8-bit engines putting line breaks in the middle of multibyte
> characters or ^^-quoting only some of them.
>
> It would likely be possible to teach it to also deal with the
> XeTeX-specific current situation, but it would likely end up being a
> nightmare to maintain.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

That said, it looks like a "wontfix".  Therefore, I'm closing this
report.

Best, Arash



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2018-08-02 Thread David Kastrup
jfbu  writes:

> Le 02/08/2018 à 15:06, jfbu a écrit :
>> There is a problem here with xetex error logs.
>
> I opened an upstream ticket
>
> https://sourceforge.net/p/xetex/bugs/154/

I guess that's the best bet.  preview-latex has special code to deal
with 8-bit engines putting line breaks in the middle of multibyte
characters or ^^-quoting only some of them.

It would likely be possible to teach it to also deal with the
XeTeX-specific current situation, but it would likely end up being a
nightmare to maintain.

-- 
David Kastrup



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2018-08-02 Thread jfbu

Le 02/08/2018 à 15:06, jfbu a écrit :

There is a problem here with xetex error logs.


I opened an upstream ticket

https://sourceforge.net/p/xetex/bugs/154/

Best,

Jean-François





___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2018-08-02 Thread jfbu

Le 02/08/2018 à 13:34, David Kastrup a écrit :

jfbu  writes:


I obtain partial success with

\documentclass{article}
\usepackage{unicode-math}
\begin{document}

Test: $풞$

\end{document}


[...]


Further the log contains indication something went wrong indeed

l.5 Test: $
풞$
Preview: Tightpage -32891 -32891 32891 32891
./testpreview.tex:5: Preview: Snippet 1 ended.(456786+9830x428605).


Maybe you should bother to mention what you consider "indication
something went wrong indeed".  preview-latex produces error messages on
purpose.  That's the only way to get to the right column.

The problem here is that the character in the error message appears to
be a different character from what is in the source file, so
preview-latex isn't able to correlate it with the source.



So you do understand what I meant then?

Have a nice summer

Jean-François



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2018-08-02 Thread David Kastrup
jfbu  writes:

> I obtain partial success with
>
> \documentclass{article}
> \usepackage{unicode-math}
> \begin{document}
>
> Test: $풞$
>
> \end{document}

[...]

> Further the log contains indication something went wrong indeed
>
> l.5 Test: $
>풞$
> Preview: Tightpage -32891 -32891 32891 32891
> ./testpreview.tex:5: Preview: Snippet 1 ended.(456786+9830x428605).

Maybe you should bother to mention what you consider "indication
something went wrong indeed".  preview-latex produces error messages on
purpose.  That's the only way to get to the right column.

The problem here is that the character in the error message appears to
be a different character from what is in the source file, so
preview-latex isn't able to correlate it with the source.

-- 
David Kastrup



___
bug-auctex mailing list
bug-auctex@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-auctex


bug#32345: 12.1.1; wrong preview position for four-byte utf-8 encoded character (xelatex)

2018-08-01 Thread sattler . christian

The attached log is generated by previewing the following document with xelatex:

\documentclass{article}

\begin{document}

Test: $풞$

\end{document}

The unicode character in math mode after "Test: " is U+1D49E.
The preview range for the snippet is completely wrong and includes the
entire line before the snipped. It appears that there are some encoding
problems because the log file refers to a unicode character U+D49E,
which is the lowest 16 bits of the original character's codepoint.

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05
Package: 12.1.1

Run buffer contents:

Running `Preview-LaTeX' on `test' with ``xelatex  --synctex=1 -file-line-error 
"\nonstopmode\nofiles\PassOptionsToPackage{active,tightpage,auctex}{preview}\AtBeginDocument{\ifx\ifPreview\undefined\RequirePackage[displaymath,floats,graphics,textmath,sections,footnotes]{preview}[2004/11/05]\fi}"
 "\input" test.tex''
This is XeTeX, Version 3.14159265-2.6-0.9 (TeX Live 2018/Arch Linux) 
(preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.

No auxiliary output files.

(./test.tex (/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo)) (./test.aux) 
(/home/noname/.emacs.d/elpa/auctex-12.1.1/latex/preview.sty 
(/usr/share/texmf-dist/tex/generic/luatex85/luatex85.sty) 
(/home/noname/.emacs.d/elpa/auctex-12.1.1/latex/prtightpage.def) 
(/home/noname/.emacs.d/elpa/auctex-12.1.1/latex/prauctex.def
No auxiliary output files.


(/home/noname/.emacs.d/elpa/auctex-12.1.1/latex/prauctex.cfg)) 
(/home/noname/.emacs.d/elpa/auctex-12.1.1/latex/prfootnotes.def)
Preview: Fontsize 10pt
Preview: PDFoutput 1
)
./test.tex:5: Preview: Snippet 1 started.
<-><->
  
l.5 Test: $
   풞$
Preview: Tightpage -32891 -32891 32891 32891
./test.tex:5: Preview: Snippet 1 ended.(0+0x0).
<-><->
  
l.5 Test: $풞$
 
[1] )
(see the transcript file for additional information)
Output written on test.pdf (1 page).
SyncTeX written on test.synctex.gz.
Transcript written on test.log.

TeX Output exited as expected with code 1 at Thu Aug  2 01:59:30
Running `Preview-PDF2DSC' with ``pdf2dsc test.pdf 
test.prv/tmp2pIiJl/preview.dsc''

Preview-PDF2DSC finished at Thu Aug  2 01:59:30
Running `Preview-Ghostscript' with ``/usr/bin/rungs 
-dOutputFile\=\(test.prv/tmp2pIiJl/pr1-\%d.png\) -q -dDELAYSAFER -dNOPAUSE 
-DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 
-sDEVICE\=png16m -r94.08x93.9321''

Preview-Ghostscript finished at Thu Aug  2 01:59:30


current state:
==
(setq
 AUCTeX-version "12.1.1"
 LaTeX-command-style '(("" "%(PDF)%(latex) %(extraopts) %S%(PDFout) 
-file-line-error"))
 image-types '(svg imagemagick png gif tiff jpeg xpm xbm pbm postscript)
 preview-image-type 'png
 preview-image-creators '((dvipng (open preview-gs-open 
preview-dvipng-process-setup) (place preview-gs-place)
   (close preview-dvipng-close))
  (png (open preview-gs-open) (place preview-gs-place) 
(close preview-gs-close))
  (jpeg (open preview-gs-open) (place preview-gs-place) 
(close preview-gs-close))
  (pnm (open preview-gs-open) (place preview-gs-place) 
(close preview-gs-close))
  (tiff (open preview-gs-open) (place preview-gs-place) 
(close preview-gs-close)))
 preview-dvipng-image-type 'png
 preview-dvipng-command "dvipng -picky -noghostscript %d -o 
\"%m/prev%%03d.png\""
 preview-pdf2dsc-command "pdf2dsc %s.pdf %m/preview.dsc"
 preview-gs-command "/usr/bin/rungs"
 preview-gs-options '("-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLATFONTS" 
"-dPrinted" "-dTextAlphaBits=4"
  "-dGraphicsAlphaBits=4")
 preview-gs-image-type-alist '((png png "-sDEVICE=png16m") (dvipng png 
"-sDEVICE=png16m")
   (jpeg jpeg "-sDEVICE=jpeg") (pnm pbm 
"-sDEVICE=pnmraw")
   (tiff tiff "-sDEVICE=tiff12nc"))
 preview-fast-conversion t
 preview-prefer-TeX-bb nil
 preview-dvips-command "dvips -Pwww -i -E %d -o %m/preview.000"
 preview-fast-dvips-command "dvips -Pwww %d -o %m/preview.ps"
 preview-scale-function 'preview-scale-from-face
 preview-LaTeX-command '("%`%l \"\\nonstopmode\\nofiles\\PassOptionsToPackage{"
 ("," . preview-required-option-list)
 
"}{preview}\\AtBeginDocument{\\ifx\\ifPreview\\undefined" 
preview-default-preamble
 "\\fi}\"%' %t")
 preview-required-option-list '("active" "tightpage" "auctex" 
(preview-preserve-counters "counters"))
 preview-preserve-counters nil
 preview-default-option-list '("displaymath" "floats" "graphics" "textmath" 
"sections" "footnotes")
 preview-default-preamble '("\\RequirePackage[" ("," .