
문서 클래스 에서 매우 이상한 동작을 경험했습니다 ieeecolor.cls
! 패키지와 함께 이 클래스를 사용하여 라텍스 문서를 컴파일하면 tikz
몇 가지 색상 경고가 발생 Warning Incompatible color definition
하지만 생성된 PDF는 예상한 대로인 것 같습니다(예: 아래 MWE 참조).
그러나 다음 섹션이 tex 파일에 추가되면 매우 이상한 일이 발생합니다.
%%%% Inverse PDF page and text color
\definecolor{pagcol}{rgb}{0.1255,0.1255,0.1255}
\definecolor{txtcol}{rgb}{0.85,0.85,0.85}
\pagecolor{pagcol}
\color{txtcol}
이 경우 라텍스의 거동은 예상치 못한 것이며 색상도 더 이상 원하는 대로 표시되지 않습니다. 이는 새 ieeecolor
클래스와 tikz
.
이전에 이 문제가 발생한 사람이 있나요? 누구든지 이것에 대한 해결책을 찾았습니까?
수업 ieeecolor
은 홈페이지에서 확인하실 수 있습니다IEEE 작가 센터 웹사이트, 파일 ieeecolor.cls
과 'generic.sty'가 필요합니다.
주석이 달린 페이지 및 텍스트 색상 코드를 사용한 최소 작업 예:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
% 1 2 3 4 5 6 7 8
%\documentclass[letterpaper,10pt,conference]{ieeeconf} % Comment this line out
% if you need a4paper
%\documentclass[a4paper, 10pt, conference]{ieeeconf} % Use this line for a4
% paper
\documentclass[journal,twoside,web]{ieeecolor} % %% NEW ieeecolor class %%
% \IEEEoverridecommandlockouts % This command is only
% needed if you want to
% use the \thanks command
% \overrideIEEEmargins
% See the \addtolength command later in the file to balance the column lengths
% on the last page of the document
% The following packages can be found on http:\\www.ctan.org
\usepackage{generic}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{pagecolor}
%%%%% Inverse PDF page and text color
%\definecolor{pagcol}{rgb}{0.1255,0.1255,0.1255}
%\definecolor{txtcol}{rgb}{0.85,0.85,0.85}
%\pagecolor{pagcol}
%\color{txtcol}
\title{My Dummy Article}
\author{Julius~Caesar~\IEEEmembership{Fellow~Member,~IEEE}
\thanks{J.~Caesar is with the Senate House, Rome}
}
\begin{document}
\maketitle
\thispagestyle{empty}
\pagestyle{empty}
\begin{abstract}
\lipsum[1]
\end{abstract}
\begin{IEEEkeywords}
Key word 1, Key word 2.
\end{IEEEkeywords}
\section{Dummy Section 1}
\lipsum
\section{Dummy Section 2}
\lipsum
\begin{figure}[!htbp]
\centering
\begin{tikzpicture}
\draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0);
\end{tikzpicture}
\caption{A Dummy Square figure}
\end{figure}
\lipsum
\end{document}
일반.sty
\def\logoname{LOGO-generic-web}
\definecolor{subsectioncolor}{rgb}{0,0.541,0.855}
\setlength{\firstpagerule}{39pc}
\setlength{\logowidth}{4pc}
\def\journalname{Generic Colorized Journal}
답변1
ieeecolor.sty
허리가 좀 아프네요. 그런데, 패치 게시를 위해 누구에게 연락할 수 있는지 아는 사람이 있나요?
여기에는 두 가지 기술적인 문제가 있고, 하나의 철학적인 문제가 있습니다.
철학적인 것은: 돌볼 가치가 있는가? 그들이 당신의 논문을 수락하면 전혀 LaTeX가 아닌 것으로 다시 포맷할 것이고 어쨌든 standalone
. 하지만 파일을 내부용으로 사용하거나 일부 아카이브에 제출하려는 경우에는 신경을 쓰는 것이 좋습니다.
기술적 문제는 두 가지입니다.
- 첫 번째 것은 꽤 큽니다.색깔이 새어 나올 것이다. 연결된 답변은 이에 대한 좋은 답변을 제공합니다.
- 패키지가 로드
color
되지 않고xcolor
(2021년!) 로드되므로 Ti에 모든 문제가 발생합니다.케이Z가 필요합니다xcolor
.
가능한 해결책.
- 반점
ieeecolor.cls
--- ieeecolor.cls.orig 2021-06-04 11:51:15.355826034 +0200
+++ ieeecolor.cls 2021-06-04 12:11:40.354385057 +0200
@@ -667,12 +667,13 @@
%
%
%
-%
+
\ProvidesClass{IEEEtran}[2002/11/18 revision V1.6b by Michael Shell]
\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
\typeout{-- The source comments contain changelog notes.}
\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{color}
+% \RequirePackage{color}
+\RequirePackage[table]{xcolor}
%%%%%%%%%%%
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
@@ -2255,16 +2256,16 @@
\else
\@IEEEfigurecaptionsepspace% V1.6 was a hard coded 5pt
% 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one
-\setbox\@tempboxa\hbox{\footnotesize #1.\color{black}\normalcolor~~\sf\boldmath #2}%
+\setbox\@tempboxa\hbox{{\footnotesize #1.\color{black}\normalcolor~~\sf\boldmath #2}}%
\ifdim \wd\@tempboxa >\hsize%
% if caption is longer than a line, let it wrap around
-\setbox\@tempboxa\hbox{\footnotesize #1.\color{black}\normalcolor~~ }%
+\setbox\@tempboxa\hbox{{\footnotesize #1.\color{black}\normalcolor~~ }}%
\parbox[t]{\hsize}{\footnotesize \noindent\unhbox\@tempboxa\sf\boldmath #2}%
% if caption is shorter than a line,
% allow user to control short figure caption justification (left or center)
\else%
-\ifcenterfigcaptions \hbox to\hsize{\footnotesize\hfil\box\@tempboxa\hfil}%
-\else \hbox to\hsize{\footnotesize\box\@tempboxa\hfil}%
+\ifcenterfigcaptions \hbox to\hsize{{\footnotesize\hfil\box\@tempboxa\hfil}}%
+\else \hbox to\hsize{{\footnotesize\box\@tempboxa\hfil}}%
\fi\fi\fi\color{black}}
이렇게 하면 두 가지 문제가 모두 해결될 것 같습니다.
- 원래 클래스를 건드리고 싶지 않다면 클래스 전에
ieeecolor
로드하여 트릭을 시도해 보겠습니다.xcolor
다른 문제를 고쳐라Phelype Oleinik 수정으로: with 호출을 변경하세요\documentclass
(ieeecolor.cls
오늘 아침에 다운로드한 것을 사용하여 테스트했습니다!).
\RequirePackage{xcolor}
\documentclass[journal,twoside,web]{ieeecolor} % %% NEW ieeecolor class %%
% \IEEEoverridecommandlockouts % This command is only
% needed if you want to
% Fix ieeecolor's \caption
\usepackage{etoolbox}
\makeatletter
\@ifundefined{color@begingroup}%
{\let\color@begingroup\relax
\let\color@endgroup\relax}{}%
\def\fix@ieeecolor@hbox#1{%
\hbox{\color@begingroup#1\color@endgroup}}
\patchcmd\@makecaption{\hbox}{\fix@ieeecolor@hbox}{}{\FAILED}
\patchcmd\@makecaption{\hbox}{\fix@ieeecolor@hbox}{}{\FAILED}
둘 다 나에게 맞는 것 같지만 깊이 확인할 시간이 없었습니다.