Thanks Johannes. I find it weird that this class has a French translation for all the document, except its ToC title!
Is it possible that the translation is actually done internally by some general code in LaTeX, and not the revtex4-1 class itself ? It may explain why some specific parts ("Contents") may not be translated.
Document Classes ⇒ ToC garbled in revtex4-1. What the Hell !?
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
ToC garbled in revtex4-1. What the Hell !?
Translation by packages, such as
Stefan
babel
and polyglossia
, relies on standard text macro names, such as \contentsname
. Unfortunately, revtex4-1 uses non-standard names, such as \tocname
, \lofname
, and \lotname
. The translation packages cannot guess non-standard names.Stefan
LaTeX.org admin
ToC garbled in revtex4-1. What the Hell !?
Thanks Stefan. So the command I added to translate the ToC title is the natural way to do it, in this case. A -1 for the
But then my goal is achieved : I successfully made an almost complete template for each major class :
The only thing missing is a customization of the header. I don't know yet if I'll add this. I may start a new topic in the following days about the best way of creating an header for the "pesky" classes.
revtex4
class!But then my goal is achieved : I successfully made an almost complete template for each major class :
article
, book
, memoir
, paper
, report
, revtex4
, scrartcl
, scrbook
, scrreprt
.The only thing missing is a customization of the header. I don't know yet if I'll add this. I may start a new topic in the following days about the best way of creating an header for the "pesky" classes.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
ToC garbled in revtex4-1. What the Hell !?
I have no idea why you need all those classes.
article is for articles. As is scrartcl.
report, book, scrbook and scrreprt just add a chapter command on top of that (roughly speaking)
revtex is for contributions for a special journal.
memoir does the same as article, report, book and its KOMA equivalents (implementation is different)
paper .... honestly, i never heard of this class before you came up with it.
Concerning headers and footers -> https://en.wikibooks.org/wiki/LaTeX/Cus ... er-scrpage
memoir has built in macros to do the job, but probably scrlayer-scrpage will work just fine as well with memoir.
To sum it up: the main classes (including KOMA and memoir) all do the very same job. Just the default layout is a bit different and easy to adjust.
works for every langauge known to the babel package.
-------
Short trip into history:
You may want to know why so many different classes exist in the first place? LaTeX evolved, when people installed a TeX distribution on university mainframes using floppy disks. A bit later, the internet came around, but installing TeX was just as hard. Support was done on mailing lists and newsgroups. If someone saw a need for something, he created a new class or package, making it available for everybody by putting it on CTAN. The LaTeX kernel (the basic set of LEGO bricks) is maintained by a small group of people. On the other hand, over 2000 people created more than 5000 packages (including classes) that extend basic LaTeX by adding extra bricks or creating classes like revtex that serve a limited purpose, i.e. creating bricks that play not well with other contributed bricks.
https://bricks.stackexchange.com/questi ... -star-wars
article is for articles. As is scrartcl.
report, book, scrbook and scrreprt just add a chapter command on top of that (roughly speaking)
revtex is for contributions for a special journal.
memoir does the same as article, report, book and its KOMA equivalents (implementation is different)
paper .... honestly, i never heard of this class before you came up with it.
Concerning headers and footers -> https://en.wikibooks.org/wiki/LaTeX/Cus ... er-scrpage
memoir has built in macros to do the job, but probably scrlayer-scrpage will work just fine as well with memoir.
To sum it up: the main classes (including KOMA and memoir) all do the very same job. Just the default layout is a bit different and easy to adjust.
This is the intended interface. Without this, you would have to patch far far far more complicated macros. The way revtex does it, is actually kind of smart. Just not standard.So the command I added to translate the ToC title is the natural way to do it, in this case.
Code: Select all
\def\tocname{\contentsname}
-------
Short trip into history:
You may want to know why so many different classes exist in the first place? LaTeX evolved, when people installed a TeX distribution on university mainframes using floppy disks. A bit later, the internet came around, but installing TeX was just as hard. Support was done on mailing lists and newsgroups. If someone saw a need for something, he created a new class or package, making it available for everybody by putting it on CTAN. The LaTeX kernel (the basic set of LEGO bricks) is maintained by a small group of people. On the other hand, over 2000 people created more than 5000 packages (including classes) that extend basic LaTeX by adding extra bricks or creating classes like revtex that serve a limited purpose, i.e. creating bricks that play not well with other contributed bricks.
https://bricks.stackexchange.com/questi ... -star-wars
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ToC garbled in revtex4-1. What the Hell !?
Johannes,
I need all these classes "templates", ready for use, for various works.
One day, I'll have to write a book (I already have done it two times in the past, all from scratch). I'll then have a template ready for use and I'll just have to fill it without rebuilding the whole preamble.
Another day, I'll have a small paper-like document to write. I already have a template to use with all the basic functions defined in my preamble (packages and macros). I know in advance the kind of heavy stuff I'll do (physics, with lots of equations, tables and figures). So my new templates already have all the proper packages declared in the preamble, and I will not have to recreate the files from scratch, for various styles (i.e. several classes).
For a book, I would also want to have some choices of style (
This is why I created a large set of "shell-like" documents, with everything already defined in their preamble. I just have to fill the documents now without worrying about a new preamble from scratch.
The templates have been tested and they are now all working perfectly. I just have to add some general code for an optional header.
I need all these classes "templates", ready for use, for various works.
One day, I'll have to write a book (I already have done it two times in the past, all from scratch). I'll then have a template ready for use and I'll just have to fill it without rebuilding the whole preamble.
Another day, I'll have a small paper-like document to write. I already have a template to use with all the basic functions defined in my preamble (packages and macros). I know in advance the kind of heavy stuff I'll do (physics, with lots of equations, tables and figures). So my new templates already have all the proper packages declared in the preamble, and I will not have to recreate the files from scratch, for various styles (i.e. several classes).
For a book, I would also want to have some choices of style (
book
and scrbook
classes). Same thing for small article-like documents.This is why I created a large set of "shell-like" documents, with everything already defined in their preamble. I just have to fill the documents now without worrying about a new preamble from scratch.
The templates have been tested and they are now all working perfectly. I just have to add some general code for an optional header.