
내 Report.log에는 다음과 같은 메시지가 많이 있습니다.
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex
\integerpart=\count405
Invalid UTF-8 byte or sequence at line 35 replaced by U+FFFD.
\decimalpart=\count406
Invalid UTF-8 byte or sequence at line 79 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 79 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 83 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 86 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 102 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 114 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 120 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 125 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 147 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 147 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 147 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 182 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 182 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 182 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 183 replaced by U+FFFD.
Invalid UTF-8 byte or sequence at line 184 replaced by U+FFFD.
안타깝게도 언급된 줄 번호는 내 report.tex
파일의 내용과 일치하지 않습니다. 이러한 오류를 올바르게 찾으려면 어떻게 해야 합니까?
여기 내 .latexmkrc
:
system ("mkdir -p build/figures");
@default_files = ('report.tex');
@cus_dep_list = (@cus_dep_list, "glo gls 0 makenomenclature");
sub makenomenclature {
system("makeindex $_[0].glo -s nomencl.ist -o $_[0].gls"); }
@generated_exts = (@generated_exts, 'glo');
# Custom dependency and function for nomencl package
add_cus_dep( 'nlo', 'nls', 0, 'makenlo2nls' );
sub makenlo2nls {
system( "makeindex -s nomencl.ist -o \"$_[0].nls\" \"$_[0].nlo\"" );
}
$out_dir = 'build';
$pdflatex = 'xelatex --synctex=1 -interaction=nonstopmode -shell-escape';
$latex = 'latex --synctex=1 -interaction=nonstopmode -shell-escape';
답변1
로그 조각을 보면
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty
(/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex
\integerpart=\count405
Invalid UTF-8 byte or sequence at line 35 replaced by U+FFFD.
현재 열린 파일 스택에서 가장 최근 파일 과 관련된 오류 메시지의 줄 번호가 없기 때문에 (
as가 xstring.sty
열린 다음 (
as 가 열렸 음을 알 수 있습니다 .xstring.tex
)
xstring.tex
해당 파일에는 ASCII가 아닌 주석이 있지만 현재 버전(적어도 texlive 2022)에서는 UTF-8로 올바르게 인코딩되고 시작됩니다.
% !TeX encoding = UTF-8
% Ce fichier contient le code de l'extension "xstring"
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
\def\xstringname {xstring} %
\def\xstringversion {1.84} %
% %
\def\xstringdate {2021/07/21} %
첫 번째 오류가 표시되는 35행은 다음과 같습니다.
\newcount\decimalpart% compteurs utilisés par xstring
주석에 UTF-8 e-acute 포함