Information and discussion about graphics, figures & tables in LaTeX documents.
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Thu Nov 08, 2012 8:37 pm
Dear forum members,
I have a double space in a table, exactly between "number/content" and the line under these words.
I am adding the minimal example:
Code: Select all
\documentclass[12pt%
%,draft%
,twoside%
,BCOR10mm%
,bibtotocnumbered,
,toc=listof,
numbers=noenddot
]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{longtable}
\captionsetup[table]{labelsep=quad}
\captionsetup[figure]{labelsep=quad}
\begin{document}
~\ref{tab:example}
\begin{longtable}{lp{.7\linewidth}}
\caption{Example} \label{tab:example} \\
\toprule
\textbf{Number} &\textbf{Content}& \\
\midrule
\endfirsthead
\caption[]{ Example } \\
\toprule
\textbf\nume &\textbf{Content}& \\
\midrule
\endhead
\midrule
&\hfill\emph{continuación} \\
\bottomrule
\endfoot
\bottomrule
\endlastfoot
\end{longtable}
\end{document}
Many thanks for your help.
Best regards,
Marie
Last edited by
marie2011 on Thu Nov 08, 2012 8:58 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Thu Nov 08, 2012 8:46 pm
marie2011 wrote: […] I am adding the minimal example: […]
This is for several reasons no
minimal example .
The »mystyle« package is not an official package and therefore not listed on CTAN . It is neither attached nor is there a link given where to get it.
The vast majority of the loaded packages is for sure not needed to reproduce the problem.
Hence there is an
adequate description of the problem needed to comprehend it.
Thorsten
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Thu Nov 08, 2012 9:00 pm
localghost wrote:
The »mystyle« package is not an official package and therefore not listed on CTAN . It is neither attached nor is there a link given where to get it.
The vast majority of the loaded packages is for sure not needed to reproduce the problem.
Hi Thorsten,
I have just deleted the packages. I hope everything is allright now.
Best regards,
Marie
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Thu Nov 08, 2012 9:00 pm
What you're seeing here is the space between columns. You can verify this by completely suppressing it using the
@{}
operator:
Code: Select all
\begin{longtable}{l@{}p{.7\linewidth}}
...
\end{longtable}
With this you will see that »Number« and »Content« in your example will have
no space in between. Adjusting is possible, for example by manually specifying a certain width again using the
@{}
syntax:
Code: Select all
\begin{longtable}{l@{\hspace{1ex}}p{.7\linewidth}}
...
\end{longtable}
Regards
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Thu Nov 08, 2012 9:12 pm
Hi Clemens,
Thanks for your prompt answer.
I did what you suggested but the double space is still there:
Code: Select all
\documentclass[12pt%
%,draft%
,twoside%
,BCOR10mm%
,bibtotocnumbered,
,toc=listof,
numbers=noenddot
]{scrreprt}
\usepackage{longtable}
\begin{document}
\begin{longtable}{l@{}p{.7\linewidth}}
\caption{Example} \label{tab:Example} \\
\toprule
\textbf\Number &\textbf{Content}& \\
\midrule
\endfirsthead
\caption[]{ Example } \\
\toprule
\textbf\Number &\textbf{Content}& \\
\midrule
\endhead
\midrule
&\hfill\emph{continuación} \\
\bottomrule
\endfoot
\bottomrule
\endlastfoot
\end{longtabe}
\end{document}
Do I have to delete anything else?
Many thanks in advance,
Marie
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Thu Nov 08, 2012 9:24 pm
The first example read “\textbf{Number}
” (I silently ignored “\textbf\nume
”). This one now reads “\textbf\Number
”. This suggests that the intercolumn space is not where your problem lies but in the definition of \Number
. Since this is no standard LaTeX macro I guess you defined it yourself? In this case we need to know its definition to say anything concrete.
Regards
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Thu Nov 08, 2012 9:32 pm
I am sorry, Clemens, it should be:
Code: Select all
\documentclass[12pt%
%,draft%
,twoside%
,BCOR10mm%
,bibtotocnumbered,
,toc=listof,
numbers=noenddot
]{scrreprt}
\usepackage{longtable}
\begin{document}
\begin{longtable}{l@{}p{.7\linewidth}}
\caption{Example} \label{tab:Example} \\
\toprule
\textbf{Number} &\textbf{Content}& \\
\midrule
\endfirsthead
\caption[]{ Example } \\
\toprule
\textbf{Number} &\textbf{Content}& \\
\midrule
\endhead
\midrule
&\hfill\emph{continuación} \\
\bottomrule
\endfoot
\bottomrule
\endlastfoot
\end{longtabe}
\end{document}
Best regards,
Marie
cgnieder
Site Moderator
Posts: 2000 Joined: Sat Apr 16, 2011 7:27 pm
Post
by cgnieder » Thu Nov 08, 2012 9:39 pm
After adding
\usepackage{booktabs}
, changing
longtabe
into
longtable
and removing the erroneous and superfluous
&
after
\textbf{Content}
this example compiles (please try that out next time before posting the code) and gives me this:
longtable.png (4.8 KiB) Viewed 6560 times
The corrected code:
Code: Select all
\documentclass[
12pt,%
% draft,%
twoside,%
BCOR10mm,%
% bibtotocnumbered,% <= obsolete
bib=totoc, % <= recommended
toc=listof,
numbers=noenddot
]{scrreprt}
\usepackage{longtable}
\usepackage{booktabs}
\begin{document}
\begin{longtable}{l@{}p{.7\linewidth}}
\caption{Example} \label{tab:Example} \\
\toprule
\textbf{Number} &\textbf{Content} \\
\midrule
\endfirsthead
\caption[]{ Example } \\
\toprule
\textbf{Number} &\textbf{Content} \\
\midrule
\endhead
\midrule
&\hfill\emph{continuación} \\
\bottomrule
\endfoot
\bottomrule
\endlastfoot
\end{longtable}
\end{document}
Regards
marie2011
Posts: 138 Joined: Mon Feb 06, 2012 4:58 pm
Post
by marie2011 » Fri Nov 09, 2012 7:23 pm
Hi Clemens,
Many thanks for your answer and my apologies for the code I sent yesterday. I will be more careful next time. I cannot see if it compiles now, but I will do it this weekend.
Best regards,
Marie