3

enter image description here

I used the \MakeUppercase command to capitalize the subsection title, but there are some letters that are not capitalized synchronously.

\documentclass[10pt,a4paper]{extbook}
\usepackage{extsizes}
\usepackage[utf8]{vietnam}
\usepackage{amsmath,amssymb,yhmath,mathrsfs,fontawesome}

\let\widering\relax \usepackage{antpolt} \usepackage{fontawesome} \usepackage{amsmath,amssymb,mathrsfs,maybemath,xlop,polynom,slashbox} \usepackage[tikz]{bclogo} \usepackage{enumerate} \usepackage{tkz-euclide} \usepackage{tikz-3dplot} \usepackage{tkz-tab,tkz-linknodes} \usetikzlibrary{shapes.geometric,arrows,calc,intersections,angles,patterns,snakes,arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri,shapes.symbols} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage[hidelinks,unicode]{hyperref} \usepackage{currfile} \usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm] {geometry} \usepackage[hidelinks,unicode]{hyperref} \usepackage{currfile} \setcounter{secnumdepth}{4} \setcounter{tocdepth}{2} \usepackage{titlesec} \usepackage{titletoc} \renewcommand\thesection{@arabic\c@section} \renewcommand\thesubsection{@Alph\c@subsection} \renewcommand\thesubsubsection{@arabic\c@subsubsection} \makeatletter

\def\thechapter{\Roman{chapter}} \titlespacing{\chapter}{0pt}{-10pt}{20pt} \titleformat{\chapter}[frame] {\color{violet!80}\fontfamily{pbk}\selectfont} {\filright\normalsize\enspace \faGraduationCap~CHƯƠNG \Huge\thechapter\enspace} {.5cm} {\Huge\bfseries\filcenter\MakeUppercase} \def\thesection{\arabic{section}} \titleformat{\section} {\fontfamily{put}\selectfont\color{magenta}\Large} {\tikz[baseline=(char.base)]\node[shape=circle,draw,line width = 1pt,inner sep=1pt,fill=violet!10] (char){\Huge\textcolor{red}{\S\thesection}};} {0em} {\Huge\bfseries\filcenter\MakeUppercase} \def\thesubsection{\Alph{subsection}} \titleformat{\subsection} {\fontfamily{pbk}\selectfont\large\bfseries\color{magenta}} { \hspace{-2.2ex}\tikz[baseline=(char.base)]\node[shape=circle,draw,inner sep=2pt,fill=violet!10] (char){\textcolor{red}{\thesubsection}}; } {.1em} {\large\bfseries\MakeUppercase} \def\thesubsubsection{\arabic{subsubsection}} \titleformat{\subsubsection} {\fontfamily{pbk}\selectfont\small\bfseries\color{magenta}} { \hspace{-2ex}\tikz[baseline=(char.base)] \node[shape=diamond,draw,inner sep=2pt,fill=violet!10] (char) {\textcolor{red}{\thesubsubsection}}; } {-0.3em} {\bfseries\MakeUppercase}

\begin{document} \chapter{MỆNH ĐỀ - TẬP HỢP} \section{TẬP HỢP} \subsection{Tóm tắt lý thuyết} \subsection{Các dạng toán và ví dụ} \subsection{Bài tập tự luận} \subsection{Câu hỏi trắc nghiệm khách quan} \end{document}

