emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] ox-latex: default packages cleaning


From: Rasmus
Subject: Re: [O] ox-latex: default packages cleaning
Date: Wed, 08 Jul 2015 20:35:28 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Suvayu Ali <address@hidden> writes:

>> +(defun org-latex-guess-polyglossia-language (header info)
>> +  "Set the Polyglossia language according to the LANGUAGE keyword.
>
> I'm in two-minds about this.  On the one had it is a nice thing, but on
> the other hand, it prevents the more fine grained control offered by
> polyglossia.  For example, I used this in my setup before:
>
>   \setdefaultlanguage[variant=british]{english}

The attached supports Polyglossia better.  Note, the last loaded language
is the main one (as babel).  Perhaps org-latex-variant-file-string should
be less annoying (not a file-variable).

Test file:

     #+title: test xetex
     #+language: en-gb
     #+latex_variant: xelatex

     * header
       add polyglossia

     #+BEGIN_SRC emacs-lisp
     (add-to-list 'org-latex-packages-alist
                   '("AUTO, french" "polyglossia" nil ("lualatex" "xelatex")))
     #+END_SRC

Output:

    % -*- LaTeX-command: xelatex -*-
    % Created 2015-07-08 miƩ 20:32
    \documentclass[11pt]{article}
    \usepackage{graphicx}
    \usepackage{grffile}
    \usepackage{longtable}
    \usepackage{wrapfig}
    \usepackage{rotating}
    \usepackage[normalem]{ulem}
    \usepackage{amsmath}
    \usepackage{textcomp}
    \usepackage{amssymb}
    \usepackage{capt-of}
    \usepackage{hyperref}
    \usepackage{polyglossia}
    \setmainlanguage{french}
    \setotherlanguage[variant=uk]{english}
    \author{Rasmus}
    \date{\today}
    \title{test xetex}
    \hypersetup{
     pdfauthor={Rasmus},
     pdftitle={test xetex},
     pdfkeywords={},
     pdfsubject={},
     pdfcreator={Emacs 25.0.50.1 (Org mode 8.3beta)}, 
     pdflang={British}}
    \begin{document}

    \maketitle
    \tableofcontents


    \section{add polyglossia}
    \label{sec:orgheadline1}
    \begin{verbatim}
    (add-to-list 'org-latex-packages-alist
                  '("AUTO, french" "polyglossia" nil ("lualatex" "xelatex")))
    \end{verbatim}
    \end{document}


-- 
Dung makes an excellent fertilizer

Attachment: 0009-ox-latex-Support-TeX-variants.patch
Description: Text Data

Attachment: 0008-ox-latex-Add-polyglossia-support.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]