Now we need to make some choices between TeX, LaTeX2e, LaTeX 3, ConTeXt(LuaTeX), LuaLaTeX, XeTeX, XeLaTeX and...

I don't specially like the syntax of L3 but recently I was impressed by very convincing examples with L3 and Lua so syntax or not it's perhaps a good thing to learn how to use L3 and how to program with Lua. But if I introduce some L3 code in my packages, I might create some problems for some users. Is it possible to mix L3 and Latex2e? Lua is a very big step... but lualatex seems to be very promising.

We need to use options in a package, we need to use keys... What are the packages that are recommended with each method?

I think that immobility is not a good thing and I must choose a direction, so my question is to ask what are the advantages and disadvantages of the different methods? (Sorry if my English is very rough!)

  • 1
    Several years ago, I made some choices : utf8 instead of latin 1 or 9 and pdf instead of dvips and actually I'm happy with that. – Alain Matthes May 11 '16 at 12:22
  • 1
    As it stands, this feels very opinion-based to me. At the very least I think you need to tighten up the criteria. For example, are you talking about writing LaTeX packages, generic (plain/LaTeX/ConTeXt/...) code, plain code, etc. Also, what sort of functionality are you using: some stuff can only be done using LuaTeX which will then dictate your choice. – Joseph Wright May 11 '16 at 12:46
  • 1
    On keys, see tex.stackexchange.com/questions/26771/… (there's one new package to add there, I think, at the time of writing). – Joseph Wright May 11 '16 at 12:47
  • 6
    "is it possible to mix L3 and latex2e" the only version of L3 that is installed by default is expl3 which is a latex2e (and plain) package designed to run in an existing format, there is no pure latex3 code available from CTAN. But asking whether to use latex2e or context is like asking whether to use english or german, it's not a question that has an answer, it depends on who you want to interact with as much as choices that you can make on your own. – David Carlisle May 11 '16 at 12:56
  • @JosephWright The question is not only for me but in my case the problem is the mix between "L3 and latex2e" and if it's possible to know if there are some side effects ... – Alain Matthes May 11 '16 at 13:01

Best ways will provoke opinion based answers...

Well, here is my opinion:

At the first glance, I found expl3 syntax terrible, but meanwhile I have transformed my first package from L2 to expl3, extending it's facilities tremendously.

'Currently' I will use expl3 to rewrite the other packages as well, as for the future ones ('some plans I have -- written the packages be must' master Yoda would say ;-))

I don't say, that L3 syntax is the best one -- I like it, meanwhile. But the truth is that there are still some legacies of L2 which has not been attacked so far to be provided by the L3 - team.

Concerning the options: User A prefers keyvalue package Z, the next one prefers package Y.

As long as you know what you're doing writing should be possible with any setup, regardless, whether it's plain TeX, LuaLaTeX, L2 or L3.

Perhaps the mixture will be the future (concerning L2 and L3 it's a mixture so far, since there's no \use_package:n {classicthesis} ;-))

(I can't say anything about ConTeXt, since I have not really used it so far beyond some minor testing, so nothing productive was generated by me -- but that's my fault ;-))

Barbara Beeton made some important notes about the publishers etc.

In my point of view the purpose/goals of the package determine the usage of class or package. A more generic package that could be used widely in huge range of applicable document types should be written in L2 or expl3, since lualatex is not that advanced (as of writting) and not as accepted so far as might be demanded.

  • No problem of compatibility ? I agree with the syntax but some answers are very convincing ! – Alain Matthes May 11 '16 at 12:32
  • @AlainMatthes: Which compatibility do you mean? The fact, that expl3 is not yet a standard? – user31729 May 11 '16 at 12:34
  • Concerning the options : the problem is to know if xkeyval or pgfkeys or ... work fine with lualatex for example. I wrote lualatex because actually I compile pdflatex ... – Alain Matthes May 11 '16 at 12:36
  • 2
    @AlainMatthes once you get how the expl3 syntax works you will see that it a) is consistent and logical (you can often guess the name of functions) b) has easy expansion control c) is comprehensive – I can't remember when I last thought it were missing any functionality :) It is definitively worth the effort to learn expl3 d) is easy to read (not at first but once you've got it it is easier to read than traditional LaTeX programming). And as far as usage in 2e is concerned: there are quite a number of 2e packages written in expl3 already: siunitx, chemmacros, acro, xpatch, … – clemens May 11 '16 at 13:02
  • 2
    @AlainMatthes tex.stackexchange.com/questions/32295/… but note that for example hyphenation, line breaking, etc., may be different (a 'drop in' replacement has to do exactly the same for the same input, not 'more-or-less the same'). – Joseph Wright May 11 '16 at 13:38

if you are creating a package that you expect to be used by authors submitting books and papers for publication, you should consider the restrictions set by the likely publishers, and the reasons for those restrictions.

mostly, such restrictions are not arbitrary, but are made on account of requirements of the production and printing processes, and the need for archival stability. (the latter depends on the field; it is very important for math, not so much for chemistry.)

here are some examples.

  • luatex is not yet sufficiently stable to be considered a production tool.

  • context is not readily adaptable to some publishers' requirements.

  • restrictive licenses may be a problem; the lppl is good.

  • "drop dead" code that renders a package unusable/unrunnable after a date specified in the code makes the package unusable for a publisher with an archival requirement that includes support for revised editions or inclusion of articles in "collected works".

pdf(la)tex and xe(la)tex have proved to be stable bases.

  • 1
    (+1) I don't think it is only publishers who should worry about using 'drop dead' packages. – cfr May 11 '16 at 13:03
  • When you wrote luatex, lualatex is also concerned ? – Alain Matthes May 11 '16 at 13:13
  • 1
    @AlainMatthes -- yes, in this sense, lualatex is equivalent to luatex; think of this as three parts: tex (the basic engine) + lua (the engine enhancement) + latex (the user interface). anything including lua is in the same category. (of course, this may change in the future, but it's not yet possible to predict when, at least with the information available to me.) – barbara beeton May 11 '16 at 14:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.