jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.36k stars 242 forks source link

the `bibliographystyle` link broken when export to pdf #328

Closed et2010 closed 7 years ago

et2010 commented 7 years ago

I'm using Org 9.0, it seems the bibliographystyle link is not parsed correctly and \bibliographystyle command is missing in the resulting tex file. It used to work before updating to Org 9.0.

jkitchin commented 7 years ago

hm. I can't reproduce this with org 9.0. Can you provide any more details?

et2010 commented 7 years ago

System Info :computer:

(helm
 (auto-completion :disabled-for org)
 better-defaults c-c++ emacs-lisp evil-snipe git github latex bibtex markdown
 (org :variables org-projectile-file "TODOs.org")
 org-config
 (han :variables han-enable-youdao-dict t han-enable-fcitx t han-org-line-spacing 0.2)
 html pandoc pdf-tools python pfc-fish
 (shell :variables shell-default-height 30 shell-default-position 'bottom)
 shell-scripts spell-checking syntax-checking version-control yaml)
et2010 commented 7 years ago

And here is my (async) export settings:

(require 'package)
(setq package-enable-at-startup nil)
(package-initialize)
(require 'org)
(require 'ox)
(require 'ox-beamer)
(require 'ox-latex)
(require 'ox-extra)
(require 'org-ref)
(ox-extras-activate '(ignore-headlines))
(setq org-export-allow-bind-keywords t)
(setq org-export-before-processing-hook nil)
;; Disable file time stamp. if not, it'll be in the first (comment) line
(setq org-export-time-stamp-file nil)
(setq org-export-with-date t)
(setq org-confirm-babel-evaluate nil)
(setq org-latex-listings 'listings)
(setq org-latex-listings-options
      '(("basicstyle" "\\small\\ttfamily")
        ("breaklines" "true")
        ("captionpos" "b")
        ("extendedchars" "true")
        ("tabsize" "4")
        ("columns" "fixed")
        ("keepspaces" "true")
        ("showstringspaces" "false")
        ("breaklines" "true")
        ("frame" "tb")
        ("framerule" "0.5pt")
        ("framexleftmargin" "0.5em")
        ("framexrightmargin" "0.5em")
        ("xleftmargin" "0.5em")
        ("xrightmargin" "0.5em")
        ("mathescape" "false")
        ("escapeinside" "{\\%*}{*)}")
        ("showspaces" "false")
        ("showstringspaces" "false")
        ("numbers" "none")
        ("numberstyle" "\\tiny\\ttfamily")
        ("commentstyle" "\\crRed")
        ("keywordstyle" "\\crBlue\\bfseries")
        ("stringstyle" "\\crGreen")
        ))
(setq org-latex-pdf-process
      '("latexmk -pdflatex='pdflatex -file-line-error -synctex=1 -interaction batchmode' -pdf %f"))
(org-babel-do-load-languages
 'org-babel-load-languages
 '(;(R . t)
   (dot . t)
   (emacs-lisp . t)
   (latex . t)
   (org . t)
   (sh . t)))
(setq org-latex-packages-alist nil)
(add-to-list 'org-latex-packages-alist '("fontset=windowsnew,zihao=5,UTF8" "ctex"))
;; (add-to-list 'org-latex-packages-alist '("comma,sort&compress,square,super" "natbib"))
(add-to-list 'org-latex-packages-alist '("usenames,dvipsnames,svgnames" "xcolor"))
(add-to-list 'org-latex-packages-alist '("" "amsmath"))
(add-to-list 'org-latex-packages-alist '("" "chronology"))
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "graphicx"))
(add-to-list 'org-latex-packages-alist '("" "CJKulem"))
(add-to-list 'org-latex-packages-alist '("" "hyperref"))
(add-to-list 'org-latex-packages-alist '("" "setspace"))
(add-to-list 'org-latex-packages-alist '("" "tabulary"))
(add-to-list 'org-latex-packages-alist '("" "cite"))
(add-to-list 'org-latex-packages-alist '("" "siunitx"))
(add-to-list 'org-latex-packages-alist '("labelfont=bf,labelsep=period,justification=raggedright" "caption"))
;; (add-to-list 'org-latex-packages-alist '("" "mathptmx"))
(setq org-latex-tables-booktabs t)
;; (setq org-latex-title-command
;;       "\\title{%t}\n\\subtitle{%s}\n\\date{\\today}\n\\author{\\texttt{by %a}}\n\\institute{Made in \\textit{机构}}\n\\maketitle")
(setq org-latex-remove-logfiles nil)
(setq org-latex-toc-command "\\tableofcontents\n\n")
(setq org-latex-classes nil)

(add-to-list 'org-latex-classes
             '("zh-beamer-devel"
               "%&header
\\documentclass[xcolor={usenames,dvipsnames,svgnames},newPxFont,t]{beamer}
\\usetheme{sthlm}
[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]

%% symbol explanation list
\\newenvironment{conditions}[1][where:]
{#1 \\begin{tabular}[t]{>{$}l<{$} @{} >{${}}c<{{}$} @{} l}}
{\\end{tabular}\\\\[\\belowdisplayskip]}

\\definecolor{eclipseBlue}{RGB}{42,0.0,255}
\\definecolor{eclipseGreen}{RGB}{0,100,0}
\\definecolor{eclipsePurple}{RGB}{127,0,85}
%\\lstloadlanguages{[LaTeX]TeX}
\\renewcommand{\\event}[3][e]{%
  \\pgfmathsetlength\\xstop{(#2-\\theyearstart)*\\unit}%
  \\ifx #1e%
    \\draw[fill=black,draw=none,opacity=0.5]%
      (\\xstop, 0) circle (.2\\unit)%
      node[opacity=1,rotate=45,right=.2\\unit] {#3};%
  \\else%
    \\pgfmathsetlength\\xstart{(#1-\\theyearstart)*\\unit}%
    \\draw[fill=black,draw=none,opacity=0.5,rounded corners=.1\\unit]%
      (\\xstart,-.1\\unit) rectangle%
      node[opacity=1,rotate=45,right=.2\\unit] {#3} (\\xstop,.1\\unit);%
  \\fi}%
\\hypersetup{
colorlinks,
linkcolor   = {red!50!black},
citecolor   = {blue!50!black},
urlcolor    = {blue!80!black}
}
\\sisetup{
range-phrase  = --,
input-symbols = \\pi
}
\\title{English for Traffic Engineering}
\\subtitle{sthlm v1.0.0 is based on hsrm \\& mTheme}
%\\date{\\small{\\jobname}}
\\date{\\today}
\\author{\\kaishu{作者}}
\\institute{Made in \\textit{China}}
\\csname
endofdump\\endcsname
%% END MACROS SECTION"
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
))
et2010 commented 7 years ago

@jkitchin The bibliography link works fine, and the export backend is beamer.

edit: The broken link is like this: bibliographystyle:gbt-7714-2015-numerical

edit2: I tried other style, the issue remains.

jkitchin commented 7 years ago

Ah. this never worked I imagine, there is no beamer format defined for bibliographystyle. I just pushed a fix I think.

et2010 commented 7 years ago

Thanks! It works now.