Comments (9)
@aminophen yes I'm actually currently running some tests with ltfinal changed as
% \begin{macrocode}
\edef\inputencodingname{utf8}%
\input{utf8.def}
\let\UTFviii@two@octets@@\UTFviii@two@octets
\long\def\UTFviii@two@octets#1#2{\string#1\string#2}
\everyjob\expandafter{\the\everyjob
\let\UTFviii@two@octets\UTFviii@two@octets@@
}
\let\@inpenc@test\@undefined
\let\saved@space@catcode\@undefined
% \end{macrocode}
would need the longer cases as well, not just the two byte of course. delaying the catcode activation until everyjob would work on the commandline but if we can make it work without that it may give a path to accepting utf8 filenames more generally in the document (which did not work in previous releases after inputenc was loaded)
from latex2e.
Already reported by me and \detokenize should be used to avoid that (from #24 (comment))
from latex2e.
@aminophen Not quite that simple ... but I have to say I'm surprised that the binaries treat the file name argument at the TeX level (it's not \input tést
, after all).
from latex2e.
Something like pdflatex \input\detokenize{tést}\relax
works, but that's not ideal.
from latex2e.
the binaries treat the file name argument at the TeX level
Any arguments to *tex is treated as TeX code;-) When the first token is a character, *tex treats it as if \input is prefixed; when the first token is a control sequence, \input is not prefixed.
from latex2e.
@aminophen I have to say I've always imagined the logic differently :) 'If the first char is the escape char, treat as TeX code, otherwise read as a filename'
from latex2e.
from latex2e.
Delaying utf8.def etc. to \everyjob might be an only solution to this (not tested well for all engines, and if so I will have to adjust platex as well)
(edit: it will change a log filename opened by $pdflatex \\relax
to utf8.log instead of texput.log)
--- latex.ltx.orig 2018-04-07 06:33:45.000000000 +0900
+++ latex.ltx 2018-04-08 19:15:09.000000000 +0900
@@ -8641,12 +8641,6 @@
\catcode10=12 % ctrl J
\catcode12=13 % ctrl L
\catcode13=5 % newline
-\@tempcnta=128
-\loop
- \catcode\@tempcnta=13
- \advance\@tempcnta\@ne
-\ifnum\@tempcnta<256
-\repeat
\def\UseRawInputEncoding{%
\let\DeclareFontEncoding@\DeclareFontEncoding@saved % revert
\let\DeclareUnicodeCharacter\@undefined % revert
@@ -8669,10 +8663,6 @@
\repeat
}
\let\DeclareFontEncoding@saved\DeclareFontEncoding@
-\edef\inputencodingname{utf8}%
-\input{utf8.def}
-\let\@inpenc@test\@undefined
-\let\saved@space@catcode\@undefined
\else
\@tempcnta=0
\loop
@@ -8793,6 +8783,18 @@
\endgroup}
\let\@filelist\@gobble
\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%
+\everyjob\expandafter{\the\everyjob
+\@tempcnta=128
+\loop
+ \catcode\@tempcnta=13
+ \advance\@tempcnta\@ne
+\ifnum\@tempcnta<256
+\repeat
+\edef\inputencodingname{utf8}%
+\input{utf8.def}
+\let\@inpenc@test\@undefined
+\let\saved@space@catcode\@undefined
+}
\makeatother
\errorstopmode
\dump
from latex2e.
724013b works as expected for pdfLaTeX; I commited a support for that change in pLaTeX texjporg/platex@8b6c518 and it’s ok on both pLaTeX and upLaTeX. I’ll upload the new version of pLaTeX, when LaTeX is ready.
from latex2e.
Related Issues (20)
- `\ShowHook` does not recognize generic hooks HOT 1
- lthooks code typo HOT 2
- \IfFileLoadedTF missing HOT 7
- source2e documentation typo
- At begin document material from package B may end up before or after at begin document from package A requiring B HOT 7
- \DeclareDefaultHookRule does not work HOT 11
- upquote package has no effect on macrocode environments HOT 2
- lthooks doc ActivateGenericHook HOT 3
- Undocumented limitation on builtin generic hook names HOT 3
- ltkeys: Global options starting surrounded by spaces in the input are not removed from the unused option list HOT 3
- Many warnings about reguler to m series substitution as corollary from loading main font using regular not m in its font definition file HOT 4
- fntguide: No redefinition information in the transcript file HOT 3
- `\AddToHook` broken in old lthooks release for undeclared hooks
- \verbatiminput* from the verbatim package vs TABs HOT 2
- Bad filehook-bug-140.lvt HOT 1
- Package textcomp Info: Symbol ... not provided by HOT 9
- Conditional statements syntax HOT 5
- `\dots` not working correctly with `\cong` HOT 4
- minor doc tweaks to ltfilehook HOT 2
- source2e documentation footers/ \ProvidesFile of base .dtx HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latex2e.