angerhang / mockDoc

0 stars 0 forks source link

doc.cls #2

Closed kohlhase closed 9 years ago

kohlhase commented 9 years ago

you should have doc.cls so that you can also run it through pdflatex

jinbozz commented 9 years ago

Done.

jinbozz commented 9 years ago

Currently I need to load article.cls for some macros, I will try not to load it tomorrow.

kohlhase commented 9 years ago

Indeed, you should not load article.cls (and I think you do not need it).

jinbozz commented 9 years ago

2+ hours work. Actually it is much more time-consuming than I expected. The main problem is that I don't know what is defined in article.cls and what is defined in LaTeX2e source file. I checked article.cls. Doesn't help me a lot. Failing to define \Large leads to "undefined control sequence" error, which costs me more than 1hr to realize it is caused by \Large.

Is there any recommended reading about writing classes in lower-latex language? I found two readings, which are

http://www.tug.org/texlive/Contents/live/texmf-dist/doc/latex/base/source2e.pdf http://www.latex-project.org/guides/clsguide.pdf

The first one is about source code, over 400 pages, seems need months to read through. I carefully read the second one, still, it can't solve my problem.

By the way, I also tried to use \@startsection to rewrite doc.cls. But I am not so clear about \@startsection, and I can't add the counter, any advice?

Jinbo

ps: go swimming now~

dginev commented 9 years ago

Your biggest problem will indeed be with finding well written TeX documentation. TeX packages tend to leave their very intricate internals largely/completely undocumented. To counter that, you should develop the skill of reading through the LaTeXML bindings and tracing commands of interest. As a rule of thumb LaTeXML bindings are much easier to read than TeX package files.

Also, if an error message confuses you - make it a habit of asking other LaTeXML devs what the mistake might be. We can also improve cryptic messages, when you hit badly implemented reporting.

kohlhase commented 9 years ago

yes, reading LaTeX packages and classes is an art that you have to learn over time, but it will come; keep at it. LaTeX error messages are also cryptic, but again, you will learn. If these things were easy, I would have no incentive to pay you :-).

stackoverflow is a great help to me in writing LaTeX, but I guess reading these kind of files is different.

Michael

kohlhase commented 9 years ago

oh, and if you are stuck you can come by and maybe I can see what is going on.

kohlhase commented 9 years ago

I guess you can close this issue.