7

I've heard a lot about the CJK package, so I want to give that a try. There is, however, no documentation for that package (see the link), nor do the available documentation files at CJK's website tell me anything about how to use the package.

So how do I figure out how to use this package?

Sverre
  • 20,729
  • 1
    It is documented. The documentation just is not linked live from the package page. Use texdoc cjk or look in doc/latex/cjk/ which contains doc, examples etc. On CTAN, I think the documentation is packed in the archive as there are two archive files, one with the -doc suffix. texdoc cjk gives usage information and details. Not PDF but definitely documentation. – cfr Sep 14 '14 at 14:32
  • 1
    http://tex.stackexchange.com/q/68707/19356 – kiss my armpit Sep 14 '14 at 14:37
  • 1
    @cfr There is no (useable) documentation in the archive file with the -doc suffix (and btw, that file is not on CTAN, but on CJK's website). But you are right, there are .txt files that explain how to use the package in the doc/latex/cjk/ folder. – Sverre Sep 14 '14 at 15:54
  • http://ctan.org/tex-archive/language/chinese/CJK includes cjk-4.8.3-doc.tar.gz which is definitely on CTAN. The documentation is on CTAN. The problem is that it is in compressed form and so cannot be directly accessed without downloading and expanding the archive. [I'm not sure what you mean about it not being usable.] – cfr Sep 14 '14 at 16:11
  • @cfr Ah ok, there it is. It's the same archive file as on CJK's website. I meant that it contains no documentations that explain how the package should be used. It has some technical documentation that I don't understand anything of. – Sverre Sep 14 '14 at 16:36
  • @LeoLiu It's not a duplicate, because I'm not asking "How can I type Korean characters in LaTeX?", I'm asking for information on how to the use the CJK package. The fact that I'm looking for this information right now because I want to type Korean is strictly speaking irrelevant. My question would be the same even if I hadn't told you that I want to write Korean. – Sverre Sep 14 '14 at 17:14
  • Have you tried texdoc cjk? That gives me documentation which starts with a section called 'Usage'. It is much like other packages' documentation except that it is a plain text file rather than PDF. I guess I'm not sure what you don't understand. Have you tried copying and pasting the lines of code given there? – cfr Sep 14 '14 at 17:49
  • If you want an example, it would be helpful to have an MWE as I have no idea how to type Korean! But I'm not really clear why http://tex.stackexchange.com/a/17144/ doesn't answer your question. – cfr Sep 14 '14 at 17:53
  • @cfr There's nothing now I don't understand. I couldn't find information on how to use the CJK package, but you told me in your first comment where I could find that information. Case closed as far as I am concerned. Other comments here get caught up by the fact that I mentioned the word 'Korean' in my question. But it should be pretty clear from my question that I wasn't ever asking about "how to type Korean characters". (Commands such as texdoc cjk have no effect for me, because I am using a portable version of texlive in Windows, so I don't use the terminal for anything). – Sverre Sep 14 '14 at 18:03
  • Doesn't your editor have a texdoc interface? That seems like a big disadvantage otherwise since it is much easier to find documentation that way. – cfr Sep 14 '14 at 18:07
  • @cfr We're getting off-topic here. I use TeXworks which comes with texlive. I am unaware of any "texdoc interface". It would be cool if TeXworks allowed commands to be typed in the console window, but I've never been able to get that to work. BTW, could you please convert your initial comment into an answer (but skip the stuff about the archive file with the -doc suffix). – Sverre Sep 14 '14 at 18:12
  • Done. At least, I'm not sure if that's what you had in mind but I put something there. – cfr Sep 14 '14 at 18:16
  • \usepackage{CJK} \begin{CJK}{UTF8}{gbsn}你会说中文吗?\end{CJK} – Thallo Zhang Jan 23 '21 at 11:04

1 Answers1

6

The package CJK is documented and the documentation is on CTAN. However, the documentation is in a compressed archive and is provided in the form of plain text files rather than DVI or PDF.

The archived documentation can be found here and includes files explaining how to use the package to typeset the different languages supported, together with the various options available.

cjk-ko provides enhanced support for Korean in the UTF8 encoding based on CJK.

At least on unix-like systems, texdoc cjk gets you the basic documentation but doc/latex/cjk/ provides further documentation and a directory of examples.

cfr
  • 198,882
  • @Sverre It is just not laid out in the way that CTAN package directories tend to be these days. But nothing under doc is not in the CTAN archive. Anyway, I've added direct links as well. (You may have done this, too, as we edited simultaneously.) – cfr Sep 14 '14 at 18:44
  • 1
    The hyperlink that you gave for "example .tex files" does not work anymore :'(. – user1271772 Oct 17 '23 at 20:25
  • @user1271772 Thanks. I should have stuck to my original guns and just linked the package directories! – cfr Oct 17 '23 at 20:33
  • No problem. Unfortunately after your new edit, there's no sample .tex files though :) – user1271772 Oct 17 '23 at 20:57
  • @user1271772 They're still there, but if I link directly the links are hostage to the next reorganisation. Either download the archives or click on 'Directories' and you'll find a sub-directory of examples, one of documentation etc. – cfr Oct 17 '23 at 23:40
  • Okay, here is an example from the directories folder, that currently works, but might not in the future. To make it work permanently, one could use a link to a WayBackMachine archive of it. Coincidentally, the first .tex example on which I clicked (which is the one I hyperlinked in this comment) is hosted by the CS Club at University of Waterloo, which is my university :) – user1271772 Oct 18 '23 at 00:11
  • @user1271772 Probably not. I expect your university has a mirror. Because you are likely near to your university, your requests get directed there, but if I followed the same links, I would probably find the example somewhere else. This is how CTAN works and why you shouldn't post direct links to particular servers. Doing so prevents CTAN from directing users who click on your links to the best mirror for them. Moreover, mirrors come and go or they fall into temporary difficulties, need updating etc. – cfr Oct 18 '23 at 00:16
  • It sounds like they can improve their system. – user1271772 Oct 18 '23 at 00:56
  • @user1271772 This is a very common way to manage repositories of software. It is resilient in terms of outages. It also means there are independent copies of files if a mirror is compromised. When you install software e.g. updating with tlmgr or if you use a Linux distro, you'll see the package manager trying a mirror. If the mirror takes too long to respond or provides corrupt downloads, it is struck off the list and another mirror tried. It's not clear to me how you envisage improving this system, since you don't say, but, if you mean, they should have a single contact point, I disagree. – cfr Oct 18 '23 at 01:03
  • @user1271772 It also means you can make use of modest donations of resources. Your university isn't donating vast resources to hosting CTAN, even though there are a lot of files and a lot of traffic. Instead, your university is copying the central resource and enabling typically local users to download it as efficiently as possible. As far as I know, this is how it always works. CTAN isn't unique. They use the system because it works well. – cfr Oct 18 '23 at 01:06
  • @user1271772 Mostly, people don't use CTAN to read documentation. They read local copies with texdoc, for example. – cfr Oct 18 '23 at 01:06
  • There is a lot in those three comments for me to digest, but the URLs for GitHub repositories seem to work equally well from everywhere and I haven't seen them "expire". Maybe that's because they don't need to rely on donations of vast resources, but also there was indeed a time not too long ago when they had zero resources and CTAN had comparatively a lot. As for texdoc, I have not heard of it and I have been using TeX since 2007 and heard about it since 2005, but I have certainly read documentation from CTAN many times over the decades, so I'm not sure about people mostly not using it. – user1271772 Oct 18 '23 at 02:06
  • @user1271772 GitHub is different. It's not primarily a method of distributing software but of managing source code. Most people don't get TeX code from GitHub, for example. Of course, some do. You can. For small, beginning projects, it might be the only place. But you wouldn't try to distribute TeX Live from GitHub. Nor would you try to distribute Debian or Arch Linux. Lots of GitHub code ends up in those distributions, but most people don't get it from GitHub. And mostly people are not downloading as much from GitHub. It has a very different purpose. – cfr Oct 18 '23 at 02:11