emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* issues with publishing to LaTeX using #INCLUDE
@ 2015-06-17 18:04 Robert Klein
  2015-06-18  6:58 ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-17 18:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

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.

Below is an excerpt of a correct export, one of a mixed up export and
the corresponding part from the #INCLUDEd file.

Currently I don't have the slightest idea what to do about this.

Any advice is highly appreciated.

Thank you very much for your help.

Best regards
Robert


A correct export looks like:

#+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=.875]{libertine} % scale by roklein
  \usepackage[osf]{libertine}             % standardfont Linux Libertine
  \usepackage[libertine]{newtxmath}
  \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
  \usepackage[scaled=0.9,zerostyle=c]{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=\ttfamily,
  frame=single,
  % frame=leftline,
  backgroundcolor=\color{Gainsboro},
  % spacing normal, wie in verbatim:
  columns=fullflexible,
  keepspaces=true,
  % Umlaute
  inputencoding=utf8,
  extendedchars=true,
  literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  }
  ...
#+end_src

For some other files, however the export looks like:

#+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=.875]{libertine} % scale by roklein
  \usepackage[osf]{libertine}             % standardfont Linux Libertine
  \usepackage[libertine]{newtxmath}
  \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
  \usepackage[scaled=0.9,zerostyle=c]{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=single,
  % frame=leftline,
  % frame=leftline,
  backgroundcolor=\color{Gainsboro},
  % spacing normal, wie in verbatim:
  columns=fullflexible,
  keepspaces=true,
  inputencoding=utf8,
  extendedchars=true,
  literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  ...
#+end_src 


The corresponding part of the #INCLUDEd file is:

#+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

  ,#+CALL: docinfo() :exports results :results raw

  ,#+LaTeX_CLASS: scrartcl
  ,#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage, headsepline, headings=normal, DIV=12, BCOR=12mm]
  # +LaTeX_HEADER: \usepackage[utf8]{inputenc}
  # +LaTeX_HEADER: \usepackage[TS1,T1]{fontenc}
  ,#+LaTeX_HEADER: \usepackage{scrhack}
  ,#+LaTeX_HEADER: 
  ,#+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=.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=0.9,zerostyle=c]{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

  ,#+LaTeX_HEADER: \usepackage{booktabs}              % beautiful table formatting

  ,#+LaTeX_HEADER: 
  # +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: 
  ,#+LaTeX_HEADER: \usepackage{calc}                  % infix notation arithmetic
  ,#+LaTeX_HEADER: 
  ,#+LaTeX_HEADER: \usepackage{ifthen}                % if...then for LaTeX
  ,#+LaTeX_HEADER: \usepackage{alltt}                 % like verbatim but \, {, and } work
  ,#+LaTeX_HEADER: 
  ,#+LaTeX_HEADER: \usepackage[a4paper]{geometry}
  ,#+LaTeX_HEADER: \usepackage{relsize}               % relative font sizing ("\smaller")
  ,#+LaTeX_HEADER: 
  ,#+LaTeX_HEADER: \lstset{
  ,#+LaTeX_HEADER:     basicstyle=\ttfamily,
  ,#+LaTeX_HEADER:     frame=single,
  ,#+LaTeX_HEADER:     % frame=leftline,
  ,#+LaTeX_HEADER:     backgroundcolor=\color{Gainsboro},
  ,#+LaTeX_HEADER:     % spacing normal, wie in verbatim:
  ,#+LaTeX_HEADER:     columns=fullflexible,
  ,#+LaTeX_HEADER:     keepspaces=true,
  ,#+LaTeX_HEADER:     % Umlaute
  ,#+LaTeX_HEADER:     inputencoding=utf8,
  ,#+LaTeX_HEADER:     extendedchars=true,
  ,#+LaTeX_HEADER:     literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
  ,#+LaTeX_HEADER: }
  ...
#+end_src

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: issues with publishing to LaTeX using #INCLUDE
  2015-06-17 18:04 issues with publishing to LaTeX using #INCLUDE Robert Klein
@ 2015-06-18  6:58 ` Robert Klein
  2015-06-18  7:15   ` ECM for: " Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-18  6:58 UTC (permalink / raw)
  To: emacs-orgmode

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 <roklein@roklein.de> wrote:

> Hi,
> 
> 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.
> 
> Below is an excerpt of a correct export, one of a mixed up export and
> the corresponding part from the #INCLUDEd file.
> 
> Currently I don't have the slightest idea what to do about this.
> 
> Any advice is highly appreciated.
> 
> Thank you very much for your help.
> 
> Best regards
> Robert
> 
> 
> A correct export looks like:
> 
> #+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=.875]{libertine} % scale by roklein
>   \usepackage[osf]{libertine}             % standardfont Linux
> Libertine \usepackage[libertine]{newtxmath}
>   \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
>   \usepackage[scaled=0.9,zerostyle=c]{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=\ttfamily,
>   frame=single,
>   % frame=leftline,
>   backgroundcolor=\color{Gainsboro},
>   % spacing normal, wie in verbatim:
>   columns=fullflexible,
>   keepspaces=true,
>   % Umlaute
>   inputencoding=utf8,
>   extendedchars=true,
>   literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1
> {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, }
>   ...
> #+end_src
> 
> For some other files, however the export looks like:
> 
> #+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=.875]{libertine} % scale by roklein
>   \usepackage[osf]{libertine}             % standardfont Linux
> Libertine \usepackage[libertine]{newtxmath}
>   \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
>   \usepackage[scaled=0.9,zerostyle=c]{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=single,
>   % frame=leftline,
>   % frame=leftline,
>   backgroundcolor=\color{Gainsboro},
>   % spacing normal, wie in verbatim:
>   columns=fullflexible,
>   keepspaces=true,
>   inputencoding=utf8,
>   extendedchars=true,
>   literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1
> {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, literate={Ä}{{\"A}}1 {ä}{{\"a}}1
> {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
> literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1
> {ü}{{\"u}}1 {ß}{{\ss}}1, literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1
> {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, ... #+end_src 
> 
> 
> The corresponding part of the #INCLUDEd file is:
> 
> #+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
> 
>   ,#+CALL: docinfo() :exports results :results raw
> 
>   ,#+LaTeX_CLASS: scrartcl
>   ,#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
> headsepline, headings=normal, DIV=12, BCOR=12mm] # +LaTeX_HEADER:
> \usepackage[utf8]{inputenc} # +LaTeX_HEADER:
> \usepackage[TS1,T1]{fontenc} ,#+LaTeX_HEADER: \usepackage{scrhack}
>   ,#+LaTeX_HEADER: 
>   ,#+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=.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=0.9,zerostyle=c]{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
> 
>   ,#+LaTeX_HEADER: \usepackage{booktabs}              % beautiful
> table formatting
> 
>   ,#+LaTeX_HEADER: 
>   # +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: 
>   ,#+LaTeX_HEADER: \usepackage{calc}                  % infix
> notation arithmetic ,#+LaTeX_HEADER: 
>   ,#+LaTeX_HEADER: \usepackage{ifthen}                % if...then for
> LaTeX ,#+LaTeX_HEADER: \usepackage{alltt}                 % like
> verbatim but \, {, and } work ,#+LaTeX_HEADER: 
>   ,#+LaTeX_HEADER: \usepackage[a4paper]{geometry}
>   ,#+LaTeX_HEADER: \usepackage{relsize}               % relative font
> sizing ("\smaller") ,#+LaTeX_HEADER: 
>   ,#+LaTeX_HEADER: \lstset{
>   ,#+LaTeX_HEADER:     basicstyle=\ttfamily,
>   ,#+LaTeX_HEADER:     frame=single,
>   ,#+LaTeX_HEADER:     % frame=leftline,
>   ,#+LaTeX_HEADER:     backgroundcolor=\color{Gainsboro},
>   ,#+LaTeX_HEADER:     % spacing normal, wie in verbatim:
>   ,#+LaTeX_HEADER:     columns=fullflexible,
>   ,#+LaTeX_HEADER:     keepspaces=true,
>   ,#+LaTeX_HEADER:     % Umlaute
>   ,#+LaTeX_HEADER:     inputencoding=utf8,
>   ,#+LaTeX_HEADER:     extendedchars=true,
>   ,#+LaTeX_HEADER:     literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1
> {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, ,#+LaTeX_HEADER: }
>   ...
> #+end_src
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18  6:58 ` Robert Klein
@ 2015-06-18  7:15   ` Robert Klein
  2015-06-18  7:21     ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-18  7:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 15175 bytes --]

Attached an ECM:

.femacs is the .emacs used.

The files 1.org, 2.org, and 3.org are in the directory ~/ot
mpip-settings.org is in ~/ot/include

The file exported first exports Ok, the others don't.

A diff of the export for the ECM (3.org exported Ok, 2.org and 1.org
not):

--- snip ---
--- 3.tex	2015-06-18 09:10:09.251989000 +0200
+++ 2.tex	2015-06-18 09:10:09.773039000 +0200
@@ -1,5 +1,5 @@
 % Created 2015-06-18 Thu 09:10
-\documentclass[11pt, a4paper, twoside, notitlepage, headsepline,
headings=normal, DIV=12, BCOR=12mm]{scrartcl}
+\documentclass[11pt,a4paper, twoside, notitlepage, headsepline,
headings=normal, DIV=12, BCOR=12mm]{article}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
@@ -24,8 +24,6 @@ \newcommand{\myAuthor}{Robert
Klein} \newcommand{\myDate}{}
 \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)}
-\newcommand{\myKeywords}{}
-\newcommand{\mySubject}{}
 \author{Robert Klein\thanks{Robert.Klein@mpip-mainz.mpg.de}}
 \date{\today}
 \title{Frequently Asked Questions}
--- snip ---

Best regards
Robert

On Thu, 18 Jun 2015 08:58:13 +0200
Robert Klein <roklein@roklein.de> wrote:

> 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 <roklein@roklein.de> wrote:
> 
> > Hi,
> > 
> > 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.
> > 
> > Below is an excerpt of a correct export, one of a mixed up export
> > and the corresponding part from the #INCLUDEd file.
> > 
> > Currently I don't have the slightest idea what to do about this.
> > 
> > Any advice is highly appreciated.
> > 
> > Thank you very much for your help.
> > 
> > Best regards
> > Robert
> > 
> > 
> > A correct export looks like:
> > 
> > #+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=.875]{libertine} % scale by roklein
> >   \usepackage[osf]{libertine}             % standardfont Linux
> > Libertine \usepackage[libertine]{newtxmath}
> >   \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
> >   \usepackage[scaled=0.9,zerostyle=c]{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=\ttfamily,
> >   frame=single,
> >   % frame=leftline,
> >   backgroundcolor=\color{Gainsboro},
> >   % spacing normal, wie in verbatim:
> >   columns=fullflexible,
> >   keepspaces=true,
> >   % Umlaute
> >   inputencoding=utf8,
> >   extendedchars=true,
> >   literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1
> > {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, }
> >   ...
> > #+end_src
> > 
> > For some other files, however the export looks like:
> > 
> > #+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=.875]{libertine} % scale by roklein
> >   \usepackage[osf]{libertine}             % standardfont Linux
> > Libertine \usepackage[libertine]{newtxmath}
> >   \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
> >   \usepackage[scaled=0.9,zerostyle=c]{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=single,
> >   % frame=leftline,
> >   % frame=leftline,
> >   backgroundcolor=\color{Gainsboro},
> >   % spacing normal, wie in verbatim:
> >   columns=fullflexible,
> >   keepspaces=true,
> >   inputencoding=utf8,
> >   extendedchars=true,
> >   literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1
> > {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, literate={Ä}{{\"A}}1
> > {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1
> > {ß}{{\ss}}1, literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1
> > {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1,
> > literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1 {ö}{{\"o}}1
> > {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, ... #+end_src 
> > 
> > 
> > The corresponding part of the #INCLUDEd file is:
> > 
> > #+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
> > 
> >   ,#+CALL: docinfo() :exports results :results raw
> > 
> >   ,#+LaTeX_CLASS: scrartcl
> >   ,#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
> > headsepline, headings=normal, DIV=12, BCOR=12mm] # +LaTeX_HEADER:
> > \usepackage[utf8]{inputenc} # +LaTeX_HEADER:
> > \usepackage[TS1,T1]{fontenc} ,#+LaTeX_HEADER: \usepackage{scrhack}
> >   ,#+LaTeX_HEADER: 
> >   ,#+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=.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=0.9,zerostyle=c]{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
> > 
> >   ,#+LaTeX_HEADER: \usepackage{booktabs}              % beautiful
> > table formatting
> > 
> >   ,#+LaTeX_HEADER: 
> >   # +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: 
> >   ,#+LaTeX_HEADER: \usepackage{calc}                  % infix
> > notation arithmetic ,#+LaTeX_HEADER: 
> >   ,#+LaTeX_HEADER: \usepackage{ifthen}                % if...then
> > for LaTeX ,#+LaTeX_HEADER: \usepackage{alltt}                 % like
> > verbatim but \, {, and } work ,#+LaTeX_HEADER: 
> >   ,#+LaTeX_HEADER: \usepackage[a4paper]{geometry}
> >   ,#+LaTeX_HEADER: \usepackage{relsize}               % relative
> > font sizing ("\smaller") ,#+LaTeX_HEADER: 
> >   ,#+LaTeX_HEADER: \lstset{
> >   ,#+LaTeX_HEADER:     basicstyle=\ttfamily,
> >   ,#+LaTeX_HEADER:     frame=single,
> >   ,#+LaTeX_HEADER:     % frame=leftline,
> >   ,#+LaTeX_HEADER:     backgroundcolor=\color{Gainsboro},
> >   ,#+LaTeX_HEADER:     % spacing normal, wie in verbatim:
> >   ,#+LaTeX_HEADER:     columns=fullflexible,
> >   ,#+LaTeX_HEADER:     keepspaces=true,
> >   ,#+LaTeX_HEADER:     % Umlaute
> >   ,#+LaTeX_HEADER:     inputencoding=utf8,
> >   ,#+LaTeX_HEADER:     extendedchars=true,
> >   ,#+LaTeX_HEADER:     literate={Ä}{{\"A}}1 {ä}{{\"a}}1 {Ö}{{\"O}}1
> > {ö}{{\"o}}1 {Ü}{{\"U}}1 {ü}{{\"u}}1 {ß}{{\ss}}1, ,#+LaTeX_HEADER: }
> >   ...
> > #+end_src
> > 
> 
> 


[-- Attachment #2: .femacs --]
[-- Type: application/octet-stream, Size: 1086 bytes --]

(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))

(require 'org)

(setq org-latex-classes
  '(("scrartcl"
     "\\documentclass[11pt]{scrartcl}"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    ("article"
     "\\documentclass[11pt]{article}"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))

(setq org-publish-project-alist nil)
(add-to-list 'org-publish-project-alist
             '("linux-e-pdf"
               :base-directory "~/ot"
               :base-extension "org"
               :publishing-directory "~/ot"
               :publishing-function org-latex-publish-to-latex
               ))

[-- Attachment #3: 1.org --]
[-- Type: application/octet-stream, Size: 448 bytes --]

# -*- fill-column:75; coding: utf-8-unix; -*-
#+LANGUAGE: en

#+TITLE: Frequently Asked Questions
# +AUTHOR: Robert Klein
#+KEYWORDS: 
#+DESCRIPTION: 
#+LaTeX_HEADER: \newcommand{\mySubtitle}{}
#+LaTeX_HEADER: \newcommand{\myProducer}{org-mode / pdflatex}

#+INCLUDE: include/mpip-settings.org
#+OPTIONS: toc:t

#+HTML: <a href="faq.pdf">PDF version</a>

* Headline

Some Text


* Other Headline
  Please use the script =/usr/local/bin/do_things=.

[-- Attachment #4: 2.org --]
[-- Type: application/octet-stream, Size: 448 bytes --]

# -*- fill-column:75; coding: utf-8-unix; -*-
#+LANGUAGE: en

#+TITLE: Frequently Asked Questions
# +AUTHOR: Robert Klein
#+KEYWORDS: 
#+DESCRIPTION: 
#+LaTeX_HEADER: \newcommand{\mySubtitle}{}
#+LaTeX_HEADER: \newcommand{\myProducer}{org-mode / pdflatex}

#+INCLUDE: include/mpip-settings.org
#+OPTIONS: toc:t

#+HTML: <a href="faq.pdf">PDF version</a>

* Headline

Some Text


* Other Headline
  Please use the script =/usr/local/bin/do_things=.

[-- Attachment #5: 3.org --]
[-- Type: application/octet-stream, Size: 448 bytes --]

# -*- fill-column:75; coding: utf-8-unix; -*-
#+LANGUAGE: en

#+TITLE: Frequently Asked Questions
# +AUTHOR: Robert Klein
#+KEYWORDS: 
#+DESCRIPTION: 
#+LaTeX_HEADER: \newcommand{\mySubtitle}{}
#+LaTeX_HEADER: \newcommand{\myProducer}{org-mode / pdflatex}

#+INCLUDE: include/mpip-settings.org
#+OPTIONS: toc:t

#+HTML: <a href="faq.pdf">PDF version</a>

* Headline

Some Text


* Other Headline
  Please use the script =/usr/local/bin/do_things=.

[-- Attachment #6: mpip-settings.org --]
[-- Type: application/octet-stream, Size: 1368 bytes --]

#+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t

#+AUTHOR: Robert Klein
#+EMAIL: Robert.Klein@mpip-mainz.mpg.de


#+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

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage, headsepline, headings=normal, DIV=12, BCOR=12mm]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18  7:15   ` ECM for: " Robert Klein
@ 2015-06-18  7:21     ` Robert Klein
  2015-06-18  7:55       ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-18  7:21 UTC (permalink / raw)
  To: emacs-orgmode

On Thu, 18 Jun 2015 09:15:50 +0200
Robert Klein <roklein@roklein.de> wrote:

 
> The file exported first exports Ok, the others don't.

Sorry, the file _published_ first exports Ok, the others not.

For the ECM I export w/ org-publish-project.

Best regards
Robert

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18  7:21     ` Robert Klein
@ 2015-06-18  7:55       ` Nicolas Goaziou
  2015-06-18 12:21         ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2015-06-18  7:55 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Hello,

Robert Klein <roklein@roklein.de> writes:

> On Thu, 18 Jun 2015 09:15:50 +0200
> Robert Klein <roklein@roklein.de> wrote:
>
>  
>> The file exported first exports Ok, the others don't.
>
> Sorry, the file _published_ first exports Ok, the others not.
>
> For the ECM I export w/ org-publish-project.

Thanks for the ECM. I will investigate by the end of the week. Do not
hesitate to post any additional information.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18  7:55       ` Nicolas Goaziou
@ 2015-06-18 12:21         ` Robert Klein
  2015-06-18 18:51           ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-18 12:21 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On Thu, 18 Jun 2015 09:55:16 +0200
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

Hello,

thank you very much for your effort!

I boiled it down further and now don't even need an #include to see
this issues.  Using the same .emacs as in the earlier mail and having
three org files 1.org, 2.org, and 3.org all having the same contents:

--- snip ---
#+TITLE: Frequently Asked Questions

#+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t

#+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"))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
headsepline, headings=normal, DIV=12, BCOR=12mm]
#+OPTIONS: toc:t

* Headline
Some Text

--- snip ---


I also get the first file in the publishing process exports Ok, the
rest is not Ok.

When I delete the LaTeX_CLASS_OPTIONS line the whole project publishes
without issues.

The same happens when I delete the "#+Options: toc:t" line below the
class options line.

Best regards
Robert




> Hello,
> 
> Robert Klein <roklein@roklein.de> writes:
> 
> > On Thu, 18 Jun 2015 09:15:50 +0200
> > Robert Klein <roklein@roklein.de> wrote:
> >
> >  
> >> The file exported first exports Ok, the others don't.
> >
> > Sorry, the file _published_ first exports Ok, the others not.
> >
> > For the ECM I export w/ org-publish-project.
> 
> Thanks for the ECM. I will investigate by the end of the week. Do not
> hesitate to post any additional information.
> 
> Regards,
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18 12:21         ` Robert Klein
@ 2015-06-18 18:51           ` Robert Klein
  2015-06-19  7:51             ` commit found, was: " Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-18 18:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hello,

now I've narrowed the org file(s) down to

--- snip ---
#+TITLE: Frequently Asked Questions

#+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"))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt]
#+OPTIONS: email:t

* Headline
Some Text
--- snip ---

I tried toc:t, toc:nil and email:t as options.

The sequence CALL, LaTeX_CLASS, LaTeX_CLASS_OPTIONS, OPTIONS seems to be
important.  Publishing the example looks Ok when I use the following
sequences: 

- CALL, LaTeX_CLASS_OPTIONS, LaTeX_CLASS, OPTIONS
- CALL, LaTeX_CLASS_OPTIONS, OPTIONS, LaTeX_CLASS
- CALL, OPTIONS, LaTeX_CLASS_OPTIONS, LaTeX_CLASS

Best regards
Robert


On Thu, 18 Jun 2015 14:21:42 +0200
Robert Klein <roklein@roklein.de> wrote:

> On Thu, 18 Jun 2015 09:55:16 +0200
> Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> 
> Hello,
> 
> thank you very much for your effort!
> 
> I boiled it down further and now don't even need an #include to see
> this issues.  Using the same .emacs as in the earlier mail and having
> three org files 1.org, 2.org, and 3.org all having the same contents:
> 
> --- snip ---
> #+TITLE: Frequently Asked Questions
> 
> #+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t
> 
> #+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"))
> #+end_src
> 
> #+CALL: docinfo() :exports results :results raw
> 
> #+LaTeX_CLASS: scrartcl
> #+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
> headsepline, headings=normal, DIV=12, BCOR=12mm]
> #+OPTIONS: toc:t
> 
> * Headline
> Some Text
> 
> --- snip ---
> 
> 
> I also get the first file in the publishing process exports Ok, the
> rest is not Ok.
> 
> When I delete the LaTeX_CLASS_OPTIONS line the whole project publishes
> without issues.
> 
> The same happens when I delete the "#+Options: toc:t" line below the
> class options line.
> 
> Best regards
> Robert
> 
> 
> 
> 
> > Hello,
> > 
> > Robert Klein <roklein@roklein.de> writes:
> > 
> > > On Thu, 18 Jun 2015 09:15:50 +0200
> > > Robert Klein <roklein@roklein.de> wrote:
> > >
> > >  
> > >> The file exported first exports Ok, the others don't.
> > >
> > > Sorry, the file _published_ first exports Ok, the others not.
> > >
> > > For the ECM I export w/ org-publish-project.
> > 
> > Thanks for the ECM. I will investigate by the end of the week. Do
> > not hesitate to post any additional information.
> > 
> > Regards,
> > 
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-18 18:51           ` Robert Klein
@ 2015-06-19  7:51             ` Robert Klein
  2015-06-19 18:28               ` tentative patch " Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-19  7:51 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hello,

the first commit that doesn't work as expected is

e900ebed08c444ad2813060195e9ece7f6bd910b
"ob-core: Small refactoring"

from Wednesday morning.


Best regards
Robert

On Thu, 18 Jun 2015 20:51:10 +0200
Robert Klein <RoKlein@roklein.de> wrote:

> Hello,
> 
> now I've narrowed the org file(s) down to
> 
> --- snip ---
> #+TITLE: Frequently Asked Questions
> 
> #+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"))
> #+end_src
> 
> #+CALL: docinfo() :exports results :results raw
> 
> #+LaTeX_CLASS: scrartcl
> #+LaTeX_CLASS_OPTIONS: [11pt]
> #+OPTIONS: email:t
> 
> * Headline
> Some Text
> --- snip ---
> 
> I tried toc:t, toc:nil and email:t as options.
> 
> The sequence CALL, LaTeX_CLASS, LaTeX_CLASS_OPTIONS, OPTIONS seems to
> be important.  Publishing the example looks Ok when I use the
> following sequences: 
> 
> - CALL, LaTeX_CLASS_OPTIONS, LaTeX_CLASS, OPTIONS
> - CALL, LaTeX_CLASS_OPTIONS, OPTIONS, LaTeX_CLASS
> - CALL, OPTIONS, LaTeX_CLASS_OPTIONS, LaTeX_CLASS
> 
> Best regards
> Robert
> 
> 
> On Thu, 18 Jun 2015 14:21:42 +0200
> Robert Klein <roklein@roklein.de> wrote:
> 
> > On Thu, 18 Jun 2015 09:55:16 +0200
> > Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> > 
> > Hello,
> > 
> > thank you very much for your effort!
> > 
> > I boiled it down further and now don't even need an #include to see
> > this issues.  Using the same .emacs as in the earlier mail and
> > having three org files 1.org, 2.org, and 3.org all having the same
> > contents:
> > 
> > --- snip ---
> > #+TITLE: Frequently Asked Questions
> > 
> > #+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t
> > 
> > #+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"))
> > #+end_src
> > 
> > #+CALL: docinfo() :exports results :results raw
> > 
> > #+LaTeX_CLASS: scrartcl
> > #+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
> > headsepline, headings=normal, DIV=12, BCOR=12mm]
> > #+OPTIONS: toc:t
> > 
> > * Headline
> > Some Text
> > 
> > --- snip ---
> > 
> > 
> > I also get the first file in the publishing process exports Ok, the
> > rest is not Ok.
> > 
> > When I delete the LaTeX_CLASS_OPTIONS line the whole project
> > publishes without issues.
> > 
> > The same happens when I delete the "#+Options: toc:t" line below the
> > class options line.
> > 
> > Best regards
> > Robert
> > 
> > 
> > 
> > 
> > > Hello,
> > > 
> > > Robert Klein <roklein@roklein.de> writes:
> > > 
> > > > On Thu, 18 Jun 2015 09:15:50 +0200
> > > > Robert Klein <roklein@roklein.de> wrote:
> > > >
> > > >  
> > > >> The file exported first exports Ok, the others don't.
> > > >
> > > > Sorry, the file _published_ first exports Ok, the others not.
> > > >
> > > > For the ECM I export w/ org-publish-project.
> > > 
> > > Thanks for the ECM. I will investigate by the end of the week. Do
> > > not hesitate to post any additional information.
> > > 
> > > Regards,
> > > 
> > 
> > 
> 
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-19  7:51             ` commit found, was: " Robert Klein
@ 2015-06-19 18:28               ` Robert Klein
  2015-06-20 22:15                 ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-19 18:28 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 3829 bytes --]

Hello,

when I change a `symbol-value' in the commit back to `eval', export
seems to work again.

Patch is attached.

Best regards
Robert


On Fri, 19 Jun 2015 09:51:40 +0200
Robert Klein <roklein@roklein.de> wrote:

> Hello,
> 
> the first commit that doesn't work as expected is
> 
> e900ebed08c444ad2813060195e9ece7f6bd910b
> "ob-core: Small refactoring"
> 
> from Wednesday morning.
> 
> 
> Best regards
> Robert
> 
> On Thu, 18 Jun 2015 20:51:10 +0200
> Robert Klein <RoKlein@roklein.de> wrote:
> 
> > Hello,
> > 
> > now I've narrowed the org file(s) down to
> > 
> > --- snip ---
> > #+TITLE: Frequently Asked Questions
> > 
> > #+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"))
> > #+end_src
> > 
> > #+CALL: docinfo() :exports results :results raw
> > 
> > #+LaTeX_CLASS: scrartcl
> > #+LaTeX_CLASS_OPTIONS: [11pt]
> > #+OPTIONS: email:t
> > 
> > * Headline
> > Some Text
> > --- snip ---
> > 
> > I tried toc:t, toc:nil and email:t as options.
> > 
> > The sequence CALL, LaTeX_CLASS, LaTeX_CLASS_OPTIONS, OPTIONS seems
> > to be important.  Publishing the example looks Ok when I use the
> > following sequences: 
> > 
> > - CALL, LaTeX_CLASS_OPTIONS, LaTeX_CLASS, OPTIONS
> > - CALL, LaTeX_CLASS_OPTIONS, OPTIONS, LaTeX_CLASS
> > - CALL, OPTIONS, LaTeX_CLASS_OPTIONS, LaTeX_CLASS
> > 
> > Best regards
> > Robert
> > 
> > 
> > On Thu, 18 Jun 2015 14:21:42 +0200
> > Robert Klein <roklein@roklein.de> wrote:
> > 
> > > On Thu, 18 Jun 2015 09:55:16 +0200
> > > Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> > > 
> > > Hello,
> > > 
> > > thank you very much for your effort!
> > > 
> > > I boiled it down further and now don't even need an #include to
> > > see this issues.  Using the same .emacs as in the earlier mail and
> > > having three org files 1.org, 2.org, and 3.org all having the same
> > > contents:
> > > 
> > > --- snip ---
> > > #+TITLE: Frequently Asked Questions
> > > 
> > > #+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t
> > > 
> > > #+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"))
> > > #+end_src
> > > 
> > > #+CALL: docinfo() :exports results :results raw
> > > 
> > > #+LaTeX_CLASS: scrartcl
> > > #+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
> > > headsepline, headings=normal, DIV=12, BCOR=12mm]
> > > #+OPTIONS: toc:t
> > > 
> > > * Headline
> > > Some Text
> > > 
> > > --- snip ---
> > > 
> > > 
> > > I also get the first file in the publishing process exports Ok,
> > > the rest is not Ok.
> > > 
> > > When I delete the LaTeX_CLASS_OPTIONS line the whole project
> > > publishes without issues.
> > > 
> > > The same happens when I delete the "#+Options: toc:t" line below
> > > the class options line.
> > > 
> > > Best regards
> > > Robert
> > > 
> > > 
> > > 
> > > 
> > > > Hello,
> > > > 
> > > > Robert Klein <roklein@roklein.de> writes:
> > > > 
> > > > > On Thu, 18 Jun 2015 09:15:50 +0200
> > > > > Robert Klein <roklein@roklein.de> wrote:
> > > > >
> > > > >  
> > > > >> The file exported first exports Ok, the others don't.
> > > > >
> > > > > Sorry, the file _published_ first exports Ok, the others not.
> > > > >
> > > > > For the ECM I export w/ org-publish-project.
> > > > 
> > > > Thanks for the ECM. I will investigate by the end of the week.
> > > > Do not hesitate to post any additional information.
> > > > 
> > > > Regards,
> > > > 
> > > 
> > > 
> > 
> > 
> 
> 


[-- Attachment #2: 0001-fix-e900ebed08c444ad2813060195e9ece7f6bd910b.patch --]
[-- Type: text/x-patch, Size: 989 bytes --]

From 388e768878cfd48c612dd2279ac8b8356533da4c Mon Sep 17 00:00:00 2001
From: Robert Klein <roklein@roklein.de>
Date: Fri, 19 Jun 2015 20:18:39 +0200
Subject: [PATCH] fix e900ebed08c444ad2813060195e9ece7f6bd910b

* lisp/ob-core.el (org-babel-params-from-properties): Using symbol-value
  on sym instead of eval breaks export.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index ae79fe6..862327a 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -1422,7 +1422,7 @@ specified in the properties of the current outline entry."
 	     (org-babel-combine-header-arg-lists
 	      org-babel-common-header-args-w-values
 	      (let ((sym (intern (concat "org-babel-header-args:" lang))))
-		(and (boundp sym) (symbol-value sym)))))))
+		(and (boundp sym) (eval sym)))))))
      ;; header arguments specified with the header-args property at
      ;; point of call.
      (org-babel-parse-header-arguments
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-19 18:28               ` tentative patch " Robert Klein
@ 2015-06-20 22:15                 ` Nicolas Goaziou
  2015-06-21 12:55                   ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2015-06-20 22:15 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Hello,

Robert Klein <RoKlein@roklein.de> writes:

> when I change a `symbol-value' in the commit back to `eval', export
> seems to work again.

Actually, I cannot reproduce your issue.

> Patch is attached.

I don't understand why replacing `symbol-value' with `eval' could solve
the issue. Could you debug this and see what happens with both
`symbol-value' and `eval'?

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-20 22:15                 ` Nicolas Goaziou
@ 2015-06-21 12:55                   ` Robert Klein
  2015-06-22  8:37                     ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-21 12:55 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2037 bytes --]

Hello,

you're right about eval and symbol-value, of course. I mixed up my test
files, so both the commit I `identified' and the `patch' are bogus.

I now used git bisect for both my current minimal setup (.emacs
attached as .femacs and the files ~/ot/1.org, ~/ot/2.org, and
~/ot/3.org all three having the contents of the attached file 1.org)
and the setup and project I first encountered the issue.


The issue occurs always during publishing the _second_ file, that is,
the first file being published gets published Ok, and the following
files don't.


For the minimal example I cd'd to ~/ot and called emacs using the
command line:

rm *.tex ~/.org-timestamps/linux-e-pdf.cache ; emacs -q -l ~/.femacs


For the original project I used my full setup but also deleted *.tex,
*.pdf, and ~/.org-timestamps/linux-e-pdf.cache.


To be sure nothing went wrong I bisected twice for each project.


For the minimal example commit 2965f8fb0c048a20b52ba90627e7cca6fe706c93
is identified as the first bad one.

For my full setup it is the earlier commit
69dd4301ab7aeb581968f1c7e75167338d024c8f.


My Emacs version is  : GNU Emacs 24.5.1 (x86_64-suse-linux-gnu, GTK+
Version 3.10.2) of 2015-04-30 on build83



Meanwhile I added a second elisp source and call (between
latex_class_options and the later options line).  With this added I
don't see the error anymore.  Same for the minimal example (org files
all having the content of the attached file working.org)


I'm sorry for the earlier confusion.

Best regards
Robert



On Sun, 21 Jun 2015 00:15:49 +0200
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Hello,
> 
> Robert Klein <RoKlein@roklein.de> writes:
> 
> > when I change a `symbol-value' in the commit back to `eval', export
> > seems to work again.
> 
> Actually, I cannot reproduce your issue.
> 
> > Patch is attached.
> 
> I don't understand why replacing `symbol-value' with `eval' could
> solve the issue. Could you debug this and see what happens with both
> `symbol-value' and `eval'?
> 
> Thank you.
> 
> Regards,
> 


[-- Attachment #2: 1.org --]
[-- Type: application/octet-stream, Size: 446 bytes --]

#+TITLE: Frequently Asked Questions

#+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"))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt]
#+OPTIONS: email:t

* Headline
Some Text



[-- Attachment #3: .femacs --]
[-- Type: application/octet-stream, Size: 1152 bytes --]

(setq load-path (cons "~/.emacs.d/org-mode/lisp" load-path))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))

(require 'org)

(setq org-latex-classes
  '(("scrartcl"
     "\\documentclass[11pt]{scrartcl}"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
    ("article"
     "\\documentclass[11pt]{article}"
     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))

(setq org-confirm-babel-evaluate nil)
(setq org-publish-project-alist nil)
(add-to-list 'org-publish-project-alist
             '("linux-e-pdf"
               :base-directory "~/ot"
               :base-extension "org"
               :publishing-directory "~/ot"
               :publishing-function org-latex-publish-to-latex
               ))
(org-publish "linux-e-pdf")

[-- Attachment #4: working.org --]
[-- Type: application/octet-stream, Size: 837 bytes --]

#+TITLE: Frequently Asked Questions

#+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"))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt]

#+name: htmlpdflink
#+begin_src elisp :exports none
    (let ((props (org-export-get-environment)))
      (concat  "#+HTML: <a href=\""
               (car (last (split-string
                           (file-name-sans-extension (buffer-file-name))
                           "/")))
               ".pdf\">PDF-Version</a>\n"))
#+end_src
#+CALL: htmlpdflink() :exports results :results raw

#+OPTIONS: email:t

* Headline
Some Text



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-21 12:55                   ` Robert Klein
@ 2015-06-22  8:37                     ` Nicolas Goaziou
  2015-06-22 15:01                       ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2015-06-22  8:37 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Robert Klein <RoKlein@roklein.de> writes:

> I now used git bisect for both my current minimal setup (.emacs
> attached as .femacs and the files ~/ot/1.org, ~/ot/2.org, and
> ~/ot/3.org all three having the contents of the attached file 1.org)
> and the setup and project I first encountered the issue.

I still cannot reproduce the problem, i.e., 1.tex, 2.tex and 3.tex are
identical.

Could you try with emacs -Q instead of -q?

Regards,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-22  8:37                     ` Nicolas Goaziou
@ 2015-06-22 15:01                       ` Robert Klein
  2015-06-23 21:44                         ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-22 15:01 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hello,

On Mon, 22 Jun 2015 10:37:26 +0200
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Robert Klein <RoKlein@roklein.de> writes:
> 
> > I now used git bisect for both my current minimal setup (.emacs
> > attached as .femacs and the files ~/ot/1.org, ~/ot/2.org, and
> > ~/ot/3.org all three having the contents of the attached file 1.org)
> > and the setup and project I first encountered the issue.
> 
> I still cannot reproduce the problem, i.e., 1.tex, 2.tex and 3.tex are
> identical.
> 
> Could you try with emacs -Q instead of -q?

Same issue with -Q.

I tested now on several platforms:
 | OS                   | Emacs version | 
 |----------------------+---------------+
 | openSUSE 13.1 x86_64 | Emacs 24.5.1  |
 | openSUSE 13.1 x86_64 | Emacs 23.4.1  |
 | FreeBSD 10.0 amd64   | Emacs 24.5.1  |
 | FreeBSD 10.1 arm     | Emacs 23.4.1  |

The first and both FreeBSD platforms i tested also using -Q instead of
-q.

Both FreeBSD's had no org-mode installed previously, and no .emacs of my
own (basically empty accounts only used to su to root).

On all I had the first published tex file (i.e. 3.tex) bigger than the
others.

I'm not sure how to proceed at the moment, are there other set-ups I
could test?

Thanks a lot.

Best regards
Robert

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-22 15:01                       ` Robert Klein
@ 2015-06-23 21:44                         ` Nicolas Goaziou
  2015-06-24  7:07                           ` Robert Klein
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Goaziou @ 2015-06-23 21:44 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

Robert Klein <roklein@roklein.de> writes:

> I'm not sure how to proceed at the moment, are there other set-ups I
> could test?

Out of curiosity, could you try the following patch?

Regards,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-Fix.patch --]
[-- Type: text/x-diff, Size: 794 bytes --]

From a1156041a3af9b45ad195828a5d79f90c01e9a5f Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Tue, 23 Jun 2015 23:41:30 +0200
Subject: [PATCH] ox: Fix ???

* lisp/ox.el (org-export-as): Refresh regexps after executing Babel
  code.
---
 lisp/ox.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/ox.el b/lisp/ox.el
index f60ff12..9d3552e 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2936,6 +2936,8 @@ Return code as a string."
 	 (org-macro-initialize-templates)
 	 (org-macro-replace-all org-macro-templates nil parsed-keywords)
 	 (org-export-execute-babel-code)
+	 (org-set-regexps-and-options)
+	 (org-update-radio-target-regexp)
 	 ;; Run last hook with current back-end's name as argument.
 	 (goto-char (point-min))
 	 (save-excursion
-- 
2.4.4


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-23 21:44                         ` Nicolas Goaziou
@ 2015-06-24  7:07                           ` Robert Klein
  2015-06-25 13:16                             ` Nicolas Goaziou
  0 siblings, 1 reply; 16+ messages in thread
From: Robert Klein @ 2015-06-24  7:07 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hello,

On Tue, 23 Jun 2015 23:44:10 +0200
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Robert Klein <roklein@roklein.de> writes:
> 
> > I'm not sure how to proceed at the moment, are there other set-ups I
> > could test?
> 
> Out of curiosity, could you try the following patch?


with the patch both the minimal example and my three "big" publishing
projects are published Ok.  That's a nice piece of work.

Any chance for the patch ending up in the org tree?


Thank you very very much!

Best regards
Robert

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: tentative patch Re:  commit found, was: Re:  ECM for:  issues with publishing to LaTeX using #INCLUDE
  2015-06-24  7:07                           ` Robert Klein
@ 2015-06-25 13:16                             ` Nicolas Goaziou
  0 siblings, 0 replies; 16+ messages in thread
From: Nicolas Goaziou @ 2015-06-25 13:16 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Robert Klein <roklein@roklein.de> writes:

> with the patch both the minimal example and my three "big" publishing
> projects are published Ok.  That's a nice piece of work.

TBH, even though I identified a source of bug in this area, I don't
fully understand yet how it relates to your specific issue. In
particular, how "working.org" solves it still puzzles me.

This is probably due to the early call of `org-export-get-environment'.
Alas, since I'm unable to reproduce the problem, I cannot investigate
much further.

> Any chance for the patch ending up in the org tree?

I just pushed a similar patch. Thank you.

Regards,

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-06-25 13:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 18:04 issues with publishing to LaTeX using #INCLUDE Robert Klein
2015-06-18  6:58 ` Robert Klein
2015-06-18  7:15   ` ECM for: " Robert Klein
2015-06-18  7:21     ` Robert Klein
2015-06-18  7:55       ` Nicolas Goaziou
2015-06-18 12:21         ` Robert Klein
2015-06-18 18:51           ` Robert Klein
2015-06-19  7:51             ` commit found, was: " Robert Klein
2015-06-19 18:28               ` tentative patch " Robert Klein
2015-06-20 22:15                 ` Nicolas Goaziou
2015-06-21 12:55                   ` Robert Klein
2015-06-22  8:37                     ` Nicolas Goaziou
2015-06-22 15:01                       ` Robert Klein
2015-06-23 21:44                         ` Nicolas Goaziou
2015-06-24  7:07                           ` Robert Klein
2015-06-25 13:16                             ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).