From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kyeong Soo (Joseph) Kim" Subject: Re: Changed behaviours of LaTeX exporter in version 8.0+ Date: Thu, 18 Sep 2014 15:32:27 +0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1134b004865ea2050351fcbd Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUWCh-0000b6-EO for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 03:32:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUWCf-00062P-Ab for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 03:32:35 -0400 Received: from mail-qc0-x22f.google.com ([2607:f8b0:400d:c01::22f]:34394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUWCf-00061j-4A for emacs-orgmode@gnu.org; Thu, 18 Sep 2014 03:32:33 -0400 Received: by mail-qc0-f175.google.com with SMTP id w7so667238qcr.34 for ; Thu, 18 Sep 2014 00:32:27 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a1134b004865ea2050351fcbd Content-Type: text/plain; charset=UTF-8 Sorry for asking another question; this time it is for the cross-referencing in LaTeX export, which existed before (e.g., Sec. 16 of manual for <8.0) but is gone now. Per the suggestion from the older manual for <8.0, I have the following setting in my configuration file: (setq org-export-latex-hyperref-format "\\ref{%s}") ; for cross-referencing Now with 8.2.7c and the following org internal link to a section ... described in Sec. [[*SectionOne][SectionOne]] ... LaTeX export generates the following code: ... described in Sec. \texttt{SectionOne}, ... Regards, Joseph On Thu, Sep 18, 2014 at 3:07 PM, Kyeong Soo (Joseph) Kim < kyeongsoo.kim@gmail.com> wrote: > Nicolas and All, > > One further question regarding your suggestion of the use of filter for > special blocks in export: > > I just found out that, if I close Emacs and relaunch it, all variables for > filter (i.e., 'org-export-filter-*') are not defined. As a result, the > following elisp codes for the workaround based on both your suggestion and > the filter example in the manual causes void variable error (i.e., > "Symbol's value as variable is void: > org-export-filter-special-block-function"): > > > ;; workaround solution (until 8.3.0) for case-sensitve handling of > special-block for IEEE LaTeX class > (defun my-latex-filter-ieeekeywords (text backend info) > "Upcase 'IEEE' in IEEEkeywords environment in LaTeX export." > (when (org-export-derived-backend-p backend 'latex) > (replace-regexp-in-string "ieeekeywords" "IEEEkeywords" text))) > > (add-to-list 'org-export-filter-special-block-functions > 'my-latex-filter-ieeekeywords) > > > It turns out that those variables are defined only after exporting org > file into LaTeX. > > Again, any advice on propor addition of custom filter functions in the > configuration file would be greatly appreciated; maybe the said example in > the manual needs to be updated as well. > > Regards, > Joseph > > > > On Thu, Sep 18, 2014 at 12:50 PM, Kyeong Soo (Joseph) Kim < > kyeongsoo.kim@gmail.com> wrote: > >> Hello Nicolas, >> >> Great thanks for the detailed instructions with clear explanations for >> the problems. >> >> I have addressed all those issues per your suggestions, but put some >> comments embedded below. >> >> >> Again, many thanks for your great help! >> >> Joseph >> >> >> On Thu, Sep 18, 2014 at 3:01 AM, Nicolas Goaziou >> wrote: >> >> -----> snip <----- >> >>> >>> > 2. Accessing the value of "#+KEYWORDS:" and change of cases in >>> > "org-special-blocks" >>> > >>> > For keywords section in IEEE papers, I used to have the following >>> settings: >>> > >>> > #+KEYWORDS: AAA, BBB, CCC >>> > ... >>> > #+BEGIN_IEEEkeywords >>> > {{{KEYWORDS}}}. >>> > #+END_IEEEkeywords >>> >>> [...] >>> >>> > Version 8.2.7c, however, produces the following from the same settings: >>> > >>> > \begin{ieeekeywords} >>> > . >>> > \end{ieeekeywords} >>> >>> I'm surprised {{{KEYWORDS}}} even worked as, AFAIK, it wasn't >>> documented. Indeed, there is no such macro in Org 8.0. However, you >>> can define your own >>> >> >> '{{{KEYWORDS}}}' worked without any issues in previous versions, which in >> fact was suggested by someone in the mailing list or stackoverflow >> (unfortunately, I couldn't find that via Google any longer). >> >> By the way, in Sec. 12.3 of the Org manual (ver. 8.2.7c), 'KEYWORDS' is >> listed together with 'AUTHOR', 'TITLE' and so on as export keywords. Also, >> according to Sec. 11.6, those predefined keywords (e.g., #+TITLE:, >> #+AUTHOR:) can be accessed by {{{title}}} and {{{author}}} like >> user-defined macros. >> >> It seems that there is some inconsistency between the actual behavior and >> the corresponding manual in export engine of org-mode ver. 8.2.7c. >> >> -----> snip <----- >> > > --001a1134b004865ea2050351fcbd Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry for asking another question; this time it is for the= cross-referencing in LaTeX export, which existed before (e.g., Sec. 16 of = manual for <8.0) but is gone now.


