savetrees 和 \raggedright 交互不良

savetrees 和 \raggedright 交互不良

血管内皮生长因子

\documentclass{article}
\usepackage[subtle]{savetrees}
\raggedright
\begin{document}
rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r
\end{document}

生产

在此处输入图片描述

另一方面,如果我发表评论,\usepackage[subtle]{savetrees}

在此处输入图片描述

可以和 一起使用savetrees\raggedright

注意 1:Debian Sid 上的 texlive 2016
注意 2:屏幕截图是用两个不同的程序不太小心拍摄的,因此缩放和质量有所不同
注意 3:受 Steven 的回答的启发,我\raggedright之前尝试过放置\usepackage{savetrees},但结果是一样的......

答案1

或者使用以下paragraphs=normal选项加载保存树:

\documentclass{article}

\usepackage[subtle,paragraphs=normal]{savetrees}


\begin{document}\raggedright

rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r


\end{document}

在此处输入图片描述

[* 编辑 *]

\documentclass{article}

\usepackage[subtle,paragraphs=normal]{savetrees}
\usepackage{lipsum}

\begin{document}\raggedright

rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r

\lipsum

\end{document}

在此处输入图片描述

答案2

也许加载ragged2e包(之前savetrees)并使用\RaggedRight而不是\raggedright

\documentclass{article}
\usepackage{ragged2e}
\RaggedRight
\usepackage[subtle]{savetrees}
\begin{document}
rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r
\end{document}

在此处输入图片描述

答案3

标准设置下的结果相同:混合使用\looseness=-1\raggedright个糟糕的主意。并savetrees尝试\looseness=-1对每个段落都执行此操作,这又是一个糟糕的主意。

\documentclass{article}

\begin{document}

\raggedright

rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r

\looseness=-1
rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r

\end{document}

在此处输入图片描述

我建议采用一种不同的方法来尽量减少段落中的行数:

\documentclass{article}

\usepackage[subtle]{savetrees}
\usepackage{lipsum} % just to show \raggedright is respected

% fix the silly thing savetrees does
\let\everypar\markeverypar
% use a high value for \linepenalty instead
\AtBeginDocument{\linepenalty=2000 }

\raggedright

\begin{document}

rgeg wrg wrg rgw rwg rwhrwghwrg e qeg rg wrg wr grw rh gr gwrg wrg 
rg wgr ewt rw wrt rwt rw  ewt rtw t rqqqqqqqqqqqqqqwt w we tw et ewt
w t wet wet wqet w t r wr thueiyuey  w ui eiuwy iywe iuyiew iie i 
ewiu ewiye iyewiuy iuew iueyiuyewiiuey iq  q qiyieqy iqiuyiriuy r

\lipsum[4]

\end{document}

在此处输入图片描述

如果我把设置去掉\linepenalty,结果就是这样。你可以看到,省了一行。

在此处输入图片描述

相关内容