0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-08-23 04:48:39 +00:00
org-mode/lisp
Noorul Islam 5324802839 Internal links in LaTeX export
Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Oct 29, 2010, at 5:22 AM, Jambunathan K wrote:
>
>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>
>>> Aloha Jambunathan K.,
>>>
>>> Yes, thanks for that suggestion.  It should work on your example, but
>>> it breaks external links, like this:
>>>
>>> \hyperref[http://www.ctan.org/tex-archive/macros/latex/contrib/koma-script/
>>> ]{KOMA-script}
>>>
>>> External links require the \href{}{} command.  It appears the LaTeX
>>> export process no longer distinguishes internal and external links,
>>> as
>>> I believe it used to do.
>>>
>>
>> This is the problematic commit:
>>
>> commit f5918bdcc0
>> parent	df5894cdcb
>> Date:   Sun Oct 17 08:29:51 2010 +0000
>>
>>    LaTeX export: use org-export-latex-hyperref-format
>
> I have just reverted this commit.
>
> - Carsten
>
Looks like time to change the variable name which is actually confusing.

Since href and hyperref are two different things, I renamed the existing
`org-export-latex-hyperref-format' variable as
`org-export-latex-href-format' and introduced a new one
`org-export-latex-hyperref-format'.

* org-latex.el (org-export-latex-hyperref-format): New option.
(org-export-latex-href-format): Renamed the existing variable
`org-export-latex-hyperref-format' as `org-export-latex-href-format'
(org-export-latex-links): Use `org-export-latex-hyperref-format' and
`org-export-latex-href-format'

Thanks and Regards
Noorul

