1

My exported pdf and and .tex file both include a name inherited from the logged-in unix account, I am having trouble over-riding this setting with #+LATEX_HEADER: \author {} in the .org file.

Watch for Tom Smith vs. Joe Brown in this code. The question is, where does org-mode derive the Tom Smith from? my .bib file includes the lines at the top, I don't see any setting to explain this.

% This BibTeX bibliography file was created using BibDesk.
% Created for Tom Smith at YYYY day t
% Saved with string encoding Unicode (UTF-8) 

my .org file says

#+LATEX_HEADER:\author{Joe Brown}

When I look in the exported .tex it has 2 lines

\author{Joe Brown}
\author{Tom Smith}

the compiled pdf features Tom Smith Where does org-mode get the \author field from if it's not declared in

#+LATEX_HEADER:\author{} ?

Is it coming from ~/.emacs.d/.init.d ? Neither Tom Smith nor author are anywhere in my .spacemacs.

2

Each export back-end has AUTHOR keyword, associated with global variable user-full-name. If it's empty, the \author will not be exported. You could redefine it into the file (buffer) with

#+AUTHOR: Joe Brown

This will set only one \author, which is defined into the buffer even if the user-full-name is not empty.

Org didn't check that you define author with LATEX_HEADER: \author, it just outputs these lines.

  • I'm not sure if I understand you correctly, but if I don't put Joe Brown in the .org there is \author{Tom Smith} in the .tex (that it's pulling from the os) If I do put Joe Brown in the .org the .tex has \author{Joe Brown} first and \author{Tom Smith} on the next line. The outputted .pdf shows the 2nd value (from the os) whether than the attempted override from the .org. – בנימן הגלילי Dec 22 '16 at 11:23
  • 1
    If you interested why LaTeX use second author, that's because it redefine first occurrence. You need to remove your LATEX_HEADER: \author... and put into the org file only AUTHOR: ... – Konstantin Morenko Dec 22 '16 at 12:22
-2

Emacs documentation:

M-x describe variable user-full-name

user-full-name is a variable defined in ‘C source code’. Its value is "Tom Smith" :: The full name of the user logged in.

You can customize this variable.
solution: Click on customize and change to Joe Brown inside emacs.

further explanation: the full name of the logged in user is not the same as your short-account-name. It can be obtained from a shell prompt by:

finger `whoami` | awk -F: '{ print $3 }' | head -n1 | sed 's/^ //'

If you desire the pdfs you write in org mode to have a different name than your unix user full name, you can override the value inherited from the os.

  • This doesn't answer the question in a meaningful way – Dodgie Dec 18 '16 at 17:17
  • 1
    Which is really funny, because I just noticed that you're also the one who asked the question – Dodgie Dec 18 '16 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.