Hi Joris,
as we discussed the hack of style files was unavoidable to tailor
TeXmacs for the Hungarian language rules.
I think I found every significant part of it. I am going to summarize
the changes now.
1.
The most simple of these is to fix the file english-hungarian.scm.
Somehow the word proposition has an inaccurate translation. The everyday use of
the word proposition in Hungarian is "Állítás.". The word "Propozíció"
was probably
used 60 years before.
2.
In Hungarian the expression "Chapter 1." is "1. Fejezet." Truth is
there are serious
arguments about "1. fejezet", but as far as I am concerned I prefer
the capitalized version.
The file entitled section-book.ts. requires the most notable modifications.
I introduced a macro called text-num-hu.
The code is as follows.
<assign|text-num-hu|<macro|text|num|<if|<equal|<value|language>|hungarian>|<arg|num>
<arg|text>|<arg|text> <arg|num>>>>
Thus text-num-hu changes the two arguments if the selected language is
Hungarian,
otherwise just outputs in the order given before.
>From here every output of <chapter-text> <the-chapter> will be substituted with
<text-num-hu|<chapter-text>|<the-chapter>.>
These are the macros chapter-numbered-title and appendix-numbered-title.
The hacked codes are as follows:
<assign|chapter-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-title|<text-num-hu|<chapter-text>|<the-chapter>.><vspace|1fn><new-line><arg|title>>>>>
<assign|appendix-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-title|<text-num-hu|<appendix-text>|<the-appendix>.><vspace|1fn><new-line><arg|title>>>>>
It is not the end of the story because there are styles files where
the above macros are
redefined. In this case we should follow the above method again, for example in
the style file tmbook.ts:
<assign|chapter-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-long-title|<text-num-hu|<chapter-text>|<the-chapter>.>
|<arg|title>>>>>
and
<assign|appendix-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-long-title|<text-num-hu|<appendix-text>|<the-appendix>.>
|<arg|title>>>>>
The macro part-numbered-title becomes the following, not unlike our
above examples:
<assign|part-numbered-title|<macro|name|<part-title-sub|<style-with|src-compact|none|<htab|0fn><text-num-hu|<part-text>|<the-part>.><htab|0fn><vspace|0.1pag><new-line><htab|0fn><arg|name><htab|0fn>>>>>
3.
"Theorem 1.2.3." is "1.2.3. Tétel." in Hungarian. Confessing again perhaps
"1.2.3. tétel.", but I tend to like the capitalized version better. This also
stands for all theorem-like environments as proposition, definition,
..., including
figure. It is coded more deeply the advantage of which is that we should not
change it in so many files.
The file env-base.ts includes the modifications. In the definition of
macro new-env
the macros theorem-numbered, definition-numbered etc have changed to:
<assign|<unquote|<merge|<arg|env>|-numbered>>|<macro|text|num|<text-num-hu|<arg|text>|<arg|num>>>>
Similar changes have been done in the definition of macro new-figure.
I am sure that somebody can find further small incompatibilities, but
personally I am completely
satisfied using the mentioned modifications. I attach the files
helping the Hungarian writing
TeXmacs funs.
:)
The integration these ideas into the core styles file can be a new
project too. As far as I googled the
Hungarian language is the only one of the localized languages having
these properties.
Very Best!
/Gyula
The files attached:
$HOME$/.TeXmacs/packages/environment/env-base.ts
$HOME$/.TeXmacs/packages/section/section-book.ts
$HOME$/.TeXmacs/styles/tmbook.ts
/Gyula
On Thu, Aug 7, 2008 at 9:26 AM, Magyarkuti, Gyula
<[EMAIL PROTECTED]> wrote:
>>> ...
>>>Thanks for the update; it has been included for the next version.
>
>>> In addition to the translation I would like to suggest a few changes in
>>> chapter titles, table/figure captions, etc. in case the user chooses the
>>> hungarian language for his document:
>>>
>>> In English (and most other languages) the notation as in "Chapter 1",
>>> "Figure
>>> 1", "Table 1" is used. However, in Hungarian the notation "1. fejezet" is
>>> used - "fejezet" stands for "chapter" in hungarian.
>>> So all I want to say is that in hungarian the ordinal number comes before
>>> the
>>> word chapter/figure/table (and so on), and is followed by a dot.
>>>
>>> I don't know whether these changes can be made easily; if they are, I
>>> suggest
>>> to make them because the automatic chapter/figure etc. numbering in its
>>> present form is quite unusable for writing documents in hungarian language.
>
>>Hmm; this could indeed be changed, but I have no time for that right now...
>
>>Best wishes, Joris
>
>
> High,
> I am interested on pick the problem up again mentioned by Róbert 2
> years ago. See the details above.
> Is there any progress until today?
>
> Thank you!!!
>
> /Gyula
>
<TeXmacs|1.0.6.11>
<style|source>
<\body>
<active*|<\src-title>
<src-package|env-base|1.0>
<\src-purpose>
Managing groups of environments.
</src-purpose>
<src-copyright|1998--2004|Joris van der Hoeven>
<\src-license>
This <TeXmacs> style package falls under the <hlink|GNU general public
license|$TEXMACS_PATH/LICENSE> and comes WITHOUT ANY WARRANTY
WHATSOEVER. If you do not have a copy of the license, then write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
</src-license>
</src-title>>
<\active*>
<\src-comment>
Groups and counters for all standard environments.
</src-comment>
</active*>
<new-counter-group|std-env>
<new-counter-group|theorem-env>
<add-to-counter-group|theorem-env|std-env>
<group-common-counter|theorem-env>
<new-counter-group|exercise-env>
<add-to-counter-group|exercise-env|std-env>
<group-individual-counters|exercise-env>
<new-counter-group|figure-env>
<add-to-counter-group|figure-env|std-env>
<group-individual-counters|figure-env>
<add-to-counter-group|equation|std-env>
<add-to-counter-group|footnote|std-env>
<assign|resetstdenv|<macro|<reset-std-env>>>
<assign|text-num-hu|<macro|text|num|<if|<equal|<value|language>|hungarian>|<arg|num>.
<arg|text>|<arg|text> <arg|num>>>>
<\active*>
<\src-comment>
Defining new block environments with one parameter.
</src-comment>
</active*>
<assign|new-env|<macro|env|name|group|render|<quasi|<style-with|src-compact|none|<add-to-counter-group|<unquote|<arg|env>>|<unquote|<arg|group>>><assign|<unquote|<merge|<arg|env>|-text>>|<macro|<localize|<unquote|<arg|name>>>>><assign|<unquote|<merge|<arg|env>|-numbered>>|<macro|text|num|<text-num-hu|<arg|text>|<arg|num>>>>
<assign|<unquote|<merge|<arg|env>|-unnumbered>>|<macro|text|<arg|text>>><assign|<unquote|<arg|env>>|<\macro|body>
<surround|<compound|<unquote|<merge|next-|<arg|env>>>>||<style-with|src-compact|none|<compound|<unquote|<arg|render>>|<style-with|src-compact|none|<compound|<unquote|<merge|<arg|env>|-numbered>>|<compound|<unquote|<merge|<arg|env>|-text>>>|<compound|<unquote|<merge|the-|<arg|env>>>>>>|<arg|body>>>>
</macro>><assign|<unquote|<merge|<arg|env>|*>>|<\macro|body>
<style-with|src-compact|none|<compound|<unquote|<arg|render>>|<style-with|src-compact|none|<compound|<unquote|<merge|<arg|env>|-unnumbered>>|<compound|<unquote|<merge|<arg|env>|-text>>>>>|<arg|body>>>
</macro>>>>>>
<assign|new-theorem|<macro|env|name|<new-env|<arg|env>|<arg|name>|theorem-env|render-theorem>>>
<assign|new-remark|<macro|env|name|<new-env|<arg|env>|<arg|name>|theorem-env|render-remark>>>
<assign|new-exercise|<macro|env|name|<new-env|<arg|env>|<arg|name>|exercise-env|render-exercise>>>
<\active*>
<\src-comment>
Defining new figure-like environments.
</src-comment>
</active*>
<assign|new-figure|<macro|env|name|<quasi|<style-with|src-compact|none|<add-to-counter-group|<unquote|<arg|env>>|figure-env><assign|<unquote|<merge|<arg|env>|-text>>|<macro|<localize|<unquote|<arg|name>>>>><assign|<unquote|<merge|small-|<arg|env>>>|<macro|body|caption|<style-with|src-compact|none|<compound|<unquote|<merge|next-|<arg|env>>>><style-with|src-compact|none|<render-small-figure|<unquote|<arg|env>>|<if|<equal|<value|language>|hungarian>|<style-with|src-compact|none|<compound|<unquote|<merge|the-|<arg|env>>>>.
<compound|<unquote|<merge|<arg|env>|-text>>>>|<style-with|src-compact|none|<compound|<unquote|<merge|<arg|env>|-text>>>
<compound|<unquote|<merge|the-|<arg|env>>>>>>|<arg|body>|<arg|caption>>>>>><assign|<unquote|<merge|small-|<arg|env>|*>>|<macro|body|caption|<style-with|src-compact|none|<render-small-figure|<unquote|<arg|env>>|<compound|<unquote|<merge|<arg|env>|-text>>>|<arg|body>|<arg|caption>>>>><assign|<unquote|<merge|big-|<arg|env>>>|<\macro|body|caption>
<surround|<compound|<unquote|<merge|next-|<arg|env>>>>||<style-with|src-compact|none|<render-big-figure|<unquote|<arg|env>>|<if|<equal|<value|language>|hungarian>|<style-with|src-compact|none|<compound|<unquote|<merge|the-|<arg|env>>>>.
<compound|<unquote|<merge|<arg|env>|-text>>>>|<style-with|src-compact|none|<compound|<unquote|<merge|<arg|env>|-text>>>
<compound|<unquote|<merge|the-|<arg|env>>>>>>|<arg|body>|<arg|caption>>>>
</macro>><assign|<unquote|<merge|big-|<arg|env>|*>>|<\macro|body|caption>
<style-with|src-compact|none|<render-big-figure|<unquote|<arg|env>>|<compound|<unquote|<merge|<arg|env>|-text>>>|<arg|body>|<arg|caption>>>
</macro>>>>>>
</body>
<\initial>
<\collection>
<associate|preamble|true>
</collection>
</initial><TeXmacs|1.0.6.11>
<style|source>
<\body>
<active*|<\src-title>
<src-package|section-book|1.0>
<\src-purpose>
Sectional markup for books.
</src-purpose>
<src-copyright|1998--2004|Joris van der Hoeven>
<\src-license>
This <TeXmacs> style package falls under the <hlink|GNU general public
license|$TEXMACS_PATH/LICENSE> and comes WITHOUT ANY WARRANTY
WHATSOEVER. If you do not have a copy of the license, then write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
</src-license>
</src-title>>
<use-package|section-base>
<assign|sectional-short-style|<macro|false>>
<assign|chapter-clean|<macro|<reset-section><reset-std-env>>>
<assign|display-std-env|<macro|nr|<chapter-prefix><arg|nr>>>
<\active*>
<\src-comment>
Parts.
</src-comment>
</active*>
<assign|part-title-sub|<macro|body|<style-with|src-compact|none|<new-dpage*><no-indent><assign|page-this-header|><assign|page-this-footer|><new-line><no-indent><vspace*|0.25pag><with|math-font-series|bold|font-series|bold|font-size|3|<arg|body>><vspace|0.05pag><no-indent*><new-dpage>>>>
<assign|part-title|<macro|name|<part-title-sub|<style-with|src-compact|none|<vspace|0.05pag><new-line><htab|0fn><arg|name><htab|0fn>>>>>
<assign|part-numbered-title|<macro|name|<part-title-sub|<style-with|src-compact|none|<htab|0fn><text-num-hu|<part-text>|<the-part>><htab|0fn><vspace|0.1pag><new-line><htab|0fn><arg|name><htab|0fn>>>>>
<\active*>
<\src-comment>
Chapters.
</src-comment>
</active*>
<assign|chapter-title|<macro|name|<style-with|src-compact|none|<new-dpage*><no-indent><new-line><no-indent><vspace*|5fn><with|math-font-series|bold|font-series|bold|<really-huge|<arg|name>>><vspace|2fn><no-page-break><no-indent*>>>>
<assign|chapter-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-title|<text-num-hu|<chapter-text>|<the-chapter>><vspace|1fn><new-line><arg|title>>>>>
<assign|appendix-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-title|<text-num-hu|<appendix-text>|<the-appendix>><vspace|1fn><new-line><arg|title>>>>>
<\active*>
<\src-comment>
Sections.
</src-comment>
</active*>
<assign|section-title|<macro|name|<style-with|src-compact|none|<sectional-normal-bold|<vspace*|3fn><very-large|<arg|name>><vspace|1fn>>>>>
<assign|subsection-title|<macro|name|<style-with|src-compact|none|<sectional-normal-bold|<vspace*|2fn><large|<arg|name>><vspace|0.5fn>>>>>
<assign|subsubsection-title|<macro|name|<style-with|src-compact|none|<sectional-normal-bold|<vspace*|1fn><arg|name><vspace|0.5fn>>>>>
<\active*>
<\src-comment>
Paragraphs.
</src-comment>
</active*>
<assign|paragraph-title|<macro|name|<style-with|src-compact|none|<sectional-short-bold|<vspace*|0.5fn><arg|name><paragraph-sep>>>>>
<assign|subparagraph-title|<macro|name|<style-with|src-compact|none|<sectional-short-bold|<vspace*|0.25fn><arg|name><subparagraph-sep>>>>>
\;
</body>
<\initial>
<\collection>
<associate|preamble|true>
</collection>
</initial><TeXmacs|1.0.6.11>
<style|source>
<\body>
<\active*>
<\src-title>
<src-style-file|tmbook|1.0>
<\src-purpose>
A future style for <TeXmacs> books.
</src-purpose>
<\src-copyright|1998--2004>
Joris van der Hoeven
</src-copyright>
<\src-license>
This <TeXmacs> style file falls under the <hlink|GNU general public
license|$TEXMACS_PATH/LICENSE> and comes WITHOUT ANY WARRANTY
WHATSOEVER. If you do not have a copy of the license, then write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
</src-license>
</src-title>
</active*>
<use-package|book|vdh>
<\active*>
<\src-comment>
Headers.
</src-comment>
</active*>
<assign|odd-page-text|<macro|s|<assign|page-odd-header|<quasiquote|<small|<style-with|src-compact|none|<wide-std-underlined|<with|font-shape|small-caps|<unquote|<arg|s>>><htab|5mm><page-the-page>>>>>>>>
<assign|even-page-text|<macro|s|<assign|page-even-header|<quasiquote|<small|<style-with|src-compact|none|<wide-std-underlined|<page-the-page><htab|5mm><with|font-shape|small-caps|<unquote|<arg|s>>>>>>>>>>
<\active*>
<\src-comment>
Chapters.
</src-comment>
</active*>
<assign|sectional-sep|<macro|.<space|2spc>>>
<assign|chapter-title|<macro|name|<style-with|src-compact|none|<new-dpage*><new-line><style-with|src-compact|none|<sectional-centered-bold|<vspace*|2fn><with|font-shape|small-caps|<really-large|<arg|name>>><vspace|3fn>>>>>>
<assign|chapter-long-title|<macro|first-title|second-title|<style-with|src-compact|none|<chapter-title|<style-with|src-compact|none|<very-huge|<arg|first-title>><right-flush><vspace|1.5fn><new-line><left-flush><arg|second-title>>>>>>
<assign|chapter-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-long-title|<text-num-hu|<chapter-text>|<the-chapter>>
|<arg|title>>>>>
<assign|appendix-numbered-title|<macro|title|<style-with|src-compact|none|<chapter-long-title|<text-num-hu|<appendix-text>|<the-appendix>>
|<arg|title>>>>>
<\active*>
<\src-comment>
Sections, subsections and subsubsections.
</src-comment>
</active*>
<assign|section-title|<macro|name|<style-with|src-compact|none|<sectional-centered-bold|<vspace*|2fn><with|font-shape|small-caps|<larger|<arg|name>>><vspace|1fn>>>>>
<assign|subsection-title|<macro|name|<style-with|src-compact|none|<sectional-normal-bold|<vspace*|1.5fn><large|<arg|name>><vspace|0.5fn>>>>>
<assign|subsubsection-title|<macro|name|<style-with|src-compact|none|<sectional-normal-bold|<vspace*|1fn><arg|name><vspace|0.5fn>>>>>
<\active*>
<\src-comment>
Other customization.
</src-comment>
</active*>
<assign|theorem-name|<macro|name|<with|font-shape|small-caps|<arg|name>>>>
<assign|toc-strong-2|<macro|left|right|<style-with|src-compact|none|<vspace*|1fn><with|font-series|bold|math-font-series|bold|font-shape|small-caps|<arg|left>><toc-dots><arg|right><vspace|0.5fn>>>>
\;
</body>
<\initial>
<\collection>
<associate|preamble|true>
</collection>
</initial>_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev