1999-09-27 18:44:28 +00:00
|
|
|
HOW TO CREATE A NEW TEMPLATE
|
|
|
|
============================
|
|
|
|
|
|
|
|
Templates are almost usual LyX file that are saved by LyX itself.
|
|
|
|
The strength is on "almost".
|
|
|
|
|
|
|
|
LyX stores some properties in a file, for example:
|
|
|
|
|
|
|
|
\textclass dinbrief
|
|
|
|
\language german
|
|
|
|
\inputencoding default
|
|
|
|
\fontscheme default
|
|
|
|
\epsfig dvips
|
2005-06-09 09:58:08 +00:00
|
|
|
\papersize a4paper
|
|
|
|
\paperfontsize 12
|
|
|
|
\baselinestretch 1.00
|
|
|
|
\secnumdepth 3
|
|
|
|
\tocdepth 3
|
|
|
|
\paragraph_separation skip
|
|
|
|
\quotes_language german
|
|
|
|
\quotes_times 2
|
|
|
|
\paperorientation portrait
|
|
|
|
\papercolumns 9
|
|
|
|
\papersides 1
|
|
|
|
\paperpagestyle plain
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
Some of these may be very reasonable for a certain template. In the
|
|
|
|
case of a dinbrief-template this might be the papersize, the language
|
|
|
|
and the quotes-settings, since it is a german-only template. But it
|
|
|
|
wouldn't make much sense to set the fontscheme or the inputencoding,
|
|
|
|
since a user might have customized this already like he/she wanted it
|
|
|
|
to be.
|
|
|
|
|
|
|
|
So please delete all the lines of a new template with your favorite
|
|
|
|
text editor (for example ed, ex or vi) that you don't want to set
|
|
|
|
explicit for this template. LyX will use the user's default-values
|
|
|
|
(defined in lyxrc) if a property isn't defined in the file itself.
|
|
|
|
|
2019-03-19 06:07:22 +00:00
|
|
|
|
|
|
|
DIRECTORY STRUCTURE & FILE NAMING
|
|
|
|
==================================
|
|
|
|
|
|
|
|
The templates directory has the following structure
|
|
|
|
|
|
|
|
templates/[language/]category/[subcategory]
|
|
|
|
|
|
|
|
Please use the layout category (with identical spelling to assure translation)
|
|
|
|
as category subdirectory (e.g., "Letters"). See \DeclareCategory entry of the
|
2019-03-22 10:10:49 +00:00
|
|
|
layout which corresponds to your template. Note the handling of special characters
|
|
|
|
below.
|
2019-03-19 06:07:22 +00:00
|
|
|
|
|
|
|
If your template consists of one file only, and if there are no further templates
|
|
|
|
relating to your layout yet, use the layout name, as defined in \DeclareLaTeXClass,
|
2019-03-22 10:10:49 +00:00
|
|
|
as file name. In any case, use a verbose, transparent name (do not use insider
|
|
|
|
acronyms as file names). Note the handling of special characters below.
|
2019-03-19 06:07:22 +00:00
|
|
|
|
|
|
|
If your template consists of multiple files, use an additional subdirectory.
|
|
|
|
Use the layout name, as defined in \DeclareLaTeXClass, as subcategory subfolder
|
2019-03-22 10:10:49 +00:00
|
|
|
name. Give the files verbose, transparent names that clarify the function of the
|
|
|
|
respective file in the templates bundle. Note the handling of special characters below.
|
2019-03-19 06:07:22 +00:00
|
|
|
|
|
|
|
The optional language subdirectory that immediately follows templates/ uses the
|
|
|
|
language code (e.g., 'de' for German). Use this if you provide a translation of
|
|
|
|
an existing English template.
|
|
|
|
The language subdirectory expands to the same subfolders than the English version
|
|
|
|
and uses the same [English) filename (e.g., templates/Letters/myletter.lyx >
|
|
|
|
templates/fr/Letters/myletter.lyx).
|
|
|
|
|
2019-03-22 10:10:49 +00:00
|
|
|
|
|
|
|
NB: SPECIAL CHARACTERS IN FILE AND DIRECTORY NAMES:
|
|
|
|
===================================================
|
|
|
|
|
|
|
|
The following characters in file and directory names must be substituted, since they break
|
|
|
|
LyX building with autotools:
|
|
|
|
|
|
|
|
* Blanks by '_' (e.g., My_Layout.lyx)
|
|
|
|
* Parentheses by %28 and %29 (e.g., My_Layout_%28v._1%29.lyx)
|
|
|
|
* Apersands by %26 (e.g., Journal_of_This_%26_That.lyx)
|
|
|
|
|
2019-03-25 07:28:54 +00:00
|
|
|
The substitution characters will be replaced again for LyX for translation and GUI display.
|
|
|
|
|
|
|
|
|
|
|
|
THINGS TO CHECK BEFORE COMMITTING:
|
|
|
|
==================================
|
|
|
|
|
|
|
|
New files must be added to Makefile.am. If you add a new (sub)folder, you must also create a new category
|
|
|
|
in Makefile.am (cf. phdthesistemplatesdir and dist_dehandoutexamples_DATA as example).
|
|
|
|
|
|
|
|
Please make sure before you commit (in a text editor) that the example that the file has the correct
|
2019-03-25 15:32:27 +00:00
|
|
|
\origin specification. It should begin with /systemlyxdir/ and then point towards the subdirectory
|
2019-03-25 07:28:54 +00:00
|
|
|
your file is in, e.g.
|
2019-03-25 15:32:27 +00:00
|
|
|
\origin /systemlyxdir/templates/es/Presentations/
|
2019-03-25 07:28:54 +00:00
|
|
|
This is particularly important if your file includes other files (such as graphics, bibliographies,
|
|
|
|
children).
|
|
|
|
|
2019-03-22 10:10:49 +00:00
|
|
|
|