
로 회전된 롱테이블을 설정할 때 이상한 현상이 발생했습니다 apa6
.
구체적으로 다음과 같이 작동합니다.
\documentclass[12pt
,man % manuscript mode; jou man doc
,babel, american % language
%,biblatex % loads biblatex or apacite
,a4paper % default:letter
% ,floatsintext
,noextraspace %removes extra space after headings; closer to "true" double-spacing
%,mask
,longtable
%,helv % font in man mode
%,tt % font in man mode
%,draftfirst
%,draftall
]{apa6}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{siunitx}
%% for the huge table to avoid boxes warnings
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}
\DeclareDelayedFloatFlavor*{landscape}{table}
\title{Longtables and Me: An Endless Story}
\shorttitle{Longtables}
\author{Me}
\affiliation{MeU}
\authornote{
Empty
}
\abstract{
Empty.
}
\keywords{Empty}
\begin{document}
\lipsum
\begin{landscape}
\begin{ThreePartTable}
\begin{TableNotes}
\rr \footnotesize %
\textit{Note.}
Just a TableNote to explain some stuff.
\end{TableNotes}
\begin{longtable}{p{7.3cm}
S[table-format = 5]
l
l
S[table-format = 2.2]
c
p{5cm}}
\caption{Longitudinal Studies Included in the Analysis} \\
\label{tab:studies} \\
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endfirsthead
\multicolumn{7}{l}{{\tablename} \thetable{} (continued)} \\[0.5ex]
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endhead
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry that is quite long and breaks to the next line & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr Another rather long Entry that also breaks and extends over two lines & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\bottomrule
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\lipsum
\end{document}
테이블 셀 중 하나(첫 번째 줄, 왼쪽 열)에 움라우트를 삽입하면 모든 내용이 중단되고 오류가 발생합니다.
\documentclass[12pt
,man % manuscript mode; jou man doc
,babel, american % language
%,biblatex % loads biblatex or apacite
,a4paper % default:letter
% ,floatsintext
,noextraspace %removes extra space after headings; closer to "true" double-spacing
%,mask
,longtable
%,helv % font in man mode
%,tt % font in man mode
%,draftfirst
%,draftall
]{apa6}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{siunitx}
%% for the huge table to avoid boxes warnings
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}
\DeclareDelayedFloatFlavor*{landscape}{table}
\title{Longtables and Me: An Endless Story}
\shorttitle{Longtables}
\author{Me}
\affiliation{MeU}
\authornote{
Empty
}
\abstract{
Empty.
}
\keywords{Empty}
\begin{document}
\lipsum
\begin{landscape}
\begin{ThreePartTable}
\begin{TableNotes}
\rr \footnotesize %
\textit{Note.}
Just a TableNote to explain some stuff.
\end{TableNotes}
\begin{longtable}{p{7.3cm}
S[table-format = 5]
l
l
S[table-format = 2.2]
c
p{5cm}}
\caption{Longitudinal Studies Included in the Analysis} \\
\label{tab:studies} \\
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endfirsthead
\multicolumn{7}{l}{{\tablename} \thetable{} (continued)} \\[0.5ex]
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endhead
\rr An Entry with ä & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry that is quite long and breaks to the next line & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr Another rather long Entry that also breaks and extends over two lines & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\bottomrule
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\lipsum
\end{document}
\DeclareDelayedFloatFlavor*{landscape}{table}
흥미롭게 도 서문을 제거하면 모든 것이 다시 작동합니다(단, 이 명령은 유지해야 합니다).
물론 움라우트와 특정 문자(예: \"a
이 경우)를 이스케이프 처리하면 문제를 쉽게 피할 수 있지만, 이 컨텍스트에 대한 보다 일반적인 해결책이 있는지 궁금합니다.
미리 감사드립니다.
추신: 움라우트는 회전된 긴 테이블 외부에서 제대로 작동합니다.
답변1
어떤 이유로 지연된 테이블이 기록되는 임시 파일이 utf8이 아닌 라틴 1로 인코딩되어 있다는 것을 이해할 수 없습니다. 따라서 해결 방법은 테이블을 다시 읽을 때 입력 인코딩을 latin 1로 설정하는 것입니다. 다음을 사용하면 편리하게 이 작업을 수행할 수 있습니다.
\AtBeginDelayedFloats{\inputencoding{latin1}}
\documentclass[12pt
,man % manuscript mode; jou man doc
,babel, american % language
%,biblatex % loads biblatex or apacite
,a4paper % default:letter
% ,floatsintext
,noextraspace %removes extra space after headings; closer to "true" double-spacing
%,mask
,longtable
%,helv % font in man mode
%,tt % font in man mode
%,draftfirst
%,draftall
]{apa6}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{threeparttablex}
\usepackage{siunitx}
%% for the huge table to avoid boxes warnings
\newcommand{\rr}{\raggedright}
\newcommand{\tn}{\tabularnewline}
\DeclareDelayedFloatFlavor*{landscape}{table}
\AtBeginDelayedFloats{\inputencoding{latin1}}
\title{Longtables and Me: An Endless Story}
\shorttitle{Longtables}
\author{Me}
\affiliation{MeU}
\authornote{
Empty
}
\abstract{
Empty.
}
\keywords{Empty}
\begin{document}
\lipsum
\begin{landscape}
\begin{ThreePartTable}
\begin{TableNotes}
\rr \footnotesize %
\textit{Note.}
Just a TableNote to explain some stuff.
\end{TableNotes}
\begin{longtable}{p{7.3cm}
S[table-format = 5]
l
l
S[table-format = 2.2]
c
p{5cm}}
\caption{Longitudinal Studies Included in the Analysis} \\
\label{tab:studies} \\
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endfirsthead
\multicolumn{7}{l}{{\tablename} \thetable{} (continued)} \\[0.5ex]
\toprule
1st Column & {2nd Column} & 3rd Column & 4th Column & {5th Column} & 6th & 7th Column\\
\midrule
\endhead
\rr An Entry with ä & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry that is quite long and breaks to the next line & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr Another rather long Entry that also breaks and extends over two lines & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\rr An Entry & 1234 & ABCD & glo & 99.32 & 2 & Some more text \\
\bottomrule
\insertTableNotes
\end{longtable}
\end{ThreePartTable}
\end{landscape}
\lipsum
\end{document}
답변2
apa6
관리자나 endfloat
관리자( 플로트를 표시하는 데 apa6
사용 ) 에게 알리고 싶을 수도 있습니다 .endfloat
주요 문제는 utf8을 디스크에 쓸 수 있다면 데이터를 쓰기 전에 보호해야 하며 그렇지 않으면 특수 문자가 확장된다는 것입니다.
이것이 도움이 되는 것 같습니다. 서문에 배치되어 있습니다.
\makeatletter
\renewcommand\efloat@iwrite[1]{%
\expandafter\immediate\expandafter\protected@write\csname efloat@post#1\endcsname{}}
\makeatother
이 매크로는 두 개가 아닌 세 개의 인수를 기대하므로 로 변경 \write
하고 그 뒤에 \protected@write
추가했습니다 .{}
\csname
편집: 흠, 생성된 코드를 보면 아니요, 디스크에 utf8을 쓰지는 않지만 올바르게 컴파일되는 것 같습니다.