From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id UCOXDlKL0mSjNAEASxT56A (envelope-from ) for ; Tue, 08 Aug 2023 20:37:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8LJYDlKL0mRJYAEAauVa8A (envelope-from ) for ; Tue, 08 Aug 2023 20:37:06 +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 D56F34A40E for ; Tue, 8 Aug 2023 20:37:05 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=cOM9ZaXX; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691519826; a=rsa-sha256; cv=none; b=Tl2fAOFFNivtjntBLHwEYtlf8ALxMZOaq/dpmwYfaRGmxLLai2POspSDiabyMgFuLRhM65 aEt0h1aw7RjXfSmxLUSz3U/1+Epu12Yi98HCmfF8kP0zbcaKWHvcHf2p3/WGhDItt6s7+t UcsgO6qyWh4sX2dfyJmjX1MsZ0eUwAgxpMZqqqB/EHwIlBvg+Sb6sY1ax7n2clORvTlOhy mwR2t9ZMKQpPZ+gDweXIsZ5WWsr8NH5hITyW8CevJJiIIjD1MZDlkxxVv8bQqFVZNELUBU 9yhCR3qK81IqUF0vurRrxf2J4HBY3u4++OdHV4a3H+d9bLutvo8yUulJPuKbiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691519826; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=nVZ1YeyHAWIyDO2viVkbT8p1GnABILzdURN4kZjw2lk=; b=ZFRcsd8i8Sjt64zSjc02Wtd8lGOH92F0VS9+Bt+9+3Zv4ecBoETwdT92YqOzj96hTBWmQZ RVWF9ZsX0BsQ0T4rpF4sRM2SxuxO3ekmGA8N8byRT/jTKQrsU/vPabF/cnEU8PXsw8wcmy WMTzYM27owBrlon4C9DS/FqROgaAzgNzbUjwpV+1qY61RkoVVyFI97PiwR1uCpG6i8qd98 YpaxKMdnAacfcOIiCtcVftYYTPhBpEI8jmxx7cNCyPVrxcX2kNASq2eMh+OtC6/NE2CBQO fxPptxisJvHbM/49HD4ZtOFmLfPY+5E3K9TfZRSWW/AEN018aRKnPU1uUDI11Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=cOM9ZaXX; 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"; dmarc=pass (policy=none) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTRYv-0005qm-3L; Tue, 08 Aug 2023 14:36:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTRYt-0005qe-F8 for emacs-orgmode@gnu.org; Tue, 08 Aug 2023 14:36:07 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qTRYr-0001zr-5O for emacs-orgmode@gnu.org; Tue, 08 Aug 2023 14:36:07 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b9cdba1228so97081961fa.2 for ; Tue, 08 Aug 2023 11:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691519763; x=1692124563; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=nVZ1YeyHAWIyDO2viVkbT8p1GnABILzdURN4kZjw2lk=; b=cOM9ZaXXN/fWa4/DaMRN2v3LOiiSZN7udjUhnVlMP5TBRfr2IcvK3x8O8KEHcXmOat I2ROnaXGUwFAz2/uM8K/6Y6KEKV6ZzBP2Ty6woX5upPnckWz3QYYkILAtLrPtcE2i7Sa ChE6/XWQmFe6XbLygYUVJ1UHSSs/c7YH8Y93ZJx25P+I/9vJlOfugWOYrHv25EOTCamA Gq0GQW7pL8wFlQ2qDRuygxofosnpxzxBnNXfODmCPPYEqWUR5g5paAcw2v636uCdbhqd JyDxBTABNL2w47LXqhthVuozFI1Tytq0VNKne+UyEuav+GQiNALi4AdApVWXmhOt+X01 3d9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691519763; x=1692124563; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nVZ1YeyHAWIyDO2viVkbT8p1GnABILzdURN4kZjw2lk=; b=ScDWFrwDh0Wejo/EytheE8uRqpSgD16/D7y98i8zrB5djmd2CZ++0/iHHo5EwJ3YLH qh4R9e0gbIZJQAHa17cVxsYVq5xe+KyqfOIqKKno7KKloE5iSvl/XNhgMXua70Hifu5l TXicRhlIXDrHwcDdmr5viBMZsTpWYU7oRIHPC7kc/rr1VBwzFmzu4uNWfvIVfWwO59Gr 0T86cfYkuVv78o4SrQuP1Qs3XYvGvotWK8autFAkG3koy4EFyti0jS9MFfSavkFZRxpl oAqkmc5eC8wReOU0v4NHX6E5LG4lD7YSsdTMrOGmKR66vm1NT9lr5OtXLlSChQ1toxFO /hSQ== X-Gm-Message-State: AOJu0YxnbeA/7Pv/Lb6LcXwsqLvelBMG1SObrGN35rRI+2BUhFpcRb30 4g+exHjGXBG1Aie1PNN/rl0Lhnn11ZFrGWksufWQk4S6i+3Yvw== X-Google-Smtp-Source: AGHT+IGDlMcPAQfkEbkLihqZnNehu/Y3aFaRYT3zwDHMo6CVbLf9k/UBM5zks+lcbEUr6LUP6Dm/aPzv4cwFJJiiQ94= X-Received: by 2002:a2e:7014:0:b0:2b6:a827:164f with SMTP id l20-20020a2e7014000000b002b6a827164fmr267215ljc.10.1691519762556; Tue, 08 Aug 2023 11:36:02 -0700 (PDT) MIME-Version: 1.0 References: <874jlbkqxl.fsf@christianmoe.com> In-Reply-To: <874jlbkqxl.fsf@christianmoe.com> From: Zenny Date: Tue, 8 Aug 2023 20:35:51 +0200 Message-ID: Subject: Re: kaobook tex template integration to a org file to make self-contained, portable? To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="00000000000093ed7a06026da2d7" Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=garbytrash@gmail.com; helo=mail-lj1-x236.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.47 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: D56F34A40E X-Spam-Score: -8.47 X-TUID: EuXrEsBTWQOg --00000000000093ed7a06026da2d7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi again, I updated the texlive to 2023 and can produce a pdf with the following snippets inside the https://github.com/asilata/emacsconf2021/ggm.org: ** Org LaTeX setup > #+latex_class: kaobook > #+latex_class_options: [openany, a5paper] > #+latex_header: > \usepackage{amsmath,amssymb,amsthm,geometry,hyperref,paralist,svg,thmtool= s,tikz,tikz-cd} > #+latex_header: \usepackage{mathtools} > #+latex_header: \usepackage[capitalise,noabbrev]{cleveref} > #+latex_header: \usepackage{environ} \NewEnviron{abmn}{\marginnote{\BODY}= } > #+latex_header: \setcounter{tocdepth}{1} > #+latex_header: \newtheorem{theorem}{Theorem} > #+latex_header: \newtheorem{example}[theorem]{Example} > #+latex_header: \newtheorem{exmpl}[theorem]{Example} > #+latex_header: \newtheorem{definition}[theorem]{Definition} > #+latex_header: \newtheorem{proposition}[theorem]{Proposition} > #+latex_header: \newtheorem{lemma}[theorem]{Lemma} > #+latex_header: \newtheorem{exercise}[theorem]{Exercise} > #+latex_header: \usetikzlibrary{arrows,automata,positioning} > ** Export settings > Export into the artifacts directory > #+export_file_name: artifacts/ggm > > Add ~kaobook~ to ~org-latex-classes~ and update ~org-latex-pdf-process~. > #+name: export-setup > #+begin_src emacs-lisp :results silent :var this-year=3D"2023" > (add-to-list 'org-latex-classes > `("kaobook" > ,(string-join > '("\\documentclass{kaobook}" > "\\usepackage{color}" > "\\usepackage{amsmath,amssymb}") > "\n") > ("\\chapter{%s}" . "\\chapter*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) > However, the pdf did not inherit all the kaobook template features like: 1. Mini table of contents in the margin at the start of each chapter. 2. Chapter headings. 3. Huge chapter number with a vertical line Any input will be appreciated to render the file that looks like https://github.com/fmarotta/kaobook/blob/master/example_and_documentation.p= df or https://github.com/tudelft3d/terrainbook/releases/latest. Thank you in advance, /z On Mon, Aug 7, 2023 at 1:55=E2=80=AFPM Christian Moe wrote: > > > Hi, > > For starters, have you added the kaobook document class to the variable > org-latex-classes? (If yes, ignore the rest of this message, if not, do > so and see what happens.) > > This is needed to tell Org how to set the document class and what command= s > are used for sections. See the manual 13.10.2 and 13.10.3, > [[info:org#LaTeX specific export settings]] and [[info:org#LaTeX header > and sectioning]], and look up the docstring for org-latex-classes if you > need help. > > E.g., in .emacs I have this for Tufte-Latex: > > (add-to-list 'org-latex-classes > '("tufte-handout" > "\\documentclass[11pt,a4paper]{tufte-handout}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}"))) > > (add-to-list 'org-latex-classes > '("tufte-book" > "\\documentclass[11pt,a5paper,nols]{tufte-book}" > ("\\part{%s}" . "\\part*{%s}") > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}"))) > > Yours, > Christian > > > Zenny writes: > > > Hi, > > > > References of interest: > > 1. https://github.com/fmarotta/kaobook > > 2. https://github.com/asilata/emacsconf2021 > > > > Can anyone guide me how to get a self-contained and portable template > that > > executes kaobook tex templates (see 1) to create an org-file that > resembles > > with the instance in 2 above? > > > > I tried the best I can by adding the kaobook.cls and kaobook.sty files > > inside `~/texmf/tex/latex/kaobook/` folder and specified 'kaobook' in t= he > > `#+latex_class: kaobook` but it failed to produce the desired look of p= df > > similar to > > > https://github.com/fmarotta/kaobook/blob/master/example_and_documentation= .pdf > > withing the same examples directory! > > > > Any input appreciated! > > > > Cheers and have a nice week, > > /z > > --00000000000093ed7a06026da2d7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi again,

