I am trying to create a table like this one here: enter image description here

The problem I have is that it requires a lot of finite tuning for each cell to be centered, and I'm planning to add more rows for different kanji symbols (which may have more subrows for each (K) and (O) row. Is there a way to configure the alignment programatically?

Here is the code for the table I showed (must be compiled with XeLaTeX compiler):


% I added more height to the cells to allow the japanese characters to have space for the text below them 

    % The multicolumn commands used here are needed to align vertically the cells
    \multicolumn{1}{|c|}{漢字}  & \multicolumn{1}{c|}{Explicación} & \multicolumn{2}{c|}{くんよみ(K)•おんよみ(O)} & \multicolumn{1}{c|}{Palabras} & \multicolumn{1}{c|}{Significado}\\
    \multirow[c]{7}{*}{人} & \multirow[c]{7}{3cm}[0.2pt]{Persona. \newline Indica el lugar de procedencia de la persona. \newline Contador de personas.} & K & ひと  & \ruby{人}{ひと}\Bstrut & Persona\\
    & & \multirow{3}{*}[0.2cm]{O} & ジン & アルゼンチン\ruby{人}{じん}\Bstrut & Argentino\\
    & & & ニン & \ruby{三}{3}\ruby{人}{にん} & Contador: Tres personas\\
    & & \multicolumn{2}{c|}{\multirow{3}{*}{Excepciones}} & \ruby{一人}{ひとり} & Contador: Una persona\\
    & & \multicolumn{2}{c|}{} & \ruby{二人}{ふたり} & Contador: Dos personas\\
  • welcome to tex.se! (i) this table i already sow here ... and answer(s) to it solve similar issues as you have (ii) your table is to wide to be fit in text area. you should consider to enlarge \textwidth (iiI) if you have more lines for row with K, than also for this row use the \multirow as you use for row with O. – Zarko Dec 6 '18 at 6:37

Your Answer

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

Browse other questions tagged or ask your own question.