;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl-lib) #@117 Return bibliography file as a string. KEYWORD is a "BIBLIOGRAPHY" keyword. If no file is found, return nil instead. (defalias 'org-bibtex-get-file #[(keyword) "\302\211;\203\303\304#\266\202\202\305A@\"\266\202\211\205)\306\307 \"\205)\310\311 \")\207" [keyword value :value get-text-property 0 plist-get string-match "\\(\\S-+\\)[ ]+\\(\\S-+\\)\\(.*\\)" match-string 1] 7 (#$ . 106)]) #@119 Return bibliography style as a string. KEYWORD is a "BIBLIOGRAPHY" keyword. If no style is found, return nil instead. (defalias 'org-bibtex-get-style #[(keyword) "\302\211;\203\303\304#\266\202\202\305A@\"\266\202\211\205)\306\307 \"\205)\310\311 \")\207" [keyword value :value get-text-property 0 plist-get string-match "\\(\\S-+\\)[ ]+\\(\\S-+\\)\\(.*\\)" match-string 2] 7 (#$ . 512)]) #@284 Return "bibtex2html" arguments specified by the user. KEYWORD is a "BIBLIOGRAPHY" keyword. Return value is a plist containing `:options' and `:limit' properties. The former contains a list of strings to be passed as options to "bibtex2html" process. The latter contains a boolean. (defalias 'org-bibtex-get-arguments #[(keyword) "\306\211;\203\307\310#\266\202\202\311A@\"\266\202\211\205l\312\313 \"\205l\314\211\315\316\317 \"!\314\211\203c @\315\f\320\"\211@A@\321\267\202[ \322\232?\202[ B+ A\211\2046\314\323 \237\324\nF,)\207" [keyword value limit options arg --dolist-tail-- :value get-text-property 0 plist-get string-match "\\(\\S-+\\)[ ]+\\(\\S-+\\)\\(.*\\)" nil split-string match-string 3 ":" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("limit" 79 "option" 87)) "nil" :options :limit s key] 7 (#$ . 921)]) #@36 Non-nil when OBJECT is a citation. (defalias 'org-bibtex-citation-p #[(object) "\211:\204\211;\205\302\262\202\211@9\205\211@\262\211\303\267\202_\304\211;\2033\305\306#\266\202\202;\307A@\"\266\202\310\232\202`\311\312\313\211;\203S\305\306#\266\202\202[\307A@\"\266\202\"\202`\314)\207" [object #1=#:temp plain-text #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (link 34 latex-fragment 64)) :type get-text-property 0 plist-get "cite" string-match "\\`\\\\cite{" :value nil] 9 (#$ . 1828)]) #@149 Return key for a given citation, as a string. CITATION is a `latex-fragment' or `link' type object satisfying to `org-bibtex-citation-p' predicate. (defalias 'org-bibtex-get-citation-key #[(citation) "\211:\204\211;\205\302\262\202\211@9\205\211@\262\303=\2034\304\211;\203-\305\306#\207\307A@\"\207\310\211;\203E\305\306#\266\202\202M\307A@\"\266\202\311\312 \"\205Z \306\225\313O)\207" [citation value plain-text link :path get-text-property 0 plist-get :value string-match "\\`\\\\cite{" -1] 6 (#$ . 2395)]) #@29 Org file of BibTeX entries. (defvar org-bibtex-file nil (#$ . 2939)) #@32 Visit a citation given its ID. (defalias 'org-bibtex-goto-citation #[(&optional citation) "\206 \303\304\305 \"\306 \206\307\310!!\210\311\312\"\211\205!\nb\210\313*\207" [citation org-bibtex-file position completing-read "Citation: " obe-citations find-file error "`org-bibtex-file' has not been configured" org-find-property "CUSTOM_ID" t] 4 (#$ . 3014) nil]) (byte-code "\301\302\303\"@\304\305\"\210)\301\207" [jump-fn cl-remove-if-not fboundp (ebib org-bibtex-goto-citation) org-add-link-type "cite"] 3) #@87 Send each bibliography in parse tree to "bibtex2html" process. Return new parse tree. (defalias 'org-bibtex-process-bib-files #[(tree backend info) "\304\305\306#\203\307\211\310 \311\312#\210 \207" [backend org-bibtex-html-entries-alist org-bibtex-html-keywords-alist tree org-export-derived-backend-p ascii html nil org-element-map keyword #[(keyword) "\306\211;\203\307\310#\266\202\202\311A@\"\266\202\312\232\205\273\313!\314!\315\211\316 !\317\232\2038\320 !\2029 \320\321 !!\311\f\322\"\203\211\323 \324\325#@\326\327!\211\330\331\332\"AB\333\216rAq\210\334\335@\336#c\210)rAq\210\337\315\211B\315\310%\210,\340\f\341\342\311\f\341\"\343\nD\"#)\344\345\342\346\347\350\351!!\211C\205\235\352CD)\311\f\341\" \353PC%\"\310=\204\261\354\355!\210\n\203\271\356\n!\210\330\357\332\"DrDq\210\360\216\361 \362P!\210eb\210\363\364\315\332#\203\346\365\366!\365\367!BEBE\202\317+\330\357\332\"FrFq\210\370\216\371G\372\"\203\373\374\375\376\377H#\"c\210\361 \362P!\210db\210\201Jc\210\202\255\371G\201K\"\203\255\345\201L\315\211\211 \362P\201M \201NP&\310=\204A\354\201O!\210\373\201P\375\376\201Q\373\201R\311H\201S\"\"!H#\"c\210\361 \201NP!\210eb\210\363\201T\315\332#\203}\201U\201V!\210\202heb\210\363\201W\315\332#\203\225\201U\201V!\210\202\200eb\210\363\201X\315\332#\203\255\201U\201Y!\210\202\230\201Z BIB\211I.\207" [keyword out-file temp-file file arguments tree :key get-text-property 0 plist-get "BIBLIOGRAPHY" org-bibtex-get-arguments org-bibtex-get-file nil file-name-extension "bib" file-name-sans-extension file-name-nondirectory :limit org-element-map (latex-fragment link) #[(object) "\301!\205 \302!\207" [object org-bibtex-citation-p org-bibtex-get-citation-key] 2] make-temp-file "ox-bibtex" generate-new-buffer " *temp file*" t #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] mapconcat identity "\n" write-region plist-put :options append "-citefile" apply call-process ("bibtex2html" nil nil nil) ("-a" "-nodoc" "-noheader" "-nofooter") org-not-nil org-bibtex-get-style "--style" ".bib" error "Executing bibtex2html failed" delete-file " *temp*" #[nil "\301!\205 \302!\207" [#2=#:temp-buffer buffer-name kill-buffer] 2] insert-file-contents ".html" re-search-forward "a name=\"\\([-_a-zA-Z0-9:]+\\)\">\\([^<]+\\)" match-string 1 2 #[nil "\301!\205 \302!\207" [#3=#:temp-buffer buffer-name kill-buffer] 2] org-export-derived-backend-p html format "
\n

