
여기에 인이 배트 옆에 있는지 \\
미리 확인하는 코드를 추가합니다 . 이 코드는 . 에는 별표를 찾은 다음 최종적으로 를 호출하기 전에 를 찾는 코드가 있습니다 . 나는 여기에 문제가 있다고 생각합니다.\end
\end{tabular}
\noalign
\\
[
\cr
이것이 적용되는지 확실하지 않습니다.
- 환경 뒤의 공백과 \par 무시
\\
, TeX\cr
(행 캐리지 리턴 끝) 을 충족하기 위해 표 내에서 변경되었기 때문입니다 .
암호
다음에 대한 로그 출력을 참조하세요.\typeout{\noexpand\reserved@a value: \meaning\reserved@a}
\documentclass{article}
\usepackage{fontspec}
\usepackage{booktabs}
\catcode`@=11 % or \catcode"0040=11 or \makeatletter to change category code of @ to 11 and temporarily to access kernel macro \@tabularcr
\let\clone@tabularcr\@tabularcr%
\def\@tabularcr{\clone@tabularcr \mymidline}%
% Using \hline and \midrule as a model, I made my own hybrid with some extra end of tabular logic
\def\mymidline{%
\noalign{\ifnum0=`}\fi\@aboverulesep=\aboverulesep\global\@belowrulesep=\belowrulesep \futurelet
\reserved@a\@mymidline}%
\def\@mymidline{\typeout{\noexpand\reserved@a value: \meaning\reserved@a}\ifx\reserved@a\end\else% <-- Here is the value test. I need \reserved@a to eventually equal \end
\vskip\@aboverulesep%
\hrule \@height \lightrulewidth%
\vskip\@belowrulesep%
\fi
\ifnum0=`{\fi}}
\catcode`@=12 % or \catcode"0040=12 or \makeatother to restore category code of @ to 12
\begin{document}
\makeatletter
\begin{tabular}{ccc}
col1 & col2 & col3 \\
\meaning\@tabularcr & col2 & col3 \\
\meaning\\ & col2 & col3 \\
col1 & col2 & col3 \\
\meaning\clone@tabularcr & col2 & col3 \\
\end{tabular}
\makeatother
\end{document}
전류 출력
원하는 출력
답변1
어쨌든 \\
찾고 있는 공간을 건너뛰고 *
작업을 수행하도록 두고 공간을 찾았는지 물어볼 수 있습니다.\end
이는 라텍스 커널에서만 작동 tabular
하지만 일부 이름을 변경하면 패키지에도 적용할 수 있습니다 array
.
\documentclass{article}
\usepackage{booktabs}
\catcode`@=11 % or \catcode"0040=11 or \makeatletter to change category code of @ to 11 and temporarily to access kernel macro \@tabularcr
\def\addmyrule{\noalign{%
\vskip\@aboverulesep%
\hrule \@height \lightrulewidth%
\vskip\@belowrulesep}}
\let\old@xtabularcr\@xtabularcr
\def\@xtabularcr{%
\ifx\@let@token\end\else
\aftergroup\aftergroup\aftergroup
\aftergroup\aftergroup\aftergroup
\aftergroup
\addmyrule
\fi
\old@xtabularcr}
\catcode`@=12 % or \catcode"0040=12 or \makeatother to restore category code of @ to 12
\begin{document}
\makeatletter
\begin{tabular}{ccc}
col1 & col2 & col3 \\
\meaning\@tabularcr & col2 & col3 \\
\meaning\\ & col2 & col3 \\
col1 & col2 & col3 \\
\meaning\clone@tabularcr & col2 & col3 \\
\end{tabular}
\makeatother
\end{document}