From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Klein Subject: Re: issues with publishing to LaTeX using #INCLUDE Date: Thu, 18 Jun 2015 08:58:13 +0200 Message-ID: <20150618085813.1630b824@pckr150.mpip-mainz.mpg.de> References: <20150617.200443.1764368968080794485.roklein@roklein.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5TmL-0001tm-2C for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 02:58:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5TmH-0006Fw-PT for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 02:58:25 -0400 Received: from gate1.mpip-mainz.mpg.de ([194.95.63.248]:53628) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5TmH-0006FX-FA for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 02:58:21 -0400 Received: from [10.20.2.71] (port=56124 helo=vmmail1.mpip-mainz.mpg.de) by gate1.mpip-mainz.mpg.de with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1Z5Tm9-0003g7-1x for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 08:58:13 +0200 Received: from pckr150.mpip-mainz.mpg.de ([10.20.70.90]) by vmmail1.mpip-mainz.mpg.de with esmtps (SSLv3:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1Z5Tm9-0007g9-GH for emacs-orgmode@gnu.org; Thu, 18 Jun 2015 08:58:13 +0200 In-Reply-To: <20150617.200443.1764368968080794485.roklein@roklein.de> 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 Update: it happens only with org-mode master, not with maint. When I delete the elisp (and its call) at the beginning of the #INCLUDEd file everything works Ok. In the failing export already the exported \documentclass is wrong; it says `article' instead of `scrartcl' I use. It seems the following code in the #INCLUDEd file causes this: --- snip --- #+name: docinfo #+begin_src elisp :exports none (let ((props (org-export-get-environment))) (concat "#+LaTeX_HEADER: \\newcommand{\\myTitle}{" (org-element-interpret-data (plist-get props :title)) "}\n" "#+LaTeX_HEADER: \\newcommand{\\myAuthor}{" (org-element-interpret-data (plist-get props :author)) "}\n" "#+LaTeX_HEADER: \\newcommand{\\myDate}{" (org-element-interpret-data (plist-get props :date)) "}\n" "#+LaTeX_HEADER: \\newcommand{\\myCreator}{" (org-element-interpret-data (plist-get props :creator)) "}\n" "#+LaTeX_HEADER: \\newcommand{\\myKeywords}{" (org-element-interpret-data (plist-get props :keywords)) "}\n" "#+LaTeX_HEADER: \\newcommand{\\mySubject}{" (org-element-interpret-data (plist-get props :description)) "}\n")) #+end_src #+CALL: docinfo() :exports results :results raw --- snip --- Any ideas? Thanks a lot Best regards Robert On Wed, 17 Jun 2015 20:04:43 +0200 (CEST) Robert Klein wrote: > Hi, >=20 > when publishing a project (to LaTeX) where each file has a #INCLUDE: > of the same file, some files get mixed up on export to LaTeX, but > _only_ the stuff from the #INCLUDE gets mixed up. >=20 > Below is an excerpt of a correct export, one of a mixed up export and > the corresponding part from the #INCLUDEd file. >=20 > Currently I don't have the slightest idea what to do about this. >=20 > Any advice is highly appreciated. >=20 > Thank you very much for your help. >=20 > Best regards > Robert >=20 >=20 > A correct export looks like: >=20 > #+begin_src latex > \newcommand{\mySubtitle}{} > \newcommand{\myProducer}{org-mode / pdflatex} > \newcommand{\myTitle}{Common Software} > \newcommand{\myAuthor}{Robert Klein} > \newcommand{\myDate}{} > \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)} > \newcommand{\myKeywords}{} > \newcommand{\mySubject}{} > \usepackage{scrhack} > % standard font is Linux Libertine, but may want to have different > % tt font. Scale is for 10pt, probably also Ok for others. > %\usepackage[ttscale=3D.875]{libertine} % scale by roklein > \usepackage[osf]{libertine} % standardfont Linux > Libertine \usepackage[libertine]{newtxmath} > \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}} > \usepackage[scaled=3D0.9,zerostyle=3Dc]{newtxtt} % TX typewriter, scale > ok by roklein % have to load ams packages before symbol packages, so > some things aren't % already defined. (amsmath doesn't cope) > \usepackage{amstext} % text in a math display > \usepackage[rgb,svgnames,table]{xcolor} % enable color, also for > tables \usepackage[most]{tcolorbox} > \usepackage{overpic} % put LaTeX or grid over graphics > \usepackage{colortbl} % colored tables > \usepackage{tabu} % enhanced tables using above > packages \usepackage{booktabs} % beautiful table > formatting \usepackage{tikz} > \usetikzlibrary{matrix,arrows,decorations.pathmorphing} > \usepackage{paralist} > \usepackage{xfrac} % nice fractions $\sfrac{1}{2}$ > \usepackage{calc} % infix notation arithmetic > \usepackage{ifthen} % if...then for LaTeX > \usepackage{alltt} % like verbatim but \, {, and } > work \usepackage[a4paper]{geometry} > \usepackage{relsize} % relative font sizing > ("\smaller") \lstset{ > basicstyle=3D\ttfamily, > frame=3Dsingle, > % frame=3Dleftline, > backgroundcolor=3D\color{Gainsboro}, > % spacing normal, wie in verbatim: > columns=3Dfullflexible, > keepspaces=3Dtrue, > % Umlaute > inputencoding=3Dutf8, > extendedchars=3Dtrue, > literate=3D{=C4}{{\"A}}1 {=E4}{{\"a}}1 {=D6}{{\"O}}1 {=F6}{{\"o}}1 > {=DC}{{\"U}}1 {=FC}{{\"u}}1 {=DF}{{\ss}}1, } > ... > #+end_src >=20 > For some other files, however the export looks like: >=20 > #+begin_src latex > \newcommand{\mySubtitle}{} > \newcommand{\myProducer}{org-mode / pdflatex} > \newcommand{\myTitle}{Mathematical Software} > \newcommand{\myAuthor}{Robert Klein} > \newcommand{\myDate}{} > \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)} > \usepackage{scrhack} > % standard font is Linux Libertine, but may want to have different > % tt font. Scale is for 10pt, probably also Ok for others. > % tt font. Scale is for 10pt, probably also Ok for others. > %\usepackage[ttscale=3D.875]{libertine} % scale by roklein > \usepackage[osf]{libertine} % standardfont Linux > Libertine \usepackage[libertine]{newtxmath} > \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}} > \usepackage[scaled=3D0.9,zerostyle=3Dc]{newtxtt} % TX typewriter, scale > ok by roklein % already defined. (amsmath doesn't cope) > % already defined. (amsmath doesn't cope) > \usepackage{amstext} % text in a math display > \usepackage[rgb,svgnames,table]{xcolor} % enable color, also for > tables \usepackage[rgb,svgnames,table]{xcolor} % enable color, also > for tables \usepackage[most]{tcolorbox} > \usepackage[most]{tcolorbox} > \usepackage{overpic} % put LaTeX or grid over graphics > \usepackage{colortbl} % colored tables > \usepackage{tabu} % enhanced tables using above > packages \usepackage{tabu} % enhanced tables using > above packages \usepackage{booktabs} % beautiful table > formatting \usetikzlibrary{matrix,arrows,decorations.pathmorphing} > \usetikzlibrary{matrix,arrows,decorations.pathmorphing} > \usepackage{paralist} > \usepackage{xfrac} % nice fractions $\sfrac{1}{2}$ > \usepackage{xfrac} % nice fractions $\sfrac{1}{2}$ > \usepackage{calc} % infix notation arithmetic > \usepackage{ifthen} % if...then for LaTeX > \usepackage{ifthen} % if...then for LaTeX > \usepackage{alltt} % like verbatim but \, {, and } > work \usepackage{alltt} % like verbatim but \, {, > and } work \usepackage[a4paper]{geometry} > \usepackage{relsize} % relative font sizing > ("\smaller") \usepackage{relsize} % relative font > sizing ("\smaller") \lstset{ > frame=3Dsingle, > % frame=3Dleftline, > % frame=3Dleftline, > backgroundcolor=3D\color{Gainsboro}, > % spacing normal, wie in verbatim: > columns=3Dfullflexible, > keepspaces=3Dtrue, > inputencoding=3Dutf8, > extendedchars=3Dtrue, > literate=3D{=C4}{{\"A}}1 {=E4}{{\"a}}1 {=D6}{{\"O}}1 {=F6}{{\"o}}1 > {=DC}{{\"U}}1 {=FC}{{\"u}}1 {=DF}{{\ss}}1, literate=3D{=C4}{{\"A}}1 {=E4}= {{\"a}}1 > {=D6}{{\"O}}1 {=F6}{{\"o}}1 {=DC}{{\"U}}1 {=FC}{{\"u}}1 {=DF}{{\ss}}1, > literate=3D{=C4}{{\"A}}1 {=E4}{{\"a}}1 {=D6}{{\"O}}1 {=F6}{{\"o}}1 {=DC}{= {\"U}}1 > {=FC}{{\"u}}1 {=DF}{{\ss}}1, literate=3D{=C4}{{\"A}}1 {=E4}{{\"a}}1 {=D6}= {{\"O}}1 > {=F6}{{\"o}}1 {=DC}{{\"U}}1 {=FC}{{\"u}}1 {=DF}{{\ss}}1, ... #+end_src=20 >=20 >=20 > The corresponding part of the #INCLUDEd file is: >=20 > #+begin_src org > ,#+name: docinfo > ,#+begin_src elisp :exports none > (let ((props (org-export-get-environment))) > (concat "#+LaTeX_HEADER: \\newcommand{\\myTitle}{" > (org-element-interpret-data > (plist-get props :title)) > "}\n" > "#+LaTeX_HEADER: \\newcommand{\\myAuthor}{" > (org-element-interpret-data > (plist-get props :author)) > "}\n" > "#+LaTeX_HEADER: \\newcommand{\\myDate}{" > (org-element-interpret-data > (plist-get props :date)) > "}\n" > "#+LaTeX_HEADER: \\newcommand{\\myCreator}{" > (org-element-interpret-data > (plist-get props :creator)) > "}\n" > "#+LaTeX_HEADER: \\newcommand{\\myKeywords}{" > (org-element-interpret-data > (plist-get props :keywords)) > "}\n" > "#+LaTeX_HEADER: \\newcommand{\\mySubject}{" > (org-element-interpret-data > (plist-get props :description)) > "}\n")) > ,#+end_src >=20 > ,#+CALL: docinfo() :exports results :results raw >=20 > ,#+LaTeX_CLASS: scrartcl > ,#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage, > headsepline, headings=3Dnormal, DIV=3D12, BCOR=3D12mm] # +LaTeX_HEADER: > \usepackage[utf8]{inputenc} # +LaTeX_HEADER: > \usepackage[TS1,T1]{fontenc} ,#+LaTeX_HEADER: \usepackage{scrhack} > ,#+LaTeX_HEADER:=20 > ,#+LaTeX_HEADER: % standard font is Linux Libertine, but may want > to have different ,#+LaTeX_HEADER: % tt font. Scale is for 10pt, > probably also Ok for others. ,#+LaTeX_HEADER: > %\usepackage[ttscale=3D.875]{libertine} % scale by > roklein ,#+LaTeX_HEADER: \usepackage[osf]{libertine} % > standardfont Linux Libertine ,#+LaTeX_HEADER: > \usepackage[libertine]{newtxmath} ,#+LaTeX_HEADER: > \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont > #1}} ,#+LaTeX_HEADER: \usepackage[scaled=3D0.9,zerostyle=3Dc]{newtxtt} % > TX typewriter, scale ok by roklein ,#+LaTeX_HEADER: ,#+LaTeX_HEADER: > % have to load ams packages before symbol packages, so some things > aren't ,#+LaTeX_HEADER: % already defined. (amsmath doesn't cope) # > +LaTeX_HEADER: \usepackage{amsmath} % enhanced > math ,#+LaTeX_HEADER: \usepackage{amstext} % text in a > math display ,#+LaTeX_HEADER: # +LaTeX_HEADER: > \usepackage{fixltx2e} % fix some things wrong with > LaTeX2e # +LaTeX_HEADER: \usepackage{textcomp} % text > symbols via text companion fonts # +LaTeX_HEADER: > \usepackage{marvosym} % Martin Vogel's Symbol Font # > +LaTeX_HEADER: \usepackage{wasysym} % Waldi Symbol > Fonts # +LaTeX_HEADER: \usepackage{amssymb} % AMS > Symbols (mainly for math) ,#+LaTeX_HEADER: ,#+LaTeX_HEADER: > \usepackage[rgb,svgnames,table]{xcolor} % enable color, also for > tables ,#+LaTeX_HEADER: \usepackage[most]{tcolorbox} ,#+LaTeX_HEADER: > # +LaTeX_HEADER: \usepackage{graphicx} % enhanced > Graphics support ,#+LaTeX_HEADER: \usepackage{overpic} > % put LaTeX or grid over graphics ,#+LaTeX_HEADER: # +LaTeX_HEADER: > \usepackage{longtable} % multi-page > tables ,#+LaTeX_HEADER: \usepackage{colortbl} % colored > tables ,#+LaTeX_HEADER: \usepackage{tabu} % enhanced > tables using above packages >=20 > ,#+LaTeX_HEADER: \usepackage{booktabs} % beautiful > table formatting >=20 > ,#+LaTeX_HEADER:=20 > # +LaTeX_HEADER: \usepackage{float} % improved > environment for floats # +LaTeX_HEADER: > \usepackage{wrapfig} % wrap text around floats # > +LaTeX_HEADER: \usepackage{rotating} % rotate > floats ,#+LaTeX_HEADER: ,#+LaTeX_HEADER: \usepackage{tikz} > ,#+LaTeX_HEADER: > \usetikzlibrary{matrix,arrows,decorations.pathmorphing} # org uses > ulem # +LaTeX_HEADER: \usepackage{soul} % space-out, > underline, strike-out... # +LaTeX_HEADER: > \usepackage{soulutf8} % also for utf-8 > characters ,#+LaTeX_HEADER: # +LaTeX_HEADER: \usepackage{hyperref} > # +LaTeX_HEADER: \usepackage{listings} > ,#+LaTeX_HEADER: \usepackage{paralist} > ,#+LaTeX_HEADER: \usepackage{xfrac} % nice > fractions $\sfrac{1}{2}$ ,#+LaTeX_HEADER:=20 > ,#+LaTeX_HEADER: \usepackage{calc} % infix > notation arithmetic ,#+LaTeX_HEADER:=20 > ,#+LaTeX_HEADER: \usepackage{ifthen} % if...then for > LaTeX ,#+LaTeX_HEADER: \usepackage{alltt} % like > verbatim but \, {, and } work ,#+LaTeX_HEADER:=20 > ,#+LaTeX_HEADER: \usepackage[a4paper]{geometry} > ,#+LaTeX_HEADER: \usepackage{relsize} % relative font > sizing ("\smaller") ,#+LaTeX_HEADER:=20 > ,#+LaTeX_HEADER: \lstset{ > ,#+LaTeX_HEADER: basicstyle=3D\ttfamily, > ,#+LaTeX_HEADER: frame=3Dsingle, > ,#+LaTeX_HEADER: % frame=3Dleftline, > ,#+LaTeX_HEADER: backgroundcolor=3D\color{Gainsboro}, > ,#+LaTeX_HEADER: % spacing normal, wie in verbatim: > ,#+LaTeX_HEADER: columns=3Dfullflexible, > ,#+LaTeX_HEADER: keepspaces=3Dtrue, > ,#+LaTeX_HEADER: % Umlaute > ,#+LaTeX_HEADER: inputencoding=3Dutf8, > ,#+LaTeX_HEADER: extendedchars=3Dtrue, > ,#+LaTeX_HEADER: literate=3D{=C4}{{\"A}}1 {=E4}{{\"a}}1 {=D6}{{\"O}= }1 > {=F6}{{\"o}}1 {=DC}{{\"U}}1 {=FC}{{\"u}}1 {=DF}{{\ss}}1, ,#+LaTeX_HEADER:= } > ... > #+end_src >=20