%s

\n" org-export-translate "References" :html citations #1# #4=#:temp-file style #2# org-bibtex-html-entries-alist #3# backend info org-bibtex-html-keywords-alist "\n
" ascii "pandoc" "-o" ".txt" "Executing pandoc failed" "%s\n==========\n\n" intern ":%s" :ascii-charset "\\[ \\[bib\\][^ ]+ \\(\\]\\||[\n ]\\)" replace-match "" "\\( \\]\\| \\]\\| |\\)" "[\n ]\\([\n ][\n ]\\)" "\\1" buffer-string] 11]] 5 (#$ . 3539)]) #@325 Merge all contiguous citation in parse tree. As a side effect, this filter will also turn all "cite" links into "\cite{...}" LaTeX fragments and will extract options. Cite options are placed into square brackets at the beginning of the "\cite" command for the LaTeX backend, and are removed for the HTML and ASCII backends. (defalias 'org-bibtex-merge-contiguous-citations #[(tree backend info) "\302\303\304\305$\203\306 \307\310#\210 \207" [backend tree org-export-derived-backend-p html latex ascii org-element-map (link latex-fragment) #[(object) "\306!\205\336\307\310\311\312\211\211;\203\313\314#\266\202\202#\315A@\"\266\202FD\316\317\n\"\210\320!C\316\321 \"\211\203m ;\203S\322 \316\323\324#)\266\203\203Y\306 !\203m ;\204d\320 !\fB\325!\210 \2024\326\327\f\"\325!\210\n\312\211\211;\203\211\313\314#\266\202\202\221\315A@\"\266\202;\203\241\330\316$\266\202\257A\331A@#\240\210\266\n\310\332\333 \206\270\311\334\335\f\237\336##;\203\317\330\316$\266\203\202\335A\331A@#\240\210\266\203,\207" [object option new-citation next keys info org-bibtex-citation-p latex-fragment :value "" :post-blank get-text-property 0 plist-get nil org-element-insert-before org-bibtex-get-citation-key org-export-get-next-element "\\S-" t string-match org-element-extract-element mapcar #[(k) "\303\304\"\203\305 \306\"\203\307\310\311\312\"\"\311\313\"\207\207" [k backend option string-match "^(\\([^)]+\\))\\(.*\\)" org-export-derived-backend-p latex format "[%s]" match-string 1 2] 5] org-add-props plist-put format "\\cite%s{%s}" mapconcat identity "," inhibit-changing-match-data] 10]] 5 (#$ . 6511)]) (byte-code "\300\301\302\"\210\303\304\305\306\307$\210\310\304!\207" [eval-after-load ox #[nil "\301>\204\n\301B\302>\203\207\302B\211\207" [org-export-filter-parse-tree-functions org-bibtex-process-bib-files org-bibtex-merge-contiguous-citations] 2] ad-add-advice org-latex-keyword (bibtex-keyword nil t (advice lambda nil "Translate \"BIBLIOGRAPHY\" keywords into LaTeX syntax.\nFallback to `latex' back-end for other keywords." (let ((keyword (ad-get-arg 0))) (if (not (equal (org-element-property :key keyword) "BIBLIOGRAPHY")) ad-do-it (let ((file (org-bibtex-get-file keyword)) (style (org-not-nil (org-bibtex-get-style keyword)))) (setq ad-return-value (when file (concat (and style (format "\\bibliographystyle{%s}\n" style)) (format "\\bibliography{%s}" file))))))))) around nil ad-activate] 5) (defvar org-bibtex-html-entries-alist nil) (defvar org-bibtex-html-keywords-alist nil) (byte-code "\300\301\302\303\304$\210\300\305\306\303\304$\210\307\301!\210\307\305!\210\300\310\311\303\304$\210\300\312\313\303\304$\210\307\310!\210\307\312!\210\314\315!\207" [ad-add-advice org-html-keyword (bibtex-keyword nil t (advice lambda nil "Translate \"BIBLIOGRAPHY\" keywords into HTML syntax.\nFallback to `html' back-end for other keywords." (let ((keyword (ad-get-arg 0))) (if (not (equal (org-element-property :key keyword) "BIBLIOGRAPHY")) ad-do-it (setq ad-return-value (cdr (assq keyword org-bibtex-html-keywords-alist))))))) around nil org-html-latex-fragment (bibtex-citation nil t (advice lambda nil "Translate \"\\cite\" LaTeX fragments into HTML syntax.\nFallback to `html' back-end for other keywords." (let ((fragment (ad-get-arg 0))) (if (not (org-bibtex-citation-p fragment)) ad-do-it (setq ad-return-value (format "[%s]" (mapconcat (lambda (key) (format "%s" key (or (cdr (assoc key org-bibtex-html-entries-alist)) key))) (org-split-string (org-bibtex-get-citation-key fragment) ",") ","))))))) ad-activate org-ascii-keyword (bibtex-keyword nil t (advice lambda nil "Translate \"BIBLIOGRAPHY\" keywords into ascii syntax.\nFallback to `ascii' back-end for other keywords." (let ((keyword (ad-get-arg 0))) (if (not (equal (org-element-property :key keyword) "BIBLIOGRAPHY")) ad-do-it (setq ad-return-value (cdr (assq keyword org-bibtex-html-keywords-alist))))))) org-ascii-latex-fragment (bibtex-citation nil t (advice lambda nil "Translate \"\\cite\" LaTeX fragments into ascii syntax.\nFallback to `ascii' back-end for other keywords." (let ((fragment (ad-get-arg 0))) (if (not (org-bibtex-citation-p fragment)) ad-do-it (setq ad-return-value (format "[%s]" (mapconcat (lambda (key) (or (cdr (assoc key org-bibtex-html-entries-alist)) key)) (org-split-string (org-bibtex-get-citation-key fragment) ",") ","))))))) provide ox-bibtex] 5)