From nobody Sun Jan 12 17:39:18 2025 X-Original-To: doc@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YWN1d1ZHwz5l1M2 for ; Sun, 12 Jan 2025 17:39:33 +0000 (UTC) (envelope-from carlavilla@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YWN1d0yqVz47ph for ; Sun, 12 Jan 2025 17:39:33 +0000 (UTC) (envelope-from carlavilla@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736703573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OFK7wDC2EQ+3KUYs+s9ipjYUf59+2RE2pAp5RYxFn3c=; b=K2V6ISz/3QcE8RJm0KKBhmo7kjWnA1hRuwHc77EPqeFeKdtZjhGYTZs9A1snFvnSAThtpL ZRwZTObiPru0QRLnb3mxtbhGSmVGhHviIkAXpcI5IEXXNcNf1vLs6qtMDmudBR9LdoAfDZ x8RQ0I8Rk9lxtsvATGZWUyabhMii2+Pt31D9D5FRI9HCtsKl3fDALHvA1wWGPS+CXhiO6F Zp9rI+MhBu9zhs9Jjdh34ctKS1+FE0Nqdx+xyChJWfVpmafmD5OWEEfh3X5xh7r6P56PQ2 RIoNScRXBbvoIVMy+0xcorxDMs60VWy/v6kbDOOWAodQ2F2tMSGptcgc9f5tPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736703573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=OFK7wDC2EQ+3KUYs+s9ipjYUf59+2RE2pAp5RYxFn3c=; b=IMeujHx2XhpfoYHjDeiL/TF+xhR3iVxWyLcOq9WZ1lJoI7Uiz5Cv7lGlCoCjp/Xsu0KJ21 FT7KXzTyKqD0CpgAFICPQHeNwJTD/4zVPpbSPqNo1Y0vkjGpJ/hlT9qO1F4NAQaxjc8cOI j6HzhiJODDCGB0/eU7rzE9N8188Ic4biRSV9Um74y3BhaISWSspVHVddUQhnUSuIrzxdFT TBukqR7m96Wg8uz4aP3emGyN0k7GfhKMx00/pVMs87GZ9MTENr3S1Em3ynci6Pup8LufGJ zXsCOZS0k6nrgx1BD8bqiHlLW9rQJtcaJBmRTf452dyUmjVEoDi4jrTPNCPZ2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736703573; a=rsa-sha256; cv=none; b=RL7vy/dG+LE0J80CVN2XJYxLLb9qQ8tpnAYYRq3NycFP+9Ae/6xizkKVf4CW/XNaa+Lmid sRk4llRccM1o8X3VjsQmCOy7/Hn8KzK1Rlh04QlijEqUqzuWiCmNI9JFy7FPvbhPpyLFmu P/dB6Ddw74VtL9LpwnbGMOJsJ2Gmvd2CfoG2a3CMtHvsQNuIQgCPVL7nIRCsOnxQE08te/ eyJPtryvKb4DUmvmOq1dHlgdKncG/26I4vmDO2ng4N8XkVCsvz4fL/Fflcu87rJg0YQZq4 LaSqXWtEHVFVmijU09XKeHXZtKffG4vufAjJgJRMvBDORMhHrqT+c7/SLBSlDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: carlavilla) by smtp.freebsd.org (Postfix) with ESMTPSA id 4YWN1d01H0zxDZ for ; Sun, 12 Jan 2025 17:39:32 +0000 (UTC) (envelope-from carlavilla@freebsd.org) Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-467a1d43821so39537971cf.1 for ; Sun, 12 Jan 2025 09:39:32 -0800 (PST) X-Gm-Message-State: AOJu0YxpXRnnwX7JqAZ/ZXlVBcHqVYnMvbhT3SbTMw1YVrFjhkQ7flLY Z5XAWGnD7zAfafB18v46zEUa8R5NOXeomGrUr9OIHjbecraFc+0o8hanKWgfKaqIEdFjwIEEYyl OTn6LnARGsm/K/ySPsFubN1tIy6k= X-Google-Smtp-Source: AGHT+IERSzSJwetdF14iYKEv5Vb7kndfIo7nPiVMOvelh63LxK6Zt3JNFH10gaRNe28tbC+RmosCIwkPzCU/gfBO2MY= X-Received: by 2002:a05:6214:4b04:b0:6d4:1613:be3e with SMTP id 6a1803df08f44-6dfa3ad9617mr222332776d6.22.1736703572207; Sun, 12 Jan 2025 09:39:32 -0800 (PST) List-Id: Documentation project List-Archive: https://lists.freebsd.org/archives/freebsd-doc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-doc@FreeBSD.org MIME-Version: 1.0 References: <20250112004942.3ba69810.jpb@jimby.name> In-Reply-To: <20250112004942.3ba69810.jpb@jimby.name> From: Sergio Carlavilla Date: Sun, 12 Jan 2025 18:39:18 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AbW1kvbGxmkX8u1AbSArXVLVgmSNb5nJyxG_ToTorOm49fm2NnbGDPLSWvpmc70 Message-ID: Subject: Re: [FDP] Generating an Index for PDF Documents To: jpb Cc: doc@freebsd.org Content-Type: text/plain; charset="UTF-8" On Sun, 12 Jan 2025 at 06:49, jpb wrote: > > > Here's a quick summary on how to generate an index for FreeBSD FDP > books, articles, and multi-part documents. Happily, the indexing > tooling is already built into Asciidoctor. > > 1. Decide where you want the index. In my case I added another > "chapter" document directory - foo-index/_index.adoc. > Edit the _index.adoc and change the title, and any next/prev. You will > also need to change the weight. The weight value should be higher than > the highest chapter in the book. This will place the index at the end > of the document or book. > > 2. Add this section info to the bottom of the _index.adoc file after > all the front matter and hugo stuff. This tells Asciidoctor where you > want the index. This is all you need to add. > > [index] > = Index > > 3. You'll now have to go through all the chapters and tag each line > that has a term you want in the index. Add the following to the end of > the line: > > indexterm:[foo] for term 'foo' or > indexterm:[buzzword,foo] which will add an entry for foo under the > 'buzzword' index. > > 4. Make the document as you usually do (make DOC_LANG=whatever). > When the book is completed, open the PDF version and check out the > index at the end (or wherever you put it). > > NOTES: > You can tag any kind of text - regular text, text inside [NOTEs], > [TIPs], etc. or text inside listings such as [.programlisting], > [.source], [subs=+quotes] etc. > > I've found that tagging a singular stem version of a word relieves you > from having to text all other variations. > > You don't have to tag every instance of a term. If there are > several sentences together, each having the same term, or even nearby > paragraphs all having the same term, just tag the term once. The index > entry will be the same for all of them. > > Check these examples: > > https://www.jimby.name/fbsd/_index.adoc.txt > https://www.jimby.name/fbsd/fdp_index_example.png > > Best Regards, > Jim B. > jpb@jimby.name > > Hi Jim, Thank you so much for raising this option, we're gonna take a look at it! Bye!