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 mDw/LcLU02R+1wAASxT56A (envelope-from ) for ; Wed, 09 Aug 2023 20:02:42 +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 sGoNLcLU02Q1EwEAauVa8A (envelope-from ) for ; Wed, 09 Aug 2023 20:02:42 +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 120F23D3B3 for ; Wed, 9 Aug 2023 20:02:42 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=h0kh5CE0; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691604162; a=rsa-sha256; cv=none; b=XgZZ4uT9htKlOQu0SFdK4mCMGsYWVKCiQSZ9quWYN3DCLLn5bEeLrkfvESmowT8x2wogvP ecRuS5mA84rasWr8+/qsAGMMpvad7UusTa57GkGD6YZD91aQQJi50ntnbRkLpIwyil9Ppx kfHlDlnNVvt4ZW1LBh7YunV0IGr0PLyOZYlF04QGx5mMC3ojNRqsgKwnmPwA0VI2MJx14s UQg3tJvnyovHn7SPa+Y3c7fO/t+hKqrgOpbyTQo4/GTRheF9Ev9lh4nrJvqLySTPtYbC36 MHiYGgBRR8z92eCAAUXWjuQOii9RJepTeHCJN1+6KK7jNGkZ+YY2YiLyN6ACrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691604162; 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:dkim-signature; bh=qe8poWJLtTNJ2sKSBUzif30hY9rfaJYG//jbzqllRdY=; b=MV/KggAwys7sg/8eDvHmaBAOtUpnTIZLOSkQga9Ye79hC5v24RGR0sSSDzpyo+br8glIhi jTcghNVi9cLTognWy1g6aYl11nqHRw3wcnSCWYMorVV4SflQA5604wbTi6v6kdyDABAKSk 7n7IuWVUw39Y7qkn+Iui/qqh7KZKjiIiTvai27Nd+g7o0kGGpT05joZ0SvThWNj1c/3BVK kyG2z/KhExYCnH6Nd8fS6kyKvwy+3ewBcEhSMcx3b2mkBgYelJcju+kMIiAJ2amhdSyF5g ZorVO2zWequh/YYs2oaK8wwY1MJZzciOU4B+oK3aychsobUQYHprMN0Swm/cqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tsdye.online header.s=default header.b=h0kh5CE0; 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=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qTnVC-0000ge-1n; Wed, 09 Aug 2023 14:01:46 -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 1qTnV5-0000gR-Eh for emacs-orgmode@gnu.org; Wed, 09 Aug 2023 14:01:39 -0400 Received: from omta036.useast.a.cloudfilter.net ([44.202.169.35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qTnV3-0008Qi-87 for emacs-orgmode@gnu.org; Wed, 09 Aug 2023 14:01:39 -0400 Received: from eig-obgw-6001a.ext.cloudfilter.net ([10.0.30.140]) by cmsmtp with ESMTP id TQb3qWuIpDKaKTnV0q2oDB; Wed, 09 Aug 2023 18:01:35 +0000 Received: from box2035.bluehost.com ([74.220.219.237]) by cmsmtp with ESMTPS id TnUzq8PHvhLhETnUzqoKpT; Wed, 09 Aug 2023 18:01:33 +0000 X-Authority-Analysis: v=2.4 cv=JKYoDuGb c=1 sm=1 tr=0 ts=64d3d47d a=VozZY++RX3oc2UgfNhVfaA==:117 a=VozZY++RX3oc2UgfNhVfaA==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=UttIx32zK-AA:10 a=DPR-AOO6AYYA:10 a=A2tt7buDTgEA:10 a=pGLkceISAAAA:8 a=o9zw6IYYAAAA:8 a=Ye9xWLIlmGM2gIzQDi8A:9 a=QEXdDO2ut3YA:10 a=-FEs8UIgK8oA:10 a=BtxB1_lq3pBo68oZtZ_9:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tsdye.online; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc:To:From:References:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qe8poWJLtTNJ2sKSBUzif30hY9rfaJYG//jbzqllRdY=; b=h0kh5CE0nq3xJj8iM0CASKEOFP PAGxRYvJkHlu+SYhRaSSU24ZuTxm/mRvxpKBfi3Fxw1CC1X+GFWkKp/2rw3m6D+O1h1HT00r+ah+h MFfCz2D0bUzL77/btL+9245IAGVPzzDBsGko/98GXDEb8Q3ggqQsB4/MVA+cbOXnHKpHTu7IGCHJb CG+VIBcYvRSa0rszUNQXYDeynjVbWzPQKJ+tC3sis72VAGapyMN6UHzcXzS/fqpLjOU8EujW1iiaX nKJfcgbk+UUy4l0vEOe/5BspQTZmclq/lH7V4RiqEGJVyS9pZsAOV8a8AwpnOTsEoSl48L9mtk89x NKrt+g6w==; Received: from cpe-50-113-33-148.hawaii.res.rr.com ([50.113.33.148]:38782 helo=poto-foou.tsdye.online) by box2035.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qTnUy-000np9-L8; Wed, 09 Aug 2023 12:01:32 -0600 References: <874jlbkqxl.fsf@christianmoe.com> <87zg31uwn5.fsf@tsdye.online> User-agent: mu4e 1.6.10; emacs 27.1 From: "Thomas S. Dye" To: Zenny Cc: "Thomas S. Dye" , emacs-orgmode@gnu.org Subject: Re: kaobook tex template integration to a org file to make self-contained, portable? Date: Wed, 09 Aug 2023 07:21:04 -1000 In-reply-to: Message-ID: <87r0ocumbp.fsf@tsdye.online> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box2035.bluehost.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tsdye.online X-BWhitelist: no X-Source-IP: 50.113.33.148 X-Source-L: No X-Exim-ID: 1qTnUy-000np9-L8 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-50-113-33-148.hawaii.res.rr.com (poto-foou.tsdye.online) [50.113.33.148]:38782 X-Source-Auth: tsd@tsdye.online X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: dHNkeWVvbmw7dHNkeWVvbmw7Ym94MjAzNS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfAv/SL4SPqj43MtFbUwg5PxQNcsArzlQsv3yz6ucgIyXzCU88b2L0uz9gUG1BFO+IZNLsu5G7imJaD/Np16t/OGoa0b+drwHNXMjkoJb9+8G8l3abl97 SNHgYo1yl4qmfhceEc8INh/LZiVsQhEwYgCUlrqx56cQhrvR5HnDFfN8KnyJ3Vrc0y11bCJ5vrHxlUsoADMQUSMwzU/cp/PFjU4= Received-SPF: pass client-ip=44.202.169.35; envelope-from=tsd@tsdye.online; helo=omta036.useast.a.cloudfilter.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FROM_SUSPICIOUS_NTLD=0.001, PDS_OTHER_BAD_TLD=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: -2.47 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: 120F23D3B3 X-Spam-Score: -2.47 X-TUID: LKpTPkqjIr3P Aloha Zenny, Zenny writes: > Aloha Tom, > > Thank you for taking time to respond with an useful pointer. I=20 > feel like I reached the right person who is an expert in both=20 > LaTeX and Orgmode who has contributed to org-tufte book > earlier as seen in your github repo. I am a novice, fyi. > > I appreciate if you take some time to point out the non-standard=20 > features in order to make Orgmode can recognize. > > On Tue, Aug 8, 2023 at 10:06=E2=80=AFPM Thomas S. Dye = =20 > wrote: > > Aloha Zenny, > > Zenny writes: > > > > However, the pdf did not inherit all the kaobook template=20 > > features like:=20 > > > > 1 Mini table of contents in the margin at the start of each=20 > > chapter. > > 2 Chapter headings. > > 3 Huge chapter number with a vertical line > > The kaobook.cls defines non-standard LaTeX commands for some of=20 > its features. Org mode doesn't know about these, so you'll=20 > have=20 > to figure out how Org mode can recognize and export them. > I haven't used kaobook, so I can't offer specific pointers. I=20 have used Tufte LaTeX with Org mode, so I can give general=20 pointers. A LaTeX class, such as kaobook, typically redefines standard LaTeX=20 commands and environments, and also defines non-standard commands=20 and environments. So, you should first check if your system=20 correctly compiles a pdf from the LaTeX examples supplied with=20 kaobook. When the LaTeX side is working correctly, then you'll=20 want to identify non-standard commands and environments defined by=20 the kaobook class. In the style and class files you might search=20 for \newcommand and \newenvironment, or the documentation might=20 identify the user facing non-standard commands and environments.=20 These are the ones you'll need to configure specially. I typically use Org mode macros to insert non-standard LaTeX=20 commands. Here are some I use with non-standard commands from=20 Tufte LaTex: #+MACRO: newthought \newthought{$1} #+MACRO: sidenote \sidenote[$2][$3]{$1} #+MACRO: marginnote \marginnote[$2]{$1} #+MACRO: urlnote \sidenote[$2][$3]{=E2=80=8B\url{$1}=E2=80=8B} Non-standard environments are a bit trickier. First, you might be able to wrap the non-standard environment like=20 this in your Org mode file: #+begin_<> Something that should be wrapped in <>. #+end_<> For figures and tables, you can pass an arbitrary argument to=20 :float. I do this for the Tufte LaTeX marginfigure environment: #+attr_latex: :float marginfigure :height 1.2in #+attr_latex: :float marginfigure :options angle=3D90 #+attr_latex: :placement [ht!] \setfloatalignment{b} The last example abuses attr_latex to pass a non-standard LaTeX=20 command that Tufte LaTeX uses to tweak the vertical alignment of=20 the figure.=20=20 Good luck! hth, Tom --=20 Thomas S. Dye https://tsdye.online/tsdye