I am trying to use the package titlesec to create vertical spaces before and after titles of sections in my document. I have tried the following commands:
Both of them seem to work for the space after the title (i.e the last parenthesis with 3pc in the above document), but they dont work for the space before the title. Any help will be greatly appreciated.
thanks. An example is attached. The issue i am grappling with is how to get the required vertical space between the text in section 2 and the heading of section 3. (Also, if there is a way to adjust font size for section heading that would be great to know too)
LyX is supposed to be a tool for experienced LaTeX-users.
What we have here, is simply madness. Sorry, please don't feel offended but that preamble looks like a madman has assembled it. Why are you keeping all those commented lines? This is insane.
To the point: The spacing isn't right, and the font size doesn't match. But apparently, this is what you wanted by clicking some buttons without care in LyX.
Get rid of that \normalsize stuff and all those freaking onehalfspace environments. Your document is typeset onehalfspaced already.
Another thing: Please use package blindtext to create some blindtext. Or use your imagination and write up a few sentences but don't throw careless asdf fsad ffsa dfsa at us.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Thanks for you response. I agree that the preamble with all the commented lines is a bit confusing and I have fixed that now.
On your (I must say rather polite) suggestion to "Get rid of that \normalsize stuff and all those freaking onehalfspace environments", I think the reason why I posted this in the first place was that I am not sure how to do it, i.e which command in my preamble is leading to these one half spacings that are interfering with titling.
Point about using blindtext or some other text is well taken. Apologies on that.
Look forward to your response.
ps "LyX is supposed to be a tool for experienced LaTeX-users." I am not sure I agree. For people like me without much of a background in programming or computer languages, lyx provides a simple way to access the latex capabilities. Perhaps as an expert you view it differently.
I minimized your code, please open in writelatex and do as i say: Get rid of the freaking onehalfspace-environments, the document is onehalfspaced anyway.
While I see that I can open this document in writelatex or any other latex editor and get rid of all the half spacings I want, this is an example file. I need to implement this in a much larger file which is set up in lyx, so if there is a way to do this directly from lyx it would be helpful.
LyX has inserted those lines because (i guess) you clicked some button. Unclick the button or revert clicking the button.
How to do this in LyX i cannot tell you, i just open up LyX most of the time to export user code to LaTeX and provide some fix. This time, i can point out just the cause of problems.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
The onehalfspacing environments have been added to individual paragraphs because, somehow, the paragraph settings has been changed. Seems the simplest way of removing it is to select all the text, right click -> Paragraph settings. Set Line spacing to Default if it isn't already, and click Apply.
If you've customized some other paragraph setting somewhere, that will likely be reset by this, so don't be surprised if something changes. You can of course do this one paragraph at a time, but that's boring.
I don't know where the \normalsizes in section headings come from, but select the heading, right click -> Text style -> Customized. From the Size dropdown, select Reset and click OK. That seems to remove those.