Como se livrar do recuo extra antes da tabela em \extratile da classe scrreprt?

Como se livrar do recuo extra antes da tabela em \extratile da classe scrreprt?

Se eu usar o seguinte documento scrreprt, a tabela tabularx inicial será alinhada com o limite esquerdo da área de texto:

\documentclass[draft=true]{scrreprt}
\usepackage{tabularx}
\usepackage{xifthen}
\usepackage{showframe}

\newcommand*{\BTDTitleTable}{%
  \noindent%
  \begin{tabularx}{\textwidth}{|p{0.14\textwidth}|p{0.14\textwidth}|X|p{0.14\textwidth}|p{0.14\textwidth}|}%
    \hline%
    a%
    & b%
    & c%
    & d%
    & f \\%
    \hline%
    1%
    & 2%
    & 3%
    & 4%
    & 5 \\%
    \hline%
  \end{tabularx}%
  \par\vspace{0.6cm}%
}%

\newcommand*{\BTDSignatureAndDate}[3][Foobar]{%
  \par\noindent\vspace{1.4cm}%
  \par\noindent\makebox[0cm][l]{{\large {#1}:}}%
  \par\noindent\vspace{0.6cm}%
  \par\noindent\makebox[0.224\textwidth][l]{\hrulefill}      \hfill\makebox[0.67\textwidth][l]{\hrulefill}%
  \ifthenelse{\isempty{#3}}%
            {\par\noindent\makebox[0.224\textwidth][l]{\small Date}    \hfill\makebox[0.67\textwidth][l]{\small #2}}%
            {\par\noindent\makebox[0.224\textwidth][l]{\small Date}    \hfill\makebox[0.67\textwidth][l]{\small #2, #3}}%
}%

\KOMAoption{twoside}{true}

\begin{document}
  \pagestyle{empty}
  \BTDTitleTable
  \BTDSignatureAndDate{Foobar}{Foo Baz}
\end{document}

Isso resulta no seguinte trecho de pdf (ambos com xelatex e pdflatex):

Nenhum recuo extra no documento simples

Substituindo o documento acima pelo código a seguir, mantendo quase (tive que alterar a largura da tabela para "0,99\textwidth" para evitar um aviso) o mesmo preâmbulo:

\begin{document}
  \extratitle{
    \BTDTitleTable
    \BTDSignatureAndDate{Foobar}{Foo Baz}
  }
\title{Not of interest}
\author{Foo bar}
\maketitle[-1]
\end{document}

resulta no seguinte trecho de pdf:

insira a descrição da imagem aqui

Observe o recuo extra de cerca de 1% da largura do texto no lado esquerdo da tabela.

Como posso me livrar desse recuo extra? E por que é adicionado por \extratitle afinal?

Responder1

Há um espaço em branco extra espúrio (uma mudança de linha). Coloque %logo após a chave \extratitlecomo em \extratitle{%:

O exemplo completo (agora você pode usar o full \textwidth):

\documentclass[draft=true]{scrreprt}
\usepackage{tabularx}
\usepackage{xifthen}
\usepackage{showframe}

\newcommand*{\BTDTitleTable}{%
  \noindent%
  \begin{tabularx}{\textwidth}{|p{0.14\textwidth}|p{0.14\textwidth}|X|p{0.14\textwidth}|p{0.14\textwidth}|}%
    \hline%
    a%
    & b%
    & c%
    & d%
    & f \\%
    \hline%
    1%
    & 2%
    & 3%
    & 4%
    & 5 \\%
    \hline%
  \end{tabularx}%
  \par\vspace{0.6cm}%
}%

\newcommand*{\BTDSignatureAndDate}[3][Foobar]{%
  \par\noindent\vspace{1.4cm}%
  \par\noindent\makebox[0cm][l]{{\large {#1}:}}%
  \par\noindent\vspace{0.6cm}%
  \par\noindent\makebox[0.224\textwidth][l]{\hrulefill}      \hfill\makebox[0.67\textwidth][l]{\hrulefill}%
  \ifthenelse{\isempty{#3}}%
            {\par\noindent\makebox[0.224\textwidth][l]{\small Date}    \hfill\makebox[0.67\textwidth][l]{\small #2}}%
            {\par\noindent\makebox[0.224\textwidth][l]{\small Date}    \hfill\makebox[0.67\textwidth][l]{\small #2, #3}}%
}%

\KOMAoption{twoside}{true}


\begin{document}
  \extratitle{%
    \BTDTitleTable
    \BTDSignatureAndDate{Foobar}{Foo Baz}
  }
\title{Not of interest}
\author{Foo bar}
\maketitle[-1]
\end{document}

O resultado:

insira a descrição da imagem aqui

informação relacionada