Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-26 Thread Marcin Borkowski
Dnia 2013-09-25, o godz. 11:09:43
Rasmus  napisał(a):

> Nicolas Girard  writes:
> 
> > 2013/9/25 Carsten Dominik :
> 
> > I came to think that, having a piece of code that brings
> > cross-compatibility between the 3 engines would be of interest to
> > people outside of the Org community. But this is not trivial,
> > especially if the code has to work with older TeX distributions (a
> > reasonable expectation would be that it works with, say, TeXlive
> > 2011 and TeXlive 2012).
> 
> Why 2011?  We also require a recent Emacs with recent Org, or?

My 3cents: TeX distros have been notoriously outdated in e.g. Ubuntu.
Things got much better recently, but think of Ubuntu LTS users.  (And
people tend not to update TeXlive for *several years* on Windows.
Given the stability of LaTeX, there is some method in this madness,
though.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-25 Thread Rasmus
Nicolas Girard  writes:

> 2013/9/25 Carsten Dominik :

> I came to think that, having a piece of code that brings
> cross-compatibility between the 3 engines would be of interest to
> people outside of the Org community. But this is not trivial,
> especially if the code has to work with older TeX distributions (a
> reasonable expectation would be that it works with, say, TeXlive 2011
> and TeXlive 2012).

Why 2011?  We also require a recent Emacs with recent Org, or?

> For instance, one difficulty is language specifics. pdflatex has Babel
> ; xelatex has polyglossia ; and lualatex didn't have any equivalent
> package until a recent version of polyglossia that comes with the most
> recent TeX distributions.

babel works with xelatex and lualatex.  I used it for now since
polyglossia does not work with biblatex.

> For these reasons, I would like to submit this question, with my code
> as a starting point, to the tex.stackexchange.com community, so that
> it is peer reviewed and we hopefully get something solid. I'm
> currently working on it and intend to post either today or tomorrow.
> Stay tuned !

The code you use can be greatly simplified by using iftex.  I don't
think \makeatletter\makeatother is necessary at all in this case.

–Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-25 Thread Carsten Dominik
Excellent, I'll wait for your further input.

Thanks Nicolas!

- Carsten

On 25.9.2013, at 09:45, Nicolas Girard  wrote:

> 2013/9/25 Carsten Dominik :
>> 
>> On 19.9.2013, at 11:38, Nicolas Girard  wrote:
>> 
>>> I actually have some working code that does this. It lies in a file I
>>> named 'minimal.tex', which I include into all my latex code using
>>> \input{minimal}\makeatletter
>> 
>> Hi Nicolas,
>> 
>> of I were to include this code not via \input, but directly, somewhere in 
>> the header,
>> is there something special with makeatletter/makeatother that I have to do?
>> 
> 
> Good morning Carsten,
> 
> Despite being silent, I didn't forget about this thread ;-)
> 
> I came to think that, having a piece of code that brings
> cross-compatibility between the 3 engines would be of interest to
> people outside of the Org community. But this is not trivial,
> especially if the code has to work with older TeX distributions (a
> reasonable expectation would be that it works with, say, TeXlive 2011
> and TeXlive 2012).
> 
> For instance, one difficulty is language specifics. pdflatex has Babel
> ; xelatex has polyglossia ; and lualatex didn't have any equivalent
> package until a recent version of polyglossia that comes with the most
> recent TeX distributions.
> 
> For these reasons, I would like to submit this question, with my code
> as a starting point, to the tex.stackexchange.com community, so that
> it is peer reviewed and we hopefully get something solid. I'm
> currently working on it and intend to post either today or tomorrow.
> Stay tuned !
> 
> Cheers,
> Nicolas



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-25 Thread Nicolas Girard
2013/9/25 Carsten Dominik :
>
> On 19.9.2013, at 11:38, Nicolas Girard  wrote:
>
>> I actually have some working code that does this. It lies in a file I
>> named 'minimal.tex', which I include into all my latex code using
>>  \input{minimal}\makeatletter
>
> Hi Nicolas,
>
> of I were to include this code not via \input, but directly, somewhere in the 
> header,
> is there something special with makeatletter/makeatother that I have to do?
>

Good morning Carsten,

Despite being silent, I didn't forget about this thread ;-)

I came to think that, having a piece of code that brings
cross-compatibility between the 3 engines would be of interest to
people outside of the Org community. But this is not trivial,
especially if the code has to work with older TeX distributions (a
reasonable expectation would be that it works with, say, TeXlive 2011
and TeXlive 2012).

For instance, one difficulty is language specifics. pdflatex has Babel
; xelatex has polyglossia ; and lualatex didn't have any equivalent
package until a recent version of polyglossia that comes with the most
recent TeX distributions.

For these reasons, I would like to submit this question, with my code
as a starting point, to the tex.stackexchange.com community, so that
it is peer reviewed and we hopefully get something solid. I'm
currently working on it and intend to post either today or tomorrow.
Stay tuned !

Cheers,
Nicolas



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-25 Thread Carsten Dominik

On 19.9.2013, at 11:38, Nicolas Girard  wrote:

> 2013/9/19 Carsten Dominik :
>> 
>> On 19.9.2013, at 00:21, Rasmus  wrote:
>> 
>>> So what would the goal be?  To make it compatible with XeLaTeX and
>>> LuaLaTeX out of the box?
>> 
>> Yes, this is what I mean.  I would be happy to have some clever line in 
>> there that would do the right thing for variants of LaTeX.  THis is also 
>> what I mean by "all cases".
> 
> 
> Hi all,
> I actually have some working code that does this. It lies in a file I
> named 'minimal.tex', which I include into all my latex code using
>  \input{minimal}\makeatletter

Hi Nicolas,

of I were to include this code not via \input, but directly, somewhere in the 
header,
is there something special with makeatletter/makeatother that I have to do?

Thanks

- Carsten

> The code allows me to compile my documents using pdflatex, lualatex or 
> xelatex.
> Please find attached the relevant part of my 'minimal.tex' file.
> Cheers
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-19 Thread Carsten Dominik

On 19.9.2013, at 11:38, Nicolas Girard  wrote:

> 2013/9/19 Carsten Dominik :
>> 
>> On 19.9.2013, at 00:21, Rasmus  wrote:
>> 
>>> So what would the goal be?  To make it compatible with XeLaTeX and
>>> LuaLaTeX out of the box?
>> 
>> Yes, this is what I mean.  I would be happy to have some clever line in 
>> there that would do the right thing for variants of LaTeX.  THis is also 
>> what I mean by "all cases".
> 
> 
> Hi all,
> I actually have some working code that does this. It lies in a file I
> named 'minimal.tex', which I include into all my latex code using
>  \input{minimal}\makeatletter
> The code allows me to compile my documents using pdflatex, lualatex or 
> xelatex.
> Please find attached the relevant part of my 'minimal.tex' file.

Well, I asked for a clever *line* :)

Thanks a lot, this is a great start, maybe we can compactify it for our 
purposes?

- Carsten


> Cheers
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-19 Thread Nicolas Girard
2013/9/19 Carsten Dominik :
>
> On 19.9.2013, at 00:21, Rasmus  wrote:
>
>> So what would the goal be?  To make it compatible with XeLaTeX and
>> LuaLaTeX out of the box?
>
> Yes, this is what I mean.  I would be happy to have some clever line in there 
> that would do the right thing for variants of LaTeX.  THis is also what I 
> mean by "all cases".