>>
>>    * lisp/org-latex.el (org-export-latex-links) : Replaced hard coded
>>    hyperref format with custom
>>      variable `org-export-latex-hyperref-format'
>>
>> Note that href is not same as hyperref.
>>
>> Jambunthan K.
>>
>>
>>> All the best,
>>> Tom
>>>
>>> On Oct 28, 2010, at 3:30 PM, Jambunathan K wrote:
>>>
>>>>
>>>> Thomas
>>>>
>>>> There was a hint at possible solution (or atleast a partial
>>>> solution) in
>>>> my original post. Did you try it before jumping in to rough waters
>>>> or
>>>> digging deeper?
>>>>
>>>> Do
>>>>
>>>> ,----
>>>> | M-x customize-variable RET org-export-latex-hyperref-format'
>>>> `----
>>>>
>>>> so that your .emacs has an entry like this
>>>>
>>>> ,---- [.emacs]
>>>> |
>>>> | (custom-set-variables
>>>> |  '(org-export-latex-hyperref-format "\\hyperref[%s]{%s}"))
>>>> |
>>>> `----
>>>>
>>>> The above setting solves the problem for me with the following
>>>> simple
>>>> Org file.
>>>>
>>>> * Heading1
>>>> Make this section as large as possible so that it fills atleast a
>>>> page.
>>>>
>>>> * Heading2
>>>> Links to [[Heading1]]
>>>>
>>>> Jambunathan K.
>>>>
>>>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>>>
>>>>> On Oct 28, 2010, at 12:35 PM, Nick Dokos wrote:
>>>>>
>>>>>> Thomas S. Dye <tsd@tsdye.com> wrote:
>>>>>>
>>>>>>> On Oct 28, 2010, at 11:01 AM, Jambunathan K wrote:
>>>>>>>
>>>>>>>
>>>>>>>  This is a regression. release-7.01h is good. HEAD is bad. I get
>>>>>>> the
>>>>>>>  following line with release-7.01h.<
>>>>>>>
>>>>>>>   Links to \hyperref[sec-1]{Heading1}
>>>>>>>
>>>>>>>  Jambunathan K.
>>>>>>>
>>>>>>> Aloha Jambunathan K.,
>>>>>>>
>>>>>>> Very many thanks for this information.  I have Org-mode version
>>>>>>> 7.01trans
>>>>>>> (release_7.01h.880.g7531f).  I take it the problem I'm having is
>>>>>>> due to a relatively recent change
>>>>>>> to Org-mode.  If there is anything I can do to help isolate the
>>>>>>> problem, please let me know.
>>>>>>>
>>>>>>
>>>>>> Tom,
>>>>>>
>>>>>> If you have the time and the inclination, you might try bisecting
>>>>>> your
>>>>>> way through. Bisecting org-mode problems is actually a very good
>>>>>> way
>>>>>> to
>>>>>> practice because the turnaround time is very small.
>>>>>>
>>>>>> Prerequisites:
>>>>>>
>>>>>> * you have a clone of the org-mode git repository.
>>>>>>
>>>>>> * you have an org test file.
>>>>>>
>>>>>>
>>>>>> Steps:
>>>>>>
>>>>>> * [optional, but it makes me feel a little safer] create a test
>>>>>> branch
>>>>>> and switch to it:
>>>>>>
>>>>>> git checkout -b test-branch master
>>>>>>
>>>>>> * I clean out all the compiled files while doing a bisection: it's
>>>>>> quicker
>>>>>> than regenerating them every time and I don't have to worry (much)
>>>>>> about
>>>>>> emacs loading a wayward .elc file:
>>>>>>
>>>>>> make clean
>>>>>>
>>>>>> * start the bisection and tell git which commit is known good and
>>>>>> which is known bad:
>>>>>>
>>>>>> git bisect start
>>>>>>
>>>>>> # current version is bad
>>>>>> git bisect bad
>>>>>>
>>>>>> # release_7.01h was good - I got the name with ``git tag''
>>>>>> git bisect good release_7.01h
>>>>>>
>>>>>> That checks out a revision half-way in between the bad and good
>>>>>> commits: since
>>>>>> there are about 900 commits in between, you'll be at approx the
>>>>>> 450-
>>>>>> mark and it
>>>>>> should take about 10 bisections to get it down to a single commit.
>>>>>>
>>>>>> * LOOP Now all you have to do is repeat the following steps:
>>>>>>
>>>>>> # since you did ``make clean'' you don't have to worry about .elc
>>>>>> files
>>>>>> # just reload all the .el files.
>>>>>> M-x org-reload
>>>>>>
>>>>>> visit your org test file, export to LaTeX, check for \href/
>>>>>> \hyperref (or
>>>>>> whatever other telltale sign shows badness/goodness).
>>>>>>
>>>>>> # tell git about it
>>>>>> git bisect good *OR* git bisect bad
>>>>>>
>>>>>> This last step will check out another revision and in about 10
>>>>>> repetitions
>>>>>> of the loop, you are done.
>>>>>>
>>>>>> * Tell git you are done, so it can clean up:
>>>>>>
>>>>>> git bisect reset
>>>>>>
>>>>>> Theoretically, you could do all of this in your master branch
>>>>>> without
>>>>>> creating a test-branch and this last step will reset everything to
>>>>>> the
>>>>>> way it was before ``git start''.
>>>>>>
>>>>>> * Post the offending commit to the list.
>>>>>>
>>>>>> * Get back to your master branch:
>>>>>>
>>>>>> git checkout master
>>>>>>
>>>>>> * If you created a test-branch, clean it out:
>>>>>>
>>>>>> git branch -d test-branch
>>>>>>
>>>>>> * [Optional] Recreate your .elc files and reload them:
>>>>>>
>>>>>> make
>>>>>> M-x org-reload
>>>>>>
>>>>>>
>>>>>> And that's it: a half-hour of fun and games. Unless of course, you
>>>>>> hit upon a revision that is neither good nor bad (in the above
>>>>>> restricted
>>>>>> sense): you might get some other problem that prevents you from
>>>>>> being
>>>>>> able to answer. That might or might not be easy to resolve, so
>>>>>> I'll
>>>>>> leave that as an advanced topic (truth be told, I came up against
>>>>>> this
>>>>>> situation a couple of days ago and I didn't know how to proceed:
>>>>>> so
>>>>>> it's ignorance more than anything else that prevents me from
>>>>>> saying
>>>>>> anything more).
>>>>>>
>>>>>> If you want to try, I'd be happy to answer questions - I might try
>>>>>> the
>>>>>> bisection later on tonight myself in any case. And btw, this is of
>>>>>> course archeology of a different (and much easier) kind, so I
>>>>>> imagine
>>>>>> you'll take to it like a fish in water :-)
>>>>>>
>>>>>> HTH,
>>>>>> Nick
>>>>>
>>>>> Hi Nick,
>>>>>
>>>>> Irresistible hook at the end there.  I wish this stuff were as easy
>>>>> as
>>>>> archaeology is for me.  Your instructions are terrific, though.
>>>>>
>>>>> I did hit on a revision that was neither good nor bad:
>>>>>
>>>>> commit 8562273b27
>>>>> Author: Eric Schulte <schulte.eric@gmail.com>
>>>>> Date:   Sat Oct 16 13:21:47 2010 -0600
>>>>>
>>>>>   ob-ref: don't forget arguments to referenced code blocks
>>>>>
>>>>>   * lisp/ob-ref.el (org-babel-ref-resolve): bringing the referent
>>>>>     arguments back to their params before evaluation
>>>>>
>>>>> This one puts these lines in *Messages* when I export to LaTeX
>>>>>
>>>>> executing Org code block...
>>>>> if: Symbol's value as variable is void: result-type
>>>>>
>>>>> I tried using different commits for the initial git bisect good,
>>>>> hoping that would skip by the problem, but this one appears to have
>>>>> stuck around a while.  My other two tries both ended with this same
>>>>> error, but with different commits.
>>>>>
>>>>> I'm not sure what to do next.  This problem isn't yielding to my
>>>>> archaeo-logic. :)
>>>>>
>>>>> All the best,
>>>>> Tom
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
2010-11-12 23:54:06 -06:00
..
ob-asymptote.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-C.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-calc.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-clojure.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-comint.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-css.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-ditaa.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-dot.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-emacs-lisp.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-eval.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-exp.el passing header arguments through to called code blocks 2010-11-08 14:18:33 -07:00
ob-gnuplot.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-haskell.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-js.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-keys.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-latex.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-ledger.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-lisp.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-lob.el passing header arguments through to called code blocks 2010-11-08 14:18:33 -07:00
ob-matlab.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-mscgen.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-ocaml.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-octave.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-org.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-perl.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-plantuml.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-python.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-R.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-ref.el passing header arguments through to called code blocks 2010-11-08 14:18:33 -07:00
ob-ruby.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-sass.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-scheme.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-screen.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-sh.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-sql.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-sqlite.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-table.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob-tangle.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
ob.el passing header arguments through to called code blocks 2010-11-08 14:18:33 -07:00
org-agenda.el Use lower case for AM/PM 2010-11-12 16:59:39 -06:00
org-archive.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-ascii.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-attach.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-bbdb.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-beamer.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-bibtex.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-capture.el Remove the autoload for org-capture-templates 2010-11-12 16:26:48 -06:00
org-clock.el org-clock.el: fix small typos and a small bug. 2010-11-11 17:43:52 +01:00
org-colview-xemacs.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-colview.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-compat.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-crypt.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-ctags.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-datetree.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-docbook.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-docview.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-entities.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-exp-blocks.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-exp.el Remove hard-wired configuration of latex minted export 2010-11-12 11:00:44 +00:00
org-faces.el New option to stop level nine headline to use level 1 face 2010-11-12 13:37:38 -06:00
org-feed.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-footnote.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-freemind.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-gnus.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-habit.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-html.el Fix partial line protection issue 2010-11-12 07:18:09 -06:00
org-icalendar.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-id.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-indent.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-info.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-inlinetask.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-irc.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-jsinfo.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-latex.el Internal links in LaTeX export 2010-11-12 23:54:06 -06:00
org-list.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mac-message.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-macs.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mew.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mhe.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mks.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mobile.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-mouse.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-plot.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-protocol.el Normalize percent escape sequence to upper case letters 2010-11-10 21:11:17 +01:00
org-publish.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-remember.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-rmail.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-src.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-table.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-taskjuggler.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-timer.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-vm.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-w3m.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-wl.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org-xoxo.el Set version number to 7.3 2010-11-07 14:52:14 +01:00
org.el Remove [home] and [end] bindings of unknown purpose 2010-11-12 15:35:49 -06:00