Patch from Udi Fogiel.
-----------------------
+2023-08-01 Udi Fogiel <udifoglle@gmail.com>
+ * Format incremented to 618: Hebrew quote style
+ New buffer param \quotes_style hebrew
+ \begin_inset Quotes d{l,r}{d,s}
+
2023-07-20 Jürgen Spitzmüller <spitz@lyx.org>
* Format incremented to 617: Update covington support in linguistics module:
- Support enviroment option of example and examples
#LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 616
+\lyxformat 618
\begin_document
\begin_header
\save_transient_properties true
\author 244031559 "Yuriy"
\author 274215730 "scott"
\author 630872221 "Jean-Pierre Chrétien" jeanpierre.chretien@free.fr
+\author 1064312605 "Udi Fogiel"
\author 1549938239 "Kornel Benko"
\author 1675569489 "Stephan Witt"
\end_header
\end_inset
+\change_inserted 1064312605 1690963146
+
+\end_layout
+
+\begin_layout Labeling
+\labelwidthstring <<Outer>> and <<inner>>:
+
+\change_inserted 1064312605 1690963188
+
+\family sans
+\begin_inset Quotes dld
+\end_inset
+
+Outer
+\begin_inset Quotes drd
+\end_inset
+
+
+\begin_inset space ~
+\end_inset
+
+and
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset Quotes dls
+\end_inset
+
+inner
+\begin_inset Quotes drs
+\end_inset
+
+
+\family default
+ Produces
+\begin_inset Quotes dld
+\end_inset
+
+these outer
+\family sans
+
+\begin_inset Quotes drd
+\end_inset
+
+
+\family default
+ and
+\begin_inset Quotes dls
+\end_inset
+
+these inner
+\family sans
+
+\begin_inset Quotes drs
+\end_inset
+
+
+\family default
+ quotation marks (as common in Hungary)
\change_unchanged
\end_layout
# - french: <<text>> ``text'' (outward guillemets -- 66_99)
# - frenchin: <<text>> <<text>> (French Imprimerie Nationale style)
# - german: ,,text`` ,text` (99/66 -- 9/6)
+# - hebrew: ''text,, 'text, (99/99 -- 9/9)
# - hungarian: ,,text'' >>text<< (99/99 -- double inward guillemets)
# - polish: ,,text'' ,text' (99/99 -- 9/9)
# - russian: <<text>> ,,text`` (outward guillemets -- 99/66)
PolyglossiaName hebrew
XindyName hebrew
Encoding cp1255
- QuoteStyle english
+ QuoteStyle hebrew
InternalEncoding true
# babel-hebrew expects the encoding for *other* languages last:
FontEncoding HE8,T1|LHE,T1
## Use font encoding HE8 if the Culmus fonts are installed and
- # work around too simple test for article-like classes in rlbabel.def.
+ # work around to simple test for article-like classes in rlbabel.def.
PreBabelPreamble
\IfFileExists{he8david.fd}{%
\providecommand{\HeblatexEncoding}{HE8}
revert_flex_inset(document.body, "Subexample Preamble", "\\subexpreamble")
revert_flex_inset(document.body, "Example Postamble", "\\expostamble")
revert_flex_inset(document.body, "Subexample Postamble", "\\subexpostamble")
+
+def revert_hequotes(document):
+ " Revert Hebrew Quotation marks "
+
+ i = find_token(document.header, "\\quotes_style hebrew", 0)
+ if i != -1:
+ document.header[i] = "\\quotes_style english"
+
+ i = 0
+ while True:
+ i = find_token(document.body, "\\begin_inset Quotes d")
+ if i == -1:
+ return
+ if document.body[i] == "\\begin_inset Quotes dld":
+ document.body[i] = "\\begin_inset Quotes prd"
+ elif document.body[i] == "\\begin_inset Quotes drd":
+ document.body[i] = "\\begin_inset Quotes pld"
+ elif document.body[i] == "\\begin_inset Quotes dls":
+ document.body[i] = "\\begin_inset Quotes prd"
+ elif document.body[i] == "\\begin_inset Quotes drs":
+ document.body[i] = "\\begin_inset Quotes pld"
##
[614, [convert_hyper_other]],
[615, [convert_acknowledgment,convert_ack_theorems]],
[616, [convert_empty_macro]],
- [617, [convert_cov_options]]
+ [617, [convert_cov_options]],
+ [618, []]
]
-revert = [[616, [revert_expreambles,revert_exarg2,revert_linggloss2,revert_cov_options]],
+revert = [[617, [revert_hequotes]],
+ [616, [revert_expreambles,revert_exarg2,revert_linggloss2,revert_cov_options]],
[615, [revert_empty_macro]],
[614, [revert_ack_theorems,revert_acknowledgment]],
[613, [revert_hyper_other]],
static char const * const string_quotes_style[] = {
"english", "swedish", "german", "polish", "swiss", "danish", "plain",
"british", "swedishg", "french", "frenchin", "russian", "cjk", "cjkangle",
- "hungarian", ""
+ "hungarian", "hebrew", ""
};
translator.addPair(string_quotes_style[12], QuoteStyle::CJK);
translator.addPair(string_quotes_style[13], QuoteStyle::CJKAngle);
translator.addPair(string_quotes_style[14], QuoteStyle::Hungarian);
+ translator.addPair(string_quotes_style[15], QuoteStyle::Hebrew);
return translator;
}
* 'french' for <<french>> quote style (with ``inner quotation'')\n
* 'frenchin' for <<frenchin>> quote style (with <<inner quotation>>) ["in" = Imprimerie Nationale]\n
* 'german' for ,,German`` quote style (with ,inner quotation`)\n
+ * 'hebrew' for ''hebrew,, quote style (with 'inner quotation,)\n
* 'plain' for "Plain" quote style (with 'inner quotation')\n
* 'polish' for ,,Polish'' quote style (with ,inner quotation')\n
* 'swedish' for ''Swedish'' quote style (with 'inner quotation')\n
* j [U+300C]cjk[U+300D] ([U+300E]inner quotation[U+300F]) [CORNER BRACKETS]
* k [U+300A]cjkangle[U+300B] ([U+3008]inner quotation[U+3009]) [ANGLE BRACKETS]
* h ,,hungarian'' (>>inner quotation<<)
+ * d ''hebrew,, ('inner quotation,)
* x dynamic style (inherits document settings)
*/
-char const * const style_char = "esgpcaqbwfirjkhx";
+char const * const style_char = "esgpcaqbwfirjkhdx";
char const * const side_char = "lr" ;
char const * const level_char = "sd";
right_secondary = 0x00ab; // <<
break;
}
+ case QuoteStyle::Hebrew: {
+ left_primary = 0x201d; // ''
+ right_primary = 0x201e; // ,,
+ left_secondary = 0x2019; // '
+ right_secondary = 0x201a; // ,
+ break;
+ }
case QuoteStyle::Dynamic:
default:
// should not happen
qs = QuoteStyle::CJKAngle;
else if (s == "hungarian")
qs = QuoteStyle::Hungarian;
+ else if (s == "hebrew")
+ qs = QuoteStyle::Hebrew;
else if (s == "dynamic")
qs = QuoteStyle::Dynamic;
///
Hungarian,
///
+ Hebrew,
+ ///
Dynamic
};
"armenian", "basque", "churchslavonic", "german-ch", "german-ch-old",
"norsk", "nynorsk", "turkmen", "ukrainian", "vietnamese", 0};
+/// languages with hebrew quotes (.lyx names)
+const char * const known_hebrew_quotes_languages[] = {"hebrew", 0};
+
/// known language packages from the times before babel
const char * const known_old_language_packages[] = {"french", "frenchle",
"frenchpro", "german", "ngerman", "pmfrench", 0};
// Finally, set the quote style.
// LyX knows the following quotes styles:
// british, cjk, cjkangle, danish, english, french, german,
- // polish, russian, swedish and swiss
+ // polish, russian, swedish, swiss, and hebrew
// conversion list taken from
// https://en.wikipedia.org/wiki/Quotation_mark,_non-English_usage
// (quotes for kazakh are unknown)
// swiss
else if (is_known(h_language, known_swiss_quotes_languages))
h_quotes_style = "swiss";
+ // hebrew
+ else if (is_known(h_language, known_hebrew_quotes_languages))
+ h_quotes_style = "hebrew";
+
// english
else if (is_known(h_language, known_english_quotes_languages))
h_quotes_style = "english";
res = "hrd";
else if (preamble.quotesStyle() == "swedish")
res = opening ? "sld" : "srd";
+ else if (preamble.quotesStyle() == "hebrew")
+ res = "dld";
} else if (in == "els") {// `
if (preamble.quotesStyle() == "german")
res = "grs";
res = "brd";
else if (preamble.quotesStyle() == "swedish")
res = opening ? "sls" : "srs";
+ else if (preamble.quotesStyle() == "hebrew")
+ res = "dls";
} else if (in == "ard") {// >>
if (preamble.quotesStyle() == "swiss")
res = "cld";
res = "hld";
else if (preamble.quotesStyle() == "russian")
res = "rls";
+ else if (preamble.quotesStyle() == "hebrew")
+ res = "drd";
} else if (in == "gls") {// ,
if (preamble.quotesStyle() == "polish")
res = "pls";
+ else if (preamble.quotesStyle() == "hebrew")
+ res = "drs";
}
return res;
}
// Do not remove the comment below, so we get merge conflict in
// independent branches. Instead add your own.
-#define LYX_FORMAT_LYX 617 // spitz: linguistics module enhancements
-#define LYX_FORMAT_TEX2LYX 617
+#define LYX_FORMAT_LYX 618 // Udi_Fogiel: hebrew quote style
+#define LYX_FORMAT_TEX2LYX 618
#if LYX_FORMAT_TEX2LYX != LYX_FORMAT_LYX
#ifndef _MSC_VER