Hi all,
I actually have some working code that does this. It lies in a file I
named 'minimal.tex', which I include into all my latex code using
  \input{minimal}\makeatletter
The code allows me to compile my documents using pdflatex, lualatex or xelatex.
Please find attached the relevant part of my 'minimal.tex' file.
Cheers


m.tex
Description: TeX document


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-19 Thread Carsten Dominik
Hi Rasmus,

On 19.9.2013, at 11:11, Rasmus  wrote:

> Hi Carsten,
> 
> Carsten Dominik  writes:
> 
>> On 19.9.2013, at 00:21, Rasmus  wrote:
>> 
>>> Carsten Dominik  writes:
>>> 
> [...]
> The output tex file looks something like this:
> 
> \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
> \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
 
 this looks excellent.  I think we will implement this as the default
 behavior, but only after 8.2.
 Does this capture all the possible cases, or are there more cases to 
 consider?
>>> 
>>> I'm not sure what you mean by all cases.  It depends on the the iftex
>>> package, so everything will break down if it ain't loaded or if it
>>> ain't loaded before it's used.
>>> 
>>> So what would the goal be?  To make it compatible with XeLaTeX and
>>> LuaLaTeX out of the box?
>> 
>> Yes, this is what I mean.  I would be happy to have some clever line
>> in there that would do the right thing for variants of LaTeX.  THis is
>> also what I mean by "all cases".
> 
> OK now I appreciate the idea.  It should be doable at the expend of
> depending on some magic such as iftex.  A clever scheme would have to
> be made up so that you wouldn't end up in cases where \ifPDFTeX is
> used, but iftex isn't loaded.
> 
> It could be a fourth *optional* argument to Org LaTeX package alists.

That is what I thought as well.

> E.g. '("T1" "fontenc" t 'pdf)

Or we make a forth argument that is the actual code to be inserted
into the document.  I think this would allow for more flexibility.
E.g.

'("" "fontenc" t "\ifPDFTeX\usepackage[utf8]{inputenc).")

Then we could put is a really complex TeX expression that will
do all necessary tests and load the right stuff.

Maybe you can come up with this expression, one that covers xetex and whatever 
you can think of.



- Carsten


> could produce
> \ifPDFTeX\usepackage[T1]{fontenc}\else\fi.  Depending on the level of
> support of iftex one would have to recognize the keywords
> (lua -lua xe -xe pdf -pdf) where '-' is the negation (e.g. not pdf).
> 
> Anyway, after 8.2 is still a bit away.
> 
> –Rasmus
> 
> -- 
> El Rey ha muerto. ¡Larga vida al Rey!
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-19 Thread Rasmus
Hi Carsten,

Carsten Dominik  writes:

> On 19.9.2013, at 00:21, Rasmus  wrote:
>
>> Carsten Dominik  writes:
>> 
 [...]
 The output tex file looks something like this:
 
 \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
 \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
>>> 
>>> this looks excellent.  I think we will implement this as the default
>>> behavior, but only after 8.2.
>>> Does this capture all the possible cases, or are there more cases to 
>>> consider?
>> 
>> I'm not sure what you mean by all cases.  It depends on the the iftex
>> package, so everything will break down if it ain't loaded or if it
>> ain't loaded before it's used.
>> 
>> So what would the goal be?  To make it compatible with XeLaTeX and
>> LuaLaTeX out of the box?
>
> Yes, this is what I mean.  I would be happy to have some clever line
> in there that would do the right thing for variants of LaTeX.  THis is
> also what I mean by "all cases".

OK now I appreciate the idea.  It should be doable at the expend of
depending on some magic such as iftex.  A clever scheme would have to
be made up so that you wouldn't end up in cases where \ifPDFTeX is
used, but iftex isn't loaded.

It could be a fourth *optional* argument to Org LaTeX package alists.
E.g. '("T1" "fontenc" t 'pdf) could produce
\ifPDFTeX\usepackage[T1]{fontenc}\else\fi.  Depending on the level of
support of iftex one would have to recognize the keywords
(lua -lua xe -xe pdf -pdf) where '-' is the negation (e.g. not pdf).

Anyway, after 8.2 is still a bit away.

–Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Carsten Dominik

On 19.9.2013, at 00:21, Rasmus  wrote:

> Carsten Dominik  writes:
> 
>>> [...]
>>> The output tex file looks something like this:
>>> 
>>> \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>>> \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
>> 
>> this looks excellent.  I think we will implement this as the default
>> behavior, but only after 8.2.
>> Does this capture all the possible cases, or are there more cases to 
>> consider?
> 
> I'm not sure what you mean by all cases.  It depends on the the iftex
> package, so everything will break down if it ain't loaded or if it
> ain't loaded before it's used.
> 
> So what would the goal be?  To make it compatible with XeLaTeX and
> LuaLaTeX out of the box?

Yes, this is what I mean.  I would be happy to have some clever line in there 
that would do the right thing for variants of LaTeX.  THis is also what I mean 
by "all cases".

- Carsten

> 
> –Rasmus
> 
> -- 
> In theory, practice and theory are the same. In practice they are not



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Rasmus
Carsten Dominik  writes:

>> [...]
>> The output tex file looks something like this:
>> 
>>  \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>>  \ifPDFTeX\usepackage[T1]{fontenc}\else\fi
>
> this looks excellent.  I think we will implement this as the default
> behavior, but only after 8.2.
> Does this capture all the possible cases, or are there more cases to consider?

I'm not sure what you mean by all cases.  It depends on the the iftex
package, so everything will break down if it ain't loaded or if it
ain't loaded before it's used.

So what would the goal be?  To make it compatible with XeLaTeX and
LuaLaTeX out of the box?

–Rasmus

-- 
In theory, practice and theory are the same. In practice they are not



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-18 Thread Carsten Dominik

On 17.9.2013, at 15:24, Rasmus  wrote:

