From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WHlhCf/1qmLnfQEAbAwnHQ (envelope-from ) for ; Thu, 16 Jun 2022 11:21:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qOlaCf/1qmJgIQEA9RJhRA (envelope-from ) for ; Thu, 16 Jun 2022 11:21:03 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C374639BC5 for ; Thu, 16 Jun 2022 11:21:02 +0200 (CEST) Received: from localhost ([::1]:51002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1lgT-0000Nu-S1 for larch@yhetil.org; Thu, 16 Jun 2022 05:21:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1ldY-0008LK-D4 for emacs-orgmode@gnu.org; Thu, 16 Jun 2022 05:18:00 -0400 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]:58228) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1o1ldW-0008Jo-4I for emacs-orgmode@gnu.org; Thu, 16 Jun 2022 05:18:00 -0400 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4LNxR26WLcz9sTm; Thu, 16 Jun 2022 11:17:50 +0200 (CEST) From: Jens Lechtenboerger To: Tim Cross Cc: emacs-orgmode@gnu.org Subject: Re: Publish to HTML and LaTeX/PDF with cross-file links? References: <871qvqv3ep.fsf@wi.uni-muenster.de> <87h74llbbd.fsf@gmail.com> Mail-Followup-To: Tim Cross , emacs-orgmode@gnu.org Date: Thu, 16 Jun 2022 11:17:49 +0200 In-Reply-To: <87h74llbbd.fsf@gmail.com> (Tim Cross's message of "Thu, 16 Jun 2022 09:55:14 +1000") Message-ID: <87r13px8zm.fsf@informationelle-selbstbestimmung-im-internet.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4LNxR26WLcz9sTm Received-SPF: neutral client-ip=2001:67c:2050:101:465::107; envelope-from=lechten@wi.uni-muenster.de; helo=mout-u-107.mailbox.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655371262; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=o8QMmRrESmhsBHhd8V82QcmOOysnpNIar6crtOQF23U=; b=Js7AQdyiyBsnHJRT0IhsbFraUPkkKQpNyhS3i53bUsqQett9HQEHSItNs5k+i5zKXmLhtX 7XHyFsOUzM6V9lX5IJEl6OudPc5tDeROWdQ7D9DaNaHAFWyi/QtBNZf4XPh+Xg1RtJCN5q Wt1PK5vA6pnxsbHKP+lbsydtfOzKsaT54xSzC1QtaXa6riNpEQwkTXX0xLqM12jJ/pZiEx bqePhq+2vczncYVMGmCGIPOQDJcb+EGweYZOvy+LQ6MzaXKtpjaebKMAfNaOWxisGGapI3 o7ARMMStgc0QSHNPoLIT2C74VruOx3AC4ZTajh6BvuRijVgZR7x5r9ENgiIYyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655371262; a=rsa-sha256; cv=none; b=nAX+nLbYkMOe5XvY4QtMwBT0wROs6gIB5JcUvQATeQ0xkrInktI0cu26aq7uu8SziJcQ2J tW527EL43ZTb1zmcbp3Tf4h5tUewqWzAnXs65ksXFYymrSb5Q2QLMw/2XpnL5J1JnFG3jw GVDq8Q6TONDgULHh/0lEuFgmM6fc/mtyLDMxOt7BmG6ijNfVfino6Gd0G9amPPihSr6f/1 qBI3gUeY0V6IZ56wbMhITXc362cGcH5m4UmEukWGPMoQJSMymayqqC/+8kvcBUKvcbi2yZ KZVHKjXrWT4TlSuHVyK88AfusnfaeU6739ULhccyTursC/mDxAXo7fhDUupw5Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.79 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C374639BC5 X-Spam-Score: -2.79 X-Migadu-Scanner: scn0.migadu.com X-TUID: rnhTBbACadoM On 2022-06-16, at 09:55, Tim Cross wrote: > Jens Lechtenboerger writes: > >> [...] >> More precisely: For HTML export, a link like >> [[file:foo.org::#custom-id][elsewhere]] turns into a hyperlink to >> =E2=80=9Cfoo.html#custom-id=E2=80=9D, which is what I want. >> >> However, for LaTeX/PDF export, the hyperlink points to the source >> file =E2=80=9Cfoo.org=E2=80=9D, which in my case is a broken link. I wo= uld like >> that to be =E2=80=9Cfoo.pdf=E2=80=9D (or even something pointing at the = proper >> section in the PDF file). >> >> Is this (easily) possible? >> > > I think what you need is an export filter function for links in latex > exports. Have a look at the docstring for variable org-export-filter-link= -functions.=20 > > As a very basic example, the following should work > [...] Thank you for the suggestion! I am still undecided which way to go. Maybe a refactoring of code from ox-html (to be usable across backends) would be appropriate here. Best wishes Jens