2

If I use the following scrreprt document, the initial tabularx table is aligned with the left boundary of the text area:

\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}

This results in the following pdf snippet (both with xelatex and pdflatex):

No extra indentation in plain document

Replacing the document above by the following code while retaining almost (I had to change the table width to "0.99\textwidth" to avoid a warning) the same preamble:

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

results in the following pdf snippet:

enter image description here

Please note the extra indentation of about 1% of the textwidth on the left-hand side of the table.

How can I get rid of this extra indentation? And why is it added by \extratitle anyway?

1
  • 2
    As always, extra spurious blank space. Place % right after the brace in \extratitle as in \extratitle{% Commented Aug 1, 2015 at 17:18

1 Answer 1

2

There's an extra spurious blank space (a line change). Place % right after the brace in \extratitle as in \extratitle{%:

The complete example (now you can use the 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}

The result:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .