I want my work to have those curly section marks (\S) at the beginning of every section. I came across this question: Section Symbol and Number, which does answer the question in LaTeX but I was wondering if there's an even simpler answers for those who use LyX?

  • Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – jub0bs
    Commented Mar 12, 2013 at 16:09
  • 1
    @Jubobs considering that this is LyX, I don't know if \documentclass{...} is in order here... @Donjim, I'm not at a computer with LyX at the moment, but you should be able to copy those two lines in the linked question (\usepackage and \titleformat) into your preamble (Layout -> Document -> Preamble) and be good to go. Commented Mar 12, 2013 at 18:32
  • @SeanAllred Thanks! That's much better than adding a LaTeX box at the beginning of the document. I feel very spoiled in asking this, but I'd be honest and say I wondered if there was something more along the lines of a document class suited for this? If no one answers in a couple of days I'll accept your answer of course, since it is just as good.
    – Donjim
    Commented Mar 12, 2013 at 19:58
  • @Donjim, it could easily be implemented as such, but I'd caution against it. Doing so could introduce a pattern that will get out of hand very quickly, producing new document classes for an arbitrary number of styles, remembering to texhash each time a new one is made, etc. would you rather find a way to auto-populate your preamble? Commented Mar 12, 2013 at 20:35
  • @Donjim you could create a LyX module which does this, if you liked that better. That way you could go to Document Settings > Modules and then add it. This seems unnecessary to me for just one line of preamble code though. But if you are interested, read the documentation in Help > Customization.
    – scottkosty
    Commented Mar 13, 2013 at 4:36

1 Answer 1


Well, @SeanAllred answered the question in the comments section. Since it bugs me to leave a question unanswered I thought I'd just add it as an answer. (I'm not sure if that agrees with stack exchange etiquette, guess I'm about to find out)

The simple answer would be to copy these lines


to the LaTeX preamble box under Document -> Settings -> LaTeX Preamble. I have tried it and it works well!

A different approach suggested by @scottkosty is to create a LyX module for this. I haven't tried it, so I wouldn't know.

Thanks for the help!

  • I think the normal thing to do is to write a comment asking the commenter to post a "proper" answer. Commented Mar 13, 2013 at 21:47
  • @TorbjørnT. Thanks! I'll remember it next time.
    – Donjim
    Commented Mar 17, 2013 at 18:29

You must log in to answer this question.

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