emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)]
@ 2015-10-21 10:47 ☕◦m̰̱̐y̿q̟̽
  2015-10-21 19:35 ` Rasmus
  2015-10-21 20:05 ` Andreas Leha
  0 siblings, 2 replies; 4+ messages in thread
From: ☕◦m̰̱̐y̿q̟̽ @ 2015-10-21 10:47 UTC (permalink / raw)
  To: emacs-orgmode

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Given the following Org document:

,----
| #+MACRO: refp \autoref{$1}, \autopageref{$1}
|
|
| * section
|
| Please see the results in {{{refp(sec:info)}}}.
|
| * info<<sec:info>>
|
| The results are here.
`----

When exporting to LaTex, I expect `autoref' and `autopageref' to
correctly refer to the target `sec:info'. However, recent versions of
Org do not do that. I now get the following when exporting to LaTeX:

,----
| % Created 2015-10-21 Wed 03:25
| \documentclass[11pt]{article}
| % [...]
| \begin{document}
| % [...]
| \section{section}
| \label{sec:orgheadline1}
|
| Please see the results in \autoref{sec:info}, \autopageref{sec:info}.
|
| \section{info\label{orgtarget1}}
| \label{sec:orgheadline2}
|
| The results are here.
| \end{document}
`----

When compiled, the following warning is issued:

