1

I am using

Document > Settings > Document Class

of Book (Standard Class). The drop-down box for text styles provides (for FrontMatter) choices such as Title and Author, but not a choice for Subtitle. How can I include a Subtitle? (So far, the only advice I have found pertains to beamer. I do not know what beamer is. I tried to use some of the advice. I did not succeed.).

5
  • You should take a look at the titling package, which has hooks to customize the \maketitle command.
    – Bernard
    Dec 28, 2016 at 15:11
  • PDF metadata (what you see when you open the PDF in a reader, and look at file properties) has a standard entry for title, and a standard entry for author. There is no standard entry for subtitle. That's PDF itself, rather than LaTeX. So, if you have a subtitle, it is really just an additional decorative element, as far as PDF is concerned. It is not searchable metadata unless you build it into the title or add custom PDF Info. What gets printed on your title page is a LaTeX thing. All this is just FYI. Consider designing your own title page, then you can put what you want there.
    – user103221
    Dec 28, 2016 at 17:05
  • @Bernard: Thanks, but I am somewhat new to Lyx and do not know what the titling package is or how to use/customize it. Permit me to ask, any other thoughts? or how about specifics as to what to do?
    – TJB
    Dec 28, 2016 at 17:09
  • @Bernard: I think I found a somewhat workaround. I can use the Title text style, type the title and subtitle, and then insert (via Insert > Formatting) between the title and subtitle each of a 'Vertical Space (Default skip)' and a Ragged Line Break. Then, I can use right-click Text Style > Customized and experiment with font sizes until the nominal-PDF looks somewhat OK. (Regarding RobtA' comment, I do know know the extent to which to be concerned about metadata.)
    – TJB
    Dec 28, 2016 at 18:53
  • TJB: The only suggestions I can give is for LaTeX code – I don't know LyX itself.
    – Bernard
    Dec 28, 2016 at 19:22

1 Answer 1

2

In Lyx, go to Document=>Settings and a dialog box will appear. The first option is "Document Class." The last option is LaTeX preamble. Click on "LaTeX Preamble." A blank box will appear. Here you can enter LaTeX packages.

\usepackage{titling}

Click "OK" and "Apply." Now return to your document, and at the beginning find "Insert=>Tex Code". A red box will appear. Inside the box enter:

\title{
Simulating Modelling Practice and Theory \\
\large Common Simulation of a SCARA robot \\
with PD and learning controller}

Then click outside the box. The text after \large is your subtitle.

This answer draws from this Q&A: How to set maintitle and subtitle?

6
  • 1
    I tried to do this, but the 'view' feature show the text but no title. Here is what I did (after selecting "book" and specifying the 'usepackage' item for the preamble.
    – TJB
    Jan 1, 2017 at 23:47
  • 1
    There is no example, file or screenshot after, "here is what I did" so I can't help to diagnosis. Why don't you post the *.lyx file on pastebin and link to it here?
    – user26732
    Jan 3, 2017 at 3:24
  • 1
    Apologies. Somehow, I did or could not get that info into my comment. Here is the info (as best I can convey it). There are two "ERT" blocks and one line of Standard text. The first ERT block ends with the characters 'frontmatter'. The Standard text starts with the work 'some'. Everything in between those two is in the second ERT block. \pagestyle{empty}\frontmatter \title{ Draft-Title \\ \large Draft-Subtitle \\ extra-subtitle} some text
    – TJB
    Jan 4, 2017 at 14:58
  • 1
    This forum requires a minimum working example. I can't tell what is wrong with your file to help you fix it. The example above compiles. Post your effort on pastebin and link to it here or post it here.
    – user26732
    Jan 6, 2017 at 1:06
  • 1
    This forum requires a minimum working example. I can't tell what is wrong with your file to help you fix it. The example above compiles. Post your effort on pastebin and link to it here or post it here. I can't tell what packages, if any, are loaded in your preamble.
    – user26732
    Jan 6, 2017 at 1:21

You must log in to answer this question.

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