* How to change the width of a latex exported inlinetask?
@ 2019-10-30 14:21 Alain.Cochard
2019-10-30 14:55 ` Fraga, Eric
0 siblings, 1 reply; 4+ messages in thread
From: Alain.Cochard @ 2019-10-30 14:21 UTC (permalink / raw)
To: emacs-orgmode
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...
Thank you for any help.
Regards,
alain
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to change the width of a latex exported inlinetask?
2019-10-30 14:21 How to change the width of a latex exported inlinetask? Alain.Cochard
@ 2019-10-30 14:55 ` Fraga, Eric
2019-11-01 22:48 ` Alain.Cochard
0 siblings, 1 reply; 4+ messages in thread
From: Fraga, Eric @ 2019-10-30 14:55 UTC (permalink / raw)
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.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to change the width of a latex exported inlinetask?
2019-10-30 14:55 ` Fraga, Eric
@ 2019-11-01 22:48 ` Alain.Cochard
2019-11-02 10:34 ` Fraga, Eric
0 siblings, 1 reply; 4+ messages in thread
From: Alain.Cochard @ 2019-11-01 22:48 UTC (permalink / raw)
To: Fraga, Eric; +Cc: emacs-orgmode@gnu.org, Alain.Cochard@unistra.fr
Fraga, Eric writes on Wed 30 Oct 2019 14:55:
> > 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 be very good!).
> 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 have succeeded, following exactly what you suggested. Thank you
very much.
(It also fixes the problem that standard inlinetasks don't seem to
span over multiple pages...)
--
EOST (École et Observatoire des Sciences de la Terre)
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes [bureau 106] | Phone: +33 (0)3 68 85 50 44
F-67084 Strasbourg Cedex, France | Fax: +33 (0)3 68 85 01 25
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to change the width of a latex exported inlinetask?
2019-11-01 22:48 ` Alain.Cochard
@ 2019-11-02 10:34 ` Fraga, Eric
0 siblings, 0 replies; 4+ messages in thread
From: Fraga, Eric @ 2019-11-02 10:34 UTC (permalink / raw)
To: Alain.Cochard@unistra.fr; +Cc: emacs-orgmode@gnu.org
On Friday, 1 Nov 2019 at 23:48, Alain.Cochard@unistra.fr wrote:
> I have succeeded, following exactly what you suggested. Thank you
> very much.
Excellent. You're very welcome.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-552-g8c5a78
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-02 10:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30 14:21 How to change the width of a latex exported inlinetask? Alain.Cochard
2019-10-30 14:55 ` Fraga, Eric
2019-11-01 22:48 ` Alain.Cochard
2019-11-02 10:34 ` Fraga, Eric
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).