,----
| Latex failed to resolve 2 reference(s)
`----


This did not occur in Org Mode 8.3beta.

                     ------------------------------

Emacs  : GNU Emacs 24.5.1 (i686-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2015-06-01 on toshiba
Package: Org-mode version 8.3.2 (8.3.2-elpaplus @
/home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)

current state:
==============
(setq
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-pretty-entities t
 org-latex-packages-alist '(("" "booktabs" t) ("" "minted" t) ("" "color" nil))
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-drill-optimal-factor-matrix '((1 (2.6 . 4.14) (1.7000000000000002
. 3.44) (1.96 . 3.58)
                                    (2.1799999999999997 . 3.72) (2.36 . 3.86))
                                   )
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-babel-hide-result-toggle-maybe
                      org-babel-header-arg-expand)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info
org-inlinetask org-irc org-mhe org-rmail
               org-w3m org-drill)
 org-cycle-hook '(org-inlinetask-hide-tasks
org-cycle-hide-archived-subtrees org-cycle-hide-drawers
                  org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-fontify-done-headline t
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-font-lock-hook '(org-inlinetask-fontify)
 org-src-lang-modes '(("ocaml" . tuareg) ("elisp" . emacs-lisp)
("ditaa" . artist) ("asymptote" . asy)
                      ("dot" . fundamental) ("sqlite" . sql) ("calc" .
fundamental) ("C" . c)
                      ("cpp" . c++) ("C++" . c++) ("screen" .
shell-script) ("bash" . sh))
 org-html-format-headline-function 'org-html-format-headline-default-function
 org-log-done t
 org-use-sub-superscripts '{}
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-hide-leading-stars t
 org-log-into-drawer t
 org-default-notes-file "notes.org"
 org-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}"
                      ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%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}"))
                     ("report" "\\documentclass[11pt]{report}"
("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("book" "\\documentclass[11pt]{book}"
("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}")
                      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     )
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-src-tab-acts-natively t
 org-export-backends '(ascii beamer html icalendar latex md odt org)
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-latex-tables-booktabs t
 org-latex-default-figure-position "tbp"
 org-use-speed-commands t
 org-mode-hook '((lambda nil (local-set-key "\216" (quote
outline-next-visible-heading))
                  (local-set-key "\220" (quote
outline-previous-visible-heading))
                  (local-set-key "\225" (quote outline-up-heading))
                  (local-set-key "\227" (quote org-table-copy-region))
                  (local-set-key "\231" (quote org-table-paste-rectangle))
                  (local-set-key "\214" (quote org-table-sort-lines))
                  (local-set-key "\311" (quote org-toggle-iimage-in-org)))
                 org-indent-mode
                 (lambda nil "" (set-face-attribute (quote org-macro)
nil :foreground "black"))
                 turn-on-org-cdlatex
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
org-show-block-all append local] 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook
org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes
org-eldoc-load)
 org-latex-pdf-process '("latexmk -pdflatex=xelatex -pdf -quiet %f")
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-directory "~/doc/org"
 org-odt-format-drawer-function '(lambda (name contents) contents)
 org-latex-listings-langs '((emacs-lisp "Lisp") (lisp "Lisp") (clojure
"Lisp") (c "C") (cc "C++")
                            (fortran "fortran") (perl "Perl") (cperl
"Perl") (python "Python")
                            (ruby "Ruby") (html "HTML") (xml "XML")
(tex "TeX") (latex "[LaTeX]TeX")
                            (shell-script "bash") (gnuplot "Gnuplot")
(ocaml "Caml") (caml "Caml")
                            (sql "SQL") (sqlite "sql") (ESS\[S\] "R")
(css "css"))
 org-latex-listings 'minted
 org-font-lock-set-keywords-hook '(org-drill-add-cloze-fontification)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-todo-keywords '((sequence "TODO(t!/!)" "IN-PROGRESS(i!/!)"
"WAIT(w@/!)" "|" "DONE(d!/!)"
                      "REJECT(r@/@)")
                     )
 org-agenda-files '("~/work/review/ltr/2015/The impact of topic
interest, L2 proficiency, and gender on EFL incidental vocabulary
acquisition through reading/review.org" "~/self/4788 N Yale.org"
"~/self/plan/todo.org" "~/doc/notes/comp/computers.org"
"~/www/VS/application/files/dev_todo.org"
"~/proj/Ghostwriting/Write-Book-8363356/log.org"
"~/ed/cur/PhD/thesis/todo.org" "~/doc/reallyenglish/log.org"
"~/ed/cur/PhD/oral exam/presentation.org" "~/doc/org/notes.org"
"~/proj/joann/notes/Green Card application notes.org"
"~/proj/joann/notes/todo.org" "~/todo.org"
"~/self/travel/2015-wgt-akl/tacos.org")
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
                 ("\\.pdf\\'" . "evince %s"))
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
 org-babel-tangle-lang-exts '(("ruby" . "rb") ("python" . "py")
("perl" . "pl") ("latex" . "tex")
                              ("awk" . "awk") ("emacs-lisp" . "el")
("elisp" . "el"))
 org-babel-load-languages '((emacs-lisp . t) (R . t) (awk . t) (css .
t) (js . t) (latex . t) (ledger . t)
                            (makefile . t) (org . t) (perl . t)
(python . t) (ruby . t) (sass . t)
                            (sh . t) (sql . t) (sqlite . t))
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-confirm-shell-link-function 'yes-or-no-p
 )

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

* Re: Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)]
  2015-10-21 10:47 Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] ☕◦m̰̱̐y̿q̟̽
@ 2015-10-21 19:35 ` Rasmus
  2015-10-21 20:05 ` Andreas Leha
  1 sibling, 0 replies; 4+ messages in thread
From: Rasmus @ 2015-10-21 19:35 UTC (permalink / raw)
  To: emacs-orgmode

☕◦m̰̱̐y̿q̟̽ <myqlarson@gmail.com> writes:


> Given the following Org document:
>
> ,----
> | #+MACRO: refp \autoref{$1}, \autopageref{$1}
> |
> |
> | * section
> |
> | Please see the results in {{{refp(sec:info)}}}.
> |
> | * info<<sec:info>>
> |
> | The results are here.
> `----
>
> When exporting to LaTex, I expect `autoref' and `autopageref' to
> correctly refer to the target `sec:info'. However, recent versions of
> Org do not do that. I now get the following when exporting to LaTeX:
>
> ,----
> | % Created 2015-10-21 Wed 03:25
> | \documentclass[11pt]{article}
> | % [...]
> | \begin{document}
> | % [...]
> | \section{section}
> | \label{sec:orgheadline1}
> |
> | Please see the results in \autoref{sec:info}, \autopageref{sec:info}.
> |
> | \section{info\label{orgtarget1}}
> | \label{sec:orgheadline2}
> |
> | The results are here.
> | \end{document}
> `----
>
> When compiled, the following warning is issued:
>
> ,----
> | Latex failed to resolve 2 reference(s)
> `----
>
>
> This did not occur in Org Mode 8.3beta.

Can you try (setq org-latex-prefer-user-labels t).

This works as expected:

     #+MACRO: refp \autoref{$1}, \autopageref{$1}

     * section

     Please see the results in {{{refp(sec:info)}}}.

     * info
     :PROPERTIES:
     :CUSTOM_ID: sec:info
     :END:

     The results are here.

Hope it helps,
Rasmus

-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere

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

* Re: Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)]
  2015-10-21 10:47 Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] ☕◦m̰̱̐y̿q̟̽
  2015-10-21 19:35 ` Rasmus
