LaTeX forum ⇒ Scientific Word/WorkplaceTranslation of Identifiers to other Language

Information and discussion about Scientific Word and Scientific Workplace, two commercial WYSIWYG-like editors for Windows
omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Translation of Identifiers to other Language

Postby omer21 » Fri Nov 23, 2012 11:14 pm

Hi,

is it possible to translate theorem, definition, lemma, ... strings like to Turkish in SW? For example I want to change "Definition" to "Tanım". If it is possible could you help?

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Postby omer21 » Sat Nov 24, 2012 1:13 pm

I used babel package and I did some changes in preamble for example I replaced
  1. \newtheorem{definition}[theorem]{Definition}
with
  1. \newtheorem{definition}[theorem]{Tanım}


Here is my document code.
  1. \documentclass{article}%
  2. \usepackage[turkish]{babel}%
  3. \usepackage{amsmath}%
  4. \setcounter{MaxMatrixCols}{30}%
  5. \usepackage{amsfonts}%
  6. \usepackage{amssymb}%
  7. \usepackage{graphicx}
  8.  
  9. %BeginMSIPreambleData
  10. \providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
  11. %EndMSIPreambleData
  12. \newtheorem{theorem}{Theorem}
  13. \newtheorem{acknowledgement}[theorem]{Acknowledgement}
  14. \newtheorem{algorithm}[theorem]{Algorithm}
  15. \newtheorem{axiom}[theorem]{Axiom}
  16. \newtheorem{case}[theorem]{Case}
  17. \newtheorem{claim}[theorem]{Claim}
  18. \newtheorem{conclusion}[theorem]{Conclusion}
  19. \newtheorem{condition}[theorem]{Condition}
  20. \newtheorem{conjecture}[theorem]{Conjecture}
  21. \newtheorem{corollary}[theorem]{Sonuç}
  22. \newtheorem{criterion}[theorem]{Criterion}
  23. \newtheorem{definition}[theorem]{Tanım}
  24. \newtheorem{example}[theorem]{Örnek}
  25. \newtheorem{exercise}[theorem]{Exercise}
  26. \newtheorem{lemma}[theorem]{Lemma}
  27. \newtheorem{notation}[theorem]{Notation}
  28. \newtheorem{problem}[theorem]{Problem}
  29. \newtheorem{proposition}[theorem]{Proposition}
  30. \newtheorem{remark}[theorem]{Remark}
  31. \newtheorem{solution}[theorem]{Solution}
  32. \newtheorem{summary}[theorem]{Summary}
  33. \newenvironment{proof}[1][Proof]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
  34. \begin{document}
  35.  
  36. \begin{theorem}
  37. this is theorem
  38.  
  39. \begin{definition}
  40. this is definition
  41.  
  42. \begin{example}
  43. this is ex.
  44.  
  45. \begin{corollary}
  46. dsfsdf
  47. \end{corollary}
  48. \end{example}
  49. \end{definition}
  50. \end{theorem}
  51.  
  52.  
  53. \end{document}

I get the output as in the attached image which does not seem properly.
Attachments
identifiers-turkish.jpg
identifiers-turkish.jpg (17.88 KiB) Viewed 5354 times
Last edited by localghost on Sat Nov 24, 2012 1:29 pm, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Sat Nov 24, 2012 1:19 pm

Try adding \usepackage[T1]{fontenc} to your preamble.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Postby omer21 » Sat Nov 24, 2012 4:05 pm

Thanks for your reply cgnieder
But no luck. I get same output.

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sat Nov 24, 2012 4:18 pm

In addition to the correct font encoding (by fontenc) you need a corresponding input encoding e.g. by selinput. Add these lines to the document preamble.
  1. \usepackage{selinput}
  2. \SelectInputMappings{ % Semi-automatic determination
  3. ccedilla={ç}, % of input encoding
  4. odieresis={ö}, % by a list of selected glyphs
  5. scedilla={ş} % see: http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt
  6. }



Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Sat Nov 24, 2012 4:18 pm

Sorry, I suggested the wrong package (although »fontenc« definitely doesn't hurt). You should add
  1. \usepackage[<encoding>]{inputenc}

where <encoding> should be the suiting package option according to the input encoding of your file. For me it is utf8.

Regards

PS: or go with Thorsten's suggestion :)
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Postby omer21 » Sat Nov 24, 2012 6:13 pm

As I know right font encoding is iso-8859-9 (latin5) for Turkish. I tried
  1. \usepackage[latin5]{inputenc}

but it does not work. Also I tried it with Thorsten's suggestion but I got the following error
  1. Package babel Warning: No hyphenation patterns were loaded for
  2. (babel) the language `Turkish'
  3. (babel) I will use the patterns loaded for \language=0 instead.
  4.  
  5.  
  6. ! LaTeX Error: File `selinput.sty' not found.

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Sat Nov 24, 2012 6:36 pm

omer21 wrote:As i know right font encoding is iso-8859-9 (latin5) for turkish.
I tried
  1. \usepackage[latin5]{inputenc}

but it does not work.


Not the font encoding is important here (I believe) but the input encoding of your editor. You should check with which encoding your files are saved. The one of »inputenc« should match that.

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

omer21
Posts: 11
Joined: Wed Oct 24, 2012 3:32 pm

Postby omer21 » Sat Nov 24, 2012 7:16 pm

cgnieder wrote:Not the font encoding is important here (I believe) but the input encoding of your editor. You should check with which encoding your files are saved. The one of »inputenc« should match that.

Regards


When latin5 >>inputenc<< is in the preamble, i save document with turkish character set. Similarly with utf8 inputenc i save with UT8 character set. In both cases when i preview pdf it does not seem properly.

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Sat Nov 24, 2012 9:09 pm

omer21 wrote:[…] Also i tried it with Thorsten's suggestion but i got the following error
  1. Package babel Warning: No hyphenation patterns were loaded for
  2. (babel) the language `Turkish'
  3. (babel) I will use the patterns loaded for \language=0 instead.

This is not part of the error, just a warning. You have to activate the hyphenation patterns for your language. I can't tell you how to do that in SW.
omer21 wrote:
  1. ! LaTeX Error: File `selinput.sty' not found.

Simply install the package by the package manager of SW (if there is one). It is part of the oberdiek bundle.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1


Return to “Scientific Word/Workplace”

Who is online

Users browsing this forum: No registered users and 1 guest