From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IAg1ByJJ4GHYYwAAgWs5BA (envelope-from ) for ; Thu, 13 Jan 2022 16:45:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kLPbAyJJ4GGibQEAauVa8A (envelope-from ) for ; Thu, 13 Jan 2022 16:45:38 +0100 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 819AA12EB3 for ; Thu, 13 Jan 2022 16:45:37 +0100 (CET) Received: from localhost ([::1]:60994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n82IC-0008O7-18 for larch@yhetil.org; Thu, 13 Jan 2022 10:45:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n82Dt-0005hA-6H for emacs-orgmode@gnu.org; Thu, 13 Jan 2022 10:41:09 -0500 Received: from mout01.posteo.de ([185.67.36.65]:52341) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n82Dp-0002Fj-W3 for emacs-orgmode@gnu.org; Thu, 13 Jan 2022 10:41:08 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 1384E240026 for ; Thu, 13 Jan 2022 16:41:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642088464; bh=G930F3CLPEoR34HkhsU/ql6g9k0CrBWMTUwBR+8GLVA=; h=From:To:Cc:Subject:Date:From; b=DmX/9aK/vsmeye757WIGasinWSGpS3Jy8Zy3u2AiWN8vlAqAllFPBagAcQ9dMxZ9H iabtCxivxVc6g3w2lptBGJsibqt49L/A90Q37jzqwlrdFSgX0dbJZHGhSLWSZ0AzCl usfLVvXYdbHrK096bpXHuNHWyYn9o3wa10GPkH34VkhBNRPxF4sXtKPDVyLRKs0aiU VpqcHpiFJuoxQebEkjfXzJdWKsUN/Kn78dS3YvMY9v8MVEUFScThzz3KwhHVqxJqXF BWlBKhSK5usjzRwkmbIIB8F6tV7iOaEe8zTNPYgIVn1pgpTd8hCifSU77/aftTMKO7 cJP8pnVjW+EUQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JZTDH2PTqz9rxK; Thu, 13 Jan 2022 16:41:03 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Eric S Fraga Subject: Re: puzzled about :fit for LaTeX src block References: <87czkxkso8.fsf@ucl.ac.uk> <871r1c3m4i.fsf@posteo.net> <87r19cj61o.fsf@ucl.ac.uk> <87zgnzdgw7.fsf@posteo.net> <877db3kfie.fsf@ucl.ac.uk> Date: Thu, 13 Jan 2022 15:41:01 +0000 In-Reply-To: <877db3kfie.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 13 Jan 2022 12:05:13 +0000") Message-ID: <87o84fd4oi.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-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: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642088737; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NERgqus6cLotpe3Gnyk9AwhsfF0sZb5hs3Eq5sUCwDE=; b=I+5H6eig8ug9u2NFK0sNFh9keki7AznEVhF0sZuQjewrle7Fh7pga45FtcM3FT6loH/LNW lSYpMeHYdK/tiakEZawXX38Glz5en0sba5Kg7G9+wVJAeRwF6lZ8gXwzbvzxebpW89+v0G XghprtMM/5LYLSOrnwxFdeP1y/VPUjuNNhH4HnC0eFQRVRw4E5vKjcEYDspS51KYRWa0iR mF3SIrfYYCqkWo0aXhf8qwEBpIA4uGZn0Uc7D+uijLuLcx8VAMnpzep5u2Wiq/xsoALJgM 3quClpc+tJH4H4tn1esOu6FzsEa5WP9Z3OkNBbEbvo6QVyLGjE1bg3ITNA6w7g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642088737; a=rsa-sha256; cv=none; b=Oyt2LQiLfrRBPDEvKzu53sR1nu7LCpbE3djtbwyE5b4WL9gxAhsoUk6BUrccdFE2xxfhoT 4cHB0bfCmCHLaC220SHFx3onEEtxTl33WKjn0xpVUbsl0BNWvEwwLI985xcqkGtCnlHOvt 7n/EWv3tHUZfTNlZ2zZrCQIMdwCMu2G7TgzOlNfnWWJPEazVNYceI5H9dw+LY8HUW46oZx JQ0H4nBoWgKrwzx9lBerW8g5sk2mRB6Hj2SJpN/y4dwT/FSFR6EZFh8OXGhFPpxNrA8iI2 Mz+Sl4ITo0ZR9FTY+zED86s8FFpa26OqNak3yWC39Kh8P2Iiz8VnBbKv3pDRJg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="DmX/9aK/"; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Spam-Score: -4.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="DmX/9aK/"; dmarc=pass (policy=none) header.from=posteo.net; 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" X-Migadu-Queue-Id: 819AA12EB3 X-Spam-Score: -4.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: MMrSE3hES323 Eric S Fraga writes: > This did it! Thank you. I am curious now to find out what tool was > used instead... something for later today! Well, it seems that if you use ":imagemagick yes", the image is created with the `org-babel-latex-convert-pdf' function. I almost always use this to create images from latex blocks, for example: #+begin_src latex: imagemagick yes :iminoptions -density 600 \bfseries Hello world! #+end_src ":fit" crop the image, but you can also put in your "org-format-latex-header" "\\documentclass[varwidth]{standalone}" On the contrary, without :imagemagick, but with results to *.png file, `org-create-formula-image' is used, which depends on "org-preview-latex-process-alist" and "org-preview-latex-default-process". Since I only use LuaTeX for everything, I have this in my init, in order to preview LaTeX fragments: (setq luamagick '(luamagick :programs ("lualatex" "convert") :description "pdf > png" :message "you need to install lualatex and imagemagick." :use-xcolor t :image-input-type "pdf" :image-output-type "png" :image-size-adjust (1.0 . 1.0) :latex-compiler ("lualatex -interaction nonstopmode -output-directory %o %f") :image-converter ("convert -density %D -trim -antialias %f -quality 100 %O"))) (add-to-list 'org-preview-latex-process-alist luamagick) (setq org-preview-latex-default-process 'luamagick) Note that the -trim option for the "convert" program (last line) allows you to crop the image from the pdf page. Best regards, Juan Manuel