X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fexamples%2Flinguistics.lyx;h=322522381b072c2e021250c95bc6da170c621230;hb=a860d18b5a722606c68fb1a4ec22ffe3e99792e6;hp=adc314e2917510c51683b99637429529001e8366;hpb=f742f7bf83caad5c7487a303ff2ff810ee3fa01f;p=lyx.git diff --git a/lib/examples/linguistics.lyx b/lib/examples/linguistics.lyx index adc314e291..322522381b 100644 --- a/lib/examples/linguistics.lyx +++ b/lib/examples/linguistics.lyx @@ -1,5 +1,5 @@ -#LyX 1.6.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 340 +#LyX 2.1 created this file. For more info see http://www.lyx.org/ +\lyxformat 474 \begin_document \begin_header \textclass article @@ -8,43 +8,80 @@ %\floatstyle{plaintop} %\restylefloat{tableau} \end_preamble +\use_default_options false \begin_modules linguistics \end_modules +\maintain_unincluded_children false \language english +\language_package default \inputencoding auto +\fontencoding global \font_roman lmodern \font_sans default \font_typewriter default +\font_math auto \font_default_family default +\use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 \font_tt_scale 100 - \graphics default +\default_output_format default +\output_sync 0 +\bibtex_command default +\index_command default \paperfontsize default \spacing single -\use_hyperref false +\use_hyperref true +\pdf_bookmarks true +\pdf_bookmarksnumbered false +\pdf_bookmarksopen false +\pdf_bookmarksopenlevel 1 +\pdf_breaklinks false +\pdf_pdfborder true +\pdf_colorlinks false +\pdf_backref false +\pdf_pdfusetitle true \papersize default \use_geometry false -\use_amsmath 1 -\use_esint 1 +\use_package amsmath 1 +\use_package amssymb 1 +\use_package cancel 0 +\use_package esint 1 +\use_package mathdots 1 +\use_package mathtools 0 +\use_package mhchem 1 +\use_package stackrel 0 +\use_package stmaryrd 0 +\use_package undertilde 0 \cite_engine basic +\cite_engine_type default +\biblio_style plain \use_bibtopic false +\use_indices false \paperorientation portrait +\suppress_date false +\justification true +\use_refstyle 0 +\index Index +\shortcut idx +\color #008000 +\end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent -\defskip medskip +\paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false -\author "" -\author "" +\html_math_output 0 +\html_css_as_file 0 +\html_be_strict false \end_header \begin_body @@ -59,13 +96,10 @@ Jürgen Spitzmüller \end_inset -\begin_inset Flex URL -status open - -\begin_layout Plain Layout - - -\end_layout +\begin_inset CommandInset href +LatexCommand href +target "spitz@lyx.org" +type "mailto:" \end_inset @@ -73,7 +107,7 @@ status open \end_layout \begin_layout Date -14/09/2008 +18/02/2013 \end_layout \begin_layout Abstract @@ -110,7 +144,7 @@ Modules \family sans Document\SpecialChar \menuseparator Settings\SpecialChar \menuseparator -Class +Modules \family default , select \begin_inset Quotes eld @@ -149,6 +183,18 @@ key "covington" : This is the base package used for numbered examples and glosses. \end_layout +\begin_deeper +\begin_layout Itemize +Installed on your system: +\begin_inset Info +type "package" +arg "covington" +\end_inset + +. +\end_layout + +\end_deeper \begin_layout Enumerate \emph on @@ -177,6 +223,18 @@ description ). \end_layout +\begin_deeper +\begin_layout Itemize +Installed on your system: +\begin_inset Info +type "package" +arg "enumitem" +\end_inset + +. +\end_layout + +\end_deeper \begin_layout Enumerate \emph on @@ -198,6 +256,18 @@ Meaning language in use. \end_layout +\begin_deeper +\begin_layout Itemize +Installed on your system: +\begin_inset Info +type "package" +arg "csquotes" +\end_inset + +. +\end_layout + +\end_deeper \begin_layout Enumerate \emph on @@ -214,12 +284,24 @@ key "float" This package should be part of any LaTeX distribution. \end_layout +\begin_deeper +\begin_layout Itemize +Installed on your system: +\begin_inset Info +type "package" +arg "float" +\end_inset + +. +\end_layout + +\end_deeper \begin_layout Section Numbered examples \end_layout \begin_layout Standard -Numbered examples are inserted via the layout dropdown box in the toolbar. +Numbered examples are inserted via the layout drop-down box in the toolbar. There are three variants: \end_layout @@ -275,7 +357,7 @@ And another one \begin_layout Standard References to examples are produced as usual: insert a label to the example - and a crossreference via + and a cross-reference via \family sans Insert\SpecialChar \menuseparator Cross references @@ -313,11 +395,16 @@ Custom Insets \emph on Custom:Glosse \emph default - provides a glosse that consists of two lines and a translation, the + provides a gloss that consists of two lines and a translation, the \emph on Custom:Tri-Glosse \emph default insets consists of three lines and a translation. + Each translation line might span multiple lines in the output, i. +\begin_inset space \thinspace{} +\end_inset + +e., the paragraphs are automatically broken if they exceed the text width. Note that the translation line is mandatory and must be preceded by the command \family typewriter @@ -325,7 +412,7 @@ Custom:Tri-Glosse \backslash glt \family default - which should be inserted verbatim in the Glosse inset (ERT is not needed, + which must be inserted verbatim in the gloss inset (TeX mode is not needed, and in fact not even possible). \end_layout @@ -334,69 +421,64 @@ Here is a simple example: \end_layout \begin_layout Standard -\begin_inset Flex Custom:Glosse +\begin_inset Flex Glosse status open \begin_layout Plain Layout + C'est un exemple simple \end_layout \begin_layout Plain Layout + {This is} an example simple \end_layout \begin_layout Plain Layout + \backslash -glt -\begin_inset Quotes els -\end_inset +glt This is a simple example +\end_layout -This is a simple example -\begin_inset Quotes ers \end_inset \end_layout -\end_inset - - +\begin_layout Standard +\noindent +Note how the braces hold together multi-word expressions. \end_layout \begin_layout Standard -Note that the braces hold together multi-word expressions. - In the same vein, we can make a three-line glosse: +In the same vein, we can make a three-line gloss: \end_layout \begin_layout Standard -\begin_inset Flex Custom:Tri-Glosse +\begin_inset Flex Tri-Glosse status open \begin_layout Plain Layout + C'est un exemple simple \end_layout \begin_layout Plain Layout + {Das ist} ein Beispiel einfach \end_layout \begin_layout Plain Layout + {This is} an example simple \end_layout \begin_layout Plain Layout -\backslash -glt -\begin_inset Quotes els -\end_inset - -This is a simple example -\begin_inset Quotes ers -\end_inset - +\backslash +glt This is a simple example \end_layout \end_inset @@ -405,38 +487,234 @@ This is a simple example \end_layout \begin_layout Standard -If you want to have numbered glosses, you can simply insert the Glosse inset +\noindent +If you want to have numbered glosses, you can simply insert the gloss inset to a numbered examples paragraph, as follows: \end_layout \begin_layout Numbered Examples (consecutive) -\begin_inset Flex Custom:Tri-Glosse +\begin_inset Flex Tri-Glosse status open \begin_layout Plain Layout + Mein Luftkissenfahrzeug ist voller Aale \end_layout \begin_layout Plain Layout + My skeertuig is vol palings \end_layout \begin_layout Plain Layout + My hovercraft is {full of} eels \end_layout \begin_layout Plain Layout + \backslash -glt -\begin_inset Quotes els +glt Do you have matches? +\end_layout + \end_inset -Do you have matches? -\begin_inset Quotes ers + +\end_layout + +\begin_layout Subsection* +Shortcomings of LyX's glosses +\end_layout + +\begin_layout Standard +LyX's glosse support is rather basic, and thus has some shortcomings, which + might be addressed in further releases: +\end_layout + +\begin_layout Enumerate +Font changes are not allowed in glosses. + Hence, the +\family sans +Character Style +\family default + dialog is disabled. + Since glosses are not hyphenated, an explicit language setting in the LaTeX + output is not required (in fact, it would break the output, since covington + does not support it). + However, you still might want to set the language for proper spell checking. + Currently, you have to do this as follows: select the text, and then issue + +\begin_inset Info +type "shortcut" +arg "command-execute" \end_inset + +\family sans +language +\family default +, where +\family sans + +\family default + should be replaced by the respective language, e. +\begin_inset space \thinspace{} +\end_inset +g. + +\family sans +english +\family default +, +\family sans +french +\family default + or +\family sans +ngerman +\family default +. + In the LaTeX output, this setting will be suppressed. +\end_layout + +\begin_layout Enumerate +Since the content of glosses is passed verbatim to LaTeX, LyX does not adapt + the encoding to the contents. + That means that if you use characters in the glosse which are not covered + by the current encoding, you will run into an error message. + Here are the possible workarounds to this problem: +\end_layout + +\begin_deeper +\begin_layout Itemize +Either enter the text outside the glosse, open +\family sans +View\SpecialChar \menuseparator +View Source +\family default + and copy the LaTeX code into the glosse, +\end_layout + +\begin_layout Itemize +or mark the whole glosse (from outside) and set the appropriate language + via +\family sans +Edit\SpecialChar \menuseparator +Language\SpecialChar \menuseparator +More Languages\SpecialChar \ldots{} + +\family default +, +\end_layout + +\begin_layout Itemize +or set the document encoding to +\emph on +Unicode (utf8) +\emph default + via +\family sans +Document\SpecialChar \menuseparator +Settings\SpecialChar \ldots{} +\SpecialChar \menuseparator +Language +\family default +, +\end_layout + +\begin_layout Itemize +or check +\emph on +Use non-TeX fonts (via XeTeX/LuaTeX) +\emph default + in +\family sans +Document\SpecialChar \menuseparator +Settings\SpecialChar \ldots{} +\SpecialChar \menuseparator +Fonts +\family default +. +\end_layout + +\end_deeper +\begin_layout Enumerate +Page breaks can occur within glosses, which is of course not desirable. + A workaround is to wrap glosses into boxes (via +\family sans +Insert\SpecialChar \menuseparator +Box\SpecialChar \menuseparator +Frameless +\family default +). + If you want to automate this for all glosses, you can copy the following + code to +\family sans +Document\SpecialChar \menuseparator +Settings\SpecialChar \menuseparator +LaTeX Preamble +\family default +: +\end_layout + +\begin_deeper +\begin_layout LyX-Code +\begin_inset listings +lstparams "basicstyle={\footnotesize},language={[LaTeX]TeX}" +inline false +status open + +\begin_layout Plain Layout + +% Do not break pages at two-line glosses +\end_layout + +\begin_layout Plain Layout + + +\backslash +AtBeginDocument{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +@ifundefined{linggloss}{}{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +renewenvironment{linggloss}[1]{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +begin{minipage}{.7 +\backslash +textwidth} +\end_layout + +\begin_layout Plain Layout + + +\backslash +gll #1}{ +\backslash +glend +\backslash +end{minipage}}} +\end_layout + +\begin_layout Plain Layout + +} \end_layout \end_inset @@ -444,6 +722,79 @@ Do you have matches? \end_layout +\begin_layout LyX-Code +\begin_inset listings +lstparams "basicstyle={\footnotesize},language={[LaTeX]TeX}" +inline false +status open + +\begin_layout Plain Layout + +% Do not break pages at three-line glosses +\end_layout + +\begin_layout Plain Layout + + +\backslash +AtBeginDocument{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +@ifundefined{lingglosss}{}{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +renewenvironment{linggloss}[1]{% +\end_layout + +\begin_layout Plain Layout + + +\backslash +begin{minipage}{.7 +\backslash +textwidth} +\end_layout + +\begin_layout Plain Layout + + +\backslash +glll #1}{ +\backslash +glend +\backslash +end{minipage}}} +\end_layout + +\begin_layout Plain Layout + +} +\end_layout + +\end_inset + + +\end_layout + +\begin_layout Standard +You might have to adapt the minipage width ( +\family typewriter +.7 +\backslash +textwidth +\family default + in the example code) to fit your actual page width. +\end_layout + +\end_deeper \begin_layout Section Optimality Theory Tableaux \end_layout @@ -490,12 +841,12 @@ status open \align center \begin_inset Tabular - - - - - - + + + + + + \begin_inset Text @@ -757,7 +1108,7 @@ a.ti.kap \end_layout \begin_layout Plain Layout -\begin_inset Caption +\begin_inset Caption Standard \begin_layout Plain Layout Example Tableau @@ -843,7 +1194,7 @@ The Linguistics module comes with some character styles that are common \begin_layout Enumerate Concept (in small caps): -\begin_inset Flex CharStyle:Concepts +\begin_inset Flex Concepts status collapsed \begin_layout Plain Layout @@ -857,7 +1208,7 @@ concept \begin_layout Enumerate Expression (emphasized): -\begin_inset Flex CharStyle:Expression +\begin_inset Flex Expression status collapsed \begin_layout Plain Layout @@ -871,7 +1222,7 @@ expression \begin_layout Enumerate Meaning (in single quotes): -\begin_inset Flex CharStyle:Meaning +\begin_inset Flex Meaning status collapsed \begin_layout Plain Layout @@ -929,11 +1280,12 @@ Phonetic Symbols (IPA) You do not need the Linguistics module to insert phonetic symbols, this is a base functionality of LyX. However, since this is frequently used by linguists, we will describe it - (briefly) in this paper nevertheless. + (briefly) in this manual nevertheless. \end_layout \begin_layout Standard -A prerequisite to use LyX's IPA support is the LaTeX package +If you use traditional LaTeX or PDFLaTeX, a prerequisite to use LyX's IPA + support is the LaTeX package \emph on tipa \emph default @@ -945,6 +1297,33 @@ key "tipa" \end_inset . +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +If you use XeTeX or LuaTeX (i. +\begin_inset space \thinspace{} +\end_inset + +e., if you have clicked +\begin_inset Quotes eld +\end_inset + +Use non-TeX fonts +\begin_inset Quotes erd +\end_inset + + in +\family sans +Document\SpecialChar \menuseparator +Settings\SpecialChar \menuseparator +Fonts +\family default +), no extra package is needed. +\end_layout + +\end_inset + Additionally, if you want to have instant preview, you should have the \emph on @@ -961,28 +1340,182 @@ key "preview" \end_layout \begin_layout Standard -Phonetic symbols can be entered via +The recommended way to insert phonetic symbols is via \family sans Insert\SpecialChar \menuseparator Special characters\SpecialChar \menuseparator Phonetic symbols. \family default -You get a little frame, where you can insert the symbols using the shortcut - notation which is described in the tipa manual. - Example: -\begin_inset Formula $\text{\textipa{[Ekspl@"neIS@n]}}$ +This gives you an input box ( +\begin_inset Quotes eld +\end_inset + +inset +\begin_inset Quotes erd +\end_inset + + in LyX speak), where you can insert the symbols. + Note that this box can be used both for the insertion of small snippets + (inline) and multiple paragraphs of phonetic notation. + While the cursor is inside the box, a toolbar opens, which provides the + basic set of phonetic symbols (sorted by the IPA categories). + Each of the toolbar's panels can be torn off the bar by clicking on the + dashed line on its top. + This way, you can insert most symbols quite comfortably: +\begin_inset IPA + +\begin_layout Standard +[l +\begin_inset IPADeco bottomtiebar +status open + +\begin_layout Plain Layout +ai +\end_layout + +\end_inset + +k ðɪs] +\end_layout + \end_inset . - Given that preview-latex is installed and you have switched on instant - preview (in +\begin_inset Foot +status collapsed + +\begin_layout Plain Layout +Note that, if you want to insert diacritics, the diacritics are inserted + +\emph on +after +\emph default + the base character. + That is to say, for +\begin_inset IPA + +\begin_layout Standard +[d̥] +\end_layout + +\end_inset + + you need to insert +\family typewriter + +\family default + and then the +\family typewriter + +\family default + subring diacritic from the toolbar immediately after the +\family typewriter + +\family default +. + If you need a diacritic alone, you can achieve this by inserting a blank + and then the diacritic, as in +\begin_inset IPA + +\begin_layout Standard + ̼ +\end_layout + +\end_inset + + ( +\family typewriter += +\begin_inset space ~ +\end_inset + ++ +\family default +). +\end_layout + +\end_inset + + Given that +\emph on + preview-latex +\emph default + is installed and you have switched on instant preview (in \family sans -Tools\SpecialChar \menuseparator + Tools\SpecialChar \menuseparator Preferences\SpecialChar \menuseparator -Graphics +Graphi +\family default +cs), you'll get a nice WYSIWYG preview as soon as the cursor leaves the + box. + Alternatively to the toolbar, you can also insert the symbols directly + via the shortcut notation which is described in the +\emph on +tipa +\emph default + manual: here's +\begin_inset IPA + +\begin_layout Standard + +\family roman +\series medium +\shape up +\size normal +\emph off +\bar no +\strikeout off +\uuline off +\uwave off +\noun off +\color none +[@n Ig"zA:mpl] +\end_layout + +\end_inset + + ( +\emph on +tipa +\emph default + shortcut notation: +\family typewriter +[@n Ig"zA:mpl +\family default +]). + Furthermore, you can insert symbols via +\family sans +Insert\SpecialChar \menuseparator +Special characters\SpecialChar \menuseparator +Symbols\SpecialChar \ldots{} + \family default -), you'll get a nice preview as soon as the cursor leaves the frame. + (which might be useful for symbols that are not yet covered by the toolbar), + or you can simply paste unicode-encoded text (e. +\begin_inset space \thinspace{} +\end_inset + +g., from other applications) into the box. + The output should be equal, no matter what input method you chose. +\end_layout + +\begin_layout Standard +Note that you can also insert or paste most IPA glyphs outside the specific + IPA input box: [əz ʃəʊn hɪə]. + In the output, they will be automatically transformed into the correct + +\emph on +tipa +\emph default + macro (if not, please inform us). + However, please note that this method produces inferior output quality, + since it will most likely result in a mix of fonts (the latin characters + are taken from the base document font, the IPA glyphs from the IPA font). + Within the IPA input box, on the other hand, the IPA font is used for all + characters. + So unless you only need to insert single IPA characters, using the IPA + input box is highly recommended. \end_layout \begin_layout Section @@ -1096,7 +1629,7 @@ Maria Gouskova, Stacia Hartleben and Jürgen Spitzmüller: Using LyX for Linguis c Papers. \begin_inset Flex URL -status open +status collapsed \begin_layout Plain Layout