Changes

Jump to navigation Jump to search
m
== An example of mixed languages ==
There is below an example of 5 pages printed mainly in English, where you can find Ancient Greek, Traditional Chinese and Arabic. This text is more than a MWE (''Minimum Working Example''), because it also contains footnotes, a an header and a footer, as well as boxed a framed text. But even if at first glance this page seems difficult for a beginner, you can practise with the code on this page. Details: the Arabic text is printed correctly, i.e. from right to left. You can adjust the size of the text with a number of commands concerning the number of lines per page, the font size, etc.
>Note : for some reason, each command here begin with 2 backslashes : one is enough ...
{{cmd|setupbodyfontenvironment}}[default][em=italic]
''% Use Theano Didot as Ancient Greek font''
{{cmd|definefallbackfamily}}[mainface][serif][Theano Didot][preset=range:greek, it={Old Standard Italic}, force=yes]
''% Choose between Ipaexmincho font and NotoSansTC (Traditional Chinese)''
''%\definefallbackfamily [mainface] [rm] [ipaexmincho] [range=cjkunifiedideographs]<\pre>''
{{cmd|definefallbackfamily}} [mainface] [rm] [notosanstc] [range=cjkunifiedideographs]
''% Choose between two Arabic fonts'' ''%{{cmd|\definefallbackfamily}}[mainface] [serif] [nafeesnastaleeq] [range=arabic]''
{{cmd|definefallbackfamily}}[mainface] [serif] [hussaininastaleeq] [range=arabic]
{{cmd|setupcolors}}[state=start]
''% Definition of the frame style (at the end of the document''
{{cmd|defineframedtext}}
[MyFrame]
frame=off,
background=MyFrame,
''%width=\textwidth'',
width=max,
height=fit,
[headstyle=\bf\smallcaps]
''% Using MPGraphic (MetaPost), with appropriate syntax''
{{cmd|startuseMPgraphic}}{MyFrame}
path b;
{{cmd|section}} {\sc Preamble}
 
''% Main text''
When it comes to submitting a document in a national language (as English, or German, or French), everything is fine. When it comes to writing a slightly complex document in any Romance language, but with quotations — or references — in another language, which in particular does not have the same requirements as your own Romance language, nor the same {\em diacritical marks}, we run into a few difficulties. Software suites such as Microsoft Office or LibreOffice are not lacking in power, but the truth is that as soon as we get into the requirements and detail of professional publishing, which consists of presenting a readable text enriched (with notes, etc.), the situation quickly becomes technically rather difficult. The most common situation we encounter in Philosophy, History, or and more generally in the Humanities, is that of a text in which there are quotations from Greek or Latin authors, with references in footnotes, which contain Greek, or even Arabic, or any other language. It could be something like this sample:
 
''% The quotation in ancient Greek is in a narrower style''
{{cmd|blank}}{{cmd|\startnarrower}}[1*left,1*right]\tfx\setupinterlinespace
This is one of the reasons why you might want to control the editorial chain, not just to do without an editor, but to have an overview of your own work, or a collective work.
 
''% Here below a paragraph which contains Chinese text and Arabic''
{{cmd|section}}{How to get Greek, Chinese and Arabic to coexist on the same page?}
48

edits

Navigation menu