> Hi Carsten,
> 
> Carsten Dominik  writes:
> 
>> I'd be interested to see a patch to this effect.
> 
> For now here's the filter I use and a add-to-list that hopefully
> works.  It could be turned into a general function such that
> 
>   - Certain packages are only required with certain flavors of TeX
> (curtsy of iftex).
>   - It only applies to the preamble (e.g. I don't want it in my
> code-blocks).
> 
> For me it works great because I can quickly check drafts with pdftex
> (which is substantially faster on my system) and switch to xelatex or
> lualatex for more serious drafts.
> 
>  (setq rasmus/org-protected-packages '(inputenc fontenc))
>  (add-to-list 'org-latex-default-packages-alist '("" "iftex" nil))
> 
>  (defun rasmus/org-latex-filter-protect-inputenc (text backend info)
>"Make inputenc and fontenc only load when using pdflatex"
>(when (org-export-derived-backend-p backend 'latex 'beamer)
>  (replace-regexp-in-string
>   (format  "\\(usepackage\\[.*\\]{\\(%s\\)}\\)"
>(mapconcat 'symbol-name pank/org-protected-packages "\\|"))
>   "ifPDFTeX\\1elsefi"
>   text)))
> 
>  (add-to-list 'org-export-filter-final-output-functions
>   'rasmus/org-latex-filter-protect-inputenc)
> 
> 
> The output tex file looks something like this:
> 
>  \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
>  \ifPDFTeX\usepackage[T1]{fontenc}\else\fi

Hi Rasmus,

this looks excellent.  I think we will implement this as the default behavior, 
but only after 8.2.
Does this capture all the possible cases, or are there more cases to consider?

- Carsten

> 
> BTW: I think the \else is redundant.
> 
> –Rasmus
> 
> --
> There are known knowns; there are things we know that we know.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-17 Thread Rasmus
Hi Eric,

>> While automatic package handling is very exciting it could go awry.
>
> I'm not too in favor of automatic package detection. Unless it works
> nearly perfectly, it just seems like trading one kind of user irritation
> for another.

Yeah.

> Personally, I _always_ blast the default packages and load my own stuff.
>
> One potential middle ground would be providing defaults "sets": for
> instance LATEX_MATH_DEFAULTS (or whatever), that provided a couple
> choices for math-related package suites that are known to work well
> together.
>
> Meh, maybe not.

It's just not much different from org-latex-classes. . .  Perhaps it
would be nice for reproducibility between documents.  But, yeah. . .

>> Fixes are usually available.  For instance, I use a filter to disable
>> fontenc/inputenc if pdflatex is not used (it breaks xelatex for me).
>
> If anything was going to be automatically detected and handled, it seems
> like it should be this. This is one of the main reasons I gave up trying
> to use the defaults at all.

The nice thing is that such stuff can be handled pretty conveniently
on the TeX side so that documents can be used for different engines
cf. my other post.  I also use this for e.g. fonts; I like Linux
Libertine for the final version, but usually don't want to deal with
the slowdown of xelatex.

–Rasmus

-- 
The Kids call him Billy the Saint



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-17 Thread Rasmus
Hi Carsten,

Carsten Dominik  writes:

> I'd be interested to see a patch to this effect.

For now here's the filter I use and a add-to-list that hopefully
works.  It could be turned into a general function such that

   - Certain packages are only required with certain flavors of TeX
 (curtsy of iftex).
   - It only applies to the preamble (e.g. I don't want it in my
 code-blocks).

For me it works great because I can quickly check drafts with pdftex
(which is substantially faster on my system) and switch to xelatex or
lualatex for more serious drafts.

  (setq rasmus/org-protected-packages '(inputenc fontenc))
  (add-to-list 'org-latex-default-packages-alist '("" "iftex" nil))

  (defun rasmus/org-latex-filter-protect-inputenc (text backend info)
"Make inputenc and fontenc only load when using pdflatex"
(when (org-export-derived-backend-p backend 'latex 'beamer)
  (replace-regexp-in-string
   (format  "\\(usepackage\\[.*\\]{\\(%s\\)}\\)"
(mapconcat 'symbol-name pank/org-protected-packages "\\|"))
   "ifPDFTeX\\1elsefi"
   text)))

  (add-to-list 'org-export-filter-final-output-functions
   'rasmus/org-latex-filter-protect-inputenc)


The output tex file looks something like this:

  \ifPDFTeX\usepackage[utf8]{inputenc}\else\fi
  \ifPDFTeX\usepackage[T1]{fontenc}\else\fi

BTW: I think the \else is redundant.

–Rasmus

--
There are known knowns; there are things we know that we know.



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-17 Thread Eric S Fraga
Carsten Dominik  writes:

> On 11.9.2013, at 13:05, Eric S Fraga  wrote:
>
>> Hi,
>> 
>> A minor feature request.  Feel free to ignore!
>> 
>> Using the sidewaystable :float option for table exports to LaTeX
>> requires one to manually add a 
>> 
>>  #+LaTeX_header: \usepackage{rotating}
>> 
>> line to the org file.  Could this package be added automatically by the
>> exporter if the sidewaystable option is present?
>
> After a long discussion:  Yes, rotating has been added to the default 
> packages.
> Tabu has not been added, but this is now documented in the manual.

Thanks for both of these changes.

> Thanks to everyone who contributed to this discussion.

I've enjoyed the discussion.  Some very well reasoned arguments on both
sides.  This has been an example of the Internet (I almost wrote USENET
;-) at its best!

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Carsten Dominik

On 11.9.2013, at 13:05, Eric S Fraga  wrote:

> Hi,
> 
> A minor feature request.  Feel free to ignore!
> 
> Using the sidewaystable :float option for table exports to LaTeX
> requires one to manually add a 
> 
>  #+LaTeX_header: \usepackage{rotating}
> 
> line to the org file.  Could this package be added automatically by the
> exporter if the sidewaystable option is present?

After a long discussion:  Yes, rotating has been added to the default packages.
Tabu has not been added, but this is now documented in the manual.

Thanks to everyone who contributed to this discussion.

- Carsten

> 
> Thanks,
> eric
> 
> -- 
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Carsten Dominik

On 17.9.2013, at 03:45, Eric Abrahamsen  wrote:

> 
> On 09/17/13 03:26 AM, Rasmus wrote:
>> Hi Carsten,
>> 
>> Carsten Dominik  writes:
>> 
 Note: I should be obvious that I prefer to load as little stuff be
 default as possible.  That is: I'm biased, but it's OK when everyone
 knows.
>>> 
>>> Yes.  Of course the cleanest solution would be to load as little
>>> as possible.  But convenience and backward compatibility are
>>> also a concern which I would like to consider.
>> 
>> I agree.  And, as said, people who want a 'clean' solution (to his or
>> her mind) can easily get that.  So convenience is certainly something
>> that should be considered!
>> 
> - to add the rotating package
> - do document that the tabu package is needed when specifying tabu
 
 Note the package loading order might matter.
>>> 
>>> Yes, I am aware of this.  Can you be specific for this case?  I guess
>>> rotating has no load sequence issues.
>> 
>> I doubt rotating causes issues as it provides its own environments
>> cf. section 2.2 of its manual.  I didn't find any reports on the
>> Internets.
>> 
>>> Does tabu have such issues [of conflicting with other packages]?
>>> With which packages (what you know)
>> 
>> I don't think tabu causes any problems.  It states it doesn't rewrite
>> any existing code (as e.g. tabularx does) cf. p. 1.
>> 
>> Perhaps, Eric Abrahamsen (Cc'ed) has more experience with tabu
>> (according to the log Eric added tabu support).
>> 
>> Unfortunately, I haven't moved to tabu yet.  Supposedly, it can
>> replace most other tabular packages including longtable and it's
>> compatible with many other packages cf. p. 9 of its manual (but that's
>> another story).
> 
> I'm not an expert, but I haven't read about or experienced any
> particular clashes, so I've made this my standard table package. I'd
> feel a little weird about enforcing that on most users, though...
> 
> - do document that amsmath in needed when generating a matrix
 
 and subscripts.  And sometimes math (e.g. align).
>>> 
>>> amsmath is (edited) in the defualt list, patch by you IIRC.  So we
>>> actually do not have to say something about this in the manual.
>> 
>> No.
>> 
> The reasoning:
> 
> - wrapfig and longtable have been in there for a long time, we want to
> avoid breaking existing files whenever possible
 
 Assuming a mechanism exists that can detect when tabu is to be loaded
 why only apply it there and not to the other optional packages?
>>> 
>>> Because any automatic mechanism may cause problems with load sequence,
>>> so packages that are problematic in this way should require user attention.
>>> Hmm, have I just argued agains longtbl by saying this?
>> 
>> If we are (i) aware of no known problems with a package and (ii) we
>> assume that loading package X–Z have little impact on compilation time
>> is it then not more rational to just add them as a default package? 
>> 
>> While automatic package handling is very exciting it could go awry.
> 
> [...]
> 
> I'm not too in favor of automatic package detection. Unless it works
> nearly perfectly, it just seems like trading one kind of user irritation
> for another.
> 
> Personally, I _always_ blast the default packages and load my own stuff.
> 
> One potential middle ground would be providing defaults "sets": for
> instance LATEX_MATH_DEFAULTS (or whatever), that provided a couple
> choices for math-related package suites that are known to work well
> together.
> 
> Meh, maybe not.
> 
>> Fixes are usually available.  For instance, I use a filter to disable
>> fontenc/inputenc if pdflatex is not used (it breaks xelatex for me).
> 
> If anything was going to be automatically detected and handled, it seems
> like it should be this. This is one of the main reasons I gave up trying
> to use the defaults at all.

Rasmus, 
I'd be interested to see a patch to this effect.

Thanks for your input, Eric.

- Carsten

> 
> Not too helpful, I know...
> 
> E



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Eric Abrahamsen

On 09/17/13 03:26 AM, Rasmus wrote:
> Hi Carsten,
>
> Carsten Dominik  writes:
>
>>> Note: I should be obvious that I prefer to load as little stuff be
>>> default as possible.  That is: I'm biased, but it's OK when everyone
>>> knows.
>>
>> Yes.  Of course the cleanest solution would be to load as little
>> as possible.  But convenience and backward compatibility are
>> also a concern which I would like to consider.
>
> I agree.  And, as said, people who want a 'clean' solution (to his or
> her mind) can easily get that.  So convenience is certainly something
> that should be considered!
>
 - to add the rotating package
 - do document that the tabu package is needed when specifying tabu
>>>
>>> Note the package loading order might matter.
>>
>> Yes, I am aware of this.  Can you be specific for this case?  I guess
>> rotating has no load sequence issues.
>
> I doubt rotating causes issues as it provides its own environments
> cf. section 2.2 of its manual.  I didn't find any reports on the
> Internets.
>
>> Does tabu have such issues [of conflicting with other packages]?
>> With which packages (what you know)
>
> I don't think tabu causes any problems.  It states it doesn't rewrite
> any existing code (as e.g. tabularx does) cf. p. 1.
>
> Perhaps, Eric Abrahamsen (Cc'ed) has more experience with tabu
> (according to the log Eric added tabu support).
>
> Unfortunately, I haven't moved to tabu yet.  Supposedly, it can
> replace most other tabular packages including longtable and it's
> compatible with many other packages cf. p. 9 of its manual (but that's
> another story).

I'm not an expert, but I haven't read about or experienced any
particular clashes, so I've made this my standard table package. I'd
feel a little weird about enforcing that on most users, though...

 - do document that amsmath in needed when generating a matrix
>>>
>>> and subscripts.  And sometimes math (e.g. align).
>>
>> amsmath is (edited) in the defualt list, patch by you IIRC.  So we
>> actually do not have to say something about this in the manual.
>
> No.
>
 The reasoning:

 - wrapfig and longtable have been in there for a long time, we want to
 avoid breaking existing files whenever possible
>>>
>>> Assuming a mechanism exists that can detect when tabu is to be loaded
>>> why only apply it there and not to the other optional packages?
>>
>> Because any automatic mechanism may cause problems with load sequence,
>> so packages that are problematic in this way should require user attention.
>> Hmm, have I just argued agains longtbl by saying this?
>
> If we are (i) aware of no known problems with a package and (ii) we
> assume that loading package X–Z have little impact on compilation time
> is it then not more rational to just add them as a default package? 
>
> While automatic package handling is very exciting it could go awry.

[...]

I'm not too in favor of automatic package detection. Unless it works
nearly perfectly, it just seems like trading one kind of user irritation
for another.

Personally, I _always_ blast the default packages and load my own stuff.

One potential middle ground would be providing defaults "sets": for
instance LATEX_MATH_DEFAULTS (or whatever), that provided a couple
choices for math-related package suites that are known to work well
together.

Meh, maybe not.

> Fixes are usually available.  For instance, I use a filter to disable
> fontenc/inputenc if pdflatex is not used (it breaks xelatex for me).

If anything was going to be automatically detected and handled, it seems
like it should be this. This is one of the main reasons I gave up trying
to use the defaults at all.

Not too helpful, I know...

E



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Andreas Leha
Rasmus  writes:

> Hi Carsten,
>
> Carsten Dominik  writes:
>
>>> Note: I should be obvious that I prefer to load as little stuff be
>>> default as possible.  That is: I'm biased, but it's OK when everyone
>>> knows.
>>
>> Yes.  Of course the cleanest solution would be to load as little
>> as possible.  But convenience and backward compatibility are
>> also a concern which I would like to consider.
>
> I agree.  And, as said, people who want a 'clean' solution (to his or
> her mind) can easily get that.  So convenience is certainly something
> that should be considered!
>
 - to add the rotating package
 - do document that the tabu package is needed when specifying tabu
>>>
>>> Note the package loading order might matter.
>>
>> Yes, I am aware of this.  Can you be specific for this case?  I guess
>> rotating has no load sequence issues.
>
> I doubt rotating causes issues as it provides its own environments
> cf. section 2.2 of its manual.  I didn't find any reports on the
> Internets.
>
>> Does tabu have such issues [of conflicting with other packages]?
>> With which packages (what you know)
>
> I don't think tabu causes any problems.  It states it doesn't rewrite
> any existing code (as e.g. tabularx does) cf. p. 1.
>
> Perhaps, Eric Abrahamsen (Cc'ed) has more experience with tabu
> (according to the log Eric added tabu support).
>
> Unfortunately, I haven't moved to tabu yet.  Supposedly, it can
> replace most other tabular packages including longtable and it's
> compatible with many other packages cf. p. 9 of its manual (but that's
> another story).
>


There seems to be some concern about an unmaintained tabu package.  See
here, for a good summary of that:
http://tex.stackexchange.com/a/121847/15392

- Andreas


 - do document that amsmath in needed when generating a matrix
>>>
>>> and subscripts.  And sometimes math (e.g. align).
>>
>> amsmath is (edited) in the defualt list, patch by you IIRC.  So we
>> actually do not have to say something about this in the manual.
>
> No.
>
 The reasoning:

 - wrapfig and longtable have been in there for a long time, we want to
 avoid breaking existing files whenever possible
>>>
>>> Assuming a mechanism exists that can detect when tabu is to be loaded
>>> why only apply it there and not to the other optional packages?
>>
>> Because any automatic mechanism may cause problems with load sequence,
>> so packages that are problematic in this way should require user attention.
>> Hmm, have I just argued agains longtbl by saying this?
>
> If we are (i) aware of no known problems with a package and (ii) we
> assume that loading package X–Z have little impact on compilation time
> is it then not more rational to just add them as a default package? 
>
> While automatic package handling is very exciting it could go awry.
>
> On conflicts.
>
> For me clashes mainly happen between macros defined multiple times,
> e.g. compare \usepackage{amsmath, wasysym} and \usepackage{wasysym,
> amsmath}.
>
> Exotic math packages, cross-reference packages, algorithm packages
> seem to be potential sources, but none should conflict with amsmath.
> There may be conlficts with hyperref, if anything.
>
> Packages that are known to cause trouble are usually known.  Beside
> stackoverflow here's an interesting list
>
> http://www.macfreek.nl/memory/LaTeX_package_conflicts
>
> Fixes are usually available.  For instance, I use a filter to disable
> fontenc/inputenc if pdflatex is not used (it breaks xelatex for me).
>
> –Rasmus
>
> --
> This is the kind of tedious nonsense up with which I will not put




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Rasmus
Hi Carsten,

Carsten Dominik  writes:

>> Note: I should be obvious that I prefer to load as little stuff be
>> default as possible.  That is: I'm biased, but it's OK when everyone
>> knows.
>
> Yes.  Of course the cleanest solution would be to load as little
> as possible.  But convenience and backward compatibility are
> also a concern which I would like to consider.

I agree.  And, as said, people who want a 'clean' solution (to his or
her mind) can easily get that.  So convenience is certainly something
that should be considered!

>>> - to add the rotating package
>>> - do document that the tabu package is needed when specifying tabu
>>
>> Note the package loading order might matter.
>
> Yes, I am aware of this.  Can you be specific for this case?  I guess
> rotating has no load sequence issues.

I doubt rotating causes issues as it provides its own environments
cf. section 2.2 of its manual.  I didn't find any reports on the
Internets.

> Does tabu have such issues [of conflicting with other packages]?
> With which packages (what you know)

I don't think tabu causes any problems.  It states it doesn't rewrite
any existing code (as e.g. tabularx does) cf. p. 1.

Perhaps, Eric Abrahamsen (Cc'ed) has more experience with tabu
(according to the log Eric added tabu support).

Unfortunately, I haven't moved to tabu yet.  Supposedly, it can
replace most other tabular packages including longtable and it's
compatible with many other packages cf. p. 9 of its manual (but that's
another story).

>>> - do document that amsmath in needed when generating a matrix
>>
>> and subscripts.  And sometimes math (e.g. align).
>
> amsmath is (edited) in the defualt list, patch by you IIRC.  So we
> actually do not have to say something about this in the manual.

No.

>>> The reasoning:
>>>
>>> - wrapfig and longtable have been in there for a long time, we want to
>>> avoid breaking existing files whenever possible
>>
>> Assuming a mechanism exists that can detect when tabu is to be loaded
>> why only apply it there and not to the other optional packages?
>
> Because any automatic mechanism may cause problems with load sequence,
> so packages that are problematic in this way should require user attention.
> Hmm, have I just argued agains longtbl by saying this?

If we are (i) aware of no known problems with a package and (ii) we
assume that loading package X–Z have little impact on compilation time
is it then not more rational to just add them as a default package? 

While automatic package handling is very exciting it could go awry.

On conflicts.

For me clashes mainly happen between macros defined multiple times,
e.g. compare \usepackage{amsmath, wasysym} and \usepackage{wasysym,
amsmath}.

Exotic math packages, cross-reference packages, algorithm packages
seem to be potential sources, but none should conflict with amsmath.
There may be conlficts with hyperref, if anything.

Packages that are known to cause trouble are usually known.  Beside
stackoverflow here's an interesting list

http://www.macfreek.nl/memory/LaTeX_package_conflicts

Fixes are usually available.  For instance, I use a filter to disable
fontenc/inputenc if pdflatex is not used (it breaks xelatex for me).

–Rasmus

--
This is the kind of tedious nonsense up with which I will not put



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Carsten Dominik

On Sep 16, 2013, at 3:27 PM, Carsten Dominik  wrote:

> Hi Rasmus,
> 
> On Sep 16, 2013, at 12:47 PM, Rasmus  wrote:
> 
>> Carsten Dominik  writes:
>> 
>>> OK, let me ask like this:
>>> 
>>> Does anyone know about conflicts arising from loading wrapfig and rotating?
>> 
>> Their manuals doesn't mention anything, it seems.  The internet
>> suggests that there might be between memoir and wrapfig, but I didn't
>> look into it as I don't know much about memoir. 
> 
> thanks for this.
> 
>> 
>> 
>>> OK, so my proposal is
>> 
>> Note: I should be obvious that I prefer to load as little stuff be
>> default as possible.  That is: I'm biased, but it's OK when everyone
>> knows.
> 
> Yes.  Of course the cleanest solution would be to load as little
> as possible.  But convenience and backward compatibility are
> also a concern which I would like to consider.
> 
>> 
>>> - to add the rotating package
>>> - do document that the tabu package is needed when specifying tabu
>> 
>> Note the package loading order might matter.
> 
> Yes, I am aware of this.  Can you be specific for this case?  I guess
> rotating has no load sequence issues.
> 
> Does tabu have such issues?  With which packages (what you know)
> 
>> 
>>> - do document that amsmath in needed when generating a matrix
>> 
>> and subscripts.  And sometimes math (e.g. align).
> 
> amsmath is not in the defualt list, patch by you IIRC.  So we actually

is *now* in the default list.  Sorry for the typo.

> do not have to say something about this in the manual.
> 
>> 
>>> The reasoning:
>> 
>>> - wrapfig and longtable have been in there for a long time, we want to
>>> avoid breaking existing files whenever possible
>> 
>> Assuming a mechanism exists that can detect when tabu is to be loaded
>> why only apply it there and not to the other optional packages?
> 
> Because any automatic mechanism may cause problems with load sequence,
> so packages that are problematic in this way should require user attention.
> Hmm, have I just argued agains longtbl by saying this?
> 
> Thank you for your competent input.
> 
> - Carsten
> 
>> 
>>> - rotating is needed for sideways stuff and does not do any harm
>> 
>> Alternative implementation exists, but they are of course not
>> supported by Org.  Would they be in conflict?  I doubt it.
>> 
>>> - somewhat arbitrarily I am drawing the line above the tabu package. 
>> 
>> It does seem a bit arbitrary.
>> 
>> Bu people who feel strongly about not loading some stuff can change
>> default package alist so it's not a big issue.
>> 
>> –Rasmus
>> 
>> -- 
>> A clever person solves a problem. A wise person avoids it
>> 
>> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Carsten Dominik
Hi Rasmus,

On Sep 16, 2013, at 12:47 PM, Rasmus  wrote:

> Carsten Dominik  writes:
> 
>> OK, let me ask like this:
>> 
>> Does anyone know about conflicts arising from loading wrapfig and rotating?
> 
> Their manuals doesn't mention anything, it seems.  The internet
> suggests that there might be between memoir and wrapfig, but I didn't
> look into it as I don't know much about memoir. 

thanks for this.

> 
> 
>> OK, so my proposal is
> 
> Note: I should be obvious that I prefer to load as little stuff be
> default as possible.  That is: I'm biased, but it's OK when everyone
> knows.

Yes.  Of course the cleanest solution would be to load as little
as possible.  But convenience and backward compatibility are
also a concern which I would like to consider.

> 
>> - to add the rotating package
>> - do document that the tabu package is needed when specifying tabu
> 
> Note the package loading order might matter.

Yes, I am aware of this.  Can you be specific for this case?  I guess
rotating has no load sequence issues.

Does tabu have such issues?  With which packages (what you know)

> 
>> - do document that amsmath in needed when generating a matrix
> 
> and subscripts.  And sometimes math (e.g. align).

amsmath is not in the defualt list, patch by you IIRC.  So we actually
do not have to say something about this in the manual.

> 
>> The reasoning:
> 
>> - wrapfig and longtable have been in there for a long time, we want to
>> avoid breaking existing files whenever possible
> 
> Assuming a mechanism exists that can detect when tabu is to be loaded
> why only apply it there and not to the other optional packages?

Because any automatic mechanism may cause problems with load sequence,
so packages that are problematic in this way should require user attention.
Hmm, have I just argued agains longtbl by saying this?

Thank you for your competent input.

- Carsten

> 
>> - rotating is needed for sideways stuff and does not do any harm
> 
> Alternative implementation exists, but they are of course not
> supported by Org.  Would they be in conflict?  I doubt it.
> 
>> - somewhat arbitrarily I am drawing the line above the tabu package. 
> 
> It does seem a bit arbitrary.
> 
> Bu people who feel strongly about not loading some stuff can change
> default package alist so it's not a big issue.
> 
> –Rasmus
> 
> -- 
> A clever person solves a problem. A wise person avoids it
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Rainer M Krug
Rasmus  writes:

> Carsten Dominik  writes:
>
>> OK, let me ask like this:
>>
>> Does anyone know about conflicts arising from loading wrapfig and rotating?
>
> Their manuals doesn't mention anything, it seems.  The internet
> suggests that there might be between memoir and wrapfig, but I didn't
> look into it as I don't know much about memoir. 
>
>
>> OK, so my proposal is
>
> Note: I should be obvious that I prefer to load as little stuff be
> default as possible.  That is: I'm biased, but it's OK when everyone
> knows.
>
>> - to add the rotating package
>> - do document that the tabu package is needed when specifying tabu
>
> Note the package loading order might matter.
>
>> - do document that amsmath in needed when generating a matrix
>
> and subscripts.  And sometimes math (e.g. align).
>
>> The reasoning:
>
>> - wrapfig and longtable have been in there for a long time, we want to
>> avoid breaking existing files whenever possible
>
> Assuming a mechanism exists that can detect when tabu is to be loaded
> why only apply it there and not to the other optional packages?
>
>> - rotating is needed for sideways stuff and does not do any harm
>
> Alternative implementation exists, but they are of course not
> supported by Org.  Would they be in conflict?  I doubt it.
>
>> - somewhat arbitrarily I am drawing the line above the tabu package. 
>
> It does seem a bit arbitrary.
>
> Bu people who feel strongly about not loading some stuff can change
> default package alist so it's not a big issue.

Exactly. For beginner and normal users, this should work out of the box,
but advanced (org and LaTeX) users should have no problem with adapting
the default package ist to their needs.

Cheers,

Rainer

>
> –Rasmus


-- 
Rainer M. Krug

email: RMKruggmailcom




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Rasmus
Carsten Dominik  writes:

> OK, let me ask like this:
>
> Does anyone know about conflicts arising from loading wrapfig and rotating?

Their manuals doesn't mention anything, it seems.  The internet
suggests that there might be between memoir and wrapfig, but I didn't
look into it as I don't know much about memoir. 


> OK, so my proposal is

Note: I should be obvious that I prefer to load as little stuff be
default as possible.  That is: I'm biased, but it's OK when everyone
knows.

> - to add the rotating package
> - do document that the tabu package is needed when specifying tabu

Note the package loading order might matter.

> - do document that amsmath in needed when generating a matrix

and subscripts.  And sometimes math (e.g. align).

> The reasoning:

> - wrapfig and longtable have been in there for a long time, we want to
> avoid breaking existing files whenever possible

Assuming a mechanism exists that can detect when tabu is to be loaded
why only apply it there and not to the other optional packages?

> - rotating is needed for sideways stuff and does not do any harm

Alternative implementation exists, but they are of course not
supported by Org.  Would they be in conflict?  I doubt it.

> - somewhat arbitrarily I am drawing the line above the tabu package. 

It does seem a bit arbitrary.

Bu people who feel strongly about not loading some stuff can change
default package alist so it's not a big issue.

–Rasmus

-- 
A clever person solves a problem. A wise person avoids it




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-16 Thread Carsten Dominik
Hi,

OK, so my proposal is

- to add the rotating package
- do document that the tabu package is needed when specifying tabu
- do document that amsmath in needed when generating a matrix

The reasoning:

- wrapfig and longtable have been in there for a long time, we want to avoid 
breaking existing files whenever possible
- rotating is needed for sideways stuff and does not do any harm
- somewhat arbitrarily I am drawing the line above the tabu package. 


Would this be an acceptable course of action?

On Sep 15, 2013, at 4:02 PM, Nicolas Girard  wrote:

> 2013/9/15 Carsten Dominik :
>> 
>> Does anyone know about conflicts arising from loading wrapfig and rotating?
>> 
> 
> 
> Not that I know of.
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-15 Thread Nicolas Girard
2013/9/15 Carsten Dominik :
>
> Does anyone know about conflicts arising from loading wrapfig and rotating?
>


Not that I know of.



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-14 Thread Carsten Dominik

On 13.9.2013, at 10:01, Detlef Steuer  wrote:

> Hi!
> 
>> Hello,
>> 
>> Rasmus  writes:
>> 
>>> So the question is should it be a default package?
>>> 
>>> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
>>> generate a matrix.
>> 
>> I think the "tabu" case (and longtable...) is different from "rotating".
>> 
>> No feature in Org requires "tabu" or "longtable" unless user explicitly
>> writes "tabu" or "longtable" somewhere in the buffer (i.e.
>> in :environment attribute).
>> 
>> On the other hand, "rotating" or "wrapfig" may be needed without the
>> user knowing about it (e.g. when setting :float or :wrap attributes).
>> 
>> Therefore, I think "wrapfig" and "rotating" belong to the same boat.
>> Either we require them both in default packages, or we do not require
>> any and add a footnote about it in the manual. I have no preference.
>> 
> 
> I think it is more consistent to provide these packages automagically.
> 
> There seems no downside besides slightly longer latex startup times.
> Org already loads some default packages to perform its export magic.
> Why not try to be "feature" complete in the sense Nicloas describes:
> User doesn't try something special with latex, but uses
> commands/options provided by org, so a bare bone export can be expected
> work.
> 
> Personally I would appreciate it very much if org followed the
> principle of least surprise in these cases, as these surprises tend to
> show up, if time is running out ;-) 

OK, let me ask like this:

Does anyone know about conflicts arising from loading wrapfig and rotating?

- Carsten

> 
> Just my two user cents.
> 
> Detlef 
> 
> 
>> On the same line, we could remove "longtable" from
>> `org-latex-default-packages-alist', if only to spare a few kittens.
>> 
>> WDYT?
>> 
>> 
>> Regards,
>> 
>> -- 
>> Nicolas Goaziou
>> 
>> 
> 
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-13 Thread Sebastien Vauban
Hello,

Nicolas Goaziou wrote:
> My point is: if "wrapfig" is there, "rotating" should accompany it, or
> both should be removed from the variable. Also, there's no reason for
> "longtable" to be included.

Your analysis makes a lot of sense (somehow looking at what LaTeX knowledge
the user has, if he writes `longtabu' in his document).

However, I am undecided about doing it the way you propose here above, and
having "all" of them included by default.

Hence, I'll be happy with whichever proposition you apply.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-13 Thread Detlef Steuer
Hi!

> Hello,
> 
> Rasmus  writes:
> 
> > So the question is should it be a default package?
> >
> > I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
> > generate a matrix.
> 
> I think the "tabu" case (and longtable...) is different from "rotating".
> 
> No feature in Org requires "tabu" or "longtable" unless user explicitly
> writes "tabu" or "longtable" somewhere in the buffer (i.e.
> in :environment attribute).
> 
> On the other hand, "rotating" or "wrapfig" may be needed without the
> user knowing about it (e.g. when setting :float or :wrap attributes).
> 
> Therefore, I think "wrapfig" and "rotating" belong to the same boat.
> Either we require them both in default packages, or we do not require
> any and add a footnote about it in the manual. I have no preference.
> 

I think it is more consistent to provide these packages automagically.

There seems no downside besides slightly longer latex startup times.
Org already loads some default packages to perform its export magic.
Why not try to be "feature" complete in the sense Nicloas describes:
User doesn't try something special with latex, but uses
commands/options provided by org, so a bare bone export can be expected
work.

Personally I would appreciate it very much if org followed the
principle of least surprise in these cases, as these surprises tend to
show up, if time is running out ;-) 

Just my two user cents.

Detlef 


> On the same line, we could remove "longtable" from
> `org-latex-default-packages-alist', if only to spare a few kittens.
> 
> WDYT?
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou
> 
> 





Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-12 Thread Nicolas Goaziou
Rasmus  writes:

> It's tough.  I've /never/ used neither wrapfig nor longtable.  From a
> totally subjective point-of-view I'd certainly want to remove it!
> However, I wonder if this is the 'nicest' thing to do.  Not everyone
> cares about LaTeX and not everyone cares to look into LaTeX details.
>
> Three possibilities are
>
>   - Just Workᵀᴹ ::  Include a lot of stuff in
>   `org-latex-default-packages-alist'.  Self-proclaimed 'power
>   users' can cut it down themselves in their config.  It could
>   slow down compilation, especially if policy is too lenient.
>   (E.g. to support tikz files you need to load TiKZ; To
>   support #+LANGUAGE you need to load babel).  Perhaps we could
>   add an optional variable org-latex-load-all-relevant-packages
>   that loads all known packages that Org might depend on (assuming
>   they are all compatible).  People with i7 processors can then
>   turn it on and we could include only basic package in the
>   default package alist.
>
>   - RTM :: Be better at documenting when a feature requires an
>additional package.  This is probably my preferred
>solution.
>
>I think Org can mostly guess when a LaTeX export failed.
>If so, perhaps we could be give informative hints when
>something fails.  E.g. if rotation is required and
>something fails, tell the user that the rotation package is
>needed.  I have no idea how much work this would be.
>
>   - Do nothing :: People who use the LaTeX exporter should be
>   proficient enough with LaTeX and Org to solve their
>   own problems.
>
> On Eric's original idea about auto-including packages: I don't like.
> I want to like it, but it's just too fragile.  Some things depend on
> being loaded in the correct order (e.g. hyperref needs to be towards
> the end).  Since people can load arbitrary code using #+LATEX_HEADER:
> \input{·} it's bound to break!

I'm not talking about auto-including packages, nor do I suggest to
include lot of stuff in `org-latex-default-packages-alist'.

My point is: if "wrapfig" is there, "rotating" should accompany it, or
both should be removed from the variable. Also, there's no reason for
"longtable" to be included.

IOW, I'm discussing a very practical point, not the general status of
packages in the LaTeX export back-end.


Regards,

-- 
Nicolas Goaziou



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-12 Thread Carsten Dominik

On 12.9.2013, at 19:42, Nicolas Goaziou  wrote:

> Hello,
> 
> Rasmus  writes:
> 
>> So the question is should it be a default package?
>> 
>> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
>> generate a matrix.
> 
> I think the "tabu" case (and longtable...) is different from "rotating".
> 
> No feature in Org requires "tabu" or "longtable" unless user explicitly
> writes "tabu" or "longtable" somewhere in the buffer (i.e.
> in :environment attribute).
> 
> On the other hand, "rotating" or "wrapfig" may be needed without the
> user knowing about it (e.g. when setting :float or :wrap attributes).
> 
> Therefore, I think "wrapfig" and "rotating" belong to the same boat.
> Either we require them both in default packages, or we do not require
> any and add a footnote about it in the manual. I have no preference.
> 
> On the same line, we could remove "longtable" from
> `org-latex-default-packages-alist', if only to spare a few kittens.

Since we are the people who control Org, we can do what we
find convenient. I think longtable was added because I personally
use it often and find it convenient to have it in the default.
I am fine with adding both wrapfig and rotating as long as they do
not cause issues with other packages often used.  LaTeX is so fast
these days that it is not harmful to load a few more packages - as
long as no conflicts arise.

- Carsten

> 
> WDYT?
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-12 Thread Rasmus
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus  writes:
>
>> So the question is should it be a default package?
>>
>> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
>> generate a matrix.
>
> I think the "tabu" case (and longtable...) is different from "rotating".
>
> No feature in Org requires "tabu" or "longtable" unless user explicitly
> writes "tabu" or "longtable" somewhere in the buffer (i.e.
> in :environment attribute).
>
> On the other hand, "rotating" or "wrapfig" may be needed without the
> user knowing about it (e.g. when setting :float or :wrap attributes).
>
> Therefore, I think "wrapfig" and "rotating" belong to the same boat.
> Either we require them both in default packages, or we do not require
> any and add a footnote about it in the manual. I have no preference.
>
> On the same line, we could remove "longtable" from
> `org-latex-default-packages-alist', if only to spare a few kittens.
>
> WDYT?

It's tough.  I've /never/ used neither wrapfig nor longtable.  From a
totally subjective point-of-view I'd certainly want to remove it!
However, I wonder if this is the 'nicest' thing to do.  Not everyone
cares about LaTeX and not everyone cares to look into LaTeX details.

Three possibilities are

  - Just Workᵀᴹ ::  Include a lot of stuff in
  `org-latex-default-packages-alist'.  Self-proclaimed 'power
  users' can cut it down themselves in their config.  It could
  slow down compilation, especially if policy is too lenient.
  (E.g. to support tikz files you need to load TiKZ; To
  support #+LANGUAGE you need to load babel).  Perhaps we could
  add an optional variable org-latex-load-all-relevant-packages
  that loads all known packages that Org might depend on (assuming
  they are all compatible).  People with i7 processors can then
  turn it on and we could include only basic package in the
  default package alist.

  - RTM :: Be better at documenting when a feature requires an
   additional package.  This is probably my preferred
   solution.

   I think Org can mostly guess when a LaTeX export failed.
   If so, perhaps we could be give informative hints when
   something fails.  E.g. if rotation is required and
   something fails, tell the user that the rotation package is
   needed.  I have no idea how much work this would be.

  - Do nothing :: People who use the LaTeX exporter should be
  proficient enough with LaTeX and Org to solve their
  own problems.

On Eric's original idea about auto-including packages: I don't like.
I want to like it, but it's just too fragile.  Some things depend on
being loaded in the correct order (e.g. hyperref needs to be towards
the end).  Since people can load arbitrary code using #+LATEX_HEADER:
\input{·} it's bound to break!

–Rasmus

-- 
The Kids call him Billy the Saint



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-12 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> So the question is should it be a default package?
>
> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
> generate a matrix.

I think the "tabu" case (and longtable...) is different from "rotating".

No feature in Org requires "tabu" or "longtable" unless user explicitly
writes "tabu" or "longtable" somewhere in the buffer (i.e.
in :environment attribute).

On the other hand, "rotating" or "wrapfig" may be needed without the
user knowing about it (e.g. when setting :float or :wrap attributes).

Therefore, I think "wrapfig" and "rotating" belong to the same boat.
Either we require them both in default packages, or we do not require
any and add a footnote about it in the manual. I have no preference.

On the same line, we could remove "longtable" from
`org-latex-default-packages-alist', if only to spare a few kittens.

WDYT?


Regards,

-- 
Nicolas Goaziou



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Eric S Fraga
Rasmus  writes:

> Carsten Dominik  writes:
>
>>> Okay.  I can live with this!  
>>> 
>>> I guess it would help if the documentation indicated when additional
>>> packages may be required.  I had to do an internet search to find out I
>>> needed the rotating package for the sidewaystable option described in
>>> the org info pages.
>
> It's fine with me if it's something like 
>
> Float environment for the table. Possible values are sidewaystable
> (requires
> 
> [[http://www.ctan.org/tex-archive/macros/latex/contrib/rotating][rotating]])...

I think this would be ideal.

thanks,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Rainer M Krug
Carsten Dominik  writes:

> On 11.9.2013, at 14:08, Eric S Fraga  wrote:
>
>> Rasmus  writes:
>> 
>>> Hi Eric,
>>> 
>>> Eric S Fraga  writes:
 A minor feature request.  Feel free to ignore!
 
 Using the sidewaystable :float option for table exports to LaTeX
 requires one to manually add a 
 
  #+LaTeX_header: \usepackage{rotating}
 
 line to the org file.  Could this package be added automatically by the
 exporter if the sidewaystable option is present?
>>> 
>>> My 2¢:
>>> 
>>> I think the policy is that the ox-latex ain't going to track packages.
>>> Aaron made some patches for this some time ago, but they weren't
>>> included.
>>> 
>>> So the question is should it be a default package?
>>> 
>>> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
>>> generate a matrix.  
>> 
>> Okay.  I can live with this!  
>> 
>> I guess it would help if the documentation indicated when additional
>> packages may be required.  I had to do an internet search to find out I
>> needed the rotating package for the sidewaystable option described in
>> the org info pages.
>
> Well, this is documented on the LaTeX pages.  Why would you duplicate this
> in Org's documentation?  And What part of the LaTeX documentation exactly?

It certainly is, but the beauty of org is that it hides some of the
nitty-gritty to write LaTeX files (and odt - even more so).

One part would be 12.7.4 - LaTeX specific attributes.

It states:

,
| :placement 
| Float environment for the table. Possible values are
| sidewaystable, multicolumn, t and nil. When unspecified, a table with a
| caption will have a table environment. Moreover, :placement attribute
| can specify the positioning of the float.
`

An addition like:

,
| For some options, additional LaTeX packages need to be loaded. Please
| see LaTeX documentation for details.
`

Would suffice, and be general enough.

Cheers,

Rainer

>
>> 
>>> Also, a kitten dies every time the length of
>>> org-latex-default-packages-alist increases!
>
> That is a terrible thought. :)
>
>> 
>> ;-)
>> 
>> Thanks,
>> eric
>> 
>> -- 
>> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
>> 
>> 
>
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug

email: RMKruggmailcom




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Rasmus
Carsten Dominik  writes:

>> Okay.  I can live with this!  
>> 
>> I guess it would help if the documentation indicated when additional
>> packages may be required.  I had to do an internet search to find out I
>> needed the rotating package for the sidewaystable option described in
>> the org info pages.

It's fine with me if it's something like 

Float environment for the table. Possible values are sidewaystable
(requires

[[http://www.ctan.org/tex-archive/macros/latex/contrib/rotating][rotating]])...

> Well, this is documented on the LaTeX pages.

Worg doesn't ship with Emacs. . .

> Why would you duplicate this in Org's documentation?  And What part
> of the LaTeX documentation exactly?

Currently 12.7.4 LaTeX specific attributes under - placement :: ...,
it seems.


>>> Also, a kitten dies every time the length of
>>> org-latex-default-packages-alist increases!
>
> That is a terrible thought. :)

So don't add another symbol package! :)

–Rasmus

-- 
m-mm-mmm- bacon!



Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Carsten Dominik

On 11.9.2013, at 14:08, Eric S Fraga  wrote:

> Rasmus  writes:
> 
>> Hi Eric,
>> 
>> Eric S Fraga  writes:
>>> A minor feature request.  Feel free to ignore!
>>> 
>>> Using the sidewaystable :float option for table exports to LaTeX
>>> requires one to manually add a 
>>> 
>>>  #+LaTeX_header: \usepackage{rotating}
>>> 
>>> line to the org file.  Could this package be added automatically by the
>>> exporter if the sidewaystable option is present?
>> 
>> My 2¢:
>> 
>> I think the policy is that the ox-latex ain't going to track packages.
>> Aaron made some patches for this some time ago, but they weren't
>> included.
>> 
>> So the question is should it be a default package?
>> 
>> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
>> generate a matrix.  
> 
> Okay.  I can live with this!  
> 
> I guess it would help if the documentation indicated when additional
> packages may be required.  I had to do an internet search to find out I
> needed the rotating package for the sidewaystable option described in
> the org info pages.

Well, this is documented on the LaTeX pages.  Why would you duplicate this
in Org's documentation?  And What part of the LaTeX documentation exactly?

> 
>> Also, a kitten dies every time the length of
>> org-latex-default-packages-alist increases!

That is a terrible thought. :)

> 
> ;-)
> 
> Thanks,
> eric
> 
> -- 
> : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5
> 
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Eric S Fraga
Rasmus  writes:

> Hi Eric,
>
> Eric S Fraga  writes:
>> A minor feature request.  Feel free to ignore!
>>
>> Using the sidewaystable :float option for table exports to LaTeX
>> requires one to manually add a 
>>
>>   #+LaTeX_header: \usepackage{rotating}
>>
>> line to the org file.  Could this package be added automatically by the
>> exporter if the sidewaystable option is present?
>
> My 2¢:
>
> I think the policy is that the ox-latex ain't going to track packages.
> Aaron made some patches for this some time ago, but they weren't
> included.
>
> So the question is should it be a default package?
>
> I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
> generate a matrix.  

Okay.  I can live with this!  

I guess it would help if the documentation indicated when additional
packages may be required.  I had to do an internet search to find out I
needed the rotating package for the sidewaystable option described in
the org info pages.

> Also, a kitten dies every time the length of
> org-latex-default-packages-alist increases!

;-)

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.1.1-7-gaecdf5




Re: [O] [export] Should sidewaystable option automatically add rotating package?

2013-09-11 Thread Rasmus
Hi Eric,

Eric S Fraga  writes:
> A minor feature request.  Feel free to ignore!
>
> Using the sidewaystable :float option for table exports to LaTeX
> requires one to manually add a 
>
>   #+LaTeX_header: \usepackage{rotating}
>
> line to the org file.  Could this package be added automatically by the
> exporter if the sidewaystable option is present?

My 2¢:

I think the policy is that the ox-latex ain't going to track packages.
Aaron made some patches for this some time ago, but they weren't
included.

So the question is should it be a default package?

I think not.  E.g. tabu isn't loaded.  Amsmath isn't loaded if you
generate a matrix.  Also, a kitten dies every time the length of
org-latex-default-packages-alist increases!

–Rasmus

-- 
When in doubt, do it!