Per = the suggestion from the older manual for <8.0, I have the following sett= ing in my configuration file:

(setq org-export-lat= ex-hyperref-format "\\ref{%s}") ; for cross-referencing
=


Now with 8.2.7c and the following org in= ternal link to a section

... described in Sec. [[*Sect= ionOne][SectionOne]] ...


LaTeX export = generates the following code:

... described in Sec. \t= exttt{SectionOne}, ...


Regards,

Joseph


On Thu, Sep 18, 2014 at 3:07 PM, Kyeong Soo (Joseph) Kim <kyeongsoo.kim@gmail.com> wrote:
Nicolas and All,

One further ques= tion regarding your suggestion of the use of filter for special blocks in e= xport:

I just found out that, if I close Emacs and relaunch it, all variables= for filter (i.e., 'org-export-filter-*') are not defined. As a res= ult, the following elisp codes for the workaround based on both your sugges= tion and the filter example in the manual causes void variable error (i.e.,= "Symbol's value as variable is void: org-export-filter-special-bl= ock-function"):


;; workaround solution (until 8.3.0) for case-sensitve handling of sp= ecial-block for IEEE LaTeX class
(defun my-= latex-filter-ieeekeywords (text backend info)
=C2=A0 "Upcase 'IEEE' in IEEEkeywords environment in LaTeX = export."
=C2=A0 (when (org-export-deri= ved-backend-p backend 'latex)
(replace-regexp-in-string "ieeekey= words" "IEEEkeywords" text)))

(add-to-list 'org-export-filter-= special-block-functions
'my-latex-filter-ieeekeywords)


It turns out that those variables are defined only afte= r exporting org file into LaTeX.

=
Again, any advice on propor addition of cu= stom filter functions in the configuration file would be greatly appreciate= d; maybe the said example in the manual needs to be updated as well.
<= div class=3D"gmail_extra">
Regards,
Joseph



On Thu, Sep 18, 2014 at 12:50 PM, Kyeong Soo (Joseph)= Kim <kyeongsoo.kim@gmail.com> wrote:
Hello Nicolas,

Great thanks for the detailed instructions with= clear explanations for the problems.

I have addressed all those issues per your suggestions, but put some com= ments embedded below.


Again, many thanks for your great he= lp!

Joseph


On Th= u, Sep 18, 2014 at 3:01 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr= > wrote:

-----> snip <-----
<= br> > 2. Accessing the value of "#+KEYWORDS:" and change of cases = in
> "org-special-blocks"
>
> For keywords section in IEEE papers, I used to have the following sett= ings:
>
> #+KEYWORDS: AAA, BBB, CCC
> ...
> #+BEGIN_IEEEkeywords
> {{{KEYWORDS}}}.
> #+END_IEEEkeywords

[...]

> Version 8.2.7c, however, produces the following from the same settings= :
>
> \begin{ieeekeywords}
> .
> \end{ieeekeywords}

I'm surprised {{{KEYWORDS}}} even worked as, AFAIK, it wasn'= t
documented.=C2=A0 Indeed, there is no such macro in Org 8.0.=C2=A0 However,= you
can define your own

'{{{KEYW= ORDS}}}' worked without any issues in previous versions, which in fact = was suggested by someone in the mailing list or stackoverflow (unfortunatel= y, I couldn't find that via Google any longer).

By the way, in Sec. 12.3 of the Org manual (ver. 8.2.7c), 'KEYWOR= DS' is listed together with 'AUTHOR', 'TITLE' and so on= as export keywords. Also, according to Sec. 11.6, those predefined keyword= s (e.g.,=C2=A0=C2=A0#+TITLE:, #+AUTHOR:) can be accessed by {{{title}}} and= {{{author}}} like user-defined macros.

It seems t= hat there is some inconsistency between the actual behavior and the corresp= onding manual in export engine of org-mode ver. 8.2.7c.

-----> snip <-----


--001a1134b004865ea2050351fcbd--