0

I am now writing a lecture notes on Advanced Number Theory, and I use University Lecture Series LaTex packages of AMS.

Then I faced two problems.

  1. First, if I include my native language package (which is Vietnamese), then some chapter's names automatically translated into Vietnamese, for example, Content changes to Mục lục, References changes to Tài liệu tham khảo. Though they are all correct translations, some names not translated. My question is: Why it is automatically translated and how can I customize it globally?

  2. Chapter name is also translated automatically in to Chương (a correct one) but C, H, N, G are are in capital but ư and ơ are not, as you can see in this MWE

    \documentclass{amsbook}
    \usepackage[utf8]{vietnam}
    \newtheorem{theorem}{Theorem}[chapter]
    \newtheorem{lemma}[theorem]{Lemma}
    \theoremstyle{definition}
    \newtheorem{definition}[theorem]{Definition}
    \newtheorem{example}[theorem]{Example}
    \newtheorem{xca}[chapter]{Exercise}
    \theoremstyle{remark}
    \newtheorem{remark}[theorem]{Remark}
    \numberwithin{section}{chapter}
    \numberwithin{equation}{chapter}    
    \newcommand{\blankbox}[2]{%
    \parbox{\columnwidth}{\centering
    \setlength{\fboxsep}{0pt}%
    \fbox{\raisebox{0pt}[#2]{\hspace{#1}}}%
     }
    }
    \begin{document}
    \date{May 6, 2016}
    \setcounter{page}{4}
    \tableofcontents
    \chapter{Bài tập}
    \section{Cơ bản}
    \end{document}
    

    I want to change the display name into CHƯƠNG (all letter are in capital). and what force it display unicode character not in capital letters?

Please help me.

Thanks.

  • 1
    This is really a bug in amsbook it does \uppercase\@xp{\chaptername}\enspace\thechapter} but \uppercase only works for simple ascii text, should be \MakeUppercase – David Carlisle May 6 '16 at 12:47
  • @DavidCarlisle I did change \uppercase to \MakeUppercase but CHươNG then change to normal Chương :( – Knumber10 May 6 '16 at 13:01
  • 1
    I was not suggesting you edit the class file (that would be a bad idea!) \MakeUppercase works but its calling sequence is different, see Alennano's answer where he uses that and shows it does uppercase \chaptername correctly – David Carlisle May 6 '16 at 13:38
  • this is being examined as a flaw in the ams document classes. other things have to be taken into consideration to make this work, in particular the \uppercasenonmath that is needed for titles that are carried over into running heads. (it's no use trying to persuade authors to omit math from titles.) – barbara beeton May 6 '16 at 16:51
1
  1. The automatic translation is intended as a feature. Since the strings are not directly customizable, like in Word for example, the automatic translation helps the user without having to translate it yourself each time. Of course, these strings can be changed.

  2. In order to customize it, I loaded titlesec and also babel to help.

  3. Chương is now in full uppercase. I also added the command for the \section if you want to customize it. I don't know the vietnamese word for section.

Output

Table of contents

enter image description here

Chapter/section titles

enter image description here

Code

\documentclass{amsbook}
\usepackage[utf8]{vietnam}
\usepackage{titlesec}
\usepackage[vietnamese]{babel}
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{lemma}[theorem]{Lemma}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{xca}[chapter]{Exercise}
\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}
\numberwithin{section}{chapter}
\numberwithin{equation}{chapter}    
\newcommand{\blankbox}[2]{%
\parbox{\columnwidth}{\centering
\setlength{\fboxsep}{0pt}%
\fbox{\raisebox{0pt}[#2]{\hspace{#1}}}%
 }
}

\addto\captionsvietnamese{% This changes the TOC title
    \renewcommand{\contentsname}%
        {Table of Contents}%
}

\titleformat{\chapter}%[display] % <--- makes the chapter title go to a new line
  {\huge}
  {\MakeUppercase{Chương}\ \thechapter}{20pt}{}

  \titleformat{\section}%[display] % <--- makes the chapter title go to a new line
  {\huge}
  {\MakeUppercase{Section}\ \thesection}{10pt}{}

\begin{document}
\date{May 6, 2016}
\setcounter{page}{4}
\tableofcontents
\chapter{Bài tập}
\section{Cơ bản}
\end{document}
| improve this answer | |
  • Thank you very much for your answer, but what I want to change is making ư and ơ into capital and keeping the AMS format, not change as in your code. And I also don't want to change Section, just only two question above. – Knumber10 May 6 '16 at 13:03
  • titlesec isn't considered compatible with the ams document classes, although in some situations it may work. – barbara beeton May 6 '16 at 16:53
  • @barbarabeeton Not compatible... how? Like, what happens? – Alenanno May 6 '16 at 16:56
  • we haven't tested it extensively with ams document classes -- changes to the series style are strongly discouraged for books published by the ams -- but areas (such as starred sections) that are handled differently in ams classes than in the basic latex equivalents are questionable. titlesec offers the ability to place headings in the margin; since the ams classes center output on the page, this could yield unexpected results (and use of geometry is also discouraged.) of course, someone can use this for their own purposes, but support won't be offered if problems occur. – barbara beeton May 6 '16 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.