@ 2015-10-21 20:05 ` Andreas Leha
  2015-10-22  6:15   ` [Not a] Bug : LaTeX export: internal target + \autoref{}broken [8.3.2 (8.3.2-elpaplus <at> /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] ☕◦m̰̱̐y̿q̟̽
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Leha @ 2015-10-21 20:05 UTC (permalink / raw)
  To: emacs-orgmode

Hi ☕◦m̰̱̐y̿q̟̽,


☕◦m̰̱̐y̿q̟̽ <myqlarson@gmail.com> writes:
>
> Given the following Org document:
>
> ,----
> | #+MACRO: refp \autoref{$1}, \autopageref{$1}
> |
> |
> | * section
> |
> | Please see the results in {{{refp(sec:info)}}}.
> |
> | * info<<sec:info>>
> |
> | The results are here.
> `----
>
> When exporting to LaTex, I expect `autoref' and `autopageref' to
> correctly refer to the target `sec:info'. However, recent versions of
> Org do not do that. I now get the following when exporting to LaTeX:
>
> ,----
> | % Created 2015-10-21 Wed 03:25
> | \documentclass[11pt]{article}
> | % [...]
> | \begin{document}
> | % [...]
> | \section{section}
> | \label{sec:orgheadline1}
> |
> | Please see the results in \autoref{sec:info}, \autopageref{sec:info}.
> |
> | \section{info\label{orgtarget1}}
> | \label{sec:orgheadline2}
> |
> | The results are here.
> | \end{document}
> `----
>
> When compiled, the following warning is issued:
>
> ,----
> | Latex failed to resolve 2 reference(s)
> `----
>
>
> This did not occur in Org Mode 8.3beta.
>

Please see `org-latex-prefer-user-labels'.

Best,
Andreas

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

* Re: [Not a] Bug : LaTeX export: internal target + \autoref{}broken [8.3.2 (8.3.2-elpaplus  <at>  /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)]
  2015-10-21 20:05 ` Andreas Leha
@ 2015-10-22  6:15   ` ☕◦m̰̱̐y̿q̟̽
  0 siblings, 0 replies; 4+ messages in thread
From: ☕◦m̰̱̐y̿q̟̽ @ 2015-10-22  6:15 UTC (permalink / raw)
  To: emacs-orgmode

Andreas Leha <andreas.leha <at> med.uni-goettingen.de> and Rasmus <rasmus 
<at> gmx.us> write:

> ☕◦m̰̱̐y̿q̟̽ <myqlarson <at> gmail.com> writes:
> >
> > Given the following Org document:
> >
> > ,----
> > | #+MACRO: refp \autoref{$1}, \autopageref{$1}
> > |
> > |
> > | * section
> > |
> > | Please see the results in {{{refp(sec:info)}}}.
> > |
> > | * info<<sec:info>>
> > |
> > | The results are here.
> > `----
[...]
> > ,----
> > | Latex failed to resolve 2 reference(s)
> > `----
> >
> >
> > This did not occur in Org Mode 8.3beta.
> >
> 
> Please see `org-latex-prefer-user-labels'.

Andreas & Rasmus,

Thank you.

That new variable was the issue. Strangely, the documentation notes that it 
was introduced in Emacs 25.1 but I'm running 24.5.1.

Now that I know what variable to look for, I can see that other people have 
had the same problem.

Please ignore my bug report.

Myq

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

end of thread, other threads:[~2015-10-22  6:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-21 10:47 Bug: LaTeX export: internal target + \autoref{} broken [8.3.2 (8.3.2-elpaplus @ /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] ☕◦m̰̱̐y̿q̟̽
2015-10-21 19:35 ` Rasmus
2015-10-21 20:05 ` Andreas Leha
2015-10-22  6:15   ` [Not a] Bug : LaTeX export: internal target + \autoref{}broken [8.3.2 (8.3.2-elpaplus <at> /home/myq/.emacs.d/elpa/org-plus-contrib-20150929/)] ☕◦m̰̱̐y̿q̟̽

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).