https://bugzilla.wikimedia.org/show_bug.cgi?id=30463
Vahid <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Vahid <[email protected]> 2012-08-12 16:20:46 UTC --- Please Edit texutils.ml as follows and define a farsi mode to choose by farsi wikipedia users: Index: texutil.ml =================================================================== --- texutil.ml (revision 115660) +++ texutil.ml (working copy) @@ -48,6 +48,7 @@ let modules_color = ref false let modules_teubner = ref false let modules_euro = ref false +let modules_farsi = ref false (* wrappers to easily set / reset module properties *) let tex_use_ams () = modules_ams := true @@ -55,13 +56,15 @@ let tex_use_color () = modules_color := true let tex_use_teubner () = modules_teubner := true let tex_use_euro () = modules_euro := true -let tex_mod_reset () = ( +let tex_use_farsi () = modules_farsi := true + let tex_mod_reset () = ( modules_ams := false; modules_nonascii := false; modules_encoding := UTF8; modules_color := false; modules_teubner := false; modules_euro := false; + modules_farsi := false; ) (* Return TeX fragment for one of the encodings in (UTF8,LATIN1,LATIN2) *) @@ -77,8 +80,27 @@ (if !modules_color then "\\usepackage[dvips,usenames]{color}\n" else "") ^ (if !modules_teubner then "\\usepackage[greek]{babel}\n\\usepackage{teubner}\n" else "") ^ (if !modules_euro then "\\usepackage{eurosym}\n" else "") ^ - "\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n$$\n" + (if !modules_farsi then + "\\usepackage[T1,LFE,LAE]{fontenc} +\\usepackage[utf8]{inputenc} +\\usepackage[farsi,arabic,english]{babel} +\\TOCLanguage{farsi} +\\makeatletter +%due to a bug in ARABI in which the command \\textRL is not +%changed to write Farsi though the main TOC language is Farsi. +\\def\\textRL#1{{\\expandafter\\@farsi@R{#1}}} + +%due to a bug in ARABI in which the quotaion marks are not +%assigned to their counterpart font-glyphs in lfeenc.def +\\DeclareTextSymbol{\\guillemotright}{LFE}{62} +\\DeclareTextSymbol{\\guillemotleft}{LFE}{60} +\\makeatother" + else "") ^ + "\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n" ^ + (if !modules_farsi then "\\selectlanguage{farsi}\n" else "") ^ + "$$\n" + (* TeX fragment appended after the content *) let get_footer () = "\n$$\n\\end{document}\n" @@ -748,4 +770,5 @@ | "\\color" -> (tex_use_color (); LITERAL (TEX_ONLY "\\color")) | "\\pagecolor" -> (tex_use_color (); LITERAL (TEX_ONLY "\\pagecolor")) | "\\definecolor" -> (tex_use_color (); LITERAL (TEX_ONLY "\\definecolor")) + | "\\farsi" -> (tex_use_farsi (); LITERAL (TEX_ONLY "\\selectlanguage{farsi}")) (* Redundant but we need to make the hash different *) | s -> raise (Illegal_tex_function s) would you please test this code to see whether it works or not? Best Regards Vahid Ghasemian -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
