我想要的是
我想使用我在/usr/share/texlive/texmf-dist/tex/latex/tikzposter/tikzposterTitlestyles.tex
Kubuntu 14.4 上找到的 Wave 标题样式。但是我希望顶部的垂直尺寸更小一些。
我尝试过
我试过
\usetitlestyle[titletotopverticalspace=-100mm,]{Wave}
但这也引出了标题文字。
我尝试复制代码tikzposterTitlestyles.tex
并对其进行操作,但是
\definetitlestyle{mytitlestyle}{
width=\paperwidth, roundedcorners=0, linewidth=0pt, innersep=1.5cm,
titletotopverticalspace=0mm, titletoblockverticalspace=20mm,
titlegraphictotitledistance=10pt, titletextscale=1
}{
\coordinate (topleft) at (\titleposleft,\titlepostop);
\coordinate (topright) at (\titleposright,\titlepostop);
\coordinate (lefttoright) at (\titlewidth,0);
\coordinate (head) at (0,\titlepostop-\titleposbottom);
%
\draw[draw=none, left color=blocktitlebgcolor!90!black, right color=titlebgcolor!95]%
(topright) -- (topleft) -- %
($(topleft) - (head)-(0,6)$) .. controls %
($(topleft) - (head)-(0,6) + 0.25*(lefttoright) + (0,9)$) and %
($(topright) - (head) - 0.5*(lefttoright) - (-10,16)$) .. %
($(topright) - (head)$) -- cycle;
% %
\draw[draw=none, left color=blocktitlebgcolor, right color=white] %
($(topleft) - (head)-(0,2)$) .. controls %
($(topleft) - (head)-(-6,3) + 0.25*(lefttoright) + (0,10)$) and ($(topright) -
(head) - 0.25*(lefttoright) - (-6,17)$).. %
($(topright) - (head)$) .. controls %
($(topright) - (head) - 0.25*(lefttoright)-(-7,19)$) and %
($(topleft) - (head)-(-9,5) + 0.25*(lefttoright) + (0,10)$) .. %
($(topleft) - (head)-(0,4)$);
%
\draw[draw=none, left color=white, right color=blocktitlebgcolor!90!black]%
($(topleft) - (head)-(0,2)$) .. controls %
($(topleft) - (head)-(-6,3) + 0.25*(lefttoright) + (0,10)$) and ($(topright) -
(head)+(0,6) - 0.25*(lefttoright) - (-6,20)$)..%
($(topright) - (head)+(0,6)$) -- %
($(topright) - (head)$) .. controls %
($(topright) - (head) - 0.25*(lefttoright) - (-6,17)$) and %
($(topleft) - (head)-(-8,4) + 0.25*(lefttoright) + (0,10)$) .. %
($(topleft) - (head)-(0,2)$);
\setlength{\TP@titletoblockverticalspace}{5\TP@titletoblockverticalspace}
}
已经抛出了类似这样的错误
! You can't use `the character 0' after \the.
\titlepostop ->0
.5\paperheight
l.197
! Missing number, treated as zero.
<to be read again>
@
l.197
! Illegal unit of measure (pt inserted).
<to be read again>
@
l.197
! Package calc Error: `@' invalid at this point.
See the calc package documentation for explanation.
Type H <return> for immediate help.
...
l.197
! Undefined control sequence.
<argument> \TP
l.197
! Missing number, treated as zero.
<to be read again>
t
l.197
! Illegal unit of measure (pt inserted).
<to be read again>
t
l.197
! Undefined control sequence.
<argument> 5\TP
@titletoblockverticalspace
l.197
! Undefined control sequence.
<recently read> \TP
l.197
! Undefined control sequence.
<argument> \TP
@titletoblockverticalspace
l.197
! You can't use `the character @' after \the.
<argument> \TP @
titletoblockverticalspace
l.197
并封闭\setlength{\TP@titletoblockverticalspace}{5\TP@titletoblockverticalspace}
并没有帮助。\makeatletter
\makeatother
我能做些什么?
答案1
从标题修改的意义上来说,这不是一个答案,但我可以告诉您向我们展示的代码有什么问题:
之前的空行
\setlength
。那里不允许分段,因此您需要删除空白行,或者添加%
,正如您在其他地方看到的那样。要在序言中的宏名称中
@
使用@
,需要\makeatletter
在代码前添加\makeatother
之后添加,请参阅以及\makeatletter
\makeatother
做什么?。
\documentclass{tikzposter}
\usetheme{Wave}
\author{A not so frustrated user}
\title{A pretty enough poster I hope}
\makeatletter % added
\definetitlestyle{mytitlestyle}{
width=\paperwidth, roundedcorners=0, linewidth=0pt, innersep=1.5cm,
titletotopverticalspace=0mm, titletoblockverticalspace=20mm,
titlegraphictotitledistance=10pt, titletextscale=1
}{%
\coordinate (topleft) at (\titleposleft,\titlepostop);
\coordinate (topright) at (\titleposright,\titlepostop);
\coordinate (lefttoright) at (\titlewidth,0);
\coordinate (head) at (0,\titlepostop-\titleposbottom);
%
\draw[draw=none, left color=blocktitlebgcolor!90!black, right color=titlebgcolor!95]%
(topright) -- (topleft) -- %
($(topleft) - (head)-(0,6)$) .. controls %
($(topleft) - (head)-(0,6) + 0.25*(lefttoright) + (0,9)$) and %
($(topright) - (head) - 0.5*(lefttoright) - (-10,16)$) .. %
($(topright) - (head)$) -- cycle;
% %
\draw[draw=none, left color=blocktitlebgcolor, right color=white] %
($(topleft) - (head)-(0,2)$) .. controls %
($(topleft) - (head)-(-6,3) + 0.25*(lefttoright) + (0,10)$) and ($(topright) -
(head) - 0.25*(lefttoright) - (-6,17)$).. %
($(topright) - (head)$) .. controls %
($(topright) - (head) - 0.25*(lefttoright)-(-7,19)$) and %
($(topleft) - (head)-(-9,5) + 0.25*(lefttoright) + (0,10)$) .. %
($(topleft) - (head)-(0,4)$);
%
\draw[draw=none, left color=white, right color=blocktitlebgcolor!90!black]%
($(topleft) - (head)-(0,2)$) .. controls %
($(topleft) - (head)-(-6,3) + 0.25*(lefttoright) + (0,10)$) and ($(topright) -
(head)+(0,6) - 0.25*(lefttoright) - (-6,20)$)..%
($(topright) - (head)+(0,6)$) -- %
($(topright) - (head)$) .. controls %
($(topright) - (head) - 0.25*(lefttoright) - (-6,17)$) and %
($(topleft) - (head)-(-8,4) + 0.25*(lefttoright) + (0,10)$) .. %
($(topleft) - (head)-(0,2)$);
% added the percent character here
\setlength{\TP@titletoblockverticalspace}{5\TP@titletoblockverticalspace}
}
\makeatother
% make this style active
\usetitlestyle{mytitlestyle}
\begin{document}
\maketitle
\end{document}
答案2
根据tikzposter 手册\maketitle
您可以在宏中传递参数来定制标题。
您需要设置titletoblockverticalspace
选项。其他有用的选项是width
titletotopverticalspace
、titletextscale
。
例如下面的方法应该有效
\maketitle[titletoblockverticalspace=0mm]