4

enter image description here

How do i remove the space infront of the 'Lorem' and how do i set the linespacing to 6pt after abstract ?

Requirements:

  • Abstract heading
  • Alignment : left
  • Size : 13pt , bold italic Times New Roman , Small caps
  • Paragraph line spacing : 6 pt

Eg. After the Abstract i need include 6 pt of line spacing and then continue to the abstract content.

This is the requirement i want, and i not sure how to set for the line spacing.

\documentclass[a4paper]{article}
\usepackage{geometry}
\geometry{
    a4paper,
    total={210mm,297mm},
    left=30mm,
    top=30mm,
    right=30mm,
    bottom=30mm
}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mathptmx}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{kpfonts}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tocloft}
\usepackage{authblk}
\usepackage{abstract}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{slantsc}
\usepackage{bold-extra}

\renewcommand{\absnamepos}{flushleft}
\setlength{\absleftindent}{0pt}
\setlength{\absrightindent}{0pt}
\renewcommand{\abstractnamefont}{\fontsize{13}{16}\scshape\itshape\bfseries\selectfont\parskip6pt}
\renewcommand{\abstracttextfont}{\fontsize{10}{12}\itshape}
\usepackage{lipsum}

\begin{document}
\begin{abstract}
\lipsum[1]
\end{abstract}
\end{document}
Bobyandbob
  • 4,899
  • 1
    use \noindent \lipsum[1] to remove the space before Lorem. – ddas Aug 13 '16 at 07:06
  • Okay, thanks. And how about the line spacing? Is that using parskip6pt for line spacing just like what written in my code? – user3718809 Aug 13 '16 at 07:10
  • Or the setting is already default Eg. after /title then the paragraph line spacing is auto 24pt ? – user3718809 Aug 13 '16 at 07:14
  • It's not clear why you would want to change the \parskipparameter, which governs the amount of white space between paragraphs, for the abstract environment: Abstracts usually consist of a single (and hopefully brief) paragraph, right? – Mico Aug 13 '16 at 07:39
  • Abstract heading Left 13 pt. bold italic TNR, small caps 6 pt. line sp. Abstract text Justify 10 pt. italic TNR 12 pt. line sp. This is the requirement i want, and i not sure how to set for the line spacing. – user3718809 Aug 13 '16 at 07:47
  • i edited my post, included packages. Please tell me what is the problem and i also cannot use the bold,small caps and italic together to format my text. ty – user3718809 Aug 13 '16 at 12:23
  • I would not use italic bold scshape, as times new roman is not shipped with this fontshape. I don't think many fonts support this. Simulating it is not a good idea, it would look terrible. – Runar Aug 13 '16 at 13:50
  • See this post : http://tex.stackexchange.com/questions/27411/small-caps-and-bold-face#27413 For the rest, I think you could use something like \renewcommand{\abstractnamefont}{\fontsize{13}{16}\scshape\slshape \parskip6pt} \renewcommand{\abstracttextfont}{\fontsize{10}{12}\itshape\noindent\ignorespaces} – Runar Aug 13 '16 at 13:54
  • Not really work, if i put bold for the text. It can either in italic with small caps or only bold... – user3718809 Aug 13 '16 at 14:08
  • yes, because that font feature doesn't exist, and shouldn't be simulated. It is of course hackable, but would look terrible. And no, MS Word doesn't make it look good either, it fakes it too. And do you really want bold italic scshape? Even if the font-feature did exist, and was handcrafted to still look good, what would the signaling effect be? I suggest changing it to something that actually exists. – Runar Aug 13 '16 at 15:18
  • Is the assignment to produce the required formatting? Or is the assignment something else? I've never heard of anybody requiring bold, italic and small-caps all at once. Italic small-caps are quite rare. Bold small-caps are not common either. (Oblique is not the same as italic, of course. \slshape gives you oblique, which might be what Word tells you is italic, but isn't.) – cfr Aug 14 '16 at 02:50
  • yeah, my assignment format is similar to this docs link. I have no idea how to format it with latex. http://www.glyndwr.ac.uk/computing/research/ita05/formatguide.doc – user3718809 Aug 14 '16 at 02:54
  • Your code cannot, of course, be compiled as it stands as it is radically incomplete. Nonetheless, it makes no sense to load the mix of packages you are using. Loading lmodern, mathptmx and kpfonts is probably pointless if you then load fontspec. You almost certainly do not want to load fontenc since you are using fontspec. You do not want to load slantsc or bold-extra if using fontspec. – cfr Aug 14 '16 at 02:54
  • But is the assignment to do the formatting? Or is the assignment something else? Few people here are going to rush to download a DOC. – cfr Aug 14 '16 at 02:55
  • If the requirements will make your document look terrible anyway, why not just use Word or LibreOffice or whatever? It isn't clear that there's much to be gained by making LaTeX create ugly results, because it is surprisingly difficult to get TeX to mess things up badly enough to pass as Word. philosophy.sty may be of help, though. (Search for it.) If it just needs to look awful, it might work. However, TNR just doesn't have the combination of weight and shape. (And, yes, you can fake it. But doing so is evil.) – cfr Aug 14 '16 at 02:59
  • Just want to get extra mark for it. No matter how also need to use latex to generate it ;( – user3718809 Aug 14 '16 at 03:02

1 Answers1

1
\documentclass[a4paper]{article}
\usepackage{geometry}
\geometry{
    a4paper,
    total={210mm,297mm},
    left=30mm,
    top=30mm,
    right=30mm,
    bottom=30mm
}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{mathptmx}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{kpfonts}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage{tocloft}
\usepackage{authblk}
\usepackage{abstract}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{slantsc}
\usepackage{bold-extra}

\renewcommand{\absnamepos}{flushleft}
\setlength{\absleftindent}{0pt}
\setlength{\absrightindent}{0pt}
\renewcommand{\abstractnamefont}{\fontsize{13}{16}\scshape\itshape\bfseries\selectfont\parskip6pt}
\renewcommand{\abstracttextfont}{\fontsize{10}{12}\itshape}
\usepackage{lipsum}

\begin{document}
\begin{abstract}
\vspace*{6pt}
\noindent \lipsum[1]
\end{abstract}
\end{document}

enter image description here

subham soni
  • 9,673