Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am making a project report for college.

In the instructions regarding report,it is written that

"The matter contained in the report should be typed in MS word (1.5 spacing) Times New Roman,12 pt or equivalent with other software"

So,I decided to make my report with LaTeX.Here is some code,I am experimenting with:

\documentclass [a4paper,12pt,oneside,fullpage]{report}
\pagestyle{empty}
\usepackage{setspace}
\begin{document}

\section*{Acknowledgement}
\begin{onehalfspace}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vitae justo dolor. In justo felis, facilisis et rhoncus in, feugiat eu elit. Aenean mollis arcu ut nunc pharetra vitae sagittis sapien feugiat. Pellentesque feugiat egestas nulla eleifend accumsan. Suspendisse fermentum dignissim erat vitae congue. Praesent adipiscing erat in nunc tristique porttitor. Ut vitae erat sit amet dui ultricies semper non et enim. Mauris vel sem a risus egestas elementum et vel neque. Mauris consequat, nulla eu aliquet tincidunt, dui libero molestie ligula, nec convallis metus metus vitae elit. Etiam turpis ante, mattis quis elementum et, fermentum a mi. In in sem massa, vel egestas arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non iaculis libero. In nibh mauris, interdum ut imperdiet ut, eleifend nec dolor.
\end{onehalfspace}    
\end{document}

which on compilation generated this PDF

But if I copy,paste the same text in Libreoffice (12 font-size and Times New Roman) and then export it to PDF,it looks like

LaTeX prints the same paragraph in 12 lines,while Libreoffice prints it in 9 lines.

So,is it safe to go with LaTeX (the instructions has to be followed strictly)?

Is this the default behaviour of LaTeX or am i missing something (most probably) perhaps something (margin,linewidth,text alignment) ?

Thanks in advance...

share
5  
Different fonts, different kerning, different altogether. The default behaviour of LaTeX (or TeX) is to set the paragraph as a whole, while LibreOffice might do it on a line-by-line basis. Completely different engines and setups. –  Werner Jul 16 '12 at 20:47
    
According to your MWE, you're not using Times Roman but the default font, which is Computer Modern. Add either \usepackage{mathptmx} or \usepackage{txfonts}, as well as the command \usepackage[margin=2cm]{geometry}, to the preamble of your LaTeX document, and the output should be quite similar to what's produced by other software packages (as long as they use the same fonts, margin settings, etc.). –  Mico Jul 16 '12 at 21:36
    
Make that \usepackage[margin=2.5cm]{geometry} (or =1in) to mimic default margins of word processing software. –  jon Jul 16 '12 at 22:07
    
@jon -- I believe the default margin width for LibreOffice is 2cm; of course, I may be wrong. However, setting margin=2cm certainly succeeds almost completely in replicating the LibreOffice output with LaTeX and either txfonts or mathptmx, and that's why I suggested it in my earlier comment. –  Mico Jul 16 '12 at 23:23
    
@Mico -- you're probably right. I just saw MS Word and I remember it being 1in. (I've never used LibreOffice to write anything; and the last time I did in Word was when OpenOffice was 2.0....) –  jon Jul 17 '12 at 0:13
add comment

1 Answer

up vote 6 down vote accepted

You have to use the same margins and the same font family (Times) as in LibreOffice. For example, LibreOffice 3.5.4 has 2 cm left and right margins as default in my installation (be aware that standard MS Word has US 1 inch margins, i.e. 2,54 cm). Also, LaTeX use Computer Modern as standard font, not Times New Roman. Try to add

\usepackage{txfonts} 
\usepackage[layout=a4paper,lmargin=2cm,rmargin=2cm]{geometry}

to your preamble. If I compile the following MWE, I get approximately the same result as your LibreOffice example.

\documentclass [a4paper,12pt,latin,oneside]{report}
\pagestyle{empty}
\usepackage{txfonts}
\usepackage{setspace}
\usepackage[layout=a4paper,lmargin=2cm,rmargin=2cm]{geometry}


\begin{document}

    \section*{Acknowledgement}
    \begin{onehalfspace}
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vitae justo dolor. In justo felis, facilisis et rhoncus in, feugiat eu elit. Aenean mollis arcu ut nunc pharetra vitae sagittis sapien feugiat. Pellentesque feugiat egestas nulla eleifend accumsan. Suspendisse fermentum dignissim erat vitae congue. Praesent adipiscing erat in nunc tristique porttitor. Ut vitae erat sit amet dui ultricies semper non et enim. Mauris vel sem a risus egestas elementum et vel neque. Mauris consequat, nulla eu aliquet tincidunt, dui libero molestie ligula, nec convallis metus metus vitae elit. Etiam turpis ante, mattis quis elementum et, fermentum a mi. In in sem massa, vel egestas arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non iaculis libero. In nibh mauris, interdum ut imperdiet ut, eleifend nec dolor.
    \end{onehalfspace}    
    \end{document}

That is: it compiles to nine lines.

share
add comment

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .