2

This dictionary is for Taiwanese, English, and Chinese.

First off:

Now for an explanation of what's going on:

Each entry is quite complicated and consists of minimally 7 parts, but up to about a dozen or so maximally. These parts are:

Required:

  1. Taiwanese (in Chinese characters)
  2. Taiwanese (in Latin pinyin)
  3. English definition
  4. Chinese definition
  5. At least one example, including 3 parts:
    • Taiwanese (in Chinese)
    • Taiwanese (in Latin pinyin)
    • English translation

Sometimes there are also:

  • Commonly misused Chinese characters (max 4)
  • Alternate pinyin romanizations (max 4)
  • More examples (max 5 total, each with the same 3 parts as above)

Currently, this is what a sample entry looks like:

\begin{entry}
  \twchar{曷}
  \tailo{a\cvo h} %\cvo is for a diacritic needed in Taiwanese romanization
  \zhdef{何須、哪}
  \endef{there is no need; why should}
  \wrong{惡霸}
  \extw{\C{曷使}{a\cvo h-sái}}
  \exen{There's no need for that.}
  \extw{\C{曷著}{a\cvo h-tio\cvo h}}
  \exen{That's unnecessary.}
\end{entry} 

The \newenvironment that controls the styling right now is a table that looks like this:

\makeatletter
\newenvironment{entry}{%
\wrongs{}%
\alts{}%
\extws{}%
\exens{}%
\def\@twchar{}%
\def\@tailo{}%
\def\@endef{}%
\def\@zhdef{}%
\def\twchar##1{\gdef\@twchar{##1}}%
\def\tailo##1{\gdef\@tailo{##1}}%
\def\endef##1{\gdef\@endef{##1}}%
\def\zhdef##1{\gdef\@zhdef{##1}}%
}{%
  \begin{tabularx}{\textwidth}{lXXX}
    \toprule
    \LARGE\@twchar &\LARGE\@tailo &\large\@endef &\@zhdef \\
    \\
    \color[HTML]{ED1C24}\the\wrongs & \the\alts & \the\extws & \the\exens
  \end{tabularx}%
}
\makeatother

I'm using MiKTeX on Windows 8 and building with XeLaTeX, if you want to compile this you'll need Google's Noto Sans T Chinese font (NotoSansTC-Regular.otf), which I can't link to directly because I don't have 10 reputation: goo.gl / Vp0MJT

What I'd really like to do is bring everything a bit closer together in a way that longer entries will still print nicely, and ideally on A5 paper (currently it won't fit at all). I'd also like to keep things lined up down the page, currently the columns are rather whacky. The main problem as I see it is twofold:

  • Dealing with the variable lengths of words and example sentences.
  • Dealing with entries that don't have any \wrongs or \alts.

If there is a better layout that keeps all of the elements together in a visually appealing way (i.e., not just a list down the page), I'm all ears!

Note also that the current way I've done the pinyin (transliterations) for the example sentences might be better off split into two separate \defs, one for the characters and one for the pinyin, in a different layout.

Any advice is much appreciated, thanks!

1 Answer 1

3

I am not sure going with the tabular table structure is the best design, as you indicate the length of the contents vary quite a lot from word to word. The width of the table will be fix according to the longest content in the table in that page.

There might be a reason that you choose not to adapt the traditional dictionary style, which is more like a default 'description list' style. I will paste on an example based on the material you provided anyway using the traditional dictionary-like style. It is probably not as stylish as some fancy structured modern dictionary, but I am sort of the person that prefer the old-fashion way:) enter image description here

Because of the mixing of Chinese and English characters, some line-breakings/blank-spacing are not ideal. But this may be tweaked a bit.

By the way, your entry script may have some typo. I use xelatex (TeX live 2013) but I can't compile your entry script with the entry environment you provided though. Also the full tex file seems to be removed. Would you mind posting a minimal working example?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .