On 12/24/2017 12:30 PM, Rich Shepard wrote:
I've dug a hole and need to learn how to climb out.

  For a reason I cannot find the preamble for every document class reverts
to that for a KOMA-Script letter2 document. Looking in ~/.lyx I don't see
why this happens.
Check ~/.lyx/templates/defaults.lyx. That's the document class (and settings) that LyX clones whenever you start a new document (File > New).

  I exported the book I'm writing as a .txt file; it has no preamble
information, only the body text. Then I created a new document and the
default class is the letter. Changing the class to Book (standard) or
KOMA-Script book did not change the preamble.
No shock so far. When you created the new document, it inherited your default preamble. Changing the class does not change the preamble.

  While the empty document displayed I deleted everything in the preamble
after \date{}. When I inserted the text file and looked at the settings, the
class is still Book (Standard with extra fonts), but now the preamble has
all the letter directives.
This part I cannot explain. Did you save the document after clearing the preamble and before inserting the text?

  My web searches do not find the answer; references to the lyx wiki that
I've seen do not tell me how to reset the preamble when the document class
is changed. I need a clue on where this is controlled so I can fix the
current situation and avoid it in the future. And, as an aside, with all
these attempts the Check TeX remains visible in the Tools menu.
One option is to start a new document (whatever class you want as default), clear the preamble and then click Document > Settings... > Save as Document Defaults. Thereafter all new documents should be born with an empty preamble.

If you have specific preambles you would like by default for certain document classes (and not the same preamble for all classes), you can do the following. For each document class, start a new document and rejigger the preamble to your liking. Also make any changes to class options, page size, margins, fonts etc. that tickle your fancy. You can also include boilerplate in the document body. Click File > Save As... and then click the Templates button in the file dialog to get to your templates directory. Save it with an evocative name (e.g., Bitching Letter to Editor.lyx). When you want to create a new document of that class, rather than File > New, use File > New from Template... to get your personalized version of the class. You can also include boilerplate in the document body.

The last time I had to write letters of recommendation for a student, I did this, and it paid dividends. The bugger must have applied to every D-I and D-II school in the country. ;-)

Paul

Reply via email to