암호

암호

여기에 인이 배트 옆에 있는지 \\미리 확인하는 코드를 추가합니다 . 이 코드는 . 에는 별표를 찾은 다음 최종적으로 를 호출하기 전에 를 찾는 코드가 있습니다 . 나는 여기에 문제가 있다고 생각합니다.\end\end{tabular}\noalign\\[\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}

관련 정보