From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Fraga, Eric" Subject: Re: How to change the width of a latex exported inlinetask? Date: Wed, 30 Oct 2019 14:55:23 +0000 Message-ID: <87ftjagu5i.fsf@ucl.ac.uk> References: <23993.40052.641597.871776@frac.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36710) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPpNg-00059S-10 for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:55:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPpNe-0000sb-UB for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:55:27 -0400 Received: from mail-eopbgr10134.outbound.protection.outlook.com ([40.107.1.134]:59617 helo=EUR02-HE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iPpNe-0000lU-DF for emacs-orgmode@gnu.org; Wed, 30 Oct 2019 10:55:26 -0400 Content-Language: en-US List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: "Alain.Cochard@unistra.fr" Cc: "emacs-orgmode@gnu.org" On Wednesday, 30 Oct 2019 at 15:21, Alain.Cochard@unistra.fr wrote: > Hello. > > By default, the width of LaTeX exported inlinetasks is less than that > of regular text. > > I would like to be able to change this default, ideally both on a > per-file basis and a per-inlinetask basis (but either way would > already very good!). > > Despite some Internet searching, I could not find a way. I am aware of > org-latex-format-inlinetask-function, but I don't know how to use > it... I have the following which, although it does not do what you want, it may give you some pointers: #+begin_src emacs-lisp (defun org-latex-format-inlinetask (todo type priority name tags contents= info) "Format an inline task element for LaTeX export." (let ((theinlinetask (concat todo " " name "\n\n\\noindent " contents))= ) (if (and todo (not (equal todo "NOTE"))) (format "\\footnote{%s}\\marginpar{\\fbox{\\tiny\\thefootnote. %s= }}" theinlinetask todo) (format "\\hl{%s}" contents)))) (setq org-latex-format-inlinetask-function 'org-latex-format-inlinetask) #+end_src You can trim this down and replace the \\hl{%s} with, for instance, an mdframed environment which allows you to control the width easily. I will add that, for a number of reasons including advice from this list, I have moved away from inline tasks almost completely and now use drawers instead. --=20 Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78