ElegantLaTeX/ElegantBook

Cover logo 留空

fyuniv opened this issue · 2 comments

能不能加个选择,如果没有cover/logo,那个位置就显示空白,而不是像现在那样留个空白图片。

建议把example-picture 去掉。另外给include_graphics{@cover}加个保护。原因是,有时候用户会定义全局的图片大小:

\setkeys{Gin}{width=\maxwidth,height=\maxheight, keepaspectratio}

由于keepaspectratio的作用,如果图片的height比较小,\includegraphics[width=\linewidth]{\@cover} 就起不到应有的效果。
可以考虑下面的修改。

 \ifdefstring{\ELEGANT@device}{normal}{
    \ifcsname @cover\endcsname
\begingroup
\setkeys{Gin}{width =\linewidth}
      \includegraphics{\@cover}
\endgroup  
    \fi
  }{\relax}

嗯 好的 我 check 下。