\usepackage{newunicodechar}가 로드되지만 명령이 효과가 없습니다.

\usepackage{newunicodechar}가 로드되지만 명령이 효과가 없습니다.

LaTeX 소스 코드에서 일반 텍스트 유니코드(UTF-8 인코딩) 기호를 사용하려고 합니다. 개념을 증명하기 위해 문제의 기호를 ASCII로만 정의했습니다.

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[verbose]{newunicodechar}
%⋮
 % Unicode
\newunicodechar{♢}{<>}
\newunicodechar{⧫}{!}
\newunicodechar{⬠}{(P)}
%⋮
\begin{document}
%⋮
\subsection{Introduction}
♢ ⧫ ⬠ 
%…
\end{document}

\newunicodechar가 없기 때문에 컴파일이 비참하게 실패합니다.

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/Debian) (preloaded format=latex 2015.4.1)  10 JUL 2017 16:47  
entering extended mode  
 restricted \write18 enabled.  
 %&-line parsing enabled.  
**PP5_tiling.tex  
(./PP5_tiling.tex  
LaTeX2e <2014/05/01>  
(/usr/share/texlive/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty  
Package: newunicodechar 2012/11/12 v1.1 Defining Unicode characters  
)  
! Package inputenc Error: Unicode char \u8:  not set up for use with LaTeX.  

See the inputenc package documentation for explanation.  
Type  H <return>  for immediate help.  
 ...                                              

l.63 ♢   
      ⧫ ⬠  
?

Ī̲가 무슨 잘못을 저지를 수 있나요?

답변1

오류 메시지는 다음과 같습니다

! Package inputenc Error: Unicode char   (U+202F)
(inputenc)                not set up for use with LaTeX.

U+202F NARROW NO-Break SPACE는 어디에도 정의되어 있지 않습니다.

선언을 추가하면 문제가 없습니다.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[verbose]{newunicodechar}
%⋮
 % Unicode
\newunicodechar{♢}{<>}
\newunicodechar{⧫}{!}
\newunicodechar{⬠}{(P)}
\newunicodechar{ }{\nolinebreak\hspace{.1em}}
%⋮
\begin{document}
%⋮
\subsection{Introduction}
♢ ⧫ ⬠ 
%…
\end{document}

<T1 인코딩을 참고하세요. 그렇지 않으면 and 를 얻지 못할 것입니다 >.

여기에 이미지 설명을 입력하세요

다른 오류 메시지가 나타나는 이유는 무엇입니까? 왜냐하면 당신은 3년 된 TeX 배포판을 사용하고 있기 때문입니다. 업데이트할 시간입니다.

관련 정보