[AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi developpers, I'd like to commit a change proposed in https://lists.gnu.org/archive/html/auctex/2018-05/msg00014.html in order to resolve problems addressed in https://lists.gnu.org/archive/html/auctex/2018-05/msg3.html https://lists.gnu.org/archive/html/auctex/2018-05/msg4.html . Are there anyone who doesn't agree with this? As explained in ealier messages, this patch introduces some incompatibilities: - Users cannot put raw TeX codes in the command line like latex -interaction=nonstopmode \SOME_CODE \input FILENAME via setting `TeX-command-extra-options' anymore, as long as the default `TeX-command-list' is used. - (Pdf)latex binaries without e-TeX extension have the following two limitations: 1. Preview-latex does not work. (This can be circumvented by customizing `preview-LaTeX-command' and `preview-undump-replacements' to cancel the change by my patch, though) 2. Region compilation (C-c C-r, C-c C-e etc.) does not work. I.e., such binaries can only use C-c C-c (and C-c C-a) to typeset the latex documents. If you consider that these incompatibilities are not acceptable, please express your opinion. I would be ready to discuss about this. If no objection, I'll commit the change in a few days. Adding document changes and regression tests will follow later. Best regards, Ikumi Keita P.S. I tested the patch with MikTeX briefly, and encountered no errors. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
>>> "Ikumi" == Ikumi Keita writes: Hi, > Hi developpers, > I'd like to commit a change proposed in > https://lists.gnu.org/archive/html/auctex/2018-05/msg00014.html > in order to resolve problems addressed in > https://lists.gnu.org/archive/html/auctex/2018-05/msg3.html > https://lists.gnu.org/archive/html/auctex/2018-05/msg4.html > . Are there anyone who doesn't agree with this? I am not really a developer (besides from trivial style files contribution), but I am a very heavy auctex user on a daily base. I am also interested in the issue of non ASCII file names (hebrew) I am not really sure I understand the implications of your change. Would it apply for all sort of latex documents or such with non ascii file names? > As explained in ealier messages, this patch introduces some > incompatibilities: > - Users cannot put raw TeX codes in the command line like >latex -interaction=nonstopmode \SOME_CODE \input FILENAME > via setting `TeX-command-extra-options' anymore, as long as the > default `TeX-command-list' is used. > - (Pdf)latex binaries without e-TeX extension have the following two > limitations: > 1. Preview-latex does not work. (This can be circumvented by > customizing `preview-LaTeX-command' and > `preview-undump-replacements' to cancel the change by my patch, > though) Oops that is a heavy one. But if it can be circumvented. > 2. Region compilation (C-c C-r, C-c C-e etc.) does not work. Again this is just for some particular binaries or in general? I am still with TL 2017. If it is a breakdown in general of that feature I am _against_ it. Region compilation is a feature I rely on very much. But maybe I misunderstood the implication of your proposed changes. Uwe Brauer smime.p7s Description: S/MIME cryptographic signature ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
> Ikumi Keita writes: > Hi developpers, I'd like to commit a change proposed in > https://lists.gnu.org/archive/html/auctex/2018-05/msg00014.html in > order to resolve problems addressed in > https://lists.gnu.org/archive/html/auctex/2018-05/msg3.html > https://lists.gnu.org/archive/html/auctex/2018-05/msg4.html . > Are there anyone who doesn't agree with this? > As explained in ealier messages, this patch introduces some > incompatibilities: - Users cannot put raw TeX codes in the command > line like latex -interaction=nonstopmode \SOME_CODE \input > FILENAME via setting `TeX-command-extra-options' anymore, as long > as the default `TeX-command-list' is used. - (Pdf)latex binaries > without e-TeX extension have the following two limitations: > 1. Preview-latex does not work. (This can be circumvented by > customizing `preview-LaTeX-command' and > `preview-undump-replacements' to cancel the change by my patch, > though) 2. Region compilation (C-c C-r, C-c C-e etc.) does not > work. I.e., such binaries can only use C-c C-c (and C-c C-a) to > typeset the latex documents. If you consider that these > incompatibilities are not acceptable, please express your opinion. > I would be ready to discuss about this. > If no objection, I'll commit the change in a few days. Adding > document changes and regression tests will follow later. > Best regards, Ikumi Keita > P.S. I tested the patch with MikTeX briefly, and encountered no > errors. I really do not like what I understand to be this suggestion. If users cannot put TeX codes in a command then extensive functionality is lost. The bar on non-ascii file names seems trivial to me - sorry. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi Uwe, > Uwe Brauer writes: > Again this is just for some particular binaries or in general? I am > still with TL 2017. > If it is a breakdown in general of that feature I am _against_ it. > Region compilation is a feature I rely on very much. > But maybe I misunderstood the implication of your proposed changes. You are not affected because you use TeXLive 2017. As I wrote >> - (Pdf)latex binaries without e-TeX extension have the following two >> limitations: , the restrictions are limited to only (pdf)latex binaries _without_ e-TeX extension. Such binaries only exist in very old TeX distributions, at least for TeXLive. c.f. https://lists.gnu.org/archive/html/auctex/2018-05/msg00013.html I know little about MikTeX, but I expect the situation is similar. > I am not really sure I understand the implications of your change. Would > it apply for all sort of latex documents or such with non ascii file names? All sort of documents processed with standard (pdf)latex without e-TeX extension. LaTeX variants such as xelatex and lualatex are not affected. Regards, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
> Ikumi Keita writes: >> I am not really sure I understand the implications of your change. Would >> it apply for all sort of latex documents or such with non ascii file names? > All sort of documents processed with standard (pdf)latex without e-TeX > extension. LaTeX variants such as xelatex and lualatex are not > affected. More precisely, - With respect to preview-latex: All sort of documents - With respect to region compilation: Documents with non-ascii file names only Best, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi Colin, > Colin Baxter writes: > I really do not like what I understand to be this suggestion. If users > cannot put TeX codes in a command then extensive functionality is > lost. The bar on non-ascii file names seems trivial to me - sorry. Thanks for your comment. I made out another patch, attached with this message, which continues to let the user to be able to put TeX codes on the command line, with some drawbacks explained later. In fact, even with my previous patch, it is possible to retain the functionality to put TeX codes in a command line. If you modify the relavant entries in `TeX-command-list' (or add new entries) so that it looks as ("TeX" "%(PDF)%(tex) %(file-line-error) %(extraopts) %`%S%(PDFout)%(mode)%' %t" ... ("LaTeX" "%`%l%(mode)%' \"\\detokenize\"{%t}" ... , you can still use `TeX-command-extra-options' to put raw TeX codes. The difference between my two patches are summarized below: 1. Previous patch Good points: - LaTeX format version banner is not discarded in the log file. [1] - First line parsing is not disabled. [2] - Bug#25276 is fixed. [3] Bad points: - Users cannot put TeX codes in a command line by default. 2. New patch Good points: - Users still can put TeX codes in a command line. Bad points: - LaTeX format version banner is discarded in the log file by default. - First line parsing is disabled by default. - Bug#25276 remains. Both approaches fix the original problem about non-ascii file names, and in both cases, the bad points are circumvented by customizing `TeX-command-list'. However, if `TeX-command-list' is customized, the user have to edit the cusomization every time a new AUCTeX release contains modification to the default value of the variable, in order to incorporate that modification into one's customized value. Colin, could you please compare the two situations? I still prefer the approach of the previous patch, but will honor your opinion if you are still against it. Best regards, Ikumi Keita [1] https://lists.gnu.org/archive/html/auctex/2018-05/msg3.html [2] https://lists.gnu.org/archive/html/auctex/2018-05/msg4.html [3] https://lists.gnu.org/archive/html/auctex/2018-05/msg00010.html non-ascii-file-name-v3.gz Description: Continue to use \input ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Ikumi Keita writes: > The difference between my two patches are summarized below: > 1. Previous patch >Good points: >- LaTeX format version banner is not discarded in the log file. [1] >- First line parsing is not disabled. [2] >- Bug#25276 is fixed. [3] >Bad points: >- Users cannot put TeX codes in a command line by default. > 2. New patch >Good points: >- Users still can put TeX codes in a command line. >Bad points: >- LaTeX format version banner is discarded in the log file by default. >- First line parsing is disabled by default. >- Bug#25276 remains. > > I still prefer the approach of the previous patch, but will honor your > opinion if you are still against it. Hi Keita, many thanks for working on this. I haven't looked at the patch, but I think we should keep `TeX-command-extra-options' working. It is a very flexible way to control the binary invoked on a file basis. E.g., all files which \usepackage{minted} need this: %%% TeX-command-extra-options: "-shell-escape" I'm not sure if first line parsing is so important. The issue described here[1] can be solved with %%% TeX-command-extra-options: "--fmt=foo.fmt" Hence, I'm voting to keep this feature running and drop something else. Best, Arash Footnotes: [1] http://lists.gnu.org/archive/html/auctex/2018-05/msg4.html ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi Arash and Jean, > jfbu writes: >> >> Hi Keita, >> >> many thanks for working on this. I haven't looked at the patch, but I >> think we should keep `TeX-command-extra-options' working. It is a very >> flexible way to control the binary invoked on a file basis. E.g., all >> files which \usepackage{minted} need this: >> >> %%% TeX-command-extra-options: "-shell-escape" As Jean pointed out, I didn't touch how `TeX-command-extra-options' is used. And sorry, I misunderstood the position of %(extraopts). I thought that the current AUCTeX allows `TeX-command-extra-options' to insert TeX codes in a command line like this: %%% TeX-command-extra-options: "\\foo\\bar{\\bla}" But that's not the case. Since %(extraopts) is put BEFORE %(mode) in the default `TeX-command-list' and `LaTeX-command-style', such settings won't work. Thus `TeX-command-extra-options' cannot be used to put TeX codes in a command line even with current AUCTeX. I'm sorry for my confusing statements so far. I wonder how Colin achieves to put TeX codes in a command line in AUCTeX. Perhaps by customizing `TeX-command-list' or `LaTeX-command-style'? Or customizing `TeX-expand-list' to override the default expansion of %(extraopts), %(mode) etc.? > Surely Keita (sorry Keita for mixing up your firstname with lastname!) Don't mind, we Japanese (at least I) generally don't care much whether to be called by first name or last name in conversation with western people :-). Regards, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi Arash Le 21/05/2018 à 12:26, Arash Esbati a écrit : Ikumi Keita writes: The difference between my two patches are summarized below: 1. Previous patch Good points: - LaTeX format version banner is not discarded in the log file. [1] - First line parsing is not disabled. [2] - Bug#25276 is fixed. [3] Bad points: - Users cannot put TeX codes in a command line by default. 2. New patch Good points: - Users still can put TeX codes in a command line. Bad points: - LaTeX format version banner is discarded in the log file by default. - First line parsing is disabled by default. - Bug#25276 remains. I still prefer the approach of the previous patch, but will honor your opinion if you are still against it. Hi Keita, many thanks for working on this. I haven't looked at the patch, but I think we should keep `TeX-command-extra-options' working. It is a very flexible way to control the binary invoked on a file basis. E.g., all files which \usepackage{minted} need this: %%% TeX-command-extra-options: "-shell-escape" Surely Keita (sorry Keita for mixing up your firstname with lastname!) will know better than me but from brief look at the patch %(extraopts) is still there. The only thing is that it can't be used with TeX macros like \def\x{blurp} if the file is not processed then via \input. The documentation in tex.el says "String with the extra options to be given to the TeX processor." it does not mention possibility to use it for inserting TeX macros before inputting the file for processing. Do AUXTeX users employ it this way? The patch has no impact on -shell-escape. Best, Jean-François I'm not sure if first line parsing is so important. The issue described here[1] can be solved with %%% TeX-command-extra-options: "--fmt=foo.fmt" Hence, I'm voting to keep this feature running and drop something else. Best, Arash Footnotes: [1] http://lists.gnu.org/archive/html/auctex/2018-05/msg4.html ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Le 21/05/2018 à 14:06, jfbu a écrit : Hi Arash Le 21/05/2018 à 12:26, Arash Esbati a écrit : Ikumi Keita writes: The difference between my two patches are summarized below: 1. Previous patch Good points: - LaTeX format version banner is not discarded in the log file. [1] - First line parsing is not disabled. [2] - Bug#25276 is fixed. [3] Bad points: - Users cannot put TeX codes in a command line by default. 2. New patch Good points: - Users still can put TeX codes in a command line. Bad points: - LaTeX format version banner is discarded in the log file by default. - First line parsing is disabled by default. - Bug#25276 remains. I still prefer the approach of the previous patch, but will honor your opinion if you are still against it. Hi Keita, many thanks for working on this. I haven't looked at the patch, but I think we should keep `TeX-command-extra-options' working. It is a very flexible way to control the binary invoked on a file basis. E.g., all files which \usepackage{minted} need this: %%% TeX-command-extra-options: "-shell-escape" Surely Keita (sorry Keita for mixing up your firstname with lastname!) will know better than me but from brief look at the patch %(extraopts) is still there. More precisely for LaTeX compilation it is inserted via LaTeX-command-style is a variable defined in ‘tex.el’. Its value is (("" "%(PDF)%(latex) %(file-line-error) %(extraopts) %S%(PDFout)")) which to best of my knowledge is not affected by Keita's patch. Best, Jean-François The only thing is that it can't be used with TeX macros like \def\x{blurp} if the file is not processed then via \input. The documentation in tex.el says "String with the extra options to be given to the TeX processor." it does not mention possibility to use it for inserting TeX macros before inputting the file for processing. Do AUXTeX users employ it this way? The patch has no impact on -shell-escape. Best, Jean-François I'm not sure if first line parsing is so important. The issue described here[1] can be solved with %%% TeX-command-extra-options: "--fmt=foo.fmt" Hence, I'm voting to keep this feature running and drop something else. Best, Arash Footnotes: [1] http://lists.gnu.org/archive/html/auctex/2018-05/msg4.html ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
> Arash Esbati writes: > Ikumi Keita writes: >> The difference between my two patches are summarized below: >> 1. Previous patch Good points: - LaTeX format version banner is >> not discarded in the log file. [1] - First line parsing is not >> disabled. [2] - Bug#25276 is fixed. [3] Bad points: - Users >> cannot put TeX codes in a command line by default. 2. New patch >> Good points: - Users still can put TeX codes in a command line. >> Bad points: - LaTeX format version banner is discarded in the log >> file by default. - First line parsing is disabled by default. - >> Bug#25276 remains. >> >> I still prefer the approach of the previous patch, but will honor >> your opinion if you are still against it. > Hi Keita, > many thanks for working on this. I haven't looked at the patch, > but I think we should keep `TeX-command-extra-options' working. > It is a very flexible way to control the binary invoked on a file > basis. E.g., all files which \usepackage{minted} need this: > %%% TeX-command-extra-options: "-shell-escape" > I'm not sure if first line parsing is so important. The issue > described here[1] can be solved with > %%% TeX-command-extra-options: "--fmt=foo.fmt" > Hence, I'm voting to keep this feature running and drop something > else. I agree. ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
> Ikumi Keita writes: > And sorry, I misunderstood the position of %(extraopts). I thought that > the current AUCTeX allows `TeX-command-extra-options' to insert TeX > codes in a command line like this: > %%% TeX-command-extra-options: "\\foo\\bar{\\bla}" > But that's not the case. Since %(extraopts) is put BEFORE %(mode) in > the default `TeX-command-list' and `LaTeX-command-style', such settings > won't work. > Thus `TeX-command-extra-options' cannot be used to put TeX codes in a > command line even with current AUCTeX. I'm sorry for my confusing > statements so far. Argh, I was wrong again! It IS possible to put TeX codes in a command line through `TeX-command-extra-options' with current AUCTeX. %%% TeX-command-extra-options: " \"\\foo\\bar{\\bla}\"" will do the trick. I'm deeply sorry. Sigh. The codes written in `TeX-expand-list-builtin' associated with the four entries %` "\ " %' cooperate to transport TeX codes wrapped inside dobule quotes just before the "\input". It can be confirmed by evaluating (let ((TeX-command-extra-options " \"\\foo\\bar{\\bla}\"")) (TeX-command-expand "%`%l%(mode)%'" 'TeX-master-file)) . The TeX code "\foo\bar{\bla}" is put after the expansion of %(mode) and just before "\input" in the return value. > I wonder how Colin achieves to put TeX codes in a command line in > AUCTeX. Perhaps by customizing `TeX-command-list' or > `LaTeX-command-style'? Or customizing `TeX-expand-list' to override the > default expansion of %(extraopts), %(mode) etc.? Now I realize how he does. > jfbu writes: > About this in the patch under discussion > + ;; Since TeXLive 2018, the default encoding for LaTeX files has been > + ;; changed to UTF-8 if used with classic TeX or pdfTeX. I.e., > + ;; \usepackage[utf8]{inputenc} is enabled by default in (pdf)latex. > + ;; c.f. LaTeX News issue 28 > + ;; Due to this change, \detokenize is required to recognize non > + ;; ascii characters in the file name. > The exact explanation would be that this is required in case the > \input method of executing the file is used. It is not required > in the case of "pdflatex filename" invocation, Yes, the reason I added that comment is that the relavant entry has "%`" and "%'" in it. Although it might seem that \detokenize is placed where no "\input" is present, "\input" is supplied automatically because of these "%`" and "%'". In other words, "\input" is always there actually. Regards, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi all, As discussed earlier in messages separately, I made out a fix much better than the previous proposal. Any opinions are welcome for this new proposal. It keeps the ability to let the users to have their own TeX codes on the command line while it doesn't use \input when it isn't necessary. Therefore, the bugs - LaTeX version banner is missing in the log file [1] - first line parsing is not effective [2] - file name with space doesn't typeset with w32 xelatex (Bug#25276) disappear except when TeX codes are present on the command line. Standard LaTeX without e-TeX extension, which exists in only very old distribution at least for TeXLive, will no longer work in the following cases: - region compilation of non-ascii file name - preview-latex (even when file name doesn't contain non-ascii chars) I found out that the current AUCTeX has a basic functionality of such on-demand supply of \input already implemented, but it isn't activated accidentally by a subtle inconsistency. It can be released by the following tiny change: -- diff --git a/tex.el b/tex.el --- a/tex.el +++ b/tex.el @@ -499,7 +499,8 @@ ("%s" file nil t) ("%t" file t t) ("%`" (lambda nil - (setq TeX-command-pos t TeX-command-text ""))) + (setq TeX-command-pos t TeX-command-text nil) + "")) (" \"\\" (lambda nil (if (eq TeX-command-pos t) (setq TeX-command-pos pos -- With this change, the command line becomes pdflatex -someoption FILENAME for most cases, but if some TeX codes are requested (by users' intention through `TeX-command-extra-options' or expansion of %(PDFout) to " \"\\pdfoutput=0 \"", or run in preview-latex), the form pdflatex -someoption \TeX_code \input FILENAME is retained. My new patches extend this functionality naturally to supply \detokenize in the latter case, necessary to typeset non-ascii FILENAME. It also adds codes to support first line parsing in region compilation. Although each changes are small, they accumlate to some amount in total. Thus I split the changes into three patches. They are attached below. The first patch fixes the bug which has been there even before TL 2018. If \usepackage[utf8]{inputenc} is present in standard LaTeX, non-ascii file names in \message{} didn't work as expected in region compilations. The second patch is the main fix. It implements most of the changes mentioned above. As a minor additional improvement, the users will be able to put their own TeX codes through `TeX-command-extra-options' for not only "LaTeX" but also "TeX" and "AmSTeX". The third patch is a fix for preview-latex to support non-ascii file names in TL2018. The TeX codes that enables preamble caching was crafted by Jean-François. I deeply thank him for his remarkable skill. Regards, Ikumi Keita [1] https://lists.gnu.org/archive/html/auctex/2018-05/msg3.html [2] https://lists.gnu.org/archive/html/auctex/2018-05/msg4.html non-ascii-file-name-revised-1.gz Description: bug fix for TeX-quote-filename non-ascii-file-name-revised-2.gz Description: use \input only when necessary and supplement \detokenize non-ascii-file-name-revised-3.gz Description: fix preview-latex for non-ascii file name on TL2018 ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Typeset LaTeX files with non-ascii file name in TeXLive 2018
Hi all, > Ikumi Keita writes: > Hi all, > As discussed earlier in messages separately, I made out a fix much > better than the previous proposal. Any opinions are welcome for this > new proposal. Since there were no objections, I commited the proposed patches along with the document change and regression test. Regards, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel