LaTeX forum ⇒ GeneralLanguage selection

LaTeX specific issues not fitting into one of the other forums of this category.
gowtham7
Posts: 1
Joined: Mon Nov 25, 2019 3:24 pm

Language selection

Postby gowtham7 » Mon Nov 25, 2019 3:30 pm

I want to change languages at certain places which is not happening through Overleaf online latex editor.

I've the following code:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. %% LyX 1.6.7 created this file. For more info, see <!-- m --><a class="postlink" href="http://www.lyx.org/">http://www.lyx.org/</a><!-- m -->.
  2. %% Do not edit unless you really know what you are doing.
  3. \documentclass[12pt,a4paper,ngerman,english,intoc,bibtotoc,idxtotoc,BCOR10mm,titlepage,tablecaptionabove,fleqn]{scrbook}
  4. \usepackage{lmodern}
  5. \renewcommand{\sfdefault}{lmss}
  6. \renewcommand{\ttdefault}{lmtt}
  7. \usepackage[T1]{fontenc}
  8. \usepackage[latin9]{inputenc}
  9. \usepackage{fancyhdr}
  10. \pagestyle{fancy}
  11. \setcounter{secnumdepth}{3}
  12. \setlength{\parskip}{\medskipamount}
  13. \setlength{\parindent}{0pt}
  14. \usepackage{babel}
  15.  
  16. \usepackage{amsmath}
  17. \usepackage{graphicx}
  18. \usepackage{amssymb}
  19. \usepackage{nomencl}
  20. % the following is useful when we have the old nomencl.sty package
  21. \providecommand{\printnomenclature}{\printglossary}
  22. \providecommand{\makenomenclature}{\makeglossary}
  23. \makenomenclature
  24. \usepackage[unicode=true,
  25. bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=1,
  26. breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
  27. {hyperref}
  28. \hypersetup{pdftitle={Your Title},
  29. pdfauthor={Your Name},
  30. pdfsubject={Dissertation zur Erlangung des Doktorgrades der Technischen Fakultät der Albert-Ludwigs-Universität Freiburg im Breisgau},
  31. pdfkeywords={Ph.D. thesis},
  32. pdfpagelayout=OneColumn, pdfnewwindow=true, pdfstartview=XYZ, plainpages=false}
  33.  
  34. \makeatletter
  35.  
  36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
  37. \pdfpageheight\paperheight
  38. \pdfpagewidth\paperwidth
  39.  
  40. \DeclareRobustCommand*{\lyxarrow}{%
  41. \@ifstar
  42. {\leavevmode\,$\triangleleft$\,\allowbreak}
  43. {\leavevmode\,$\triangleright$\,\allowbreak}}
  44.  
  45. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
  46. % print no date
  47. \date{}
  48.  
  49. % increase link area for cross-references and autoname them
  50. \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}
  51. \newlength{\abc}
  52. \settowidth{\abc}{\space}
  53. \addto\extrasenglish{
  54. \renewcommand{\equationautorefname}{\hspace{-\abc}}
  55. \renewcommand{\sectionautorefname}{sec.\negthinspace}
  56. \renewcommand{\subsectionautorefname}{sec.\negthinspace}
  57. \renewcommand{\subsubsectionautorefname}{sec.\negthinspace}
  58. \renewcommand{\figureautorefname}{Fig.\negthinspace}
  59. \renewcommand{\tableautorefname}{Tab.\negthinspace}
  60. }
  61.  
  62. % in case somebody want to have the label "equation"
  63. %\renewcommand{\eqref}[1]{equation~(\negthinspace\autoref{#1})}
  64.  
  65. % that links to image floats jumps to the beginning
  66. % of the float and not to its caption
  67. \usepackage[figure]{hypcap}
  68.  
  69. % the pages of the TOC is numbered roman
  70. % and a pdf-bookmark for the TOC is added
  71. \let\myTOC\tableofcontents
  72. \renewcommand\tableofcontents{%
  73. \frontmatter
  74. \pdfbookmark[1]{\contentsname}{}
  75. \myTOC
  76. \mainmatter }
  77.  
  78. % make caption labels bold
  79. \setkomafont{captionlabel}{\bfseries}
  80. \setcapindent{1em}
  81.  
  82. % enable calculations
  83. \usepackage{calc}
  84.  
  85. % fancy page header/footer settings
  86. \renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
  87. \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
  88. %\lhead[\fancyplain{}{}]{\fancyplain{}{\rightmark}}
  89. \rhead[\fancyplain{}{\leftmark}]{\fancyplain{}{}}
  90. \lfoot[\thepage]{}
  91. \rfoot[]{\thepage}
  92. \cfoot{}
  93.  
  94. % increase the bottom float placement fraction
  95. \renewcommand{\bottomfraction}{0.5}
  96.  
  97. % avoid that floats are placed above its sections
  98. \let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
  99.  
  100. % widen the space for the nomenclature entry labels
  101. \renewcommand{\nomlabelwidth}{2.5cm}
  102.  
  103. \makeatother
  104.  
  105. \begin{document}
  106. \selectlanguage{ngerman}%
  107.  
  108. \subject{Dissertation zur Erlangung des Doktorgrades der Technischen Fakultät
  109. der Albert-Ludwigs-Universität Freiburg im Breisgau}
  110.  
  111. \selectlanguage{english}%
  112.  
  113. \title{Title}
  114.  
  115.  
  116. \author{Your name}
  117.  
  118.  
  119. \date{Date}
  120.  
  121. \selectlanguage{ngerman}%
  122.  
  123. \publishers{\includegraphics[width=0.4\columnwidth]{images/Uni_Logo-Grundversion_E1_A4_CMYK}\vspace{\baselineskip}\\
  124. Albert-Ludwigs-Universität Freiburg im Breisgau\\
  125. Technische Fakultät\\
  126. Institut für zzz\vspace{-3cm}
  127. }
  128.  
  129.  
  130. \lowertitleback{\textbf{Dekan}\smallskip{}
  131. \\
  132. Prof. Dr. xxx yyy\bigskip{}
  133. \\
  134. \textbf{Referenten}\smallskip{}
  135. \\
  136. Prof. Dr. aaa bbb\smallskip{}
  137. \\
  138. Prof. Dr. xxx yyy\bigskip{}
  139. \\
  140. \textbf{Datum der Promotion (only necessary for final publication)}\smallskip{}
  141. \\
  142. xx.yy.zzzz}
  143.  
  144. \selectlanguage{english}%
  145.  
  146. \dedication{Dedication, cite from a famous person, or whatever you like (is of
  147. course optional)}
  148.  
  149. \maketitle
  150. \cleardoublepage{}
  151.  
  152. \lhead[\fancyplain{}{}]{\fancyplain{}{\rightmark}}
  153.  
  154. \tableofcontents{}
  155.  
  156. \cleardoublepage{}
  157.  
  158. \pagestyle{plain}
  159.  
  160. \include{Summary}
  161.  
  162. \include{Zusammenfassung}
  163.  
  164. \cleardoublepage{}
  165.  
  166. \pagestyle{fancy}\lhead[\fancyplain{}{\chaptername\;\thechapter}]{\fancyplain{}{\rightmark}}
  167.  
  168. \include{chapter-1}
  169.  
  170. \include{chapter-2}
  171.  
  172. \cleardoublepage{}
  173.  
  174. \lhead[\fancyplain{}{}]{\fancyplain{}{Acknowledgments}}
  175.  
  176. \rhead[\fancyplain{}{Acknowledgments}]{\fancyplain{}{}}
  177.  
  178.  
  179.  
  180. \include{Appendix}
  181.  
  182. \cleardoublepage{}
  183.  
  184. \lhead[\fancyplain{}{}]{\fancyplain{}{\rightmark}}
  185.  
  186. \rhead[\fancyplain{}{\leftmark}]{\fancyplain{}{}}
  187.  
  188. \bibliographystyle{biblio/alpha}
  189. \bibliography{biblio/Plasma}
  190.  
  191.  
  192. \cleardoublepage{}
  193.  
  194. \lhead[\fancyplain{}{}]{\fancyplain{}{Nomenclature}}
  195. \rhead[\fancyplain{}{Nomenclature}]{\fancyplain{}{}}
  196.  
  197. \printnomenclature{}
  198. \end{document}

User avatar
Johannes_B
Site Moderator
Posts: 4174
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Nov 25, 2019 5:13 pm

Welcome to the forum, you simply cannot use a two-langauge title the way you are trying.

Can you prepare a minimal working example so we can see the problem in more detail? Your document is cluttered with old, not-up-to-date, obsolete stuff.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “General”

Who is online

Users browsing this forum: No registered users and 10 guests