From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/17806 Path: news.gmane.org!.POSTED!not-for-mail From: Thomas Lord Newsgroups: gmane.text.pandoc Subject: Re: internal link page numbers? Date: Fri, 09 Jun 2017 16:14:52 -0700 Message-ID: References: <9c1fc336-b56d-433d-a007-1a094326afce@googlegroups.com> <20170608093907.GD23518@MacBook-Air-2.local> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed X-Trace: blaine.gmane.org 1497050097 27201 195.159.176.226 (9 Jun 2017 23:14:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Jun 2017 23:14:57 +0000 (UTC) User-Agent: Roundcube Webmail/1.2.5 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDN7D7GEUELBB3WX5TEQKGQELFAVUZA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jun 10 01:14:53 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-yb0-f183.google.com ([209.85.213.183]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJT7C-0006g7-Sf for gtp-pandoc-discuss@m.gmane.org; Sat, 10 Jun 2017 01:14:51 +0200 Original-Received: by mail-yb0-f183.google.com with SMTP id f16sf5744067yba.1 for ; Fri, 09 Jun 2017 16:14:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1497050095; cv=pass; d=google.com; s=arc-20160816; b=Ctivkn7oRS+4RJYJQlf8xBviTGlNX4rm/1cxUP6tako4paJ+GBdHuVhb9isku1/t+W z4fdor9ZVzQ1RNRGlqOQaUxqmeVE7m2waeloeM6gkewtAxTeURRNdoeDyMJA6zzN1vlk u0V66bsJWE/nPxHIiPjR7FtaxzkbOE4cd88b/UOpp+STW5N6RN0uCq66+67UvDrJcccT W00JGlA0hXQRH82iiCTBsYm7EbUhqM2YSVUGkb7EBlF9vSFoIjP2YeULJY+DltrPpaOV jtQL0kAndqkFb26Dolgb7v3zPgbWoRxFeKqQRRFS8RKIF75rMU1n1wEp2dZbZUOYp+eA wFow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:message-id :references:in-reply-to:subject:to:from:date:mime-version :arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=iqG7ThXvLH3iIc50FfT2eAPmsOlC4ceGwYHE1y2Pulk=; b=DUwqWjellIy/u3/qCtcW1M53VbdFNEr3fI3i7h01RVZP4sUiNB2ajMvM+jnofbCREW 9Fhzd5amOPCaQ4Se4j47MUyB0rmlWygc5G928Q8jGcoPzr8uQsfqkjR1flb9dnzIfbgi qAdbxuLXoiQEFV566kO71ECKxwwi82B1qlVjFehSUW3xW1testfLl2evncMV5aEzeI6g LTEcbzGRVP0FVmyY0VGdDK+hjvxrcTx7hERxvKST5DwVCkI696VDLIpQ2j4977wc6tDQ z42nROsdum+jo1uQUVP6Nf8tV/avg76nSC6Naa1ztMKUczbrzFc0hulYdI4a0ACPcATg 7cWQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 64.142.111.80 is neither permitted nor denied by best guess record for domain of lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org) smtp.mailfrom=lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:date:from:to:subject:in-reply-to:references :message-id:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=iqG7ThXvLH3iIc50FfT2eAPmsOlC4ceGwYHE1y2Pulk=; b=LCBPwArnMN0aUat9e2/KzB7N2+vrjcZ4Ltoe/q9kjlqVlUb70FPSuOB6uvRycFfh9Q FX44djZaf2G0czk3iPI7tmsFoXzIllYzr1hRXQcQ9jnl0Y+jQIljb/rfsoggZ3AX7KV0 toENqDpU0/4KH71a7ejCRHeHvY9YuObzxfPDI2aMhQJnHmRSlKJKOws7R1h+ex6YE3xK 4h33/9+l2LZFOHIDe4Ryi1RBItqy+qSVTZpzt7s/r42ESKSZ6Z8vo06VkhcIktsnTp8B WV7ym4RjOzgkB+yKsIPZS3jtT2BtwXzzgPMAC0AxZ68E1JvFOiJ+te+E9GO6KUyMVG7H BOrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:date:from:to:subject :in-reply-to:references:message-id:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=iqG7ThXvLH3iIc50FfT2eAPmsOlC4ceGwYHE1y2Pulk=; b=c2WDkIqac0Dehcr/IbLCJq+e8VqX5Tdc74qAs4xE6usv7RVlF1i+TmO9jnOSzwsTPy IIUURNlU9BWqBHe00fZaHcNjQ4byLsls7PkO/dmZMENCCQ9bQ9cgA6V9XtgvUGQ4u309 qSIaSPH4mUTo/+zAw18ZrVT+7+0lfGep7AVHIMIdKZnQ4ILFleRejoRZ6eyjtQB/Kfwx e8GfmkFTYys2PPc1l/hL+Dcpmu9TG8wzk6VvUNE8UpTaOVB4AZg5QWhiMJBQT+afnBBO BVv+m0IP83ZRqXXWOi+ARo4FvyxAJ24lsKvLU8jkgKZgyVIrmnJGQAkQD5YUlTAJjtjo gz9Q== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AODbwcCGZiGGudpmTT40h7tqM0+P97PXzzxTpjm/ASZ7A6wEcIL3B7J2 9YOEbPPYq1fUUg== X-Received: by 10.157.43.142 with SMTP id u14mr1043246ota.3.1497050095196; Fri, 09 Jun 2017 16:14:55 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.39.168 with SMTP id c37ls10515047otb.37.gmail; Fri, 09 Jun 2017 16:14:54 -0700 (PDT) X-Received: by 10.200.2.162 with SMTP id p34mr14011839qtg.28.1497050094734; Fri, 09 Jun 2017 16:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497050094; cv=none; d=google.com; s=arc-20160816; b=SZWsk4GSIjV1KmADk5MV4Aq8yJlF/G1Mt3OABxYEQJcPJVMs1QNSBPyt4OSea+RmQJ 8Ub2Q3RrRh5gfQtug1DfrSMo1m9X/pnxl5NG5CLRAtAGrp4xrMd6ViUZc7vXD18h5okf WNx7SG8uOHO3QHwOwgUk+kxwIM3gIvTh47ZbiUysJTESFgpqmOu91nz1smm7dObUD4Z0 D7iYGVa2Q0uJZGn9+brIFX1wFeVP97bXJ45Y1KYf5civ5DxMgD9CBRlwp9yMD3m5NaVY 49GcSXg4MqLXoL7DEhfj/dHPd6I849cbS+mWqjooAHPwbNpHC6wT7k8qzznwcxQscWuk q+ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:message-id:references:in-reply-to:subject:to:from:date :content-transfer-encoding:mime-version:arc-authentication-results; bh=IvDn1tNbHnpWLzDOC6CWJqgr1+M26U8v7Vdbi/wxDh0=; b=JKpwVbVbii1Fi0AvivJGvFLESAXA6Kg0g521TN1PBYy6se/xcEro2Zi6ah6oma8CJl 8e/0cNPPdFtaIDUsCin8ys4tlZeURP8JfGzn4whT9syWVSEVnirFmEga78LRgq839UGa mGi8vMMinu8huXpn59q2rMMuZpYdlruRwZxuVPthzMfyZmJdgLDhKLdWxy0sMAZTCtt9 wEIAbql6Jem0zjScYdZI45RAR8B+QGl0YqC/5ogRrIadgtR31vt9qirgCtdUQj3m4qum 1OjDEnLrwtaNrANqUPnLzUgTwtS7og58rwzI8uFUgGGH0I5UOBsTqOlyhkmUe59PrXQJ Yurw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 64.142.111.80 is neither permitted nor denied by best guess record for domain of lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org) smtp.mailfrom=lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org Original-Received: from c.mail.sonic.net (c.mail.sonic.net. [64.142.111.80]) by gmr-mx.google.com with ESMTPS id 78si427300pfa.8.2017.06.09.16.14.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 16:14:54 -0700 (PDT) Received-SPF: neutral (google.com: 64.142.111.80 is neither permitted nor denied by best guess record for domain of lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org) client-ip=64.142.111.80; Original-Received: from webmail.sonic.net (webmail.a.apps.sonic.net [64.142.109.105]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPA id v59NEqOG026417; Fri, 9 Jun 2017 16:14:52 -0700 In-Reply-To: <20170608093907.GD23518-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org> X-Sonic-Auth: FjuyUY3btir4n2cw7sZL5fShneC9oemm73T2da1bl1n37TbgPP7RGOyJjl6xtnhps9gOkp/daYBAgxn9SExNT37xL9fp7och+p27gi2Fge0= X-Sonic-CAuth: UmFuZG9tSVZnMmgABESvTVfrw47uDKda4F0jrqqOqs11F17agYo2xPN32xqGsrvt1rfgKjgHxCQXKXkkljJMWHniBCJtWec6pqtYR7iiZnc= X-Sonic-ID: C;roRmcWlN5xGpYizL7bdh1w== M;OK9wcWlN5xGpYizL7bdh1w== X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-Original-Sender: lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 64.142.111.80 is neither permitted nor denied by best guess record for domain of lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org) smtp.mailfrom=lord-A+ZCe59fpk2Wd6l5hS35sQ@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:17806 Archived-At: Thank you. To get printed page numbers on references I adopted this workaround: In a custom LaTeX template I defined a macro PG, after package hyperref is loaded: \usepackage{hyperref} \newcommand{\PG}[1]{\mbox{(p. \pageref{#1})}} Thus I can write a link this way: [copyright and licensing terms \PG{copyright}](#copyright) which is not ideal but will do. On the other issue, you suggest writing: [Appendix: The GNU General Public License 3.0] That's the opposite of what I am wishing for. Supposing a section header like this: Appendix: Copyright and Licensing Information {#copyright .unnumbered} ============================================= I wish I could write a link like this: [](#copyright) And have the text "Appendix: Copyright ... Information" supplied automagically. That way, if I alter the section header, all such links to the section stay in sync. -t On 2017-06-08 02:39, John MacFarlane wrote: > +++ Thomas Lord [Jun 06 17 17:18 ]: >> Help? >> >> I am writing markdown source in order to produce HTML output and PDF >> (via LaTeX) output. >> I have two questions about internal links: >> 1. My internal links are being rendered, in PDF, as hyperlinks that >> are >> useful when viewing the PDF on a screen. How can I have such links >> be >> rendered in a way that includes a page number, suitable for printed >> forms of the PDF? (Of course, I hope the on-line PDF still has a >> clickable hyperlink.) > > You can use raw LaTeX \label{..}, \pageref{..} for this. > But there's no way to do it in native pandoc; pandoc doesn't > have a concept of pages, since only page-layout software can > know what page it's on. > >> 2. Is there a way to write a link to an internal section, such that >> the >> link text is automatically taken from the section name? For >> example, >> if I have a section: >> Appendix: The GNU General Public License 3.0 {#gnu-license} >> ============================================ >> then is there a way to write a link mentioning just "#gnu-license", >> and >> having the title of the appendix filled in automatically? > > You can just write > > [Appendix: The GNU General Public License 3.0] > > and you'll get an automatic link with the title.