I updated the texlive to 2023 and can produce a pdf with the followin= g snippets inside the https://github.com/asilata/emacsconf2021/ggm.org:
** Org LaTeX = setup
#+latex_class: kaobook
#+latex_class_options: [openany, a5paper= ]
#+latex_header: \usepackage{amsmath,amssymb,amsthm,geometry,hyperref,p= aralist,svg,thmtools,tikz,tikz-cd}
#+latex_header: \usepackage{mathtools= }
#+latex_header: \usepackage[capitalise,noabbrev]{cleveref}
#+latex_= header: \usepackage{environ} \NewEnviron{abmn}{\marginnote{\BODY}}
#+lat= ex_header: \setcounter{tocdepth}{1}
#+latex_header: \newtheorem{theorem= }{Theorem}
#+latex_header: \newtheorem{example}[theorem]{Example}
#+l= atex_header: \newtheorem{exmpl}[theorem]{Example}
#+latex_header: \newth= eorem{definition}[theorem]{Definition}
#+latex_header: \newtheorem{propo= sition}[theorem]{Proposition}
#+latex_header: \newtheorem{lemma}[theorem= ]{Lemma}
#+latex_header: \newtheorem{exercise}[theorem]{Exercise}
#+l= atex_header: \usetikzlibrary{arrows,automata,positioning}
** Export sett= ings
Export into the artifacts directory
#+export_file_name: artifact= s/ggm

