Multilingual
Skill SeidSmatti/misc-CC-Plugins/plugins/academic-latex/skills/multilingual
Personal multi usage Claude Code plugins/skills marketplace
npx -y skills add SeidSmatti/misc-CC-Plugins --skill multilingualAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Configures multilingual LaTeX documents — Latin scripts (English, French, German, Spanish, etc.), RTL (Arabic, Hebrew, Persian), CJK (Chinese, Japanese, Korean), and Indic (Devanagari, Tamil, Thai, Bengali). Picks babel vs polyglossia based on engine and script; sets fonts via fontspec; handles bidi (XeLaTeX) and luabidi (LuaLaTeX). Use when the document has more than one language or any non-Latin script, or when /academic-latex:author needs the right setup. Delegates to /academic-latex:docs-lookup for non-trivial language-specific options.
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.7 KB, as published. Nobody here has run it
multilingual — script and language setup
Decision: babel or polyglossia?
| Document needs | Engine | Use |
|---|---|---|
| Latin scripts only (English, French, German, Spanish, …) | pdflatex | babel |
| Latin scripts only, but want OTF fonts | xelatex / lualatex | babel (modern) OR polyglossia |
| Any non-Latin script (Arabic, Hebrew, CJK, Devanagari, …) | xelatex / lualatex | polyglossia (required) |
| Mixed Latin + RTL | xelatex / lualatex | polyglossia + bidi/luabidi |
| Maximum Indic shaping fidelity | lualatex | polyglossia + LuaTeX HarfBuzz |
Rule of thumb: babel for pdflatex+Latin; polyglossia for xelatex/lualatex with anything beyond Latin. polyglossia is XeLaTeX/LuaLaTeX-only.
Source: polyglossia manual at https://texdoc.org/serve/polyglossia.pdf/0.
babel (pdflatex / Latin scripts)
\usepackage[main=english, french, german, spanish]{babel}
% In body:
\selectlanguage{french} % switch zone
Bonjour le monde.
\foreignlanguage{german}{Hallo Welt} % inline
main= sets the document language. Hyphenation patterns load automatically per language. Babel adapts captions ("Figure"→"Figura"), date formats, quote styles.
Source: https://ctan.org/pkg/babel.
polyglossia (xelatex / lualatex / non-Latin or modern fonts)
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{french, arabic, hindi}
% Per-script font:
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\newfontfamily\hindifont[Script=Devanagari]{Noto Serif Devanagari}
% In body — same commands as babel:
\selectlanguage{french}
\foreignlanguage{arabic}{مرحبا بالعالم}
Pitfalls (polyglossia):
- Does NOT accept package-option language declarations.
\usepackage[french]{polyglossia}is wrong; use\setotherlanguages{...}. - Other languages must be explicitly declared (no lazy reference).
- Variants come via options:
\setdefaultlanguage[variant=british]{english}.
Source: https://ctan.org/pkg/polyglossia · polyglossia PDF (linked above).
RTL setup (Arabic, Hebrew, Persian)
Recommended stack: LuaLaTeX + polyglossia + fontspec + luabidi (auto).
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri} % free, traditional Naskh
\begin{document}
English paragraph here.
\begin{arabic}
هذا نص عربي.
\end{arabic}
\end{document}
Compile: lualatex main.tex or latexmk -pdflua main.tex.
Recommended Arabic fonts (free, Unicode, well-shaped): Amiri (Khaled Hosny), Scheherazade New (SIL), Noto Naskh Arabic, Reem Kufi (display only). Hebrew: SBL Hebrew, Ezra SIL, David CLM, Frank Ruhl Hofshi, Noto Serif Hebrew. Persian: same as Arabic plus XB Niloofar, Vazirmatn.
Mixed direction: inside an RTL paragraph, wrap LTR fragments with \foreignlanguage{english}{...} or \LR{...} (and \RL{...} for the inverse). Without this, Latin numbers, punctuation, and English words drift visually.
XeLaTeX path: same packages but uses bidi (auto-loaded). LuaLaTeX is generally smoother for bidi due to TeX engine's native bi-directional layout.
Sources: https://ctan.org/pkg/bidi, https://ctan.org/pkg/luabidi, polyglossia RTL chapter.
CJK setup
Chinese (XeLaTeX):
\documentclass[UTF8]{ctexart} % loads xeCJK + Chinese class defaults
\begin{document}
你好,世界。Mixed Chinese/English works automatically.
\end{document}
ctex is the canonical Chinese-typesetting bundle; it ships ctexart, ctexrep, ctexbook classes. By default uses XeLaTeX; can be pointed at LuaLaTeX with \documentclass[lua]{ctexart} (newer ctex).
Japanese (LuaLaTeX):
\documentclass{article}
\usepackage{luatexja-fontspec}
\setmainjfont{Noto Serif CJK JP}
\setsansjfont{Noto Sans CJK JP}
\begin{document}
こんにちは、世界。Mixed Japanese/English.
\end{document}
Compile: lualatex (luatexja is LuaLaTeX-only).
Korean (LuaLaTeX similar): replace fonts with Noto Serif CJK KR etc.
Generic CJK on XeLaTeX without ctex/luatexja:
\usepackage{xeCJK}
\setCJKmainfont{Noto Serif CJK SC}
\setCJKsansfont{Noto Sans CJK SC}
\setCJKmonofont{Noto Sans Mono CJK SC}
Recommended fonts:
- Simplified Chinese: Noto Serif CJK SC, Source Han Serif SC.
- Traditional Chinese: Noto Serif CJK TC, Source Han Serif TC.
- Japanese: Noto Serif CJK JP, Source Han Serif JP, IPAex Mincho.
- Korean: Noto Serif CJK KR, Source Han Serif KR, Nanum Myeongjo.
Pitfalls:
- Default font for
xeCJKis "Fandol" (Chinese) — inappropriate for JP/KR. Always set explicitly per language. - CJK leading typically wants
\linespread{1.3}or so — defaults are too tight. - Loading order:
xeCJKafterfontspecafterpolyglossia(if used).
Sources: https://ctan.org/pkg/xecjk, https://ctan.org/pkg/ctex, https://ctan.org/pkg/luatexja.
Indic / Devanagari / Tamil / Thai
Recommended stack: LuaLaTeX + polyglossia + fontspec + Noto fonts.
\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hindi}
\newfontfamily\hindifont[Script=Devanagari]{Noto Serif Devanagari}
\begin{document}
Hello in Hindi: \texthindi{नमस्ते दुनिया}.
\end{document}
Script=Devanagari (or Script=Tamil, Script=Bengali, etc.) is required so the OpenType shaper builds conjuncts and half-forms. Without it, glyph shapes are right but ligature placement breaks.
Recommended fonts: Noto Serif/Sans for {Devanagari, Tamil, Thai, Bengali, Malayalam, Kannada, Telugu}; Sahadeva and Annapurna SIL for Sanskrit.
polyglossia language names: hindi, marathi, sanskrit, tamil, thai, malayalam, kannada, telugu, bengali.
Pitfalls:
- Forgetting
Script=Devanagari(or equivalent) on\newfontfamily. - pdflatex won't work for Unicode Indic — use lualatex.
- Hyphenation and line-breaking for Indic scripts are limited; rely on script-specific rules from polyglossia + LuaTeX.
Sources: polyglossia manual sections on Indic scripts.
Direction-aware hyphenation
When the document has multiple scripts, ensure hyphenation patterns are loaded for each:
- babel: handled per language option.
- polyglossia: handled per
\setotherlanguage{...}call.
If a language is set but hyphenation is wrong, check texlive-lang-<lang> is installed (TeX Live splits language patterns into per-language packages).
When uncertain
Language-specific options (variants, hyphenation overrides, font features for a specific script) — invoke /academic-latex:docs-lookup with the question. polyglossia options especially are version-sensitive; do not guess.
Last verified
2026-05-09 — polyglossia, babel, xeCJK, ctex, luatexja, bidi/luabidi at CTAN; font recommendations from Google Noto and SIL catalog.