LaTeX
Fjern blanke sider
Jeg har nogle problemer, med mit tex, som jeg håber nogen kan svare på. Koden nedenfor burde reproducerer det. Når jeg kører det får jeg to ekstra blanke sider, som ikke burde være der. Hvordan kan jeg fjerne dem?
Mvh /Peter
\documentclass[a4paper,extrafontsizes,12pt,draft,article]{memoir}
\usepackage{afterpage}
\usepackage{pdflscape}
\usepackage[showframe]{geometry}
% Showframe
\makeatletter
\let\LS@vtryfc\@vtryfc
\g@addto@macro\landscape{%
\def\@vtryfc#1{%
\LS@vtryfc{#1}%
\LS@rot
}%
}
\makeatother
\makeatletter
\newcommand*{\gmshow@textheight}{\textheight}
\newdimen\gmshow@@textheight
\g@addto@macro\landscape{%
\gmshow@@textheight=\hsize
\renewcommand*{\gmshow@textheight}{\gmshow@@textheight}%
}
\def\Gm@vrule{%
\vrule width 0.2pt height\gmshow@textheight depth\z@
}%
\makeatother
\usepackage{lipsum}
\setlxvchars[\normalfont]
\settypeblocksize{*}{1.15\lxvchars}{1.61803}
\setlrmargins{*}{*}{1}
\setulmargins{*}{*}{1}
\checkandfixthelayout[nearest]
\newsubfloat{figure}
\captionstyle{\hangcaption}
\newsubfloat{table}
\begin{document}
\lipsum[1]
\afterpage{
\noindent
\begin{table}[p]
\caption{Prediction power of the model, confidence intervals for parameters and season.}
\centering
\resizebox{0.48\columnwidth}{5mm}{%
\subtop[Confidence level for season parameters]{
\begin{tabular}{lrrrr}
\toprule
Names & confGoals & confConcede & confPoints & confPlacement \\
\midrule
Arsenal & (51.9;84.1) & (20.1;41.9) & (81.4;102.6) & (1;7.8) \\
Aston Villa & (29.3;54.7) & (40.5;69.6) & (65.7;89.2) & (5.1;20) \\
Birmingham & (17.6;38.4) & (36.2;63.8) & (58.2;81.5) & (12.2;20) \\
Blackburn & (37;65) & (29.2;54.7) & (72.2;95.1) & (1;15.7) \\
Bolton & (35.2;62.8) & (28.5;53.5) & (71.4;94.5) & (1.2;16.4) \\
Charlton & (28.5;53.6) & (40.4;69.6) & (65.3;88.8) & (5.4;20) \\
Chelsea & (55.4;88.5) & (12.8;31.2) & (85.2;105.4) & (1;5.4) \\
Everton & (22.6;45.5) & (35.3;62.7) & (62.1;85.7) & (8.4;20) \\
Fulham & (34.4;61.6) & (43;72.9) & (68.3;91.6) & (3;18.7) \\
Liverpool & (42.2;71.8) & (15.2;34.8) & (78.4;100.2) & (1;10.5) \\
Man City & (30.2;55.8) & (34.4;61.6) & (67.2;90.7) & (3.9;19.5) \\
Man United & (55.4;88.5) & (22.6;45.3) & (82.2;103.2) & (1;7.2) \\
Middlesbrough & (34.4;61.6) & (43.1;72.9) & (68.4;91.6) & (2.9;18.6) \\
Newcastle & (33.6;60.4) & (29.4;54.7) & (70.1;93.3) & (1.9;17.4) \\
Portsmouth & (25.1;48.9) & (46.5;77.4) & (62.4;85.9) & (8.1;20) \\
Sunderland & (16;36) & (52.7;85.4) & (55.3;78.2) & (14.6;20) \\
Tottenham & (38.7;67.3) & (25.9;50.1) & (73.8;96.5) & (1;14.3) \\
West Brom & (20.1;41.9) & (43.1;72.9) & (59.3;82.8) & (11;20) \\
West Ham & (37.9;66.1) & (40.4;69.5) & (70.5;93.6) & (1.6;16.9) \\
Wigan & (31.8;58.1) & (37.9;66.2) & (67.6;91) & (3.5;19.2) \\
\bottomrule
\end{tabular}
}
}
\hfill
\resizebox{.48\columnwidth}{5mm}{%
\subtop[Confidence level for the regression parameters.]{
\label{Tab:confIntPara}
\begin{tabular}{lrrrr}
\toprule
Names & confOff & confDef & confInt & confHome \\
\midrule
Arsenal & (0.2;0.6) & (-0.7;0) & (-0.2;0) & (0.2;0.5) \\
Aston Villa & (-0.4;0.2) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Birmingham & (-0.9;-0.1) & (-0.2;0.4) & (-0.2;0) & (0.2;0.5) \\
Blackburn & (-0.2;0.4) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Bolton & (-0.2;0.3) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Charlton & (-0.4;0.2) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Chelsea & (0.2;0.7) & (-1.1;-0.3) & (-0.2;0) & (0.2;0.5) \\
Everton & (-0.6;0) & (-0.2;0.3) & (-0.2;0) & (0.2;0.5) \\
Fulham & (-0.2;0.3) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
Liverpool & (-0.1;0.5) & (-1;-0.2) & (-0.2;0) & (0.2;0.5) \\
Man City & (-0.4;0.2) & (-0.2;0.3) & (-0.2;0) & (0.2;0.5) \\
Man United & (0.2;0.7) & (-0.6;0.1) & (-0.2;0) & (0.2;0.5) \\
Middlesbrough & (-0.2;0.3) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
Newcastle & (-0.3;0.3) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Portsmouth & (-0.5;0.1) & (0.1;0.6) & (-0.2;0) & (0.2;0.5) \\
Sunderland & (-0.9;-0.2) & (0.2;0.6) & (-0.2;0) & (0.2;0.5) \\
Tottenham & (-0.1;0.4) & (-0.5;0.1) & (-0.2;0) & (0.2;0.5) \\
West Brom & (-0.7;0) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
West Ham & (-0.1;0.4) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Wigan & (-0.3;0.3) & (-0.1;0.4) & (-0.2;0) & (0.2;0.5) \\
\bottomrule
\end{tabular}
}
}
\end{table}
%
\noindent
\begin{figure}[p]%
\centering
\rule{\columnwidth}{.42\textheight}
\caption{95\% confidence interval for final league position for each team in the league.}%
\end{figure}
}
\noindent
\afterpage{
\begin{landscape}
\thispagestyle{empty}
\vspace*{\fill}
\begin{table}
\caption{The table shows if the confidence interval for the home (row) and away (column) teams $\lambda$ parameter overlap. If they do this is represented with a 1, otherwise it is a 0.}
\centerline{
\begin{tabular}{lcccccccccccccccccccc}
\toprule
& Ars & Ast & Bir & Bla & Bol & Cha & Che & Eve & Ful & Liv & Man C& Man U & Mid & New & Por & Sun & T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& 0 & 0 \\
Middlesbrough & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\
Newcastle & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & & 0 & 0 & 1 & 0 & 1 & 1 \\
Portsmouth & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & & 1 & 1 & 1 & 1 & 1 \\
Sunderland & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & & 0 & 1 & 1 & 1 \\
Tottenham & 1 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & & 0 & 1 & 1 \\
West Brom & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & & 1 & 1 \\
West Ham & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 1 & 0 & & 1 \\
Wigan & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 & \\
\bottomrule
\end{tabular}
}
\end{table}
\vspace*{\fill}
\end{landscape}
}
\end{document}
Svar #1
15. december 2013 af daleif (Slettet)
Svar #2
15. december 2013 af pdebes (Slettet)
Grunden til afterpage, var at hvis jeg bare brugte table[p], så efterlod det et stort tom stykke på siden før floatet. Det ser dog ud til at sidewaystable har overflødiggjort afterpage og landscape og fjernet de to blanke sider, så det er godt. Men når jeg bruger sidewaystable fra rotating pakken, ser \thispagesyle{empty} ikke ud til at have nogen effekt, så der står et sidenummer mit i min tabel. Nogen ide til hvorfor det kunne være?
\documentclass[a4paper,extrafontsizes,12pt,draft,article]{memoir}
\usepackage{afterpage}
\usepackage{rotating}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{sidewaystable}[p]
\thispagestyle{empty}
\rule{.5\textwidth}{.05\textheight}
\end{sidewaystable}
\end{document}
Svar #3
15. december 2013 af daleif (Slettet)
Jeg kan ikke se hvad der er galt med
\documentclass[a4paper,12pt,article]{memoir}
\usepackage{rotating}
\usepackage{lipsum}
\setlxvchars[\normalfont]
\settypeblocksize{*}{1.15\lxvchars}{1.61803}
\setlrmargins{*}{*}{1}
\setulmargins{*}{*}{1}
\checkandfixthelayout[nearest]
\newsubfloat{figure}
\captionstyle{\hangcaption}
\newsubfloat{table}
\begin{document}
\lipsum[1]
\begin{table}[p]
\caption{Prediction power of the model, confidence intervals for parameters and season.}
\centering
\resizebox{0.48\columnwidth}{5mm}{%
\subtop[Confidence level for season parameters]{
\begin{tabular}{lrrrr}
\toprule
Names & confGoals & confConcede & confPoints & confPlacement \\
\midrule
Arsenal & (51.9;84.1) & (20.1;41.9) & (81.4;102.6) & (1;7.8) \\
Aston Villa & (29.3;54.7) & (40.5;69.6) & (65.7;89.2) & (5.1;20) \\
Birmingham & (17.6;38.4) & (36.2;63.8) & (58.2;81.5) & (12.2;20) \\
Blackburn & (37;65) & (29.2;54.7) & (72.2;95.1) & (1;15.7) \\
Bolton & (35.2;62.8) & (28.5;53.5) & (71.4;94.5) & (1.2;16.4) \\
Charlton & (28.5;53.6) & (40.4;69.6) & (65.3;88.8) & (5.4;20) \\
Chelsea & (55.4;88.5) & (12.8;31.2) & (85.2;105.4) & (1;5.4) \\
Everton & (22.6;45.5) & (35.3;62.7) & (62.1;85.7) & (8.4;20) \\
Fulham & (34.4;61.6) & (43;72.9) & (68.3;91.6) & (3;18.7) \\
Liverpool & (42.2;71.8) & (15.2;34.8) & (78.4;100.2) & (1;10.5) \\
Man City & (30.2;55.8) & (34.4;61.6) & (67.2;90.7) & (3.9;19.5) \\
Man United & (55.4;88.5) & (22.6;45.3) & (82.2;103.2) & (1;7.2) \\
Middlesbrough & (34.4;61.6) & (43.1;72.9) & (68.4;91.6) & (2.9;18.6) \\
Newcastle & (33.6;60.4) & (29.4;54.7) & (70.1;93.3) & (1.9;17.4) \\
Portsmouth & (25.1;48.9) & (46.5;77.4) & (62.4;85.9) & (8.1;20) \\
Sunderland & (16;36) & (52.7;85.4) & (55.3;78.2) & (14.6;20) \\
Tottenham & (38.7;67.3) & (25.9;50.1) & (73.8;96.5) & (1;14.3) \\
West Brom & (20.1;41.9) & (43.1;72.9) & (59.3;82.8) & (11;20) \\
West Ham & (37.9;66.1) & (40.4;69.5) & (70.5;93.6) & (1.6;16.9) \\
Wigan & (31.8;58.1) & (37.9;66.2) & (67.6;91) & (3.5;19.2) \\
\bottomrule
\end{tabular}
}
}
\hfill
\resizebox{.48\columnwidth}{5mm}{%
\subtop[Confidence level for the regression parameters.]{
\label{Tab:confIntPara}
\begin{tabular}{lrrrr}
\toprule
Names & confOff & confDef & confInt & confHome \\
\midrule
Arsenal & (0.2;0.6) & (-0.7;0) & (-0.2;0) & (0.2;0.5) \\
Aston Villa & (-0.4;0.2) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Birmingham & (-0.9;-0.1) & (-0.2;0.4) & (-0.2;0) & (0.2;0.5) \\
Blackburn & (-0.2;0.4) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Bolton & (-0.2;0.3) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Charlton & (-0.4;0.2) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Chelsea & (0.2;0.7) & (-1.1;-0.3) & (-0.2;0) & (0.2;0.5) \\
Everton & (-0.6;0) & (-0.2;0.3) & (-0.2;0) & (0.2;0.5) \\
Fulham & (-0.2;0.3) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
Liverpool & (-0.1;0.5) & (-1;-0.2) & (-0.2;0) & (0.2;0.5) \\
Man City & (-0.4;0.2) & (-0.2;0.3) & (-0.2;0) & (0.2;0.5) \\
Man United & (0.2;0.7) & (-0.6;0.1) & (-0.2;0) & (0.2;0.5) \\
Middlesbrough & (-0.2;0.3) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
Newcastle & (-0.3;0.3) & (-0.4;0.2) & (-0.2;0) & (0.2;0.5) \\
Portsmouth & (-0.5;0.1) & (0.1;0.6) & (-0.2;0) & (0.2;0.5) \\
Sunderland & (-0.9;-0.2) & (0.2;0.6) & (-0.2;0) & (0.2;0.5) \\
Tottenham & (-0.1;0.4) & (-0.5;0.1) & (-0.2;0) & (0.2;0.5) \\
West Brom & (-0.7;0) & (0;0.5) & (-0.2;0) & (0.2;0.5) \\
West Ham & (-0.1;0.4) & (-0.1;0.5) & (-0.2;0) & (0.2;0.5) \\
Wigan & (-0.3;0.3) & (-0.1;0.4) & (-0.2;0) & (0.2;0.5) \\
\bottomrule
\end{tabular}
}
}
\end{table}
\begin{figure}[p]%
\centering
\rule{\columnwidth}{.42\textheight}
\caption{95\% confidence interval for final league position for each team in the league.}%
\end{figure}
\begin{sidewaystable}[p]
\caption{The table shows if the confidence interval for the home (row) and away (column) teams $\lambda$ parameter overlap. If they do this is represented with a 1, otherwise it is a 0.}
\centering
\tiny
\begin{tabular}{lcccccccccccccccccccc}
\toprule
& Ars & Ast & Bir & Bla & Bol & Cha & Che & Eve & Ful & Liv & Man C& Man U & Mid & New & Por & Sun & Tot & Wes B& Wes H & Wig \\
\midrule
Arsenal & & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
Aston Villa & 1 & & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1 \\
Birmingham & 0 & 1 & & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
Blackburn & 1 & 1 & 0 & & 1 & 1 & 1 & 0 & 1 & 1 & 1 & 1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1 & 1 & & 0 & 1 & 1 & 1 \\
Tottenham & 1 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 & 0 & 1 & 0 & 0 & & 0 & 1 & 1 \\
West Brom & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & & 1 & 1 \\
West Ham & 1 & 1 & 0 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 1 & 0 & & 1 \\
Wigan & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 1 & 1 & 1 & \\
\bottomrule
\end{tabular}
\end{sidewaystable}
\end{document}
Svar #4
15. december 2013 af daleif (Slettet)
Hvorfor er det lige du gerne vil have sidetallet væk på en side med kun floats?
Svar #5
15. december 2013 af pdebes (Slettet)
Først tak for svar :)
Det er ikke fordi jeg meget gerne vil have sidetallet væk, men syntes ikke det er særlig pænt at det går ind over tabellen. Og jo, jeg kunne godt sætte font størrelsen ned for at få plads til det hele tabellen og sidetallet, men syntes dog personligt at alt under \small bliver for småt til at det giver en nem og flydene oplevelse når man skal læse.
Svar #6
15. december 2013 af daleif (Slettet)
Man kunne også starte med at sætte tabellen pænere op
Svar #7
15. december 2013 af pdebes (Slettet)
Tak for forslaget, det ender nok med at det er det jeg gør, Men det vigtigste var at jeg slap af med de to blanke sider.
Skriv et svar til: Fjern blanke sider
Du skal være logget ind, for at skrive et svar til dette spørgsmål. Klik her for at logge ind.
Har du ikke en bruger på Studieportalen.dk?
Klik her for at oprette en bruger.