emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: emacs-orgmode@gnu.org
Subject: Re: insert automatically a reference to a section header and a link
Date: Wed, 17 Nov 2021 17:00:10 +0100	[thread overview]
Message-ID: <875ysqlqlx.fsf@mat.ucm.es> (raw)
In-Reply-To: 87wnl6n80o.fsf@ucl.ac.uk

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

>>> "ESF" == Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Wednesday, 17 Nov 2021 at 14:58, Uwe Brauer wrote:
>> Right, but how do you do this automatically?

> John's given you an answer along the lines of what you wanted but I
> would suggest that sometimes we over-complicate things?

Hm not sure

> LaTeX needs help because it's a lot more verbose.  Org, however, has a
> very simple markup ("It's all text" ;-)) and just typing what you want
> is often quicker!  Instead of key bindings to remember, I know I can
> simply type

> RET * <<label>> heading RET

> and I'm done...

Well you should try auctex+reftex, it is just easier and (faster) if all
this is done automatically.

In auctex, you can also do this as you describe and I found that
terrible and was very relived to find out about reftex, that insert
labels automatically (and systematically)

> Likewise, typing the reference is simply typing [[label]].

> And both bits above benefit from electric-pair-mode...

> But I'm glad you found your solution in any case!

There is just a small problem with this approach.

When exported to latex 



** Hello 
   :PROPERTIES:
   :CUSTOM_ID: sec:wo
   :END:

Is exported as 


\subsection{Hello}
\label{sec:wo}


While

** That <<sec:That>>  

Is exported as 

\subsection{That \label{sec:That}}
\label{sec:org213d0b6}


The first one is much nicer and more in line with the logic of latex,
the second however is not bad (since it generates correct pdf files when
compiled)

I might think how to generalize John's approach.

Uwe 

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  reply	other threads:[~2021-11-17 16:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  7:36 insert automatically a reference to a section header and a link Uwe Brauer
2021-11-17  8:28 ` Uwe Brauer
2021-11-17 10:04 ` Eric S Fraga
2021-11-17 13:58   ` Uwe Brauer
2021-11-17 14:06     ` John Kitchin
2021-11-17 14:15       ` Uwe Brauer
2021-11-17 14:59         ` Stefan Nobis
2021-11-17 15:42           ` Juan Manuel Macías
2021-11-17 16:08             ` Uwe Brauer
2021-11-17 15:55           ` Uwe Brauer
2021-11-17 16:08             ` Eric S Fraga
2021-11-17 16:44               ` Uwe Brauer
2021-11-17 16:29             ` Stefan Nobis
2021-11-17 17:05               ` Uwe Brauer
2021-11-17 19:10                 ` Stefan Nobis
2021-11-23 15:20                 ` Bruce D'Arcus
2021-11-17 18:17               ` Juan Manuel Macías
2021-11-17 19:00                 ` Stefan Nobis
2021-11-17 14:58     ` Eric S Fraga
2021-11-17 16:00       ` Uwe Brauer [this message]
2021-11-17 16:31         ` Eric S Fraga
2021-11-17 17:06           ` Uwe Brauer
2021-11-17 16:49 ` [Problems with org-ref-helm-insert-ref-link and org-id-get-create] (was: insert automatically a reference to a section header and a link) Uwe Brauer
2021-11-17 17:57   ` John Kitchin
2021-11-17 18:58     ` [Problems with org-ref-helm-insert-ref-link and org-id-get-create] Uwe Brauer
2021-11-17 19:58       ` John Kitchin
2021-11-17 20:16         ` Uwe Brauer
2021-11-17 21:41         ` Uwe Brauer
2021-11-17 21:54           ` John Kitchin
2021-11-18  7:44             ` Uwe Brauer
2021-11-18  8:06               ` Uwe Brauer
2021-11-18 12:48               ` John Kitchin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875ysqlqlx.fsf@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).