Add ~kaobook~ to ~org-latex-classes~ and update ~org-latex-pdf= -process~.
#+name: export-setup
#+begin_src emacs-lisp :results silen= t :var this-year=3D"2023"
=C2=A0 (add-to-list 'org-latex-c= lasses
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`("ka= obook"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0,(string-join
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0'("\\documentclass{kaobook}"
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\\usepa= ckage{color}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0"\\usepackage{amsmath,amssymb}")
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"\n&= quot;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&q= uot;\\chapter{%s}" . "\\chapter*{%s}")
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\section{%s}" . &= quot;\\section*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0("\\subsection{%s}" . "\\subsection*{%s}&qu= ot;)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(&quo= t;\\paragraph{%s}" . "\\paragraph*{%s}")
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\subparagraph{%s}&q= uot; . "\\subparagraph*{%s}")))

=
However, the pdf did not inherit all the kaobook template features lik= e:
  1. Mini table of contents in the margin at the sta= rt of each chapter.
  2. Chapter headings.
  3. Huge chapter number w= ith a vertical line

Thank you = in advance,
/z

On Mon, Aug 7, 2023 at 1:55=E2=80=AF= PM Christian Moe <mail@christia= nmoe.com> wrote:


Hi,

For starters, have you added the kaobook document class to the variable
org-latex-classes? (If yes, ignore the rest of this message, if not, do
so and see what happens.)

This is needed to tell Org how to set the document class and what commands<= br> are used for sections. See the manual 13.10.2 and 13.10.3,
[[info:org#LaTeX specific export settings]] and [[info:org#LaTeX header
and sectioning]], and look up the docstring for org-latex-classes if you need help.

E.g., in .emacs I have this for Tufte-Latex:

(add-to-list 'org-latex-classes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'("tufte-handout&q= uot; "\\documentclass[11pt,a4paper]{tufte-handout}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\section{%s}= " . "\\section*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\subsection{= %s}" . "\\subsection*{%s}")))

(add-to-list 'org-latex-classes
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'("tufte-book"= ; "\\documentclass[11pt,a5paper,nols]{tufte-book}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\part{%s}&qu= ot; . "\\part*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\section{%s}= " . "\\section*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\subsection{= %s}" . "\\subsection*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("\\paragraph{%= s}" . "\\paragraph*{%s}")))

Yours,
Christian


Zenny writes:

> Hi,
>
> References of interest:
> 1. https://github.com/fmarotta/kaobook
> 2. https://github.com/asilata/emacsconf2021
>
> Can anyone guide me how to get a self-contained and portable template = that
> executes kaobook tex templates (see 1) to create an org-file that rese= mbles
> with the instance in 2 above?
>
> I tried the best I can by adding the kaobook.cls and kaobook.sty files=
> inside `~/texmf/tex/latex/kaobook/` folder and specified 'kaobook&= #39; in the
> `#+latex_class: kaobook` but it failed to produce the desired look of = pdf
> similar to
> https://github.com= /fmarotta/kaobook/blob/master/example_and_documentation.pdf
> withing the same examples directory!
>
> Any input appreciated!
>
> Cheers and have a nice week,
> /z




--00000000000093ed7a06026da2d7--