`

1 Answers1

4

Changes to the case changing system mean that new data is needed to support the T5 encoding used for Vietnamese. Until this is fixed in the release:

\documentclass{article}
\usepackage[T5]{fontenc}
\ExplSyntaxOn
\group_begin:
  \bool_lazy_or:nnF
    { \sys_if_engine_luatex_p: }
    { \sys_if_engine_xetex_p: }
    {
      \cs_set_protected:Npn \__text_loop:nn #1#2
        {
          \quark_if_recursion_tail_stop:n {#1}
          \use:x
            {
              \__text_tmp:w
                \char_to_utfviii_bytes:n { "#1 }
                \char_to_utfviii_bytes:n { "#2 }
            }
          \__text_loop:nn
        }
      \cs_set_protected:Npn \__text_tmp:nnnnnn #1#2#3#4#5#6#7
        {
          \tl_const:cx
            {
              c__kernel_ #1 case_
              \char_generate:nn {#2} { 12 }
              \char_generate:nn {#3} { 12 }
              \tl_if_blank:nF {#4}
                { \char_generate:nn {#4} { 12 } }
              _tl
            }
            {
              \exp_after:wN \exp_after:wN \exp_after:wN
                \exp_not:N \char_generate:nn {#5} { 13 }
              \exp_after:wN \exp_after:wN \exp_after:wN
                \exp_not:N \char_generate:nn {#6} { 13 }
              \tl_if_blank:nF {#7}
                {
                  \exp_after:wN \exp_after:wN \exp_after:wN
                    \exp_not:N \char_generate:nn {#7} { 13 }
                }
            }
        }
      \cs_set_protected:Npn \__text_tmp:w #1#2#3#4#5#6#7#8
        {
          \tl_const:cx
            {
              c__kernel_lowercase_
              \char_generate:nn {#1} { 12 }
              \char_generate:nn {#2} { 12 }
              \tl_if_blank:nF {#3}
                { \char_generate:nn {#3} { 12 } }
              _tl
            }
            {
              \exp_after:wN \exp_after:wN \exp_after:wN
                \exp_not:N \char_generate:nn {#5} { 13 }
              \exp_after:wN \exp_after:wN \exp_after:wN
                \exp_not:N \char_generate:nn {#6} { 13 }
              \tl_if_blank:nF {#7}
                {
                  \exp_after:wN \exp_after:wN \exp_after:wN
                    \exp_not:N \char_generate:nn {#7} { 13 }
                }
            }
          \__text_tmp:nnnnnn { upper } {#5} {#6} {#7} {#1} {#2} {#3}
          \__text_tmp:nnnnnn { title } {#5} {#6} {#7} {#1} {#2} {#3}
        }
      \__text_loop:nn
        { 1EA0 } { 1EA1 }
        { 1EA2 } { 1EA3 }
        { 1EA4 } { 1EA5 }
        { 1EA6 } { 1EA7 }
        { 1EA8 } { 1EA9 }
        { 1EAA } { 1EAB }
        { 1EAC } { 1EAD }
        { 1EAE } { 1EAF }
        { 1EB0 } { 1EB1 }
        { 1EB2 } { 1EB3 }
        { 1EB4 } { 1EB5 }
        { 1EB6 } { 1EB7 }
        { 1EB8 } { 1EB9 }
        { 1EBA } { 1EBB }
        { 1EBC } { 1EBD }
        { 1EBE } { 1EBF }
        { 1EC0 } { 1EC1 }
        { 1EC2 } { 1EC3 }
        { 1EC4 } { 1EC5 }
        { 1EC6 } { 1EC7 }
        { 1EC8 } { 1EC9 }
        { 1ECA } { 1ECB }
        { 1ECC } { 1ECD }
        { 1ECE } { 1ECF }
        { 1ED0 } { 1ED1 }
        { 1ED2 } { 1ED3 }
        { 1ED4 } { 1ED5 }
        { 1ED6 } { 1ED7 }
        { 1ED8 } { 1ED9 }
        { 1EDA } { 1EDB }
        { 1EDC } { 1EDD }
        { 1EDE } { 1EDF }
        { 1EE0 } { 1EE1 }
        { 1EE2 } { 1EE3 }
        { 1EE4 } { 1EE5 }
        { 1EE6 } { 1EE7 }
        { 1EE8 } { 1EE9 }
        { 1EEA } { 1EEB }
        { 1EEC } { 1EED }
        { 1EEE } { 1EEF }
        { 01A0 } { 01A1 }
        { 01AF } { 01B0 }
        \q_recursion_tail ?
        \q_recursion_stop
  }
\group_end:
\ExplSyntaxOff

\begin{document} \MakeUppercase{Tóm tắt lý thuyết ư} \end{document}

(The team are looking more generally at whether full Unicode support is needed even in pdfTeX: I suspect so.)

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • Thank you @Josep Wright. But symbol "ư" not not capitalized synchronously. https://imgur.com/nk0meUG – Cao Thành Thái Aug 11 '22 at 09:05
  • @CaoThànhThái I probably missed one: in the patch I've got ready for expl3 I included that (it's in a different place in Unicode to the rest) - I'll edit my answer shortly – Joseph Wright Aug 11 '22 at 09:07