双倍行距不起作用

双倍行距不起作用

我无法生成双倍行距。我尝试了以下操作,但没有成功:

\documentclass[a4paper,12pt]{report}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew,latin1]{inputenc}

\usepackage{setspace}      
\onehalfspacing       

\begin{document}


AAAAAAAAAAAAAAAAAAAAAAAAAAA
\doublespacing
BBBBBBBBBBBBBBBBBBBBBBBBBBB

\end{document}

有人能帮我把两行之间的间距设为双倍吗?

答案1

这可能不是您想要的,但请尝试在\doublespacing命令前放置一个空行。

\documentclass[a4paper,12pt]{report}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew,latin1]{inputenc}

\usepackage{setspace}      
\onehalfspacing       

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed hendrerit
sagittis orci. Nulla bibendum sed dui non condimentum. Suspendisse 
libero mi, iaculis at justo vel, tincidunt tristique mi. Vestibulum 
tellus massa, sollicitudin in pulvinar vitae, adipiscing ornare sapien. 
Donec porttitor eu diam vitae eleifend. 

\doublespacing
\noindent Nullam id ullamcorper lacus, 
eget pellentesque purus. Integer quis mattis sem. Mauris quis tincidunt 
mi. Sed consectetur justo sed porta lacinia. In nunc felis, ornare a 
arcu quis, porttitor sollicitudin nunc. Nam molestie, sem quis aliquam 
adipiscing, nisl est pulvinar lacus, eget egestas nisi libero in turpis.
\end{document}

这将产生以下内容。

编译后代码的屏幕截图。

相关内容