Q&A 마당은 텍 관련 질문/답변을 위해 만들었습니다.
- 로그인 없이 자유롭게 글을 읽고 쓸 수 있는 철학은 처음과 같이 계속됩니다.
- 질문 전에 아래를 읽어 보세요. 좋은 질문이 좋은 답을 받을 수 있는 좋은 방법입니다.
- 질문에 맞는 제목을 붙이세요. 질문의 내용과 관련없는 "고수님", "긴급질문", "도와주세요"와 같은 제목은 답이 잘 올라오지 않습니다. 이 게시판에 올라오는 모든 글은 질문입니다. 굳이 [질문], [Q]를 적으실 필요도 없습니다.
- 내용을 충실히 적어 주시고, 같은 상황을 재현할 수 있는 최소한의 예제가 같이 있어야 합니다.
- 최소 예제는 "Minimal working example"을 읽어 보세요.
- 파일을 첨부하실 때에는 가능한 압축하여 파일 크기를 줄여서 올려주시길 바랍니다.
- 개인적으로 사용하신 글꼴이 들어 있는 경우, preparefont.sty에 관한 답변을 참조하세요.
- 스팸 글을 막기 위하여 짧은 시간 내에 다시 글이 등록되는 IP를 막거나, 광고 글을 막기 위하여 금지어로 .com, .net 등을 설정하고 있습니다. 다소간의 불편함이 있으시더라도 양해 바랍니다.
- 금지어에서 stackexchange, stackoverflow, ctan, overleaf, , github, google.com, gmail.com, .org, .io, sil.org, wiki.com, tistory.com등은 해제하였습니다.
- MathJax를 이용한 수식조판을 사용하실 수 있습니다. 여기를 참조하세요.
- 사용하는 편집기는 CKeditor입니다.
- 편집기에서 [enter]를 누르면 <p> 태그가 들어가고, 문단으로 생각하고 한 줄을 비웁니다.
- 글줄만 바꾸려면 [shift-enter]를 누르면 <BR> 태그가 들어가므로 용도에 맞게 나누어 쓸 수 있습니다.
- 수식를 문서내에 삽입하시려면 에디터를 툴바에서 [소스]를 눌러 HTML로 입력할 수 있게 바꾸신 후 <pre> </pre> tag를 사용하셔서 <pre> 여러 줄의 수식 </pre>처럼 입력하시면 좋습니다.
Font 가 Not loadable 하다네요
2013.12.05 12:06
LaTeX 을 갓 배우기 시작했습니다.
특별한 용도는 없고 일단 연습을 해보고 싶어서,
제가 가진 전공서적 하나를 그대로 LaTeX 으로 옮겨보고 있습니다.
Mac OS X 10.8.1 에서 TeXShop 환경을 이용 중이고요.
템플릿으로는 웹상에 무료로 공개된 The Wiley Book Style 을 사용하고 있는데
한글을 쓰기 위해 kotex 패키지를 포함시켜서 잘 사용하고 있었습니다
그런데 chapter 제목에서 다음과 같은 문제가 발생하더군요
특정 글자(예: '학', '인' 등)가 chapter 제목에 들어가면 이런 문제가 발생합니다.
part 나 section 에 있을 때는 문제가 없어요. 아마 cls 에 문제가 있는건가 살펴봤는데 못찾겠더라고요
그리고 저 상태에서 [s]ignore all 눌러서 그냥 진행시키면 정상적으로 렌더링을 마칠 수 있기는 한데
(폰트도 다 뜹니다)
그냥 타입셋 할때마다 오류가 걸리는게 귀찮기도 하고 원인을 알고 싶기도 해서 올려봅니다.
cls 파일의 chapter 커맨드는 다음과 같습니다
\def\@chapter[#1]#2{\startonoddpage
\global\titletrue
%% no floats on chapter title page
\global\@topnum\z@
\global\@botnum\z@
%%
\ifnum\c@chapter=0\relax \ifnum\c@part=1 \else \setcounter{page}{1}
\global\@mainmattertrue% <<===
\fi\fi
%% if using answers.sty:
\expandafter\ifx\csname Closesolutionfile\endcsname \relax
\else
\Closesolutionfile{ans}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lowercase{\global\savefootnotenumber=\c@footnote
\global\ftnum=0
\setbox0=\hbox{\let\thanks\catchfootnote
\let\\ \relax\let\footnote\catchfootnote#2}
{\def\thefootnote{\zfnsymbol{footnote}}
\ifnum\ftnum<1 \else
\saveftnum\ftnum
\global\advance\saveftnum by1
\ftnum=1
\loop\ifnum\saveftnum>\ftnum
\advance\c@footnote by 1
\savefootnotetext{\csname thecatchfootnote\the\ftnum\endcsname}
\global\advance\ftnum by1
\repeat
\fi}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\gdef\thepage{\csname @arabic\endcsname\c@page}
%
\refstepcounter{chapter}% <<==== moved this here instead of below mainmatter
%% when using answers.sty,
%% to open an ans<chapnum> file to be used for solutions section
\expandafter\ifx\csname Opensolutionfile\endcsname\relax\else
\Opensolutionfile{ans}[ans\the\c@chapter]\fi
\let\dolabelnow\relax
{\def\label##1{\gdef\dolabelnow{\savelabel{##1}}}%
\global\setbox0=\hbox{\def\\ {\relax}#2}}%
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\typeout{\@chapapp\space\thechapter.}%
\let\thanks\eatone
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\let\thanks\eatone
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\let\thanks\eatone
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\@makechapterhead{{
\def\thanks##1{$^{\zfnsymbol{footnote}}$}
\def\\ {\vskip1sp}\uppercase{#2}}}%
\dolabelnow
\@afterheading
\lowercase{\global\c@footnote\savefootnotenumber}}
\def\@makechapterhead#1{%
\vglue10pt
\SpaceAboveChapterNumber=36pt
{\parindent \z@
\interlinepenalty\@M
\Large
\hbox to\textwidth{\hbox{\chapternumberfont CHAPTER
\the\c@chapter}\hfill\vrule depth12pt width0pt}
\hrule height3pt
\vtop to22.5pc{\vfill
\hyphenpenalty10000
\raggedright
\parfillskip=0pt
\huge\boldmath\bfseries\chaptertitlefont
#1\vskip1pc
\hrule height 1pt
\vskip7pc}}
\dooffprintinfo}
댓글 6
-
anonymous
2013.12.05 12:10
-
김민규
2013.12.05 12:20
정말 광속같은 댓글이군요 감사합니다
방금 드롭다운에서 xelatex 해보니까 오류는 사라졌습니다
그런데 한글 문자열이 전부 사라졌는데... 폰트 지정이 영문 폰트로 되어 있어서 그런거 같은데 어떻게 해결해 줘야 하나요?
xelatex 써본 적이 없어서 어떻게 쓰는지 모르겠네요
-
김민규
2013.12.05 12:27
-
김민규
2013.12.05 12:38
아아앗 해결법을 터득했습니다~~~ㅋㅋㅋㅋㅋ무한감사합니다
또 문제 생기면 댓글로 올릴게요
-
그로몹
2013.12.05 13:56
올려 주신 파일은 그대로 xelatex에서 아무 문제도 안 생깁니다.
(단지 로고 파일인가가 없다는 에러만)
-
DohyunKim
2013.12.06 01:39
레거시 텍 [cjk-ko]에서 에러가 나지 않게 하는 방법은
- 질문 글에 제시된 chapter 명령에서 \lowercase를 지우거나,
- 다음을 전처리부에서 실행합니다. (kotex-utf에서는 \uccode도 조정해야 할 것임)
\count255="80
\loop
\lccode\count255=0
\advance\count255 by1
\ifnum\count255<"F4
\repeat - 질문 글에 제시된 chapter 명령에서 \lowercase를 지우거나,
latex 이나 pdflatex을 사용하지 마시고 xelatex 으로 컴파일 하여보시면 어떻게 되나요?