0

I edited the code as provided by Mico (see Align on nested braces) and managed to change the font to be used for the Latin characters to 'nimbus sans'. Using TexStudio and the latex compiler, the following code returns exactly what I want. The only remaining problem is that I don't know how I can change the Japanese font to be used.

\documentclass{article} 
\usepackage{amssymb}
\usepackage{CJKutf8}
\usepackage{mathtools,array,booktabs} 
\usepackage{cancel}
\usepackage{nimbussans}
\renewcommand*\familydefault{\sfdefault}
\usepackage[T1]{fontenc}

\begin{document} \begin{CJK}{UTF8}{gbsn}
[ \setlength\arraycolsep{0pt} \renewcommand\arraystretch{1} \left. \begin{array}{rr} \left.\begin{array}{r} \text{V} \ \text{い-adj} \end{array}\right} & \multicolumn{1}{r}{\text{Jisho}} \ \addlinespace \left.\begin{array}{r} \text{な-adj} \ \text{N}\textsubscript{1} \end{array}\right} & \begin{array}{r} \text{Jisho} \ \text{$\sim$\cancel{だ}}\to\text{$\sim$な} \end{array} \end{array} \right}
\text{のは N}\textsubscript{2}\text{です} ] \end{CJK
}
\end{document}

enter image description here

All my LibreOffice documents use Noto Sans mono CJK JP as the default font. Is it possible to use the same font in Latex?

  • you can use any opentype font including Noto Sans if you use lualatex rather than pdflatex (so not T1 encoding) – David Carlisle Oct 04 '23 at 10:09
  • The real Noto Sans Mono is not (easily) available for pdflatex/latex (and very easily for XeLaTeX or LuaLaTeX, as David commented). However, depending on your installation there are probably some variants available for pdflatex/latex that look a bit more sans. For example instead of gbsn you could try goth or maru. I don't know if they have all the required characters available for Japanese though. – Marijn Oct 04 '23 at 10:42
  • After switching to lualatex, the Japanese characters were no longer displayed. Where can I find information on how to install opentype fonts? And what means 'gbsn', 'goth' or 'maru'? ( I am really a Newbie on latex). – Ben Engbers Oct 04 '23 at 12:56
  • gbsn is a font for simplified Chinese, goth is a Gothic Japanese font, maru is a Maru Gothic font (see https://tex.my/2010/06/21/cjk-support-in-latex/). To be clear, you can use goth and maru in your code above on the 11th line, so instead of \begin{CJK*}{UTF8}{gbsn} what you have now you could use \begin{CJK*}{UTF8}{goth} or \begin{CJK*}{UTF8}{maru} to get different fonts. Despite the name 'Gothic' the two alternatives are actually simpler/cleaner than gbsn, they look more 'sans-achtig', zogezegd. – Marijn Oct 04 '23 at 13:47
  • I removed the [T1] encoding and replaced gbsn with goth. After compiling I can see that another font is used. Only a pity that Noto Sans mono CJK JP is much easier to read. How can I use Noto Sans mono when using lualatex? (ik ben nieuwsgierig, zogezegd) – Ben Engbers Oct 04 '23 at 15:53
  • Later on, for reference, you can investigate Japanese-specific packages/unicode (e.g., do texdoc luatexja-en) rather than staying with old coding and legacy fonts etc. – Cicada Oct 05 '23 at 06:07

0 Answers0