Re: [patch] Add two new header args to LaTeX block

2024-02-19 Thread Juan Manuel Macías
Ihor Radchenko writes: > Juan Manuel Macías writes: > >>> I'd prefer to refactor `org-babel-execute:latex' first, before adding >>> new header arguments. >> >> org-create-formula-image inserts LaTeX code: > > `org-create-formula-image' will be obsoleted after Timothy merges his > latex preview

Re: [patch] Add two new header args to LaTeX block

2024-02-19 Thread Ihor Radchenko
Juan Manuel Macías writes: >> I'd prefer to refactor `org-babel-execute:latex' first, before adding >> new header arguments. > > org-create-formula-image inserts LaTeX code: `org-create-formula-image' will be obsoleted after Timothy merges his latex preview branch. If the new implementation

Re: [patch] Add two new header args to LaTeX block

2024-02-18 Thread Juan Manuel Macías
Ihor Radchenko writes: >> In any case, if the org-create-formula-image method is going to stay, I >> think it is fine as it is (except for extending the allowed file formats >> to more extensions, and not only .png). I also believe that the :process >> argument is sufficient for the user to

Re: [patch] Add two new header args to LaTeX block

2024-02-18 Thread Ihor Radchenko
Juan Manuel Macías writes: > It is true that the "org-create-formula-image" method is much more > complete. But, IMHO, I think it's a method focused on the buffer (rather > than the block) or previewing LaTeX code in the buffer. What do you mean? `org-create-formula-image' is passed a string of

Re: [patch] Add two new header args to LaTeX block

2024-02-13 Thread Juan Manuel Macías
Ihor Radchenko writes: > Juan Manuel Macías writes: > >>> Moreover, it would be nice to unify handling .png and imagemagick >>> branches of the code. >> >> I agree. In any case, I still think that the coexistence of two methods >> to convert to images, when one of the methods has a scheme so

Re: [patch] Add two new header args to LaTeX block

2024-02-13 Thread Ihor Radchenko
Juan Manuel Macías writes: >> Moreover, it would be nice to unify handling .png and imagemagick >> branches of the code. > > I agree. In any case, I still think that the coexistence of two methods > to convert to images, when one of the methods has a scheme so different > from the rest, becomes

Re: [patch] Add two new header args to LaTeX block

2024-02-11 Thread Juan Manuel Macías
Ihor Radchenko writes: > Got it. > Although, it is confusing to have different formats of :process > value depending on :file extension. Indeed. For that reason I changed the original name I gave from ":pdf-process" to simply ":process". IMHO this function has a tremendous problem: two methods

Re: [patch] Add two new header args to LaTeX block

2024-02-11 Thread Ihor Radchenko
Juan Manuel Macías writes: >> Considering that 'imagemagick is one of the variants in >> `org-preview-latex-process-alist', it might be reasonable to allow >> :process imagemagick == :imagemagick yes > > I wouldn't equate it. ':imagemagic yes' uses 'org-latex-convert-pdf'. > Instead, «:process

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Juan Manuel Macías
Ihor Radchenko writes: > Juan Manuel Macías writes: > >> I am attaching a new patch with this idea incorporated. I have also >> changed the name from full-to-pdf to standalone. >> >> + (process (cdr (assq :process params))) >> + (org-preview-latex-default-process (if (and

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Ihor Radchenko
Juan Manuel Macías writes: > I am attaching a new patch with this idea incorporated. I have also > changed the name from full-to-pdf to standalone. > > + (process (cdr (assq :process params))) > + (org-preview-latex-default-process (if (and process > +

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Juan Manuel Macías
Juan Manuel Macías writes: >> Ihor Radchenko writes: >> Would it make sense to make :pdf-process work for png previews as well? > > It would be ideal. The expected value for org-latex-pdf-process is a > command or a list of commands, but org-preview-latex-default-process > expects a plist of

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Juan Manuel Macías
Ihor Radchenko writes: > Juan Manuel Macías writes: > >>> May you please explain in more detail how these new header arguments fit >>> into other available LaTeX code block parameters? In particular, when >>> exporting to .png/.svg/.html or when :imagemagick header argument is >>> provided. >>

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Ihor Radchenko
Juan Manuel Macías writes: >> May you please explain in more detail how these new header arguments fit >> into other available LaTeX code block parameters? In particular, when >> exporting to .png/.svg/.html or when :imagemagick header argument is >> provided. > > Sure! `:pdf-process' simply

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Juan Manuel Macías
Ihor Radchenko writes: > Juan Manuel Macías writes: > >> The attached patch adds two new header args to the LaTeX block: >> >> - `:pdf-process' allows modifying the value of `org-latex-pdf-process' >> locally to the block. This can be useful for evaluating a given block >> with another LaTeX

Re: [patch] Add two new header args to LaTeX block

2024-02-10 Thread Ihor Radchenko
Juan Manuel Macías writes: > The attached patch adds two new header args to the LaTeX block: > > - `:pdf-process' allows modifying the value of `org-latex-pdf-process' > locally to the block. This can be useful for evaluating a given block > with another LaTeX compiler, or even using some