LaTeX forum ⇒ Document ClassesWrite different languages on the same page

Information and discussion about specific document classes and how to create your own document classes.
mehdib
Posts: 2
Joined: Wed Jan 18, 2017 6:21 pm

Write different languages on the same page

Postby mehdib » Wed Jan 18, 2017 6:28 pm

Hello
How can I write in different languages (Arabic and french) on the same page ?
thanks

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9416
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Jan 18, 2017 11:39 pm

Hi Mehdib,

welcome to the forum!

Sure, simply write it on the same page. Or was there any issue? If yes, let us know, with a code example.
Regarding language and hyphenation, you can

  1. \documentclass{article}
  2. \usepackage[french,arabic]{babel}
  3. \begin{document}
  4. \begin{otherlanguage}{french}
  5. french text
  6. \end{otherlanguage}
  7. arabic text
  8. \end{document}


Besides that, it's switching fonts.

Stefan
Site admin

mehdib
Posts: 2
Joined: Wed Jan 18, 2017 6:21 pm

Postby mehdib » Thu Jan 19, 2017 11:56 am

Thank you for the response.

to write in arabic we must change the language
when I compile to pdf i have this error message
" \documentclass{
article}
The document may only declare one class."


thanks.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9416
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Jan 19, 2017 11:42 pm

Yes, use the command \documentclass only one time. That's the very basic setup of a document, only done one time. If you use a template (that uses \documentclass) you cannot change it later. You may post your document code here, to check, if you like.

Stefan
Site admin


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 3 guests