* Re: I can't set dabbrev to respect the writen case
2022-05-15 10:40 7% ` Ypo
@ 2022-05-15 13:58 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-15 13:58 UTC (permalink / raw)
To: Ypo; +Cc: orgmode
Ypo writes:
> These are my variables, it keeps changing what I have already written:
>
> '(case-replace nil)
>
> '(dabbrev-case-distinction t)
> '(dabbrev-case-fold-search t)
> '(dabbrev-case-replace t)
> '(dabbrev-upcase-means-case-search nil)
With those values it works for me as expected. Maybe it's a problem with
your configuration. Try starting emacs with 'emacs -q' and evaluate the
variables with:
M-x eval-expression
(setq dabbrev-case-distinction t
dabbrev-case-fold-search t
dabbrev-case-replace t
abbrev-upcase-means-case-search nil)
RET
I hardly use dabbrev and I'm afraid I can't give you any more tips.
Try asking <emacs-devel@gnu.org> as well.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* [tip] Export and open a PDF in Android via Termux
@ 2022-05-15 11:54 9% Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-15 11:54 UTC (permalink / raw)
To: orgmode
Hi all,
I have recently installed TeX live on Android inside Termux:
$ pkg install texlive-installer
(https://wiki.termux.com/wiki/TeX_Live)
And I've managed to open a PDF exported from Org using an external
android viewer (mupdf, downloaded from f-droid). The Termux command is
termux-open. You need to add:
(setq org-file-apps
'((auto-mode . emacs)
(directory . emacs)
("\\.mm\\'" . default)
("\\.x?html?\\'" . default)
("\\.pdf\\'" . "termux-open %s")))
It is necessary also to uncomment the line 'allow-external-apps = true' in '~/.termux/termux.properties'.
And to open the PDF from AUCTeX:
(setq TeX-view-program-list '(("termux" "termux-open %o")))
(setq TeX-view-program-selection
'(((output-dvi has-no-display-manager)
"dvi2tty")
((output-dvi style-pstricks)
"dvips and gv")
(output-dvi "xdvi")
(output-pdf "termux")
(output-html "xdg-open")))
A screencast: https://imgur.com/a/iBvwDTo
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: I can't set dabbrev to respect the writen case
2022-05-14 22:32 10% ` Juan Manuel Macías
@ 2022-05-15 10:40 7% ` Ypo
2022-05-15 13:58 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ypo @ 2022-05-15 10:40 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
Thanks, Juan Manuel.
These are my variables, it keeps changing what I have already written:
'(case-replace nil)
'(dabbrev-case-distinction t)
'(dabbrev-case-fold-search t)
'(dabbrev-case-replace t)
'(dabbrev-upcase-means-case-search nil)
Best regards,
Ypo
El 15/05/2022 a las 0:32, Juan Manuel Macías escribió:
> Ypo writes:
>
>> Hi
>>
>> I find dabbrev and fancy-dabbrev very useful to typing fast. But there
>> is a problem I am not able to solve: When I apply an expansion while
>> writing, the case is always that of the expansion, I can't make it to
>> respect what I have written. An example:
>>
>> — (Typing) "Hel
>>
>> — (Offered expansion) "hello"
>>
>> — (What I get when accepting the expansion) "hello"
>>
>> — (What I wanted) "Hello"
>>
>> Best regards,
>>
>> Ypo
>>
> Take a look at these variables. I have them configured as non-nil:
>
> (setq dabbrev-case-replace t)
>
> (setq dabbrev-case-fold-search t)
>
> Best regards,
>
> Juan Manuel
[-- Attachment #2: Type: text/html, Size: 1623 bytes --]
^ permalink raw reply [relevance 7%]
* Re: I can't set dabbrev to respect the writen case
@ 2022-05-14 22:32 10% ` Juan Manuel Macías
2022-05-15 10:40 7% ` Ypo
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-14 22:32 UTC (permalink / raw)
To: Ypo; +Cc: orgmode
Ypo writes:
> Hi
>
> I find dabbrev and fancy-dabbrev very useful to typing fast. But there
> is a problem I am not able to solve: When I apply an expansion while
> writing, the case is always that of the expansion, I can't make it to
> respect what I have written. An example:
>
> — (Typing) "Hel
>
> — (Offered expansion) "hello"
>
> — (What I get when accepting the expansion) "hello"
>
> — (What I wanted) "Hello"
>
> Best regards,
>
> Ypo
>
Take a look at these variables. I have them configured as non-nil:
(setq dabbrev-case-replace t)
(setq dabbrev-case-fold-search t)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: simple request letter - help
2022-05-13 19:06 3% ` andrés ramírez
@ 2022-05-13 20:30 9% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-13 20:30 UTC (permalink / raw)
To: andrés ramírez; +Cc: orgmode
andrés ramírez writes:
> Right. It is giving me an error I have NOT noticed it because the pdf is
> being generated.
Your document is probably compiled on export with the
`-intercaction=nonstopmode' option, and thus does not break the
compilation with an error. In any case, I don't really understand why
you export that part literally to LaTeX and why you add the & at
beginning of line:
& John Doe\\
& ID: XXXXXXXX
Those characters are usually reserved for tabular
environments, so LaTeX returns an error. If you want to use an &
literally in LaTeX you must escape it as \&. But if you write the
anpersand directly in Org Mode you don't need to escape it, since Org
takes care of it when it exports the document.
Also, in the signature you could also avoid direct formatting. You can
define a simple environment, with an extra space before it, if you need
to add that space. This is a very elementary example, based on your
format. Then you can use in Org a special block, with the name of the
environment:
#+LaTeX_Header: \newenvironment{signature}{\bigskip\raggedright\makebox[1.5in]{\hrulefill}\par}{\par}
#+begin_signature
John Doe
ID: XXXXXXXX
#+end_signature
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: simple request letter - help
2022-05-13 18:22 8% ` Juan Manuel Macías
@ 2022-05-13 19:06 3% ` andrés ramírez
2022-05-13 20:30 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: andrés ramírez @ 2022-05-13 19:06 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hi. Juan.
My comments below.
>>>>> "Juan" == Juan Manuel Macías <maciaschain@posteo.net> writes:
[...]
Juan> section is not indented. This is what is happening :):
That is good to know.
Juan> section no indent ------------- indent ---------- indent ----------
[...]
Juan> is enough that you add this:
Juan> #+LaTeX_Header: \parindent=0em\parskip=\bigskipamount
It worked for most part of the document. But I Think I need the double
of space before the signature.
[...]
Juan> On the other hand, this code at the end does not give you an error?
Juan> \makebox[1.5in]{\hrulefill} \hspace {1.0in} \\ & John Doe \\ & ID: XXXXXXXX\\
Right. It is giving me an error I have NOT noticed it because the pdf is
being generated.
Best Regards
^ permalink raw reply [relevance 3%]
* Re: simple request letter - help
2022-05-13 17:19 2% ` andrés ramírez
@ 2022-05-13 18:22 8% ` Juan Manuel Macías
2022-05-13 19:06 3% ` andrés ramírez
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-13 18:22 UTC (permalink / raw)
To: andrés ramírez; +Cc: orgmode
hi Andrés,
andrés ramírez writes:
> Hi. Juan.
> My comments below.
I'll explain what happens. There really isn't an alignment issue. TeX by
default applies a first line indent to paragraphs. It also defaults to
applying English typographical conventions, as is the case in your
document, where the first paragraph following a section is not indented.
This is what is happening :):
section
no indent -------------
indent ----------
indent ----------
Another more general typographical convention is that when paragraphs
are separated by a vertical space, they do not need to indent the first
line, as it is a redundant mark. Besides, you are making paragraph
separation by direct format (\bigskip). I usually recommend not applying
direct format in LaTeX, or applying it as little as possible. To disable
the first line indentation and make the paragraphs have a space between
them, it is enough that you add this:
#+LaTeX_Header: \parindent=0em\parskip=\bigskipamount
That way, you're giving the first line indentation a global value of
zero and a paragraph spacing value equivalent to \bigskip, and you don't
need to put a \bigsip every time you start a paragraph.
On the other hand, this code at the end does not give you an error?
\makebox[1.5in]{\hrulefill} \hspace {1.0in} \\
& John Doe \\
& ID: XXXXXXXX\\
best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: simple request letter - help
2022-05-13 17:04 10% ` Juan Manuel Macías
@ 2022-05-13 17:19 2% ` andrés ramírez
2022-05-13 18:22 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: andrés ramírez @ 2022-05-13 17:19 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hi. Juan.
My comments below.
>>>>> "Juan" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Juan> Can you please copy the contents of your .tex file here: `M-x org-export-disptatch l l'?
--8<---------------cut here---------------start------------->8---
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\date{}
\title{}
\hypersetup{
pdfauthor={Andrés Ramírez},
pdftitle={},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 28.1 (Org mode 9.5.2)},
pdflang={English}}
\begin{document}
\section*{}
\label{sec:orgbc8783b}
Me John Doe with ID number XXXXXXXX request to install me the water service \ldots{}.
\bigskip
I am sharing the payment receipt for the service in an attachment
\bigskip
Sincerely.
\makebox[1.5in]{\hrulefill} \hspace {1.0in} \\
& John Doe \\
& ID: XXXXXXXX\\
\end{document}
--8<---------------cut here---------------end--------------->8---
Best Regards
^ permalink raw reply [relevance 2%]
* Re: simple request letter - help
@ 2022-05-13 17:04 10% ` Juan Manuel Macías
2022-05-13 17:19 2% ` andrés ramírez
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-13 17:04 UTC (permalink / raw)
To: Andrés Ramírez; +Cc: orgmode
Hi Andrés,
Andrés Ramírez writes:
> When I export the file M-x org-export-distpach l p
>
> The second and third paragraph do nat have right alignment as the first
> paragraph.
Can you please copy the contents of your .tex file here: `M-x
org-export-disptatch l l'?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: citation-style-language: new LaTeX package in TL 2022
2022-05-12 10:44 9% citation-style-language: new LaTeX package in TL 2022 Juan Manuel Macías
@ 2022-05-12 11:34 6% ` Bruce D'Arcus
0 siblings, 0 replies; 200+ results
From: Bruce D'Arcus @ 2022-05-12 11:34 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Thu, May 12, 2022 at 7:11 AM Juan Manuel Macías
<maciaschain@posteo.net> wrote:
> I'm not sufficiently familiar (at the moment) with org-cite, but I share
> the news here in case this new LaTeX package could have some kind of use
> for org-cite export options.
I've played with it a bit, and it does look promising.
I think whether and where it might fit in org-cite (a feature added to
oc-csl, or a new export processor) might depend on how its command
options evolve. Right now, it has a single "cite" command.
Bruce
^ permalink raw reply [relevance 6%]
* citation-style-language: new LaTeX package in TL 2022
@ 2022-05-12 10:44 9% Juan Manuel Macías
2022-05-12 11:34 6% ` Bruce D'Arcus
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-12 10:44 UTC (permalink / raw)
To: orgmode
Hi all,
TeX Live 2022 includes a new LaTeX package for citations,
'citation-style-language', written by Zeping Lee. According to the
package description:
"[...] The citation-style-language package is aimed to provide another
reference formatting method for LaTeX that utilizes the CSL styles. It
contains a citation processor implemented in pure Lua (citeproc-lua)
which reads bibliographic metadata and performs sorting and formatting
on both citations and bibliography according to the selected CSL style.
A LaTeX package (citation-style-language.sty) is provided to communicate
with the processor."
https://ctan.org/pkg/citation-style-language
https://github.com/zepinglee/citeproc-lua
I'm not sufficiently familiar (at the moment) with org-cite, but I share
the news here in case this new LaTeX package could have some kind of use
for org-cite export options.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: export to latex: begin_example gets exported to verbatim (
2022-05-12 8:52 10% ` Juan Manuel Macías
@ 2022-05-12 10:02 0% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-05-12 10:02 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Uwe Brauer, orgmode
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Uwe,
> Uwe Brauer writes:
>> Which gets exported to verbatim not lstlisting as I want
> Try adding this:
> :wrap lstlisting
It does! Thanks!
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: export to latex: begin_example gets exported to verbatim (
@ 2022-05-12 8:52 10% ` Juan Manuel Macías
2022-05-12 10:02 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-12 8:52 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Uwe Brauer writes:
> Which gets exported to verbatim not lstlisting as I want
Try adding this:
:wrap lstlisting
(I don't use matlab, but I think that should work).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* A function that converts a LaTeX document to an Elisp expression (for org-latex-classes)
@ 2022-05-10 10:32 7% Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-10 10:32 UTC (permalink / raw)
To: orgmode
Hi all,
In case anyone finds it useful, I'm sharing this function here that I
recently wrote, to convert a LaTeX buffer to an Elisp expression,
suitable for adding to `org-latex-classes'. It's a bit rudimentary, but
I think it does the trick. It can be useful for long preambles with a
lot of (La)TeX code. Although if you are dealing with bizarrely large preambles
that are used often, I would recommend writing your own .sty file
(https://tex.stackexchange.com/questions/8750/make-your-own-sty-files).
The funny thing is that doing it from Org is much easier than from the
official LaTeX utility for creating packages through literary
programming, docstrip.
As for my function, the LaTeX document to be converted must have this skeleton:
- Preamble
- `\begin{document}'
- An ordered list of section names (one name per line). For example:
chapter
section
subsection
susbsubsection
etc
- `\end{document}'
Best regards,
Juan Manuel
#+begin_src emacs-lisp
(defun create-new-org-latex-class-from-latex-buffer ()
"Convert the current LaTeX buffer to an appropriate Elisp
expression to add to `org-latex-classes'. The LaTeX document must
have the following structure:
- Preamble
- `\begin{document}'
- A list of section names (one name per line). For example:
section
subsection
susbsubsection
etc
- `\end{document}'"
(interactive)
(if (not (equal (format "%s" major-mode) "latex-mode"))
(error "Not in a LaTeX buffer")
(let* ((class-name (read-from-minibuffer "Class name: "))
(preamble-beg (with-current-buffer
(buffer-name)
(save-excursion
(goto-char (point-min))
(point))))
(preamble-end (with-current-buffer
(buffer-name)
(save-excursion
(goto-char (point-min))
(re-search-forward "\\\\begin{document}" nil t)
(beginning-of-line)
(point))))
(packages "[NO-DEFAULT-PACKAGES]
[PACKAGES]
[EXTRA]")
(preamble (concat
(buffer-substring-no-properties preamble-beg preamble-end)
packages))
(preamble-list (list preamble))
(sections-list)
(sections-list-populate (with-current-buffer (buffer-name)
(save-excursion
(goto-char (point-min))
(let ((beg-sec
(save-excursion
(re-search-forward "\\\\begin{document}" nil t)
(point)))
(end-sec
(save-excursion
(re-search-forward "\\\\end{document}" nil t)
(beginning-of-line)
(point))))
(save-restriction
(narrow-to-region beg-sec end-sec)
(while (re-search-forward "\\(^.+\\)" nil t)
(push (substring-no-properties (match-string 1)) sections-list)))
(reverse sections-list)))))
(section-list-final (mapcar
(lambda (x)
(let ((car (format "\\%s{%%s}" x))
(cdr (format "\\%s*{%%s}" x)))
(cons car cdr)))
sections-list-populate))
(list-final (append (list class-name) preamble-list section-list-final))
(format-list (format "%S" list-final)))
(when (get-buffer "*class*")
(kill-buffer "*class*"))
(get-buffer-create "*class*")
(with-current-buffer "*class*"
(insert format-list))
(temp-buffer-window-show "*class*"))))
#+end_src
^ permalink raw reply [relevance 7%]
* Re: [tip] Insert arbitrary LaTeX code at the beginning of any float environment
2022-05-09 14:01 10% ` Juan Manuel Macías
@ 2022-05-09 14:14 6% ` Eric S Fraga
0 siblings, 0 replies; 200+ results
From: Eric S Fraga @ 2022-05-09 14:14 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Ihor Radchenko, orgmode
On Monday, 9 May 2022 at 14:01, Juan Manuel Macías wrote:
> Although ---as Eric says--- we can always use special blocks, a :wrap
> attribute would drastically lighten the readability of the document,
One advantage of special blocks is that they work across all
(some/most/?) export backends and are not tied to LaTeX.
--
: Eric S Fraga, with org release_9.5.3-478-g2a6f5c in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: [tip] Insert arbitrary LaTeX code at the beginning of any float environment
2022-05-09 12:47 6% ` Ihor Radchenko
@ 2022-05-09 14:01 10% ` Juan Manuel Macías
2022-05-09 14:14 6% ` Eric S Fraga
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-09 14:01 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Eric S Fraga, orgmode
Ihor Radchenko writes:
> I'd be happy to see a built-in solution for this.
> I feel that the ability to insert arbitrary LaTeX code near the
> begin/end of environment would be generally a useful feature to have in
> ox-latex. It could be done via #+attr_latex: :pre/:post
>
> Moreover, it would be useful to be able to wrap the whole chunk into
> custom environment:
> #+attr_latex: :wrap [options]environmant
>
> WDYT?
I think they are both great ideas, especially the second one. Although
---as Eric says--- we can always use special blocks, a :wrap attribute
would drastically lighten the readability of the document, and could be
very useful in those complex constructions where we need to enclose a
table or a figure in another environment (for example, with the
threeparttable package and others like it).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [tip] Insert arbitrary LaTeX code at the beginning of any float environment
2022-05-08 22:22 8% [tip] Insert arbitrary LaTeX code at the beginning of any float environment Juan Manuel Macías
@ 2022-05-09 12:47 6% ` Ihor Radchenko
2022-05-09 14:01 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-05-09 12:47 UTC (permalink / raw)
To: Juan Manuel Macías, Timothy; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> If we want to introduce arbitrary LaTeX code at the very beginning of a
> float environment, apart from the usual tricks of putting the code in
> :caption or :placement, this solution I describe here is more from the
> LaTeX side. I thik its advantages are more control and consistency from
> the point of view of LaTeX, and the possibility of introducing code of a
> certain complexity.
I'd be happy to see a built-in solution for this.
I feel that the ability to insert arbitrary LaTeX code near the
begin/end of environment would be generally a useful feature to have in
ox-latex. It could be done via #+attr_latex: :pre/:post
Moreover, it would be useful to be able to wrap the whole chunk into
custom environment:
#+attr_latex: :wrap [options]environmant
WDYT?
Best,
Ihor
^ permalink raw reply [relevance 6%]
* [tip] Insert arbitrary LaTeX code at the beginning of any float environment
@ 2022-05-08 22:22 8% Juan Manuel Macías
2022-05-09 12:47 6% ` Ihor Radchenko
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-08 22:22 UTC (permalink / raw)
To: orgmode
Hi all,
If we want to introduce arbitrary LaTeX code at the very beginning of a
float environment, apart from the usual tricks of putting the code in
:caption or :placement, this solution I describe here is more from the
LaTeX side. I thik its advantages are more control and consistency from
the point of view of LaTeX, and the possibility of introducing code of a
certain complexity.
Well, you have to write some LaTeX code for the preamble, but it's
really not much :)
We have to define a global command \myenvcode{<arbitrary code>} (if we
want to add the code to all document floats environments), and also a
'Myenvcode' environment, with the same argument. The etoolbox LaTeX
package provides a number of hooks: \AtBeginEnvironment,
\AtEndEnvironment, etc., but if we want our arbitrary code to be at the
very beginning of the environment, it's safer to use the \@floatboxreset
hook. So, the code that we would have to add to our preamble would be (I
prefer to define the command and environment using the xparse syntax):
#+NAME: preamble
#+begin_src latex :exports none
\usepackage{xparse}
\makeatletter
\def\my@envcode{}
\NewDocumentCommand{\myenvcode}{+m}{%
\def\my@envcode{#1}}
\g@addto@macro\@floatboxreset{\my@envcode}
\makeatother
\NewDocumentEnvironment{Myenvcode}{+m}{%
\IfNoValueF{#1}{\myenvcode{#1}}}
{\par}
#+end_src
#+begin_src latex :noweb yes :results raw
,#+LaTeX_HEADER: <<preamble>>
#+end_src
And here a few examples:
#+ATTR_LaTeX: :options {\centering\fbox{Code before a image}\par\vspace{1ex}}
#+begin_Myenvcode
#+CAPTION: This is a image
#+ATTR_LaTeX: :width .5\linewidth :placement [h]
[[file:example-image-a.jpg]]
#+end_Myenvcode
#+ATTR_LaTeX: :options {\captionsetup{font={color=red}}}
#+begin_Myenvcode
#+CAPTION: This is a image
#+ATTR_LaTeX: :width .5\linewidth :placement [h]
[[file:example-image-b.jpg]]
#+end_Myenvcode
#+latex: \myenvcode{{\centering\fbox{Code before a table}\par\vspace{1ex}}}
#+CAPTION: This is a table
#+ATTR_LaTeX: :placement [h] :booktabs t
| a | b | c | d | f |
|---+---+---+---+---|
| 1 | 2 | 3 | 4 | 5 |
#+latex: \myenvcode{}
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: [PATCH] org-attach: Attach current Gnus article parts
2022-05-08 14:18 5% ` Ihor Radchenko
@ 2022-05-08 18:06 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-08 18:06 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> I think that a good example implementation is from notmuch.el. It does
> not use anything specific to notmuch, just built-in mm-*.el from gnus:
Thanks for the tip, Ihor. I'll take a look at it, and see if I can
sketch something usable...
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Export LaTeX command inside figure environment
2022-05-08 6:06 0% ` Thomas S. Dye
@ 2022-05-08 16:12 8% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-08 16:12 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: Maxim Nikulin, orgmode
Thomas S. Dye writes:
> It would be better to have a LaTeX attribute, say :commands, that
> places commands within \begin{figure} ... \end{figure}.
This is a possible solution from the LaTeX side, which would avoid
having to modify the Org code and can also be used to introduce more
complex arbitrary code into the figure environment. It consists of
defining a variable (for arbitrary code) and redefining the figure
environment to include that variable. Something like this:
#+NAME: preamble
#+begin_src latex :exports none
\usepackage{graphicx,xparse}
\def\myfigcode#1{#1}
\let\svfigure\figure
\let\endsvfigure\endfigure
\DeclareDocumentEnvironment{figure}{o}{%
\IfNoValueTF{#1}{%
\begin{svfigure}}
{\begin{svfigure}[#1]}
\myfigcode%
}
{\end{svfigure}}
#+end_src
#+begin_src latex :noweb yes :results raw
,#+LaTeX_HEADER: <<preamble>>
#+end_src
Here I use the dummy images from the graphicx package. Of course, then
it is necessary to apply a zero value to the variable again, or enclose
all in a \begingroup...\endgroup. It's a bit tricky and I haven't tried
it too much:
@@latex:\begingroup\def\myfigcode{{\centering\fbox{\textbf{Hello world!!!}}\par\vspace{5ex}}}@@
#+caption: This is a caption
#+ATTR_LaTeX: :placement [h] :width .5\linewidth
[[file:example-image-a.jpg]]
@@latex:\endgroup@@
#+caption: This is a caption
#+ATTR_LaTeX: :placement [h] :width .5\linewidth
[[file:example-image-b.jpg]]
A screenshot:
https://i.imgur.com/8JIU6nX.png
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: [PATCH] org-attach: Attach current Gnus article parts
2022-05-08 13:23 9% ` Juan Manuel Macías
@ 2022-05-08 14:18 5% ` Ihor Radchenko
2022-05-08 18:06 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-05-08 14:18 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> What I don't quite understand is why it wouldn't be appropriate to add a
> new entry with the new feature to the org-attach menu.
Thinking about it more, new feature in org-attach menu should actually
be ok.
My initial logic was that we cannot easily select attach method for
entries in the attach menu. However, anything other than 'cp method is
meaningless when saving article attachments.
> Well, as I said, I have chosen Gnus because it is part of GNU Emacs. In
> any case, if anyone wants to write a patch with a more general solution,
> I'd encourage them. I think that would be an interesting feature for
> org-attach. I only use Gnus and unfortunately I'm not familiar with
> other mail reader libraries (I could try to do something more "agnostic"
> from message-mode, when I have some more time...).
I think that a good example implementation is from notmuch.el. It does
not use anything specific to notmuch, just built-in mm-*.el from gnus:
(defun notmuch-save-attachments (mm-handle &optional queryp)
(notmuch-foreach-mime-part
(lambda (p)
(let ((disposition (mm-handle-disposition p)))
(and (listp disposition)
(or (equal (car disposition) "attachment")
(and (equal (car disposition) "inline")
(assq 'filename disposition)))
(or (not queryp)
(y-or-n-p
(concat "Save '" (cdr (assq 'filename disposition)) "' ")))
(mm-save-part p))))
mm-handle))
(defun notmuch-foreach-mime-part (function mm-handle)
(cond ((stringp (car mm-handle))
(dolist (part (cdr mm-handle))
(notmuch-foreach-mime-part function part)))
((bufferp (car mm-handle))
(funcall function mm-handle))
(t (dolist (part mm-handle)
(notmuch-foreach-mime-part function part)))))
Best,
Ihor
^ permalink raw reply [relevance 5%]
* Re: [PATCH] org-attach: Attach current Gnus article parts
2022-05-08 12:30 5% ` Ihor Radchenko
@ 2022-05-08 13:23 9% ` Juan Manuel Macías
2022-05-08 14:18 5% ` Ihor Radchenko
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-08 13:23 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> I think that supporting only Gnus is too specific. Not all the people
> use Gnus as mail reader. And the extra menu option you propose will only
> eat up space for people not using Gnus.
>
> I'd prefer a more generic approach working in any kind of email reader,
> be it rmail, gnus, mu4e, notmuch, or wunderlust. The approach can
> probably making use of message-mode or MML libraries from Emacs core.
Well, as I said, I have chosen Gnus because it is part of GNU Emacs. In
any case, if anyone wants to write a patch with a more general solution,
I'd encourage them. I think that would be an interesting feature for
org-attach. I only use Gnus and unfortunately I'm not familiar with
other mail reader libraries (I could try to do something more "agnostic"
from message-mode, when I have some more time...).
What I don't quite understand is why it wouldn't be appropriate to add a
new entry with the new feature to the org-attach menu.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: [PATCH] org-attach: Attach current Gnus article parts
2022-05-07 14:31 8% [PATCH] org-attach: Attach current Gnus article parts Juan Manuel Macías
@ 2022-05-08 12:30 5% ` Ihor Radchenko
2022-05-08 13:23 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-05-08 12:30 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> In the attached patch I add a new command for org-attach: save *all*
> attachments from the current Gnus article to the current org-attach-dir.
>
> (Sorry for repeating the word "attach" so much :-))
>
> NB:
>
> 1. If no Gnus article is open, it returns an error message.
>
> 2. I've only tested it on Emacs 28. I don't know if it can cause any
> problems on earlier Emacs/Gnus versions.
>
> 3. Although there are several alternatives to Gnus, I have chosen Gnus
> specifically because it is part of GNU Emacs.
>
> 4. I think an option could be added to save only certain types of files
> (pdf, png, jpg, docx, etc.).
I think that supporting only Gnus is too specific. Not all the people
use Gnus as mail reader. And the extra menu option you propose will only
eat up space for people not using Gnus.
I'd prefer a more generic approach working in any kind of email reader,
be it rmail, gnus, mu4e, notmuch, or wunderlust. The approach can
probably making use of message-mode or MML libraries from Emacs core.
Also, I do not like adding yet another menu option even if it is working
for other mail readers. Instead, it would be more consistent to follow
what we do for dired. See interactive spec in org-attach-attach.
Best,
Ihor
^ permalink raw reply [relevance 5%]
* Re: Export LaTeX command inside figure environment
2022-05-08 5:08 5% ` Max Nikulin
@ 2022-05-08 6:06 0% ` Thomas S. Dye
2022-05-08 16:12 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Thomas S. Dye @ 2022-05-08 6:06 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
Aloha Max,
Max Nikulin <manikulin@gmail.com> writes:
> On 08/05/2022 07:30, Juan Manuel Macías wrote:
>> Thomas S. Dye writes:
>>
>>> Is there a way to add an arbitrary LaTeX command between
>>> \begin{figure} ... \end{figure} during LaTeX export? I want
>>> to end up
>>> with the following snippet, but can't figure out how to slip
>>> in
>>> \setfloatalignment{b}. \begin{figure}[htb]
>>> \centering
>>> \includegraphics[width=.9\linewidth]{hilbertcurves.pdf}
>>> \caption[Hilbert curves]{\label{fig:orgparagraph1} Hilbert
>>> curves of
>>> various degrees \emph{n}.}
>>> \setfloatalignment{b}
>>> \end{figure}
>> I think the :caption attribute could do the trick (of course
>> everything
>> must be on one line):
>> #+ATTR_LaTeX: :caption \caption[Hilbert
>> curves]{\label{fig:orgparagraph1} Hilbert curves of various
>> degrees
>> \emph{n}.}\setfloatalignment{b}
>
> Would it work if \setfloatalignment{b} is added before
> \includegraphics? From
> my point of view, it is still a hack due to abusing the
> :placement attribute,
> but it is backend agnostic, so reuses caption for HTML and
> relieves requirement
> of single long line:
>
> #+caption[Hilbert curves]: Hilbert curves of various degrees
> \(n\)
> #+name: orgparagraph1
> #+attr_latex: :placement [b]\setfloatalignment{b}
> [[file:hilbertcurves.pdf]]
>
> # Local Variables:
> # org-latex-prefer-user-labels: t
> # End:
>
> P.S. Math and absence of period are intentional. I never used
> tufte, so unsure
> if something besides b is meaningful with \setfloatalignment{b}.
> I dropped "ht"
> to make inconsistency apparent and expecting that when figures
> are moved to the
> end of document, "ht" should be used instead with removing of
> \setfloatalignment.
Yes, this works, too. It is a convenient hack. Thanks!
It would be better to have a LaTeX attribute, say :commands, that
places commands within \begin{figure} ... \end{figure}.
I'm circling back to Tufte handouts for a course I'm offering in
the Fall. It is great that ox-latex has the flexibility to export
to tufte-latex now. I haven't prepared any handouts yet, but all
the pieces seem to work in a straightforward way. Org-cite is
performing like a champ, too!
All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye
^ permalink raw reply [relevance 0%]
* Re: Export LaTeX command inside figure environment
2022-05-08 0:30 10% ` Juan Manuel Macías
2022-05-08 0:57 7% ` Thomas S. Dye
@ 2022-05-08 5:08 5% ` Max Nikulin
2022-05-08 6:06 0% ` Thomas S. Dye
1 sibling, 1 reply; 200+ results
From: Max Nikulin @ 2022-05-08 5:08 UTC (permalink / raw)
To: emacs-orgmode
On 08/05/2022 07:30, Juan Manuel Macías wrote:
> Thomas S. Dye writes:
>
>> Is there a way to add an arbitrary LaTeX command between
>> \begin{figure} ... \end{figure} during LaTeX export? I want to end up
>> with the following snippet, but can't figure out how to slip in
>> \setfloatalignment{b}. \begin{figure}[htb]
>> \centering
>> \includegraphics[width=.9\linewidth]{hilbertcurves.pdf}
>> \caption[Hilbert curves]{\label{fig:orgparagraph1} Hilbert curves of
>> various degrees \emph{n}.}
>> \setfloatalignment{b}
>> \end{figure}
>
> I think the :caption attribute could do the trick (of course everything
> must be on one line):
>
> #+ATTR_LaTeX: :caption \caption[Hilbert
> curves]{\label{fig:orgparagraph1} Hilbert curves of various degrees
> \emph{n}.}\setfloatalignment{b}
Would it work if \setfloatalignment{b} is added before \includegraphics?
From my point of view, it is still a hack due to abusing the :placement
attribute, but it is backend agnostic, so reuses caption for HTML and
relieves requirement of single long line:
#+caption[Hilbert curves]: Hilbert curves of various degrees \(n\)
#+name: orgparagraph1
#+attr_latex: :placement [b]\setfloatalignment{b}
[[file:hilbertcurves.pdf]]
# Local Variables:
# org-latex-prefer-user-labels: t
# End:
P.S. Math and absence of period are intentional. I never used tufte, so
unsure if something besides b is meaningful with \setfloatalignment{b}.
I dropped "ht" to make inconsistency apparent and expecting that when
figures are moved to the end of document, "ht" should be used instead
with removing of \setfloatalignment.
^ permalink raw reply [relevance 5%]
* Re: Export LaTeX command inside figure environment
2022-05-08 0:30 10% ` Juan Manuel Macías
@ 2022-05-08 0:57 7% ` Thomas S. Dye
2022-05-08 5:08 5% ` Max Nikulin
1 sibling, 0 replies; 200+ results
From: Thomas S. Dye @ 2022-05-08 0:57 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Thomas S. Dye, orgmode
Aloha Juan Manuel,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi, Thomas,
>
> Thomas S. Dye writes:
>
>> Is there a way to add an arbitrary LaTeX command between
>> \begin{figure} ... \end{figure} during LaTeX export? I want to
>> end up
>> with the following snippet, but can't figure out how to slip in
>> \setfloatalignment{b}. \begin{figure}[htb]
>> \centering
>> \includegraphics[width=.9\linewidth]{hilbertcurves.pdf}
>> \caption[Hilbert curves]{\label{fig:orgparagraph1} Hilbert
>> curves of
>> various degrees \emph{n}.}
>> \setfloatalignment{b}
>> \end{figure}
>
> I think the :caption attribute could do the trick (of course
> everything
> must be on one line):
>
> #+ATTR_LaTeX: :caption \caption[Hilbert
> curves]{\label{fig:orgparagraph1} Hilbert curves of various
> degrees
> \emph{n}.}\setfloatalignment{b}
>
That works. Thanks!
All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye
^ permalink raw reply [relevance 7%]
* Re: Export LaTeX command inside figure environment
@ 2022-05-08 0:30 10% ` Juan Manuel Macías
2022-05-08 0:57 7% ` Thomas S. Dye
2022-05-08 5:08 5% ` Max Nikulin
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-08 0:30 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: orgmode
Hi, Thomas,
Thomas S. Dye writes:
> Is there a way to add an arbitrary LaTeX command between
> \begin{figure} ... \end{figure} during LaTeX export? I want to end up
> with the following snippet, but can't figure out how to slip in
> \setfloatalignment{b}. \begin{figure}[htb]
> \centering
> \includegraphics[width=.9\linewidth]{hilbertcurves.pdf}
> \caption[Hilbert curves]{\label{fig:orgparagraph1} Hilbert curves of
> various degrees \emph{n}.}
> \setfloatalignment{b}
> \end{figure}
I think the :caption attribute could do the trick (of course everything
must be on one line):
#+ATTR_LaTeX: :caption \caption[Hilbert
curves]{\label{fig:orgparagraph1} Hilbert curves of various degrees
\emph{n}.}\setfloatalignment{b}
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* [PATCH] org-attach: Attach current Gnus article parts
@ 2022-05-07 14:31 8% Juan Manuel Macías
2022-05-08 12:30 5% ` Ihor Radchenko
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-07 14:31 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Hi all,
In the attached patch I add a new command for org-attach: save *all*
attachments from the current Gnus article to the current org-attach-dir.
(Sorry for repeating the word "attach" so much :-))
NB:
1. If no Gnus article is open, it returns an error message.
2. I've only tested it on Emacs 28. I don't know if it can cause any
problems on earlier Emacs/Gnus versions.
3. Although there are several alternatives to Gnus, I have chosen Gnus
specifically because it is part of GNU Emacs.
4. I think an option could be added to save only certain types of files
(pdf, png, jpg, docx, etc.).
Best regards,
Juan Manuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-org-attach.el-new-command-to-attach-Gnus-curren.patch --]
[-- Type: text/x-patch, Size: 1865 bytes --]
From 03a53680df38300110c2095a98bc1dec8cc7adce Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Sat, 7 May 2022 16:04:06 +0200
Subject: [PATCH] lisp/org-attach.el: new command to attach Gnus current
article parts
* (org-attach-gnus-save-parts-current-article): Attach current Gnus
article parts
* (org-attach-commands): add a new key
---
lisp/org-attach.el | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index 5ee2b84b2..54c8a2bdb 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -206,6 +206,8 @@ git-functionality from this file.")
"Attach a file using symbolic-link method.")
((?u ?\C-u) org-attach-url
"Attach a file from URL (downloading it).")
+ ((?g ?\C-g) org-attach-gnus-save-parts-current-article
+ "Attach current Gnus article parts")
((?b) org-attach-buffer
"Select a buffer and attach its contents to the task.")
((?n ?\C-n) org-attach-new
@@ -488,6 +490,21 @@ DIR-property exists (that is different from the unset one)."
(let ((org-attach-method 'url))
(org-attach-attach url)))
+(defun org-attach-gnus-save-parts-current-article ()
+ "Attach current Gnus article parts."
+ (interactive)
+ (let* ((attach-dir (org-attach-dir 'get-create))
+ (art gnus-article-current)
+ (subject (gnus-summary-article-subject (cdr art))))
+ (if (not art)
+ (error "There is no open article")
+ (if (yes-or-no-p (format "Attach current article: \"%s\"" subject))
+ (progn
+ (org-attach-tag)
+ (gnus-summary-save-parts "." attach-dir art)
+ (message "New attachment: \"%s\"" subject))
+ (keyboard-quit)))))
+
(defun org-attach-buffer (buffer-name)
"Attach BUFFER-NAME's contents to current outline node.
BUFFER-NAME is a string. Signals a `file-already-exists' error
--
2.36.0
^ permalink raw reply related [relevance 8%]
* Re: Org and multimedia (tips?)
2022-03-17 22:44 7% Org and multimedia (tips?) Juan Manuel Macías
2022-03-18 14:40 6% ` Max Nikulin
@ 2022-05-05 1:14 5% ` TRS-80
1 sibling, 0 replies; 200+ results
From: TRS-80 @ 2022-05-05 1:14 UTC (permalink / raw)
To: emacs-orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi all,
>
> I've been trying for a while to use Org also to store and org-anize the
> data of my music and video files, so that I can conveniently access them
> via helm-org-ql and play them using EMMS.
I mean, I love Org just as much as anyone else on this list, but it does
not strike me as the right tool for this job?
In my mind anyway, I think first -- especially since you are storing
your files on an SBC on the network -- about some network based music
player like mpd or Mopidy (there are others, too).
There are many interfaces to those, including some in Emacs (maybe even
within EMMS, if I am recalling correctly).
But then you can also access your music from outside Emacs, too. And
without needing to hack something up / re-invent the wheel in Org.
However, if you like to hack something up in Org instead, by all means,
continue! :)
Cheers,
TRS-80
^ permalink raw reply [relevance 5%]
* Re: [tip] Org speed commands improved
2022-04-27 7:08 9% ` Juan Manuel Macías
@ 2022-05-04 22:12 6% ` TRS-80
0 siblings, 0 replies; 200+ results
From: TRS-80 @ 2022-05-04 22:12 UTC (permalink / raw)
To: emacs-orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Ihor,
>
> Ihor Radchenko writes:
>
>> If you are going this far with speed commands, you might as well switch
>> to modal editing. What you are describing is basically a modal command
>> map with ability to switch to insert map.
>
> I'm not a fan of modal editing, rather the opposite. But in this
> particular case I have found that I spend very little time editing the
> raw content of the headers, once I set it. I spend more time editing the
> 'meta-content': TODO states, properties, tags, refile, attached folders,
> etc. And that with the speed commands can be achieved in a very agile
> way, so that a small dose of controlled modal editing and reduced only
> to the header, maybe it's worth it :-) If the speed commands were also
> activated in the content of the sections, here we would have a real
> modal editing, and that (in my case) would not be comfortable.
I agree with your assessment! In fact, I think I will give your
functions a try. Thanks for sharing them!
Cheers,
TRS-80
^ permalink raw reply [relevance 6%]
* Re: Org as a workspace (an impromptu reflection)
2022-05-02 19:17 6% ` Nick Dokos
@ 2022-05-03 23:41 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-03 23:41 UTC (permalink / raw)
To: Nick Dokos; +Cc: orgmode
Nick Dokos writes:
> From my vantage point (of ignorance about it :-) ), this sounds like
> org-roam to me: https://www.orgroam.com/
I've read here and there interesting things about org-roam, but I admit
I've never had the courage to try it. Partly due to lack of time and
partly because with my current Org setup I am reasonably satisfied. In
any case, everything I described I get with (if the expression is
allowed) 'org-vanilla' :-) (+ a number of must-have packages, such as
org-ql/helm-org-ql, org-super-links, org-transclusion, and more).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-05-02 3:31 6% ` Ihor Radchenko
@ 2022-05-03 23:08 8% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-05-03 23:08 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> It is more complex and I do not see a clear benefit of introducing a
> whole new hook. It would only be useful for people who define a large
> number of extra speed command handlers.
Yes, I agree. Also I'm afraid that this idea of mine added a drawback as
a bonus track: it would be necessary to modify all the functions that
activate the speed commands because, otherwise, it would return an error
anywhere outside the activation contexts. Precisely because of this:
(pcase (run-hook-with-args-until-success 'org-speed-command-strict-hook _)
('nil (error "Command not defined: \"?\" for help"))
(symbol (run-hook-with-args-until-success
'org-speed-command-strict-hook _)))
And I suppose that the functions should consist of a conditional of the
type: "if the context is given -> activate the speed commands, otherwise
-> self-insert-command". Or something like that. Too hacky.
On the other hand, I now seriously doubt whether a patch would be worth
it, even if a defcustom was added. I think you're also right about what
you said at the beginning: considering how speed commands are designed,
it's hard to implement a clean, general solution. I think I'm going to
leave this patch in the fridge for now, though I also encourage other
potential users of speed commands to join the discussion.
(Perhaps, instead of a patch, some tips could be added to the manual (or
to any other relevant site) so that users who want to extend this
functionality apply this type of hacks, as I have done in my particular
case...).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: Org as a workspace (an impromptu reflection)
2022-04-29 15:03 7% Org as a workspace (an impromptu reflection) Juan Manuel Macías
2022-04-29 23:46 6% ` Matt
@ 2022-05-02 19:17 6% ` Nick Dokos
2022-05-03 23:41 10% ` Juan Manuel Macías
1 sibling, 1 reply; 200+ results
From: Nick Dokos @ 2022-05-02 19:17 UTC (permalink / raw)
To: emacs-orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> With Org something curious has happened. I've gotten used to working
> around nodes (regardless of what documents those nodes are in), rather
> than around folders or files. Little by little, a kind of virtual world
> of ideas, objects, etc., all intertwined with each other, is being
> built.
From my vantage point (of ignorance about it :-) ), this sounds like
org-roam to me: https://www.orgroam.com/
--
Nick
"There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
^ permalink raw reply [relevance 6%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-05-01 11:00 9% ` Juan Manuel Macías
@ 2022-05-02 3:31 6% ` Ihor Radchenko
2022-05-03 23:08 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-05-02 3:31 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Ok, I agree that this is the most reasonable direction. What do you
> think about the idea that I outlined in the last post of this thread
> (https://list.orgmode.org/87v8uqmkc0.fsf@posteo.net/)?: it consists in
> defining a new hook (by default with value nil) where the user can store
> those functions that he wants to have a 'strict' behavior: some functions
> or all. And then the user should add the
> org-speed-command-strict-function to org-speed-command-hook.
>
> If this idea sounds too hacky, I think a defcustom for
> org-babel-speed-command-activate, as you suggest, might suffice.
It is more complex and I do not see a clear benefit of introducing a
whole new hook. It would only be useful for people who define a large
number of extra speed command handlers.
Disclaimer: I do not use speed commands myself, so my opinion is
somewhat theoretical. If other users who are actively using speed
command hook have something to say, I'd encourage them to join the
discussion.
Best,
Ihor
^ permalink raw reply [relevance 6%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-05-01 4:01 5% ` Ihor Radchenko
@ 2022-05-01 11:00 9% ` Juan Manuel Macías
2022-05-02 3:31 6% ` Ihor Radchenko
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-05-01 11:00 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> This would not solve the problem of shadowing.
> It may be better idea to provide a custom variable controlling
> org-babel-speed-command-activate: do nothing or throw an error.
> This custom variable should also be described in the docstring of
> org-speed-command-hook to warn about potential shadowing.
>
> To summarise, your idea will be reasonable if:
> 1. The new behaviour can be customized
> 2. The new behaviour is documented in org-speed-command-hook
Ok, I agree that this is the most reasonable direction. What do you
think about the idea that I outlined in the last post of this thread
(https://list.orgmode.org/87v8uqmkc0.fsf@posteo.net/)?: it consists in
defining a new hook (by default with value nil) where the user can store
those functions that he wants to have a 'strict' behavior: some functions
or all. And then the user should add the
org-speed-command-strict-function to org-speed-command-hook.
If this idea sounds too hacky, I think a defcustom for
org-babel-speed-command-activate, as you suggest, might suffice.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-04-30 14:41 8% ` Juan Manuel Macías
2022-04-30 19:39 8% ` Juan Manuel Macías
@ 2022-05-01 4:01 5% ` Ihor Radchenko
2022-05-01 11:00 9% ` Juan Manuel Macías
1 sibling, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-05-01 4:01 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Ihor Radchenko writes:
>
>> Note that speed commands are not only decided by
>> org-speed-command-activate. Any function in org-speed-command-hook can
>> trigger speed command. Throwing an error in org-speed-command-activate
>> can potentially shadow other functions in the hook.
>
> Ah, I see... I had not taken into account what you mention.
>
> But, if I have understood correctly how this hook works, each associated
> function has its "independence", right? I mean, if I have
> org-speed-command-activate and org-babel-speed-command-activate
> associated to this hook, and I bind the "K" key to an action in
> org-babel-key-bindings, but that key does not is associated with any
> action in org-speed-commands, then the error message would only be
> displayed in the proper context, that is, if I hit K at the beginning of
> the headline or any location defined for org-use-speed-commands.
You are mostly correct, with one potential caveat.
Consider a user who wants to define extra speed command that should run
at the beginning of level 1 headlines. This context also matches the
context of org-babel-speed-command-activate and your proposed patch will
make it harder for the user to achieve the described behaviour.
On the other hand, the user could simply add to front of the
org-speed-command-hook given that blocking behaviour of
org-babel-speed-command-activate is well-documented.
> Another possibility I can think of is, instead of returning an error
> message: just do nothing when a wrong key is pressed. Something, maybe,
> like this (I suppose that the same should be done in each function added
> to the hook):
This would not solve the problem of shadowing.
It may be better idea to provide a custom variable controlling
org-babel-speed-command-activate: do nothing or throw an error.
This custom variable should also be described in the docstring of
org-speed-command-hook to warn about potential shadowing.
To summarise, your idea will be reasonable if:
1. The new behaviour can be customized
2. The new behaviour is documented in org-speed-command-hook
Best,
Ihor
^ permalink raw reply [relevance 5%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-04-30 14:41 8% ` Juan Manuel Macías
@ 2022-04-30 19:39 8% ` Juan Manuel Macías
2022-05-01 4:01 5% ` Ihor Radchenko
1 sibling, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-30 19:39 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
> Ihor Radchenko writes:
>
>> Note that speed commands are not only decided by
>> org-speed-command-activate. Any function in org-speed-command-hook can
>> trigger speed command. Throwing an error in org-speed-command-activate
>> can potentially shadow other functions in the hook.
This other, more general solution has also occurred to me, although I
don't know if it's too tricky :-). The idea is to define an
org-speed-command-strict-hook. Something like this (I haven't tested it
much), and probably have its drawbacks:
#+begin_src emacs-lisp
(defcustom org-speed-command-strict-hook
nil
"TODO"
:group 'org-structure
:version "24.1"
:type 'hook)
(defun org-speed-command-strict-function (_)
(pcase (run-hook-with-args-until-success 'org-speed-command-strict-hook _)
('nil (error "Command not defined: \"?\" for help"))
(symbol (run-hook-with-args-until-success 'org-speed-command-strict-hook _))))
;; no strict speed commands (default values):
;; org-speed-command-strict-hook: nil
;; org-speed-command-hook: (org-speed-command-activate org-babel-speed-command-activate)
;; when strict speed commands:
(setq org-speed-command-strict-hook '(org-speed-command-activate org-babel-speed-command-activate))
(setq org-speed-command-hook '(org-speed-command-strict-function))
(defun my-org-toggle-speed-commands ()
(interactive)
(if org-use-speed-commands
(progn
(setq org-use-speed-commands-on org-use-speed-commands)
(setq org-use-speed-commands nil)
(message "speed commands off"))
(setq org-use-speed-commands org-use-speed-commands-on)
(message "speed commands on")))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-04-30 13:06 6% ` Ihor Radchenko
@ 2022-04-30 14:41 8% ` Juan Manuel Macías
2022-04-30 19:39 8% ` Juan Manuel Macías
2022-05-01 4:01 5% ` Ihor Radchenko
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-30 14:41 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> Note that speed commands are not only decided by
> org-speed-command-activate. Any function in org-speed-command-hook can
> trigger speed command. Throwing an error in org-speed-command-activate
> can potentially shadow other functions in the hook.
Ah, I see... I had not taken into account what you mention.
But, if I have understood correctly how this hook works, each associated
function has its "independence", right? I mean, if I have
org-speed-command-activate and org-babel-speed-command-activate
associated to this hook, and I bind the "K" key to an action in
org-babel-key-bindings, but that key does not is associated with any
action in org-speed-commands, then the error message would only be
displayed in the proper context, that is, if I hit K at the beginning of
the headline or any location defined for org-use-speed-commands.
Another possibility I can think of is, instead of returning an error
message: just do nothing when a wrong key is pressed. Something, maybe,
like this (I suppose that the same should be done in each function added
to the hook):
...
(let ((defined (cdr (assoc keys
;; FIXME: don't check `org-speed-commands-user' past 9.6
(if (boundp 'org-speed-commands-user)
(append org-speed-commands
org-speed-commands-user)
org-speed-commands)))))
(if defined defined
'ignore))))
I don't know if this would avoid unexpected results...
what do you think?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: [PATCH] speed commands: error message when a key is not associated with a command
2022-04-30 11:25 9% [PATCH] speed commands: error message when a key is not associated with a command Juan Manuel Macías
@ 2022-04-30 13:06 6% ` Ihor Radchenko
2022-04-30 14:41 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Ihor Radchenko @ 2022-04-30 13:06 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> If we have speed commands activated and we type (by mistake) a character
> not associated with a command, the letter is printed at point. I think a
> more appropriate behavior would be:
>
> - key associated with a command: the command is activated
>
> - key not associated with a command: an error message is displayed.
The idea is not bad, but I doubt that it can be implemented cleanly
given the current speed commands design.
> * (org-speed-command-activate): If a letter is not associated with a
> command, an error message is displayed instead of typing the letter.
Note that speed commands are not only decided by
org-speed-command-activate. Any function in org-speed-command-hook can
trigger speed command. Throwing an error in org-speed-command-activate
can potentially shadow other functions in the hook.
Best,
Ihor
^ permalink raw reply [relevance 6%]
* Re: [BUG] Exporting italic link with bang inside to html fails to parse the link [9.5.2 (N/A @ /gnu/store/89yvbijwnvsbpa5h33mvbgh1gy9w30n2-emacs-org-9.5.2/share/emacs/site-lisp/org-9.5.2/)]
@ 2022-04-30 11:47 5% ` Max Nikulin
0 siblings, 0 replies; 200+ results
From: Max Nikulin @ 2022-04-30 11:47 UTC (permalink / raw)
To: Ihor Radchenko, Dr. Arne Babenhauserheide; +Cc: emacs-orgmode
On 30/04/2022 16:37, Ihor Radchenko wrote:
> "Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
>
>> To reproduce:
>>
>> - create an org-file with the following content:
>> /Foo [[https://taz.de/!5843294/][link with a bang]]/
>> - M-x org-html-export-to-html
>>
>> Expected: The HTML-file contains an italic link named "link with a bang".
>>
>> Actual: The HTML-file contains a broken link with only the domain:
>> <i>Foo [[<a href="https://taz.de">https://taz.de</a></i>!5843294/][link with a bang]]/</p>
>
> Confirmed.
Nicolas clearly expressed that it is a feature of the Org parser though.
Moreover, this is a duplicate of another item already tracked on
updates.orgmode.org:
2021-09-03 5:17 Dr. Arne Babenhauserheide Bug: PDF Export of Link fails
https://list.orgmode.org/87pmtqp79s.fsf@web.de/T/#u
The following markup should be used instead:
/Foo/ [[https://taz.de/!5843294/][/link with a bang/]]
> To force Org mode not treat internal /! as italics ending, you can
> insert a zero-width space before "/": <zero width space>/!
Unfortunately It requires an additional export filter to remove zero
width spaces.
> On the other hand, the example link could be inserted using
> org-insert-link.
>
> If one does the following:
> 1. emacs -Q /tmp/test.org
> 2. Type "/Begin italic "
> 3. C-c C-l https://taz.de/!5843294/ <RET> <test> <RET>
> 4. The inserted text is not a link because the problematic /! is not
> fixed automatically.
>
> I consider the above to be at least a bug in org-insert-link.
Timothy suggested to fix `org-insert-link' somehow in than thread.
P.S. Actually I like behavior of pandoc
printf '%s' '/Foo [[https://taz.de/!5843294/][link with a bang]]/' |
pandoc -f org -t html
<p><em>Foo <a href="https://taz.de/!5843294/">link with a
bang</a></em></p>
Juan Manuel Macías to emacs-orgmode. Pandoc and nested emhases. Fri, 18
Feb 2022 00:47:18 +0000. https://list.orgmode.org/87sfshgfvt.fsf@posteo.net
^ permalink raw reply [relevance 5%]
* [PATCH] speed commands: error message when a key is not associated with a command
@ 2022-04-30 11:25 9% Juan Manuel Macías
2022-04-30 13:06 6% ` Ihor Radchenko
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-04-30 11:25 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 387 bytes --]
Hi,
If we have speed commands activated and we type (by mistake) a character
not associated with a command, the letter is printed at point. I think a
more appropriate behavior would be:
- key associated with a command: the command is activated
- key not associated with a command: an error message is displayed.
Attached a patch with that modification.
Best regards,
Juan Manuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-org-keys.el-error-message-when-speed-command-is.patch --]
[-- Type: text/x-patch, Size: 1489 bytes --]
From fd380f41420aef9bc91baede9d4cd2cb7eadee0a Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Sat, 30 Apr 2022 13:00:02 +0200
Subject: [PATCH] lisp/org-keys.el: error message when speed command is not
defined
* (org-speed-command-activate): If a letter is not associated with a
command, an error message is displayed instead of typing the letter.
---
lisp/org-keys.el | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index 782ffa871..a850abb4f 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -835,12 +835,14 @@ See `org-speed-commands' for configuring them."
(when (or (and (bolp) (looking-at org-outline-regexp))
(and (functionp org-use-speed-commands)
(funcall org-use-speed-commands)))
- (cdr (assoc keys
- ;; FIXME: don't check `org-speed-commands-user' past 9.6
- (if (boundp 'org-speed-commands-user)
- (append org-speed-commands
- org-speed-commands-user)
- org-speed-commands)))))
+ (let ((defined (cdr (assoc keys
+ ;; FIXME: don't check `org-speed-commands-user' past 9.6
+ (if (boundp 'org-speed-commands-user)
+ (append org-speed-commands
+ org-speed-commands-user)
+ org-speed-commands)))))
+ (if defined defined
+ (error "Speed command not defined: \"h\" for help")))))
\f
;;; Babel speed keys
--
2.36.0
^ permalink raw reply related [relevance 9%]
* Re: Org as a workspace (an impromptu reflection)
2022-04-29 15:03 7% Org as a workspace (an impromptu reflection) Juan Manuel Macías
@ 2022-04-29 23:46 6% ` Matt
2022-05-02 19:17 6% ` Nick Dokos
1 sibling, 0 replies; 200+ results
From: Matt @ 2022-04-29 23:46 UTC (permalink / raw)
To: "Juan Manuel Macías"; +Cc: orgmode
---- On Fri, 29 Apr 2022 11:03:55 -0400 Juan Manuel Macías <maciaschain@posteo.net> wrote ----
> I don't know if anyone has had a similar experience...
I tell people that Emacs changed my life. I feel it's that profound. My story is different from yours, yet similar in that it started with Org. I love that it has this affect on people. It brings a smile to my face. This really is a great community. Thanks for sharing your experience. :)
^ permalink raw reply [relevance 6%]
* Org as a workspace (an impromptu reflection)
@ 2022-04-29 15:03 7% Juan Manuel Macías
2022-04-29 23:46 6% ` Matt
2022-05-02 19:17 6% ` Nick Dokos
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-29 15:03 UTC (permalink / raw)
To: orgmode
Hi all,
Since I use Org Mode I have been noticing a gradual change in the way I
work with a computer (as a simple user). It is not something consciously
sought, but I have to say that I see it as a positive evolution. I've
always been used to (or rather resigned to) the typical Unix
directory/file scheme: everything must be a file and everything must be
stored in a directory. When one has many and varied interests and tasks,
and manages a wide variety of files and folders, it is certainly hard to
maintain order and 'digital hygiene' within that scheme. Before using
Gnu Emacs as a shell and as a desktop environment, I used KDE and Gnome for
quite a while. The indexers and file search tools in these environments
(especially the GnomeShell one, tracker) were somewhat helpful in
keeping things tidy and close at hand. But, at the end of the day, the
directory/file scheme was always present.
With Org something curious has happened. I've gotten used to working
around nodes (regardless of what documents those nodes are in), rather
than around folders or files. Little by little, a kind of virtual world
of ideas, objects, etc., all intertwined with each other, is being
built. What amazes me about Org is that all of this is tremendously
transparent and simple. I'm not saying that the detachment of the
directory/file schema is complete: directories and files are there,
actually, but at least they don't show up when working. It is somewhat
akin to being in a play, where there is a suspension of disbelief.
Of course, there are tools that I find indispensable. Helm-org-ql, for
example, is what I use to nimbly navigate that virtual world of nodes. I
also make heavy and obsessive use of org-attach and org-capture (I
barely use the classic 'Documents', 'Images', 'Videos', 'Music', etc.
style directories, but everything is stored in folders associated with
nodes). And since I've started using org-transclusion, a new dimension
has been opened to that virtuality that I mentioned before. Sometimes I
wonder if this isn't a working style similar to that of the old Lisp
machines, a subject I find exciting but know little about, so I
apologize if that statement sounds too ignorant ;-).
I don't know if anyone has had a similar experience...
Best regards,
Juan Manuel
^ permalink raw reply [relevance 7%]
* Re: [tip] Org speed commands improved
2022-04-26 14:00 9% [tip] Org speed commands improved Juan Manuel Macías
2022-04-27 4:20 6% ` Ihor Radchenko
@ 2022-04-27 16:30 6% ` Daniel Fleischer
1 sibling, 0 replies; 200+ results
From: Daniel Fleischer @ 2022-04-27 16:30 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías [2022-04-26 Tue 14:00] wrote:
> Org speed commands are a major productivity boost and I love them.
> Lately it has occurred to me to make some modifications with the
> following configuration, which I share here in case someone wants to try
> it. The idea is that Org speed commands are activated anywhere in the
> header (not just at the beginning of the line) *or* when point is at the
> very beginning of the buffer. This, in my opinion, improves the
> navigation speed:
Very nice idea; I'll give it a try, thanks!
--
Daniel Fleischer
^ permalink raw reply [relevance 6%]
* Re: [tip] Org speed commands improved
2022-04-27 4:20 6% ` Ihor Radchenko
2022-04-27 5:37 0% ` Tim Cross
@ 2022-04-27 7:08 9% ` Juan Manuel Macías
2022-05-04 22:12 6% ` TRS-80
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-04-27 7:08 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Hi Ihor,
Ihor Radchenko writes:
> If you are going this far with speed commands, you might as well switch
> to modal editing. What you are describing is basically a modal command
> map with ability to switch to insert map.
I'm not a fan of modal editing, rather the opposite. But in this
particular case I have found that I spend very little time editing the
raw content of the headers, once I set it. I spend more time editing the
'meta-content': TODO states, properties, tags, refile, attached folders,
etc. And that with the speed commands can be achieved in a very agile
way, so that a small dose of controlled modal editing and reduced only
to the header, maybe it's worth it :-) If the speed commands were also
activated in the content of the sections, here we would have a real
modal editing, and that (in my case) would not be comfortable.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: [tip] Org speed commands improved
2022-04-27 4:20 6% ` Ihor Radchenko
@ 2022-04-27 5:37 0% ` Tim Cross
2022-04-27 7:08 9% ` Juan Manuel Macías
1 sibling, 0 replies; 200+ results
From: Tim Cross @ 2022-04-27 5:37 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Juan Manuel Macías, orgmode
Ihor Radchenko <yantar92@gmail.com> writes:
> Juan Manuel Macías <maciaschain@posteo.net> writes:
>
>> Org speed commands are a major productivity boost and I love them.
>> Lately it has occurred to me to make some modifications with the
>> following configuration, which I share here in case someone wants to try
>> it. The idea is that Org speed commands are activated anywhere in the
>> header (not just at the beginning of the line) *or* when point is at the
>> very beginning of the buffer. This, in my opinion, improves the
>> navigation speed:
>> ...
>> This also serves as a kind of write protection for the header titles. To
>> be able to edit them, we can use this function:
>
> If you are going this far with speed commands, you might as well switch
> to modal editing. What you are describing is basically a modal command
> map with ability to switch to insert map.
>
Funny - as I read Juan's post, as an evil user, that was exactly my
thought. I've never looked at the org speed commands, but as I read the
post, I thought "that looks like what I have with evil mode"
^ permalink raw reply [relevance 0%]
* Re: [tip] Org speed commands improved
2022-04-26 14:00 9% [tip] Org speed commands improved Juan Manuel Macías
@ 2022-04-27 4:20 6% ` Ihor Radchenko
2022-04-27 5:37 0% ` Tim Cross
2022-04-27 7:08 9% ` Juan Manuel Macías
2022-04-27 16:30 6% ` Daniel Fleischer
1 sibling, 2 replies; 200+ results
From: Ihor Radchenko @ 2022-04-27 4:20 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Org speed commands are a major productivity boost and I love them.
> Lately it has occurred to me to make some modifications with the
> following configuration, which I share here in case someone wants to try
> it. The idea is that Org speed commands are activated anywhere in the
> header (not just at the beginning of the line) *or* when point is at the
> very beginning of the buffer. This, in my opinion, improves the
> navigation speed:
> ...
> This also serves as a kind of write protection for the header titles. To
> be able to edit them, we can use this function:
If you are going this far with speed commands, you might as well switch
to modal editing. What you are describing is basically a modal command
map with ability to switch to insert map.
Best,
Ihor
^ permalink raw reply [relevance 6%]
* [tip] Org speed commands improved
@ 2022-04-26 14:00 9% Juan Manuel Macías
2022-04-27 4:20 6% ` Ihor Radchenko
2022-04-27 16:30 6% ` Daniel Fleischer
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-26 14:00 UTC (permalink / raw)
To: orgmode
Hi all,
Org speed commands are a major productivity boost and I love them.
Lately it has occurred to me to make some modifications with the
following configuration, which I share here in case someone wants to try
it. The idea is that Org speed commands are activated anywhere in the
header (not just at the beginning of the line) *or* when point is at the
very beginning of the buffer. This, in my opinion, improves the
navigation speed:
#+begin_src emacs-lisp
(setq org-use-speed-commands
(lambda () (or (eq (point) 1)
(org-in-regexp "^\\*+\s+.+"))))
#+end_src
This also serves as a kind of write protection for the header titles. To
be able to edit them, we can use this function:
#+begin_src emacs-lisp
(defun my-org-toggle-speed-commands ()
(interactive)
(if org-use-speed-commands
(progn (setq org-use-speed-commands nil)
(message "speed-commands off"))
(setq org-use-speed-commands
(lambda () (or (eq (point) 1)
(org-in-regexp "^\\*+\s+.+"))))
(message "speed-commands on")))
(with-eval-after-load 'org
(define-key org-mode-map (kbd "M-i") 'my-org-toggle-speed-commands))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: latex block tikz to svg
2022-01-17 16:01 9% ` Juan Manuel Macías
2022-01-25 23:24 6% ` Edouard Debry
@ 2022-04-18 13:23 4% ` Edouard Debry
1 sibling, 0 replies; 200+ results
From: Edouard Debry @ 2022-04-18 13:23 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hi,
I finally found a way to make the following example work
<===========================================================>
#+HEADER: :file test1.svg
#+HEADER: :exports results
#+HEADER: :results output silent graphics file
#+HEADER: :headers '("\\usepackage{tikz}")
#+begin_src latex
\begin{tikzpicture}
\draw[->] (-3,0) -- (-2,0) arc[radius=0.5cm,start angle=-180,end angle=0] (-1,0) -- (1,0) arc[radius=0.5cm,start angle=180,end angle=0] (2,0) -- (3,0);
\filldraw (-1.5,0) circle[radius=1mm];
\filldraw (1.5,0) circle[radius=3mm];
\end{tikzpicture}
#+end_src
<===========================================================>
In file ob-latex.el, I commented out the lines beginning with ((string=
"svg" extension) :
;; ((string= "svg" extension)
;; (with-temp-file tex-file
;; (insert (concat (funcall org-babel-latex-preamble params)
;; (mapconcat #'identity headers "\n")
;; (funcall org-babel-latex-begin-env params)
;; body
;; (funcall org-babel-latex-end-env params))))
;; (let ((tmp-pdf (org-babel-latex-tex-to-pdf tex-file)))
;; (let* ((log-buf (get-buffer-create "*Org Babel LaTeX Output*"))
;; (err-msg "org babel latex failed")
;; (img-out (org-compile-file
;; tmp-pdf
;; (list org-babel-latex-pdf-svg-process)
;; extension err-msg log-buf)))
;; (shell-command (format "mv %s %s" img-out out-file)))))
This part is responsible for the previous example to fail. What actually
breaks the svg production is the latex preamble. "pdflatex" fails itself
to produce a valid pdf file.
After that, I changed
((and (string= "html" extension)
(executable-find org-babel-latex-htlatex))
into
((and (or (string= "html" extension) (string= "svg" extension))
(executable-find org-babel-latex-htlatex))
Then, previous example, is compiled no more by "pdflatex" but by
"htlatex", this latter is able to produce svg directly.
I hope I do not introduce any side effects in doing so. There are several ways
to produce svg :
- pdflatex + inkscape (default with current org implementation)
- latex + dvisvgm
- pdflatex + pdf2svg
- htlatex (my choice above)
Ideally, all ways could be implemented and orgmode's user should choose
which way to use through a header parameter. As far as I could
understand, "htlatex" is the faster (direct) and cleaner way to produce
svg, but it may lack some advanced features, which is probably why, at the
moment, the default way is through pdf generation.
Regards
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Edouard,
>
> Edouard Debry writes:
>
>> I would like to find a way to generate svg images from latex src blocks
>> (using tikz) which works and is compatible with default orgmode settings
>> for latex export (at least does not break it)
>>
>> Did you experience such issues ? do you have some workings settings and
>> examples ? I googled several times "org latex block tikz svg", but it is
>> difficult to guess how relevant are the elements found, some of them
>> seems quiet outdated. Hence my question on this mailing list
>
> I've done some quick tests with your example block. I don't know if I'm
> wrong, but I think the problem is on line 27 of `org-babel-execute:latex':
>
> ((string= "svg" extension)
>
> I don't know if this should be considered an Org bug, but it's clear
> that if the svg extension is detected in :file, the ':imagemagick yes'
> option is ignored, and a type of preamble is generated that fails in
> pgfsysdriver when compiling the temp tex document:
>
> \documentclass[preview]{standalone}
> \def\pgfsysdriver{pgfsys-tex4ht.def}
>
> If I replace the above line with this conditional:
>
> ((and (string= "svg" extension) (not imagemagick))
>
> then the imagemagick option is taken into account: it creates correctly
> the pdf and then converts it to svg with 'convert' imagemagick program.
> I did have to remove this line though:
>
> #+HEADER: :imoutoptions -geometry 400 :iminoptions -density 600
>
> otherwise, the conversion produced a dark image.
>
> Best regards,
>
> Juan Manuel
^ permalink raw reply [relevance 4%]
* Re: [PATCH] org-element-export-snippet-parser: Fix snippets without ending @@
@ 2022-04-16 10:46 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-16 10:46 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> Our current parser recognises the opening "@@html:" as a standalone
> snippet.
>
> Unless I misunderstand something, it is not intentional.
>
> The fix is attached.
This fix makes a lot of sense to me. I've always been intrigued by this
'strange' behavior of html export snippets. Of course, the main danger of
this unintentional behavior is error propagation. I remember seeing it
on a few sites, like here: https://emacs.stackexchange.com/a/30470
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: #+latex_header blocks, or, managing lots of LaTeX headers
2022-04-12 0:46 4% #+latex_header blocks, or, managing lots of LaTeX headers William Denton
2022-04-12 2:51 0% ` Vikas Rawal
2022-04-12 6:16 0% ` Tim Cross
@ 2022-04-12 8:55 8% ` Juan Manuel Macías
2 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-12 8:55 UTC (permalink / raw)
To: William Denton; +Cc: orgmode
Hi William,
William Denton writes:
> What sorts of practices do people have for managing lots of LaTeX
> headers? Juan Manuel Macías, you mentioned something like
> this---literate programming in Org to export LaTeX source---may I ask
> how you do it?
When it comes to a large project, for example the typesetting of a book,
I usually generate all the configuration for LaTeX in a *.tex document or
a *.sty document from Org, using literate programming[1]. I include there all
the LaTeX packages I use, their configuration, my own LaTeX or Lua code
(because I use LuaTeX to compile), etc. Here is a screenshot of a part of
the configuration I wrote for the Hispanic Dictionary of the Classical
Tradition:
https://i.imgur.com/fwonZtT.png
I also have an 'empty' class added to the org-latex-classes list, and then
load my LaTeX configuration via \input. When it comes to large books I
also use org-publish, which makes it easier for me to work with complex
projects and multi-part/chapter books.
Another possibility, to avoid adding many lines with 'LaTeX_Header:', is
to use blocks and the noweb keyword. For example: you can create a
non-exportable node in your document, and put all the necessary
configuration there. You include all the LaTeX preamble in a block:
* Configuration :noexport:
#+NAME: preamble
#+begin_src latex :exports none
a lot of LaTeX code
#+end_src
And in another block you add this:
#+begin_src latex :noweb yes :results raw
,#+LaTeX_HEADER: <<preamble>>
#+end_src
(in this thread you can find an org document attached with this procedure:
https://list.orgmode.org/87sfwvlp56.fsf@posteo.net/)
----------------------------
[1] In fact, Org is much more powerful and simpler for doing these
things than the docstript suite itself that is 'officially' used in the
(La)TeX ecosystem to generate packages code and documentation:
https://ctan.org/pkg/docstrip?lang=en
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: #+latex_header blocks, or, managing lots of LaTeX headers
2022-04-12 0:46 4% #+latex_header blocks, or, managing lots of LaTeX headers William Denton
2022-04-12 2:51 0% ` Vikas Rawal
@ 2022-04-12 6:16 0% ` Tim Cross
2022-04-12 8:55 8% ` Juan Manuel Macías
2 siblings, 0 replies; 200+ results
From: Tim Cross @ 2022-04-12 6:16 UTC (permalink / raw)
To: William Denton; +Cc: emacs-orgmode
William Denton <wtd@pobox.com> writes:
> I have another question related to managing a book I'm doing building for export to LaTeX:
> what do people do for managing all of the headers?
>
I only use the #+latex_headers or #+latext-headers-extra lines for 'one
off' type documents. If I'm going to be writing lots of documents where
those packages are needed, I define a new org-latex-classes entry.
> It's possible to add a new class to the org-latex-classes variable, and in the documentation on
> it I see there are options ([NO-DEFAULT-PACKAGES], [NO-PACKAGES], [NO-EXTRA]) that allow one to
> trim away all the default headers. That makes it easy to take away, but not to add in lines I
> want, short of managing them in my init file.
The org-latex-classes 'placeholder' macros allow you to add or remove
the headers defined in either the default-packages or packages alist or
headers added via latex_headers/latex_headers_extra. However, the point
to note is that this 'value' is just a string, so you can just put in
exactly what you want - you don't have to use the placeholder macros
(though I almost always do - at least the [default-packages] macro, but
usually the [packages] one as well). The value isn't just restricted to
\usepackage lines either - you can put anything there which makes sense
in the latgex header.
>
> What sorts of practices do people have for managing lots of LaTeX headers? Juan Manuel Macías,
> you mentioned something like this---literate programming in Org to export LaTeX source---may I
> ask how you do it?
>
If I find myself using lots of #+latex_headers lines, this tells me
either
1. I need to update/add to the packages alist variable. This is
especially likely if I'm adding the same headers to every document. Just
add it to the packages alist. I tend to leave the default-packages alist
alone.
2. There is a specific 'style' of document I write often and all
documents of this style have the same additional headers. For this, I
create a new entry in org-latex-classes.
I think adding headers via #+latex_headers and #+latext_headers_extra
should be avoided as much as possible. It is a great escape hatch or for
doing 'on-offs', but not the right approach for doing something like
writing a book.
Consider the situation where you have been adding headers to load
language support or a particular code listing package or whatever. You
writing a book and it will have many org files (perhaps one per
chapter). You add these #+latex_header lines to add the packages. Later,
you find the listing package isn't suitable or you need to modify the
language encoding - now you have to edit every org file which makes up
the book.
Alternatively, you define a new org-latex-classes entry call 'my-book'
and use that to add the language encoding and code listing packages
(along with some other 'tweaks' you typically put in the header, maybe
even add a few custom commands etc). Now when you find it necessary to
change the language encoding, code listing package or whatever, you just
have that one definition to change and only need to edit one file.
^ permalink raw reply [relevance 0%]
* Re: #+latex_header blocks, or, managing lots of LaTeX headers
2022-04-12 0:46 4% #+latex_header blocks, or, managing lots of LaTeX headers William Denton
@ 2022-04-12 2:51 0% ` Vikas Rawal
2022-04-12 6:16 0% ` Tim Cross
2022-04-12 8:55 8% ` Juan Manuel Macías
2 siblings, 0 replies; 200+ results
From: Vikas Rawal @ 2022-04-12 2:51 UTC (permalink / raw)
To: William Denton; +Cc: org-mode mailing list
[-- Attachment #1: Type: text/plain, Size: 1842 bytes --]
For a major project like this, I would just put these in a separate file,
and include it using #+INCLUDE:
Vikas
On Tue, 12 Apr 2022 at 06:37, William Denton <wtd@pobox.com> wrote:
> I have another question related to managing a book I'm doing building for
> export
> to LaTeX: what do people do for managing all of the headers?
>
> I have about 30 #+latex_header lines in the project I'm working on, and
> I'm
> still just working on it as a basic article. When I'm ready to do more
> formatting I'll use the memoir class and then there will be more
> commands. I
> imagine some of you have huge headers with custom commands and more.
>
> It would be great if there was a way to manage these lines as LaTeX, for
> example
> in a "#+begin_export latex" block, but as far as I can tell, there isn't a
> way
> (unless once again I overlooked something).
>
> The idea came up about seven years ago, and Nicolas mentioned the
> possibility of
> a "#+begin_export latex :header t" implementation.
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2015-05/msg00538.html
>
> It's possible to add a new class to the org-latex-classes variable, and in
> the
> documentation on it I see there are options ([NO-DEFAULT-PACKAGES],
> [NO-PACKAGES], [NO-EXTRA]) that allow one to trim away all the default
> headers.
> That makes it easy to take away, but not to add in lines I want, short of
> managing them in my init file.
>
> What sorts of practices do people have for managing lots of LaTeX headers?
> Juan Manuel Macías, you mentioned something like this---literate
> programming in
> Org to export LaTeX source---may I ask how you do it?
>
> Thanks,
>
> Bill
>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
> Toronto, Canada
[-- Attachment #2: Type: text/html, Size: 2450 bytes --]
^ permalink raw reply [relevance 0%]
* #+latex_header blocks, or, managing lots of LaTeX headers
@ 2022-04-12 0:46 4% William Denton
2022-04-12 2:51 0% ` Vikas Rawal
` (2 more replies)
0 siblings, 3 replies; 200+ results
From: William Denton @ 2022-04-12 0:46 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]
I have another question related to managing a book I'm doing building for export
to LaTeX: what do people do for managing all of the headers?
I have about 30 #+latex_header lines in the project I'm working on, and I'm
still just working on it as a basic article. When I'm ready to do more
formatting I'll use the memoir class and then there will be more commands. I
imagine some of you have huge headers with custom commands and more.
It would be great if there was a way to manage these lines as LaTeX, for example
in a "#+begin_export latex" block, but as far as I can tell, there isn't a way
(unless once again I overlooked something).
The idea came up about seven years ago, and Nicolas mentioned the possibility of
a "#+begin_export latex :header t" implementation.
https://lists.gnu.org/archive/html/emacs-orgmode/2015-05/msg00538.html
It's possible to add a new class to the org-latex-classes variable, and in the
documentation on it I see there are options ([NO-DEFAULT-PACKAGES],
[NO-PACKAGES], [NO-EXTRA]) that allow one to trim away all the default headers.
That makes it easy to take away, but not to add in lines I want, short of
managing them in my init file.
What sorts of practices do people have for managing lots of LaTeX headers?
Juan Manuel Macías, you mentioned something like this---literate programming in
Org to export LaTeX source---may I ask how you do it?
Thanks,
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
^ permalink raw reply [relevance 4%]
* Save Gnus attachments to Org using org-attach and helm-org-ql
@ 2022-04-10 8:49 9% Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-10 8:49 UTC (permalink / raw)
To: orgmode
Hi all,
I thought it wouldn't be a bad idea to be able to save attachments from
GNUS (current article) to any Org node, via org-attach. Since I use
helm-org-ql to quickly access the headlines of my org documents, it
occurred to me to write this action for helm-org-ql. I share it here in
case someone finds it useful.
Best regards,
Juan Manuel
#+begin_src emacs-lisp
(defun my-helm-org-ql/gnus-save-parts-to-org-attach (marker)
(interactive)
(switch-to-buffer (marker-buffer marker))
(goto-char marker)
(org-show-entry)
(when (not (member "ATTACH" (org-element-property :tags (org-element-at-point))))
(org-toggle-tag "ATTACH"))
;; create attach dir if not exits
(let ((atch-dir (org-attach-dir t))
(art gnus-article-current))
(gnus-summary-save-parts "." atch-dir art)))
(with-eval-after-load 'helm-org-ql
(add-to-list 'helm-org-ql-actions
'("Save attachments" . my-helm-org-ql/gnus-save-parts-to-org-attach) t))
#+end_src
^ permalink raw reply [relevance 9%]
* Re: when exporting latex how to set with in the includegraphics command
2022-04-03 10:19 10% ` Juan Manuel Macías
@ 2022-04-03 15:09 3% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-04-03 15:09 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Uwe Brauer, orgmode
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Hi Juan Manuel
> Hi Uwe,
> Uwe Brauer writes:
>> But I would like a smaller width say 0.5, how can I achieve that?
> #+ATTR_LaTeX: :float nil
> #+ATTR_LaTeX: :width <any valid value>
Thanks very much, that was very helpful
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 3%]
* Re: when exporting latex how to set with in the includegraphics command
@ 2022-04-03 10:19 10% ` Juan Manuel Macías
2022-04-03 15:09 3% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-04-03 10:19 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Uwe Brauer writes:
> But I would like a smaller width say 0.5, how can I achieve that?
#+ATTR_LaTeX: :float nil
#+ATTR_LaTeX: :width <any valid value>
#+CAPTION: El método del Trapecio punto fijo vs PC
[[./diagram-trapfix-vs-trapfixpc-norigid.png]]
(You can add more options to the includegraphics optional argument with
:options attribute; for example, :options scale=.5, etc).
best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: TOC and latex memoir class
@ 2022-04-02 7:21 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-04-02 7:21 UTC (permalink / raw)
To: Steve Downey; +Cc: orgmode
Hi Steve,
Steve Downey writes:
> In order to place the table of contents without a section name
> "Contents" the memoir class uses \tableofcontents* rather than
> \tableofcontents.
> However, `org-latex-toc-command` is documented as:
> "LaTeX command to set the table of contents, list of figures, etc.
> This command only applies to the table of contents generated with
> the toc:nil option, not to those generated with #+TOC keyword."
> Which is confusing in two ways, first that toc:nil doesn't generate a
> table of contents, and that it doesn't seem to provide any way of
> getting the string to be used?
>
> As a workaround, I could use the latex command directly, but that
> means not having it available in, for example, an html export.
>
> Is there a workaround I'm missing?
One possible workaround would be to define a macro with a conditional:
if exporting to LaTeX, returns the string 'toc:nil'; otherwise, returns
'toc:t'. And the LaTeX command can be added via a export snippet.
Something like this:
#+MACRO: mytoc (eval (if (eq org-export-current-backend 'latex) "#+OPTIONS: toc:nil" "#+OPTIONS: toc:t"))
{{{mytoc}}}
@@latex:\tableofcontents*@@
* Heading 1
lorem ipsum dolor
* Heading 2
lorem ipsum dolor
------------
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Move or rename a file in a link
2022-03-19 11:25 8% ` Juan Manuel Macías
@ 2022-03-22 15:30 5% ` João Pedro de Amorim Paula
0 siblings, 0 replies; 200+ results
From: João Pedro de Amorim Paula @ 2022-03-22 15:30 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 1779 bytes --]
On 19 March 2022 11:25, Juan Manuel Macías <maciaschain@posteo.net> wrote:
> #+begin_src emacs-lisp
> (defun my-org-rename-link-file-at-point ()
> (interactive)
> (let* ((curr-dir (if (equal (org-element-property :type (org-element-context)) "attachment")
> (concat (abbreviate-file-name (org-attach-dir)) "/")
> (abbreviate-file-name default-directory)))
> (current-path (if (equal (org-element-property :type (org-element-context)) "attachment")
> (concat curr-dir (org-element-property :path (org-element-context)))
> (org-element-property :path (org-element-context))))
> (new-path (read-file-name "Rename file at point to: " current-path)))
> (rename-file current-path new-path)
> (message (concat "moved to: " new-path))
> (if (directory-name-p new-path)
> (setq new-path (concat new-path (file-name-nondirectory current-path)))
> (setq new-path new-path))
> (if (equal (org-element-property :type (org-element-context)) "attachment")
> (my-org-replace-link-file (file-name-nondirectory current-path)
> (replace-regexp-in-string
> curr-dir "" new-path))
> (my-org-replace-link-file current-path
> (replace-regexp-in-string
> curr-dir "" new-path)))))
>
> (defun my-org-replace-link-file (from to)
> (save-excursion
> (goto-char (point-min))
> (while (re-search-forward org-bracket-link-regexp nil t)
> (cond ((string-match-p (concat "attachment:" from) (match-string 1))
> (replace-match (concat "[[attachment:" to "]]")))
> ((string-match-p from (match-string 1))
> (replace-match (concat "[[file:" to "]]")))))))
> #+end_src
Just a couple of fixes and it seems to be working fine.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: org-rename-link.patch --]
[-- Type: text/x-patch, Size: 1012 bytes --]
diff -u a/org-rename-link.el b/org-rename-link.el
--- a/org-rename-link.el 2022-03-22 12:08:45.790727092 -0300
+++ b/org-rename-link.el 2022-03-22 12:25:31.500218923 -0300
@@ -23,8 +23,11 @@
(defun my-org-replace-link-file (from to)
(save-excursion
(goto-char (point-min))
- (while (re-search-forward org-bracket-link-regexp nil t)
- (cond ((string-match-p (concat "attachment:" from) (match-string 1))
- (replace-match (concat "[[attachment:" to "]]")))
- ((string-match-p from (match-string 1))
- (replace-match (concat "[[file:" to "]]")))))))
+ (while (re-search-forward org-link-bracket-re nil t)
+ (replace-match
+ (cond
+ ((string-match-p (format "^attachment:%s\\'" from) (match-string 1))
+ (format "attachment:%s" (file-name-nondirectory to)))
+ ((string-match-p (format "^file.*:%s\\'" from) (match-string 1))
+ (format "file:%s" to)))
+ nil nil nil 1))))
Diff finished. Tue Mar 22 12:26:56 2022
[-- Attachment #3: Type: text/plain, Size: 439 bytes --]
All this patch does is to remove the directory name from the
=attachment:file.ext= -- given that the path is calculated by org-attach
--, and use the group 1 of the match string (as well as updating the use
of an obsolete variable), which corresponds to the actual link portion,
leaving the description unchanged.
Cordially,
--
João Pedro de A. Paula
IT undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)
^ permalink raw reply [relevance 5%]
* Re: Move or rename a file in a link
2022-03-18 18:52 6% ` João Pedro de Amorim Paula
@ 2022-03-19 11:25 8% ` Juan Manuel Macías
2022-03-22 15:30 5% ` João Pedro de Amorim Paula
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-19 11:25 UTC (permalink / raw)
To: João Pedro de Amorim Paula; +Cc: orgmode
Hi João,
João Pedro de Amorim Paula writes:
> I mean org attachments. I use org-attach extensively to store documents
> with notes. So I'd have a heading like so
>
> * Documents
> :PROPERTIES:
> :DIR: data/docs/
> :END:
>
> - [[Registration][attachment:registration.pdf]] :: My registration.
>
> And say I'd like to rename the file. I would need to rename it inside
> data/docs and I would also need to edit the link, so I would like to
> have a way to do it automatically. I just got a computer back so I will
> be trying to adapt what you did to work with org-attach, but if you
> figure out a way to do it as well, please, let me know.
I see. This is a new version that would also work with org attachment
links. I haven't tested it much and the function is a bit tricky, but I
think it works fine:
#+begin_src emacs-lisp
(defun my-org-rename-link-file-at-point ()
(interactive)
(let* ((curr-dir (if (equal (org-element-property :type (org-element-context)) "attachment")
(concat (abbreviate-file-name (org-attach-dir)) "/")
(abbreviate-file-name default-directory)))
(current-path (if (equal (org-element-property :type (org-element-context)) "attachment")
(concat curr-dir (org-element-property :path (org-element-context)))
(org-element-property :path (org-element-context))))
(new-path (read-file-name "Rename file at point to: " current-path)))
(rename-file current-path new-path)
(message (concat "moved to: " new-path))
(if (directory-name-p new-path)
(setq new-path (concat new-path (file-name-nondirectory current-path)))
(setq new-path new-path))
(if (equal (org-element-property :type (org-element-context)) "attachment")
(my-org-replace-link-file (file-name-nondirectory current-path)
(replace-regexp-in-string
curr-dir "" new-path))
(my-org-replace-link-file current-path
(replace-regexp-in-string
curr-dir "" new-path)))))
(defun my-org-replace-link-file (from to)
(save-excursion
(goto-char (point-min))
(while (re-search-forward org-bracket-link-regexp nil t)
(cond ((string-match-p (concat "attachment:" from) (match-string 1))
(replace-match (concat "[[attachment:" to "]]")))
((string-match-p from (match-string 1))
(replace-match (concat "[[file:" to "]]")))))))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: Org and multimedia (tips?)
2022-03-18 14:40 6% ` Max Nikulin
@ 2022-03-19 11:13 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-19 11:13 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> org-web-tools is an interesting project, but if you have access to
> files it should be easier to extract all meta information directly
> using e.g.
>
> exiftool -json file.mp3
>
> or another tool suitable to particular format. It seems emms has
> interface to various tools.
>
> P.S. You may try to adapt common LISP implementation of ID3 parser
> https://gigamonkeys.com/book/practical-an-id3-parser.html
Maxim, thanks a lot for the ideas. I take note. The reason for using
org-web-tools is that the web page that GNUMP3d serves is extremely
simple, with an alphabetical list of artists, titles, and links to the
.m3u to stream. The list is easily reusable in Org. In the end I managed
to write a function to create in each node a property drawer with
album title, date and artist, accessing each m3u and obtaining the
information with ffprobe (screenshot: https://i.imgur.com/1ALe4Ah.png).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Move or rename a file in a link
2022-03-10 14:58 10% ` Juan Manuel Macías
@ 2022-03-18 18:52 6% ` João Pedro de Amorim Paula
2022-03-19 11:25 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: João Pedro de Amorim Paula @ 2022-03-18 18:52 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On 10 March 2022 14:58, Juan Manuel Macías <maciaschain@posteo.net> wrote:
> Hi João, Thanks for your comment.
Hello, Juan! I apologize for the delay on responding, I had some issues
with my e-mail account lately.
> Regarding attachments, do you mean org attachments or email attachments?
> Could you give an example of a use case?
I mean org attachments. I use org-attach extensively to store documents
with notes. So I'd have a heading like so
* Documents
:PROPERTIES:
:DIR: data/docs/
:END:
- [[Registration][attachment:registration.pdf]] :: My registration.
And say I'd like to rename the file. I would need to rename it inside
data/docs and I would also need to edit the link, so I would like to
have a way to do it automatically. I just got a computer back so I will
be trying to adapt what you did to work with org-attach, but if you
figure out a way to do it as well, please, let me know.
Regards,
--
João Pedro de Amorim Paula
IT undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)
^ permalink raw reply [relevance 6%]
* Re: Org and multimedia (tips?)
2022-03-17 22:44 7% Org and multimedia (tips?) Juan Manuel Macías
@ 2022-03-18 14:40 6% ` Max Nikulin
2022-03-19 11:13 10% ` Juan Manuel Macías
2022-05-05 1:14 5% ` TRS-80
1 sibling, 1 reply; 200+ results
From: Max Nikulin @ 2022-03-18 14:40 UTC (permalink / raw)
To: emacs-orgmode
On 18/03/2022 05:44, Juan Manuel Macías wrote:
>
> What I do is quite simple and rudimentary. For example, I have all my
> music files stored on a hard drive on my Raspberry. As a media server I
> use GNUMP3d, which is pretty clunky and outdated, but it works fine and
> is very easy for me to administer. GNUMP3d serves a local web page with
> the list of titles and artists. I convert that web to an Org node using
> org-web-tools (https://github.com/alphapapa/org-web-tools), and some
> extra elisp to clean up inconsistencies and format everything so that
> each artist/title is a sub-tree. The process is not quite fine-tuned: I
> have to see how labels and properties could be added automatically:
> music gender, year, etc.
org-web-tools is an interesting project, but if you have access to files
it should be easier to extract all meta information directly using e.g.
exiftool -json file.mp3
or another tool suitable to particular format. It seems emms has
interface to various tools.
P.S. You may try to adapt common LISP implementation of ID3 parser
https://gigamonkeys.com/book/practical-an-id3-parser.html
^ permalink raw reply [relevance 6%]
* Org and multimedia (tips?)
@ 2022-03-17 22:44 7% Juan Manuel Macías
2022-03-18 14:40 6% ` Max Nikulin
2022-05-05 1:14 5% ` TRS-80
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-17 22:44 UTC (permalink / raw)
To: orgmode
Hi all,
I've been trying for a while to use Org also to store and org-anize the
data of my music and video files, so that I can conveniently access them
via helm-org-ql and play them using EMMS. I was wondering if anyone is
trying this too, and thought maybe it would be nice to share tips and
hacks.
What I do is quite simple and rudimentary. For example, I have all my
music files stored on a hard drive on my Raspberry. As a media server I
use GNUMP3d, which is pretty clunky and outdated, but it works fine and
is very easy for me to administer. GNUMP3d serves a local web page with
the list of titles and artists. I convert that web to an Org node using
org-web-tools (https://github.com/alphapapa/org-web-tools), and some
extra elisp to clean up inconsistencies and format everything so that
each artist/title is a sub-tree. The process is not quite fine-tuned: I
have to see how labels and properties could be added automatically:
music gender, year, etc. I have also defined a new type of link to be
able to play the content (*.m3u) via EMMS[1], and I have also added a new
action to helm-org-ql. Finally, in another section I am also storing
links to radio stations, TV, single songs (captured with org-capture),
etc. I have also found 'sacad' useful for downloading the cover art
(https://github.com/desbma/sacad).
This is my system for organizing my media files in Org. If anyone is
interested, I can expand on specific details. And here, a couple of
screenshots:
https://i.imgur.com/NKybgPV.png
https://i.imgur.com/DtfoyZl.jpg
[1]
#+begin_src emacs-lisp
(org-link-set-parameters
"url-media"
:follow (lambda (path) (emms-play-url path))
:face '(:foreground "chocolate" :weight bold :underline t))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 7%]
* Re: leading superscript on a line for ODT export
@ 2022-03-16 14:07 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-16 14:07 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode, Eric S Fraga
Max Nikulin writes:
> @@org:@@^1 blah
This is a nice solution. I think a snipet with a "non-existent" backend
would work here too:
@@null:@@^1
(I use a lot export snipets with 'non-existent' backends for inline
comments).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: leading superscript on a line for ODT export
2022-03-16 13:12 10% ` Juan Manuel Macías
@ 2022-03-16 13:42 6% ` Eric S Fraga
0 siblings, 0 replies; 200+ results
From: Eric S Fraga @ 2022-03-16 13:42 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Wednesday, 16 Mar 2022 at 13:12, Juan Manuel Macías wrote:
> When I need to find out some xml markup in odt or docx I open the
> document from Dired with view-mode, and run C-c C-c
Yeah, I've done this in the past as well. Dired and automatic
un-zipping really helps!
Thanks again,
eric
--
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: leading superscript on a line for ODT export
2022-03-16 12:46 6% ` Eric S Fraga
@ 2022-03-16 13:12 10% ` Juan Manuel Macías
2022-03-16 13:42 6% ` Eric S Fraga
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-16 13:12 UTC (permalink / raw)
To: Eric S Fraga; +Cc: orgmode
Eric S Fraga writes:
> Yes, I guess this is the best way to do this. Thank you in particular
> for the xml code for odt which would have taken me some time to figure
> out!
When I need to find out some xml markup in odt or docx I open the
document from Dired with view-mode, and run C-c C-c
(doc-view-toggle-display) to access the .xml files (these documents are
nothing more than zipped folders with xml files inside). This is also
useful for making (small) modifications to an odt or docx document. So,
yeah, in Emacs we can edit a Word or Libreoffice document :-D.
A screenshot: https://i.imgur.com/XRcGwse.png
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: leading superscript on a line for ODT export
2022-03-16 12:03 10% ` Juan Manuel Macías
@ 2022-03-16 12:46 6% ` Eric S Fraga
2022-03-16 13:12 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Eric S Fraga @ 2022-03-16 12:46 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Wednesday, 16 Mar 2022 at 12:03, Juan Manuel Macías wrote:
> I would use a macro. For example:
Yes, I guess this is the best way to do this. Thank you in particular
for the xml code for odt which would have taken me some time to figure
out!
--
: Eric S Fraga, with org release_9.5.2-401-g91681f in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: leading superscript on a line for ODT export
@ 2022-03-16 12:03 10% ` Juan Manuel Macías
2022-03-16 12:46 6% ` Eric S Fraga
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-16 12:03 UTC (permalink / raw)
To: Eric S Fraga; +Cc: orgmode
Hi Eric,
Eric S Fraga writes:
> I need to have a line starting with a superscript, e.g. 1, in an ODT
> exported file. If I write "^1 blah", it doesn't work. I need a
> character before the ^ to have it interpreted as a superscript.
>
> Is there an "empty" character I can use? I tried a non-breaking space
> but that did not work. The space is there but the ^1 gets exported
> literally.
I would use a macro. For example:
#+begin_src emacs-lisp
(defun my-macro-superscript (arg)
(cond ((eq org-export-current-backend 'latex)
(format "@@latex:\\textsuperscript{%s}@@" arg))
((eq org-export-current-backend 'odt)
(format "@@odt:<text:span text:style-name=\"OrgSuperscript\">%s</text:span>@@" arg))))
(setq org-export-global-macros
'(("sup" . "(eval (my-macro-superscript $1))")))
#+end_src
{{{sup(4)}}}
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: LaTeX export of a file with some accented characters
@ 2022-03-15 20:23 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-15 20:23 UTC (permalink / raw)
To: Vikas Rawal; +Cc: orgmode
Hi Vikas,
Vikas Rawal writes:
> I have an org file with some names (not all) that have accented
> characters. But when I try to export, I get errors such as this:
>
> Sāṅkr - 65190: word not found
>
> What do I do to make Org export these correctly? Is there a way to
> make Org export even if it does not recognise the characters?
Do you have flyspell-mode active? Sounds to me like that's a flyspell
error message, but it's weird anyway and I don't know how to fit it into
your export issue...
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Code blocks and quotes export style
2022-03-14 12:50 6% ` Max Nikulin
@ 2022-03-14 18:09 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-14 18:09 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> should be even better since, besides LaTeX "\-", HTML exporter uses
> "­" or "­" (I would expect more consistent behavior
> though.)
Hi, Maxim. You're right, I didn't remember that there is a specific
entity in Org for the discretionary hyphen. Sometimes I think too much
from the LaTeX side... :-)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Code blocks and quotes export style
2022-03-13 18:39 7% ` Juan Manuel Macías
@ 2022-03-14 12:50 6% ` Max Nikulin
2022-03-14 18:09 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-03-14 12:50 UTC (permalink / raw)
To: emacs-orgmode
On 14/03/2022 01:39, Juan Manuel Macías wrote:
>
> Supercali@@latex:\-@@fragilistic
Supercali\shy{}fragilistic
Supercali\-fragilistic
should be even better since, besides LaTeX "\-", HTML exporter uses
"­" or "­" (I would expect more consistent behavior though.)
info "(org) Special Symbols"
https://orgmode.org/manual/Special-Symbols.html [[info:org#Special Symbols]]
^ permalink raw reply [relevance 6%]
* Re: Code blocks and quotes export style
@ 2022-03-13 18:39 7% ` Juan Manuel Macías
2022-03-14 12:50 6% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-13 18:39 UTC (permalink / raw)
To: Kaushal Modi; +Cc: orgmode, Sébastien Gendre
Kaushal Modi writes:
> Well, that will at least help the code blocks going out of bounds. It
> won't help the quotes.
With the quotes going out of bounds issue it would be nice to see a
screenshot. But if a line of normal text goes outside the margin, it is
usually due to a TeX overfull hbox, perhaps because TeX hasn't been able
to hyphenate a long word correctly (also perhaps because the text is in
a language other than the main language, and that text should be encased
in the secondary language specifications).
For this type of lines outside the margin there are several LaTeX
solutions:
The quick fix is to add a discretionary hyphen (\-). For example, if the
word that goes outside the margin is "supercalifragilistic", the
discretionary can be added with an export snipett:
Supercali@@latex:\-@@fragilistic
Or even breakpoints can be indicated with the '\hyphenation' macro in the
preamble (we can add a list of words separated by commas):
#+LaTeX_Header: \hyphenation{Supercali-fragilistic}
Another solution is to disable TeX's line break algorithm at the
paragraph where the line overflows, using the slopypar environment. The
result can be ugly, with too wide separations between words.
On the other hand, loading the microtype package (in pdfTeX or LuaTeX)
usually helps a lot in the construction of the paragraphs.
And finally, if LuaTeX is used to compile, the linebreaker
(https://www.ctan.org/pkg/linebreaker) package automatically prevents
all overfull hboxes in the document.
Also note that the Org quote block supports the :environments attribute,
where we can apply environments other than 'quote', such as quotation or
those provided by the csquotes package. For example, for quotes in
another language:
#+LaTeX_Header:\usepackage[german,english]{babel}
#+LaTeX_Header:\usepackage{quoting}
#+LaTeX_Header:\usepackage[babel=true,autostyle=true,german=quotes]{csquotes}
#+LaTeX_Header:\SetBlockEnvironment{quoting}
#+ATTR_LaTeX: :environment foreigndisplayquote :options {german}
#+begin_quote
Eine Erklärung, wie sie einer Schrift in einer Vorrede nach der
Gewohnheit vorausgeschickt wird (Hegel).
#+end_quote
Best regards,
Juan Manuel
^ permalink raw reply [relevance 7%]
* helm-org-names: browse the names of code blocks, tables and figures
@ 2022-03-11 22:24 10% Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-11 22:24 UTC (permalink / raw)
To: orgmode
Hi all,
I've written this little package to browse with helm through the names
of code blocks, tables and figures in a document. A series of actions
can be executed on the candidate (go to object, edit a code block,
insert a link, etc.). In the list of figures that is displayed in Helm,
each figure name is accompanied by a thumbnail of the image.
A screenshot: https://i.imgur.com/DVIQv8x.png
The GitLab repo:
https://gitlab.com/maciaschain/helm-org-names
I'm afraid the package is still a bit raw, but I think it's usable :-).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Move or rename a file in a link
2022-03-09 20:30 6% ` João Pedro de Amorim Paula
@ 2022-03-10 14:58 10% ` Juan Manuel Macías
2022-03-18 18:52 6% ` João Pedro de Amorim Paula
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-10 14:58 UTC (permalink / raw)
To: João Pedro de Amorim Paula; +Cc: orgmode
Hi João, Thanks for your comment.
João Pedro de Amorim Paula writes:
> Thanks for sharing! It'd be great if it worked for attachments as well,
> but that is a whole can of worms.
Regarding attachments, do you mean org attachments or email attachments?
Could you give an example of a use case?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Move or rename a file in a link
2022-03-05 19:58 9% Move or rename a file in a link Juan Manuel Macías
2022-03-06 8:09 3% ` Uwe Brauer
@ 2022-03-09 20:30 6% ` João Pedro de Amorim Paula
2022-03-10 14:58 10% ` Juan Manuel Macías
1 sibling, 1 reply; 200+ results
From: João Pedro de Amorim Paula @ 2022-03-09 20:30 UTC (permalink / raw)
To: Juan Manuel Macías, orgmode
On 05 March 2022 19:58, Juan Manuel Macías <maciaschain@posteo.net> wrote:
Hello Juan!
> Hi all,
>
> I have written this simple function to move or rename a destination file
> in an external link at point. I share it here in case it is useful to
> someone.
>
> Best regards,
>
> Juan Manuel
>
> #+begin_src emacs-lisp
> (defun my-org-replace-link-file (from to)
> (save-excursion
> (goto-char (point-min))
> (while (re-search-forward org-bracket-link-regexp nil t)
> (when (string-match-p from (match-string 1))
> (replace-match (concat "[[file:" to "]]"))))))
>
> (defun my-org-rename-link-file-at-point ()
> "Rename or move a file in an external link at point and
> update the link path"
> (interactive)
> (let* ((curr-dir (abbreviate-file-name default-directory))
> (current-path (org-element-property :path (org-element-context)))
> (new-path (read-file-name "Rename file at point to: " current-path)))
> (rename-file current-path new-path)
> (message (concat "moved to: " new-path))
> (if (directory-name-p new-path)
> (setq new-path (concat new-path (file-name-nondirectory current-path)))
> (setq new-path new-path))
> (my-org-replace-link-file current-path
> (replace-regexp-in-string curr-dir "" new-path))))
>
> #+end_src
>
Thanks for sharing! It'd be great if it worked for attachments as well,
but that is a whole can of worms.
Cheers,
--
João Pedro de Amorim Paula
IT undergraduate at Universidade Federal do Rio Grande do Norte (UFRN)
^ permalink raw reply [relevance 6%]
* Re: Filter for HTML (cite) footnotes?
2022-03-08 7:40 5% ` Filter for HTML (cite) footnotes? M. ‘quintus’ Gülker
@ 2022-03-08 10:14 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-08 10:14 UTC (permalink / raw)
To: M. ‘quintus’ Gülker; +Cc: orgmode
M. ‘quintus’ Gülker writes:
> That is, what I am after effectively, is post-processing the results
> generated by org-cite resp. citeproc.el. I have names in my
> bibliographic database like “Axel von Hellfeld”, which contain the
> German name particle “von”. Some (not all) citation customs require
> “von” to be abbreviated to “v.” so that the cited name becomes
> “v. Hellfeld”. This is not possible with CSL, so I look for another
> way to automate this during the export process.
I see. Have you tried using `org-export-filter-final-output-functions'?
You can try a find/replace function for the footnotes of final
output. The drawback is that the scope here is broader and
care should be taken with false positives...
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Filter for HTML (cite) footnotes?
2022-03-06 4:03 9% ` Juan Manuel Macías
@ 2022-03-08 7:40 5% ` M. ‘quintus’ Gülker
2022-03-08 10:14 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: M. ‘quintus’ Gülker @ 2022-03-08 7:40 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Am Sonntag, dem 06. März 2022 schrieb Juan Manuel Macías:
> I think a function for `org-export-filter-parse-tree-functions' would
> work better here. For example, this function replaces "lorem ipsum" with
> "foo" in all footnote definitions:
I have tried this suggestion, but it does not appear to work with
org-cite’s automatically generated footnotes. Text is only changed in
ordinary footnotes already present in the org file. When I use org-cite
with citeproc.el with a CSL style demanding footnotes, these citational
footnotes are generated from the [cite:] constructs somewhere inside
org-cite and/or citeproc.el during the export process. These footnotes
are apparantly not subject to “org-export-filter-parse-tree-functions”,
probably because they are inserted after parsing has completed.
That is, what I am after effectively, is post-processing the results
generated by org-cite resp. citeproc.el. I have names in my
bibliographic database like “Axel von Hellfeld”, which contain the
German name particle “von”. Some (not all) citation customs require
“von” to be abbreviated to “v.” so that the cited name becomes
“v. Hellfeld”. This is not possible with CSL, so I look for another
way to automate this during the export process.
-quintus
--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland | kontakt@guelker.eu | O<
^ permalink raw reply [relevance 5%]
* Re: interleaving comment between rows of a table?
@ 2022-03-07 15:54 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-07 15:54 UTC (permalink / raw)
To: Greg Minshall; +Cc: orgmode
Hi Greg,
Greg Minshall writes:
> i don't remember anybody asking about this.
>
> i'd sometimes find it useful to be able to interleave comments -- using
> (almost) whatever syntax -- between rows in an org-mode table.
> (normally, this would be to provide context/rationale for the subsequent
> row(s).)
I find the annotate package useful for inserting comments and
annotations in "difficult" places. I find annotations in the margin (as
overlays) intrusive, so I have set this variable, so that the
annotations appear only in the echo area and as a tooltip:
(setq annotate-use-echo-area t)
See this screenshot: https://i.imgur.com/koKYL0K.png
Other possible settings for annotate:
(set-face-attribute 'annotate-highlight nil :foreground "chocolate" :background nil :underline nil)
(set-face-attribute 'annotate-highlight-secondary nil :foreground "chocolate" :background nil :underline nil)
(setq annotate-file "path/to/my/annotate/file")
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Move or rename a file in a link
2022-03-05 19:58 9% Move or rename a file in a link Juan Manuel Macías
@ 2022-03-06 8:09 3% ` Uwe Brauer
2022-03-09 20:30 6% ` João Pedro de Amorim Paula
1 sibling, 0 replies; 200+ results
From: Uwe Brauer @ 2022-03-06 8:09 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Hi Juan Manuel
> Hi all,
> I have written this simple function to move or rename a destination file
> in an external link at point. I share it here in case it is useful to
> someone.
Thanks, that looks very useful, I tend to reorder files in
subdirectories and therefore «destroying links»
Uwe Brauer
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 3%]
* Re: Filter for HTML footnotes?
@ 2022-03-06 4:03 9% ` Juan Manuel Macías
2022-03-08 7:40 5% ` Filter for HTML (cite) footnotes? M. ‘quintus’ Gülker
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-03-06 4:03 UTC (permalink / raw)
To: M. ‘quintus’ Gülker; +Cc: orgmode
M. ‘quintus’ Gülker writes:
> I recently discovered export filters and found some useful applications
> for them. For instance, the scientific domain I work in (law) uses
> footnote citations, and in these footnotes we abbreviate some words
> which would otherwise be written out in ordinary text, like name
> particles. Since I use org-cite these footnotes are automatically
> generated. So what I did was to write a filter which abbreviates these
> words on export in footnotes. I added the filter function to both
> org-export-filter-footnote-definition-functions and
> org-export-filter-footnote-reference-functions and indeed, when I export
> to LaTeX or ODT it does its job just fine. However, when I export to
> HTML instead, it does not. When I looked at the text passed to the
> filter when exporting as HTML, it turned out what the function receives
> is not the content of the footnote, but only the markup for the footnote
> number. That came a bit by surprise.
> So, what is the correct way to target the content of a footnote in a
> filter across backends?
Hi,
I think a function for `org-export-filter-parse-tree-functions' would
work better here. For example, this function replaces "lorem ipsum" with
"foo" in all footnote definitions:
#+BIND: org-export-filter-parse-tree-functions (fnt-filter-replace)
#+begin_src emacs-lisp :exports results :results none
(defun fnt-filter-replace (tree backend info)
(org-element-map tree 'footnote-definition
(lambda (fnt)
(let* ((contents (org-element-interpret-data
(org-element-contents fnt)))
(contents-new (with-temp-buffer
(insert contents)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "lorem ipsum" nil t)
(replace-match "foo" t nil)))
(org-element-parse-buffer))))
(apply #'org-element-set-contents
fnt
(list contents-new))))
info)
tree)
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Move or rename a file in a link
@ 2022-03-05 19:58 9% Juan Manuel Macías
2022-03-06 8:09 3% ` Uwe Brauer
2022-03-09 20:30 6% ` João Pedro de Amorim Paula
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-03-05 19:58 UTC (permalink / raw)
To: orgmode
Hi all,
I have written this simple function to move or rename a destination file
in an external link at point. I share it here in case it is useful to
someone.
Best regards,
Juan Manuel
#+begin_src emacs-lisp
(defun my-org-replace-link-file (from to)
(save-excursion
(goto-char (point-min))
(while (re-search-forward org-bracket-link-regexp nil t)
(when (string-match-p from (match-string 1))
(replace-match (concat "[[file:" to "]]"))))))
(defun my-org-rename-link-file-at-point ()
"Rename or move a file in an external link at point and
update the link path"
(interactive)
(let* ((curr-dir (abbreviate-file-name default-directory))
(current-path (org-element-property :path (org-element-context)))
(new-path (read-file-name "Rename file at point to: " current-path)))
(rename-file current-path new-path)
(message (concat "moved to: " new-path))
(if (directory-name-p new-path)
(setq new-path (concat new-path (file-name-nondirectory current-path)))
(setq new-path new-path))
(my-org-replace-link-file current-path
(replace-regexp-in-string curr-dir "" new-path))))
#+end_src
^ permalink raw reply [relevance 9%]
* Re: including one double quote in an anonymous footnote?
@ 2022-02-28 20:57 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-28 20:57 UTC (permalink / raw)
To: Greg Minshall; +Cc: orgmode, Nicolas Goaziou
Hi Greg and Nicolas,
Greg Minshall writes:
> Nicolas and Juan Manuel,
>
> thanks very much. the bugfix branch seems to work for my case.
Thank you very much Nicolas. In my case it also works fine.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: including one double quote in an anonymous footnote?
2022-02-26 19:20 9% ` Juan Manuel Macías
@ 2022-02-28 14:47 6% ` Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Nicolas Goaziou @ 2022-02-28 14:47 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Greg Minshall, orgmode
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Greg Minshall writes:
> In any case, I don't know if that behavior should be considered a bug. I
> say this because other constructions with an unbalanced element,
> although org does not fontify them well, they are exported correctly:
>
> this is a test[fn::(this is an inline footnote]
>
> this is a test[fn::{this is an inline footnote]
>
> == LaTeX ==>
>
> this is a test\footnote{(this is an inline footnote}
>
> this is a test\footnote{\{this is an inline footnote}
>
> Instead, if you do <M-: (org-element-context)> on your example,
> org-element-context doesn't recognize this as a footnote reference:
>
> this is a test[fn::"this is an inline footnote]
>
> Looking at `org-element-footnote-reference-parser', I'd say the problem
> is with:
>
> ...
> (with-syntax-table org-element--pair-square-table
> (ignore-errors (scan-lists (point) 1 0)))
> ...
>
> If there is an unbalanced double quote inside a bracket construction,
> that expression returns nil and not the position after the final
> bracket. But I don't know how to go on :-(.
I think I fixed it in bugfix branch. Thanks.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [relevance 6%]
* Re: including one double quote in an anonymous footnote?
@ 2022-02-26 19:20 9% ` Juan Manuel Macías
2022-02-28 14:47 6% ` Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-26 19:20 UTC (permalink / raw)
To: Greg Minshall; +Cc: orgmode
Greg Minshall writes:
> Juan Manuel,
>
>> I can confirm that behavior. One possible solution is to use an entity
>> (M-x org-entities-help):
>
> thanks very much -- that does the trick for my case.
In any case, I don't know if that behavior should be considered a bug. I
say this because other constructions with an unbalanced element,
although org does not fontify them well, they are exported correctly:
this is a test[fn::(this is an inline footnote]
this is a test[fn::{this is an inline footnote]
== LaTeX ==>
this is a test\footnote{(this is an inline footnote}
this is a test\footnote{\{this is an inline footnote}
Instead, if you do <M-: (org-element-context)> on your example,
org-element-context doesn't recognize this as a footnote reference:
this is a test[fn::"this is an inline footnote]
Looking at `org-element-footnote-reference-parser', I'd say the problem
is with:
...
(with-syntax-table org-element--pair-square-table
(ignore-errors (scan-lists (point) 1 0)))
...
If there is an unbalanced double quote inside a bracket construction,
that expression returns nil and not the position after the final
bracket. But I don't know how to go on :-(.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: including one double quote in an anonymous footnote?
@ 2022-02-26 14:47 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-26 14:47 UTC (permalink / raw)
To: Greg Minshall; +Cc: orgmode
Hi Greg,
Greg Minshall writes:
> hi. experimenting [after significant confusion!], it appears that
> including a single (unpaired) double quote inside an anonymous footnote
> eliminates the recognition of the footnote. is this intentional?
>
> this works:
> ----
> this is a test.[fn:: a very long footnote]
> ----
>
> whereas this doesn't:
> ----
> this is a test.[fn:: "a very long footnote]
> ----
>
> i notice that for purposes of exporting, i can have the single double
> quote accepted by escaping it with a backslash:
> ----
> this is a test.[fn:: \"a very long footnote]
> ----
> but,
> - the backslash itself shows up in both latex and html exporting
> - the footnote doesn't get displayed in the org buffer as a footnote
> (the separate colors; this is "font locking"?)
>
> Org mode version 9.5.2 (9.5.2-gbb6830 @ /home/minshall/.emacs.d/straight/build/org/)
I can confirm that behavior. One possible solution is to use an entity
(M-x org-entities-help):
this is a test.[fn:: \quot{}a very long footnote]
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: ConTeXt exporter makes me happy
@ 2022-02-24 19:58 9% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-24 19:58 UTC (permalink / raw)
To: juh; +Cc: orgmode
juh writes:
> thanks a lot for org-mode and the ConTeXt exporter.
> https://github.com/Jason-S-Ross/ox-context
>
> With your help, in the last few months I setup a complete authoring and
> publishing environment for my needs with org-mode and ox-context. I
> collect my thoughts with org-roam, outline and write my texts with Emacs
> and org-mode and typeset my books with ConTeXt. Perfect match!
>
> ConTeXt is a wonderful tool to typeset books. It is much more flexible
> than LaTeX and very powerful.
>
> Before ox-context my authoring and publishing setup was a combination of
> Markdown, Pandoc and ConTeXt. It was quite perfect and handsome. The
> only drawback of this setup is the break between my Zettelkasten
> (org-roam) and my publishing tools.
>
> So, I am very happy that ox-context is there and is continually
> improved. The possibility to export to ConTeXt is a good reason to
> learn more facets of org-mode which is quite a big beast.
Although I prefer LaTeX to ConTeXt for my typesetting and publishing
work, I agree that ConTeXt is an excellent tool, and for many users it
can provide a number of advantages over LaTeX. I agree also that Jason
has done a great job with ox-context, and I join in the congratulations.
I recommend LaTeX users, and even users of LaTeX via Org-Mode, to give
ConTeXt a try, if you haven't tried it yet. And of course try
ox-context. One of the historical drawbacks of ConTeXt has always been
its poor documentation, compared to LaTeX's documentation (it's not
really deficient, but what abounds is the documentation at a more
technical level). But luckily there is now an excellent ConTeXt
introductory manual, written by Joaquín Ataz López and with translations
(so far) into English, French, Russian and Serbian:
https://github.com/contextgarden/not-so-short-introduction-to-context
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Footnote tooltips (an attempt)
2022-02-24 13:01 6% ` John Kitchin
@ 2022-02-24 16:25 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-24 16:25 UTC (permalink / raw)
To: John Kitchin; +Cc: orgmode
John Kitchin writes:
> that is a nice solution. I probably should have read the docstring on
> org-footnote-get-definition a little more closely, it has the
> definition you need in it!
Well, it's a minor detail. The really brilliant thing here is your idea
of passing the function as a help-echo value, instead of a text string.
It works like a charm! :-).
(I didn't know that the help-echo property could accept a function as a
value, and reading the documentation I realize that this has a lot of
potential...).
Best regards, And thanks again,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Footnote tooltips (an attempt)
2022-02-24 2:04 8% ` Juan Manuel Macías
@ 2022-02-24 13:01 6% ` John Kitchin
2022-02-24 16:25 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: John Kitchin @ 2022-02-24 13:01 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 2771 bytes --]
that is a nice solution. I probably should have read the docstring on
org-footnote-get-definition a little more closely, it has the definition
you need in it!
John
-----------------------------------
John Kitchin (he/his)
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
https://pointbreezepubs.gumroad.com/ pycse bookstore
On Wed, Feb 23, 2022 at 9:04 PM Juan Manuel Macías <maciaschain@posteo.net>
wrote:
> Hi John,
>
> John Kitchin writes:
>
> > I think this might be a simpler approach. what you want (I think) is
> > to leverage font-lock on tooltips to set a help-echo function instead
> > of a string. You can override org-activate-footnote-links with an
> > advice (which makes it easy to undo of you need). The tooltip function
> > then looks up the tooltip when you ask for it. The 3 pieces are below.
> > the first function looks up and returns a tooltip. the second is a
> > lightly modified version of org-activate-footnote-links which just
> > replaces the footnote reference string with the first function. the
> > last piece is the override advice. you could use a minor mode to
> > toggle the advice on and off.
>
> Thank you very much for your comment and code, which has helped me to
> clarify my ideas. Your approach is in a certain way similar to the last
> version of my attempt, which I attached in the previous message: through
> a first function I get the definition of each note, which is returned as
> a text string. And I also override via `advice-add'
> 'org-activate-footnonte-links' with a new function, which is also
> slightly modified, including a variable that gets the tooltip from the
> first function. The problem is that with my approach the tooltip does
> not appear on the fly, but when the next note is added. I think what my
> first function (the one that gets the footnote definition) was missing
> was the three arguments of your first function: `_win _obj position' and
> the (goto-char position), and pass it as a symbol (not as a variable) to
> the second function that overrides org-activate-footnote-links, as you
> do in your code. Modifying my function from your code, it would look
> something like this:
>
> (defun my-org-fn-get-def (_win _obj position)
> (save-excursion
> (goto-char position)
> (let* ((el (org-element-context))
> (label (org-element-property :label el))
> (def (nth 3 (org-footnote-get-definition label))))
> (when def (concat "Footnonte: " def)))))
>
> And it seems that now the tooltips appear instantly, and are updated in
> real time.
>
> Best regards,
>
> Juan Manuel
>
[-- Attachment #2: Type: text/html, Size: 3511 bytes --]
^ permalink raw reply [relevance 6%]
* Re: Pandoc and nested emhases
2022-02-18 12:31 10% ` Juan Manuel Macías
@ 2022-02-24 12:50 5% ` Max Nikulin
0 siblings, 0 replies; 200+ results
From: Max Nikulin @ 2022-02-24 12:50 UTC (permalink / raw)
To: emacs-orgmode
On 18/02/2022 19:31, Juan Manuel Macías wrote:
> Max Nikulin writes:
>
>> So formally this feature of pandoc is a bug (due to different kind of
>> parser). It is the reason why a corpus of tests should exist in a
>> format that can be easily imported from various programming languages.
>
> Your conclusions seem logical to me. It may sound a bit surrealistic to
> think that Pandoc is doing it wrong precisely for doing it "right", but...
Even pandoc is not perfect (at least not really consistent):
printf '%s' '- [[https://orgmode.org/][Lorem :: Ipsum]]' \
| pandoc -f org -t html
<dl>
<dt>[[<a href="https://orgmode.org/">https://orgmode.org/</a>][Lorem</dt>
<dd>Ipsum]]
</dd>
</dl>
Default zero-width workaround does not work for e.g. for code snippets
since it would break syntax of target programming language:
printf '%s' '- src_haskell{monoidBSFold :: FilePath -> IO Counts}' \
| pandoc -f org -t html
Examples are inspired by the following message:
Cash Weaver. Bug with exporting list with link item containing "::" to
markdown. Sat, 12 Feb 2022 12:12:45 -0800.
https://list.orgmode.org/CABGRHLkLGXYgGNm4CXK_LjOTGTpsLO=5aWD=FyPd1aMy2QdBxw@mail.gmail.com
^ permalink raw reply [relevance 5%]
* Re: Footnote tooltips (an attempt)
2022-02-23 22:05 4% ` John Kitchin
@ 2022-02-24 2:04 8% ` Juan Manuel Macías
2022-02-24 13:01 6% ` John Kitchin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-24 2:04 UTC (permalink / raw)
To: John Kitchin; +Cc: orgmode
Hi John,
John Kitchin writes:
> I think this might be a simpler approach. what you want (I think) is
> to leverage font-lock on tooltips to set a help-echo function instead
> of a string. You can override org-activate-footnote-links with an
> advice (which makes it easy to undo of you need). The tooltip function
> then looks up the tooltip when you ask for it. The 3 pieces are below.
> the first function looks up and returns a tooltip. the second is a
> lightly modified version of org-activate-footnote-links which just
> replaces the footnote reference string with the first function. the
> last piece is the override advice. you could use a minor mode to
> toggle the advice on and off.
Thank you very much for your comment and code, which has helped me to
clarify my ideas. Your approach is in a certain way similar to the last
version of my attempt, which I attached in the previous message: through
a first function I get the definition of each note, which is returned as
a text string. And I also override via `advice-add'
'org-activate-footnonte-links' with a new function, which is also
slightly modified, including a variable that gets the tooltip from the
first function. The problem is that with my approach the tooltip does
not appear on the fly, but when the next note is added. I think what my
first function (the one that gets the footnote definition) was missing
was the three arguments of your first function: `_win _obj position' and
the (goto-char position), and pass it as a symbol (not as a variable) to
the second function that overrides org-activate-footnote-links, as you
do in your code. Modifying my function from your code, it would look
something like this:
(defun my-org-fn-get-def (_win _obj position)
(save-excursion
(goto-char position)
(let* ((el (org-element-context))
(label (org-element-property :label el))
(def (nth 3 (org-footnote-get-definition label))))
(when def (concat "Footnonte: " def)))))
And it seems that now the tooltips appear instantly, and are updated in
real time.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: Footnote tooltips (an attempt)
2022-02-23 19:52 9% ` Juan Manuel Macías
@ 2022-02-23 22:05 4% ` John Kitchin
2022-02-24 2:04 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: John Kitchin @ 2022-02-23 22:05 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Ypo, orgmode
[-- Attachment #1: Type: text/plain, Size: 4080 bytes --]
I think this might be a simpler approach. what you want (I think) is to
leverage font-lock on tooltips to set a help-echo function instead of a
string. You can override org-activate-footnote-links with an advice (which
makes it easy to undo of you need). The tooltip function then looks up the
tooltip when you ask for it. The 3 pieces are below. the first function
looks up and returns a tooltip. the second is a lightly modified version of
org-activate-footnote-links which just replaces the footnote reference
string with the first function. the last piece is the override advice. you
could use a minor mode to toggle the advice on and off.
#+BEGIN_SRC emacs-lisp
(defun footnote-reference-tooltip (_win _obj position)
"Get footnote contents"
(save-excursion
(goto-char position)
(let* ((fnf (org-element-context))
(label (org-element-property :label fnf))
(p (nth 1 (org-footnote-get-definition label))))
(when p
(goto-char p)))
(let ((fnd (org-element-context)))
(string-trim
(buffer-substring (org-element-property :contents-begin fnd)
(org-element-property :contents-end fnd))))))
(defun footnote-tooltip (limit)
"Add text properties for footnotes."
(let ((fn (org-footnote-next-reference-or-definition limit)))
(when fn
(let* ((beg (nth 1 fn))
(end (nth 2 fn))
(label (car fn))
(referencep (/= (line-beginning-position) beg)))
(when (and referencep (nth 3 fn))
(save-excursion
(goto-char beg)
(search-forward (or label "fn:"))
(org-remove-flyspell-overlays-in beg (match-end 0))))
(add-text-properties beg end
(list 'mouse-face 'highlight
'keymap org-mouse-map
'help-echo
(if referencep #'footnote-reference-tooltip
"Footnote definition")
'font-lock-fontified t
'font-lock-multiline t
'face 'org-footnote))))))
(advice-add 'org-activate-footnote-links :override 'footnote-tooltip)
#+END_SRC
John
-----------------------------------
John Kitchin (he/his)
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu
https://pointbreezepubs.gumroad.com/ pycse bookstore
On Wed, Feb 23, 2022 at 2:52 PM Juan Manuel Macías <maciaschain@posteo.net>
wrote:
> Hi Samuel,
>
> Samuel Wales writes:
>
> > what a great idea. i am interested in your comments. emacs has lots
> > of tooltip-related features. eldoc, help-at-pt, mouse-avoidance, etc.
> > you don't want tooltips when your mouse happens to end up over. or
> > for your mouse to go haywire just because you ended up over. i ran
> > into a lot of confusion with various mechanisms.
> >
> > [e.g. i like having tooltips in echo area, and don't like eldoc for
> > function sigs, and do want cursor/mouse consistency.]
> >
> > i found that some tooltip features actually break others. just
> > wondering if you noticed this and what you think of it.
>
> I don't have much experience with Emacs tooltips and I haven't studied
> them much, because I hardly use the mouse in Emacs :-) But I noticed
> that you can also display the content of a tooltip in the echo area,
> with `<C-h .>' (`display-local-help'), or even set to non-nil
> `help-at-pt-display-when-idle' and evaluate `help-at-pt-set-timer', so
> that a tootltip is displayed at point; and in this scenario, they can be
> useful to me to quickly have some type of information.
>
> You can also set this variable to force tooltips always in the echo
> area:
>
> (setq tooltip-use-echo-area t)
>
> Anyway, I haven't given up on the idea of footnote tooltips yet. Here's
> a new version of the code I attached in my first post in this thread,
> and I think it's simpler now and works better, though I don't know if it
> might have any side effects... Footnote tooltips are activated with the
> minor mode `my-org-fn-tooltip-mode'.
>
> A new demo video:
>
> https://cloud.disroot.org/s/sBGJjCzbYgYbn5k
>
> Best regards,
>
> Juan Manuel
>
>
[-- Attachment #2: Type: text/html, Size: 5282 bytes --]
^ permalink raw reply [relevance 4%]
* Re: Footnote tooltips (an attempt)
[not found] ` <CAJcAo8tsK5o+789Wv=i6ddiSrM4fDyX8HCvjAgDLXGyLXWRWmQ@mail.gmail.com>
@ 2022-02-23 19:52 9% ` Juan Manuel Macías
2022-02-23 22:05 4% ` John Kitchin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-23 19:52 UTC (permalink / raw)
To: Samuel Wales, Ypo; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]
Hi Samuel,
Samuel Wales writes:
> what a great idea. i am interested in your comments. emacs has lots
> of tooltip-related features. eldoc, help-at-pt, mouse-avoidance, etc.
> you don't want tooltips when your mouse happens to end up over. or
> for your mouse to go haywire just because you ended up over. i ran
> into a lot of confusion with various mechanisms.
>
> [e.g. i like having tooltips in echo area, and don't like eldoc for
> function sigs, and do want cursor/mouse consistency.]
>
> i found that some tooltip features actually break others. just
> wondering if you noticed this and what you think of it.
I don't have much experience with Emacs tooltips and I haven't studied
them much, because I hardly use the mouse in Emacs :-) But I noticed
that you can also display the content of a tooltip in the echo area,
with `<C-h .>' (`display-local-help'), or even set to non-nil
`help-at-pt-display-when-idle' and evaluate `help-at-pt-set-timer', so
that a tootltip is displayed at point; and in this scenario, they can be
useful to me to quickly have some type of information.
You can also set this variable to force tooltips always in the echo
area:
(setq tooltip-use-echo-area t)
Anyway, I haven't given up on the idea of footnote tooltips yet. Here's
a new version of the code I attached in my first post in this thread,
and I think it's simpler now and works better, though I don't know if it
might have any side effects... Footnote tooltips are activated with the
minor mode `my-org-fn-tooltip-mode'.
A new demo video:
https://cloud.disroot.org/s/sBGJjCzbYgYbn5k
Best regards,
Juan Manuel
[-- Attachment #2: fn-tooltips.org --]
[-- Type: application/vnd.lotus-organizer, Size: 3004 bytes --]
^ permalink raw reply [relevance 9%]
* Re: Bug with exporting list with link item containing "::" to markdown
@ 2022-02-23 16:59 5% ` Max Nikulin
0 siblings, 0 replies; 200+ results
From: Max Nikulin @ 2022-02-23 16:59 UTC (permalink / raw)
To: Cash Weaver, emacs-orgmode
On 13/02/2022 03:12, Cash Weaver wrote:
>
> As a quick summary: The following list item is improperly exported to
> org mode (org-md-export-as-markdown). The first snippet is in org-mode
> and the second is the exported markdown:
>
> - [[id:c89158fd-05ac-4c66-8986-05753e15096c][ryans01 :: No Zero Days]]
> - [[id:92cf48f0-63a6-4d1d-9275-c80f6743ccb9][Do Things that Compound]]
>
> - **[[<ryans01NoZeroDays2013.md>][ryans01:** No Zero Days]]
> - [Do Things that Compound](do_things_that_compound.md)
I am marking this issue as a bug for https://updates.orgmode.org/ but it
may be just non-intuitive behavior of org-element parser. "::" inside an
item forces the list to be considered as descriptive one. Element which
parsing started earlier has higher priority. See the following recent
thread for similar issues:
Juan Manuel Macías. Pandoc and nested emhases.
Fri, 18 Feb 2022 00:47:18 +0000.
https://list.orgmode.org/orgmode/87sfshgfvt.fsf@posteo.net/T/#u
You may add zero-width space between colons, see
info "(org) Escape Character"
https://orgmode.org/manual/Escape-Character.html but it may require
post-processing filter to remove zero-width spaces.
Another approach is to insert an export snippet:
- [[id:cbce567a-861c-4d9b-8b2f-5933afadb864][ryans01 :@@org:@@: No Zero
Days]]
^ permalink raw reply [relevance 5%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-23 2:25 1% ` Samuel Banya
@ 2022-02-23 2:33 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-23 2:33 UTC (permalink / raw)
To: Samuel Banya; +Cc: orgmode
Hi Samuel,
Samuel Banya writes:
> Hey Juan,
>
> Just wanted to let you know that this works beautifully!
>
> I wish I was as good at Elisp to make this in the first place, but
> this really helps since I wanted to have some minimum overhead for 2
> separate websites to be able to just write in Org Mode but include
> ideas for buttons, with classes and ID values.
>
> This helps a ton, thanks so much as it totally worked! :)
You're welcome! I'm glad it works and is useful to you. Org links
have great potential :-)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Footnote tooltips (an attempt)
@ 2022-02-23 2:26 9% ` Juan Manuel Macías
[not found] ` <CAJcAo8tsK5o+789Wv=i6ddiSrM4fDyX8HCvjAgDLXGyLXWRWmQ@mail.gmail.com>
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-23 2:26 UTC (permalink / raw)
To: Ypo; +Cc: orgmode
Ypo writes:
> I love it!
> I am going to read your code, Juan Manuel, I won't understand anything
> but that function is very interesting for me, since it could be used
> too with internal links, I suppose.
Org links already have tooltips out of the box. You can also display the
tooltip in the echo area by pressing <C-h .> (`display-local-help').
If you want to try the code from my first post, please replace the
`my-org-fn-make-tooltips' function with this new version, which is much
simpler and doesn't have time-consuming issues to create or update
tooltips.
(However, I find the function I put in my second post more useful (for
my use case: I don't use the mouse very much).
#+begin_src emacs-lisp
(defun my-org-fn-make-tooltips ()
(interactive)
(org-element-map (org-element-parse-buffer) 'footnote-reference
(lambda (ref)
(let* ((label (org-element-property :label ref))
(label-from (org-element-property :begin ref))
(label-to (org-element-property :end ref))
(def (org-with-wide-buffer
(org-footnote-goto-definition label)
(let* ((e (org-element-context))
(from (org-element-property :contents-begin e))
(to (org-element-property :contents-end e)))
(buffer-substring-no-properties from to))))
(tooltip def))
(add-text-properties label-from label-to
`(help-echo
,tooltip))))
nil nil))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-21 0:38 6% ` Samuel Banya
@ 2022-02-23 2:25 1% ` Samuel Banya
2022-02-23 2:33 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Samuel Banya @ 2022-02-23 2:25 UTC (permalink / raw)
To: Charles Berry
[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]
Hey Juan,
Just wanted to let you know that this works beautifully!
I wish I was as good at Elisp to make this in the first place, but this really helps since I wanted to have some minimum overhead for 2 separate websites to be able to just write in Org Mode but include ideas for buttons, with classes and ID values.
This helps a ton, thanks so much as it totally worked! :)
Sincerely,
Sam
On Sun, Feb 20, 2022, at 7:38 PM, Samuel Banya wrote:
> Thanks for this, will try this for my Emacs config.
>
> On Sat, Feb 19, 2022, at 4:51 AM, Juan Manuel Macías wrote:
>> Juan Manuel Macías writes:
>>
>> > If you want to pass the class or id 'manually' to each link, and thus
>> > have more control, you can evaluate this other version, where the class
>> > or id would be added at the end of the link description, after (for
>> > example) "!style":
>>
>> PS: Sorry, this is the correct code:
>>
>> (org-link-set-parameters "button"
>> :face '(:foreground "green4" :underline t)
>> :follow (lambda (path) (browse-url path))
>> :export (lambda (path desc backend)
>> (when (eq backend 'html)
>> (let ((style (if (string-match "\\(!style\\)\\(.+\\)" desc)
>> (match-string 2 desc)
>> ""))
>> (desc (replace-regexp-in-string "\\(!style .+\\)" "" desc)))
>> (format "<form><button %s
>> formaction=\"%s\">%s</button></form>" style
>> path desc)))))
>>
>>
>> Example:
>>
>> [[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style class="mybutton"]]
>>
>> == HTML ==>
>>
>> <p>
>> <form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link </button></form>
>> </p>
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 2915 bytes --]
^ permalink raw reply [relevance 1%]
* Re: Footnote tooltips (an attempt)
2022-02-22 4:32 9% Footnote tooltips (an attempt) Juan Manuel Macías
@ 2022-02-22 22:15 11% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-22 22:15 UTC (permalink / raw)
To: orgmode
I answer myself to comment a couple more things on this question of
footnotes and tooltips. I think my approach is quite poor, and also when
it comes to files with many notes, it takes a long time to create or
update the list of tooltips. So I think I'll give up on' footnote
tooltips. If what it is about is being able to see the content of a
footnote quickly, I have written this other simpler function, which
displays the content of a footnote at point, in the echo area. Since
`<C-h .>' (`display-local-help') is not very useful in a footnote
reference, I recycle the shortcut for my function, if the context is a
footnote reference. I share it here, in case it is useful to someone.
┌────
│ (defun my-org-footnote-show-content ()
│ "Displays the content of a footnote at point, in the echo area"
│ (interactive)
│ (if (not (equal (org-element-type (org-element-context)) 'footnote-reference))
│ (error "Not on a footnote reference!")
│ (let* ((elt (org-element-context))
│ (label (org-element-property :label elt))
│ (def (org-with-wide-buffer
│ (org-footnote-goto-definition label)
│ (let* ((e (org-element-context))
│ (from (org-element-property :contents-begin e))
│ (to (org-element-property :contents-end e)))
│ (buffer-substring-no-properties from to)))))
│ (message def))))
│
│ (defun mi-display-local-help ()
│ (interactive)
│ (if (and (derived-mode-p 'org-mode)
│ (equal (org-element-type (org-element-context)) 'footnote-reference))
│ (my-org-footnote-show-content)
│ (call-interactively 'display-local-help)))
│
│ (global-set-key (kbd "C-h .") 'mi-display-local-help)
└────
Best regards,
Juan Manuel
Juan Manuel Macías writes:
Hi all,
>
> I think sometimes it would be nice to have tooltips in the footnote
> references, so I can see the contents of each footnote definition,
> especially when I'm in a narrowed subtree; so I've tried to write some
> code. I have achieved a "semi-automatic" solution. It doesn't work bad
> at all, but I'm not entirely convinced either. With a minor mode the
> `org-activate-footnote-links' function is overridden, and tooltips content
> for all footnotes in the document are added or updated after a couple of
> actions when you finish writing or editing a footnote:
> `org-edit-src-exit' and `org-mark-ring-goto'. And that's where the
> automatic part ends. Beyond that, tooltips must be updated/added by
> calling the `my-org-fn-make-tooltips' function.
>
> Here is a short video demo: https://cloud.disroot.org/s/a4gejYc6PSwNWHY
>
> I attach the code of my poor man's footnote tooltips. Of course, any
> comment and/or feedback is appreciated.
>
> Best regards,
>
> Juan Manuel
>
>
^ permalink raw reply [relevance 11%]
* Re: [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures
2022-02-16 19:52 8% ` [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures (was: update and add info for arbitrary :float values) Juan Manuel Macías
@ 2022-02-22 19:14 6% ` Nicolas Goaziou
0 siblings, 0 replies; 200+ results
From: Nicolas Goaziou @ 2022-02-22 19:14 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> I am attaching an updated version of the patch, which retrieves the
> `t' value for `:float' in tables and figures. The necessary information in
> the Manual is also updated.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [relevance 6%]
* Re: Open a footnote definition outside a narrowed subtree (workaround)
2022-02-22 16:45 6% ` Nicolas Goaziou
@ 2022-02-22 17:34 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-22 17:34 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: orgmode
Nicolas Goaziou writes:
> The "standard" solution is to use <C-c '>
Thanks fot the tip!
org-edit-special > org-edit-footnote-reference: it's clearly explained
in the docstring, and I've been cloning buffers manually all my life
(facepalm).
Sorry for the noise, naturally the "standard" solution is preferable to my
workaround.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Open a footnote definition outside a narrowed subtree (workaround)
2022-02-22 16:04 8% Open a footnote definition outside a narrowed subtree (workaround) Juan Manuel Macías
@ 2022-02-22 16:45 6% ` Nicolas Goaziou
2022-02-22 17:34 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Nicolas Goaziou @ 2022-02-22 16:45 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> When I am working on a narrowed subtree and want to open a footnote for
> editing (`C-c C-o': `org-open-at-point'), I get the message: "Definition
> is outside narrowed part of buffer". I don't know if there is a
> "standard" solution for that (aside from cloning the buffer and/or
> removing the restrictions)...
The "standard" solution is to use <C-c '>
Regards,
--
Nicolas Goaziou
^ permalink raw reply [relevance 6%]
* Open a footnote definition outside a narrowed subtree (workaround)
@ 2022-02-22 16:04 8% Juan Manuel Macías
2022-02-22 16:45 6% ` Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-22 16:04 UTC (permalink / raw)
To: orgmode
Hi all,
When I am working on a narrowed subtree and want to open a footnote for
editing (`C-c C-o': `org-open-at-point'), I get the message: "Definition
is outside narrowed part of buffer". I don't know if there is a
"standard" solution for that (aside from cloning the buffer and/or
removing the restrictions)... I’ve written this simple and quick
workaround, and then remapped `C-c C-o' so that:
`C-u C-c C-o'
my function
`C-c C-o'
`org-open-at-point'
┌────
│ (defun my-org-open-fn-indirect-buffer ()
│ (interactive)
│ (if (not (equal (org-element-type (org-element-context)) 'footnote-reference))
│ (error "Not in a footnote reference!")
│ (let* ((el (org-element-context))
│ (label (org-element-property :label el))
│ (buf (buffer-name))
│ (format (format "%s | Note %s" buf label)))
│ (when (get-buffer format)
│ (kill-buffer format))
│ (clone-indirect-buffer format t)
│ (setq header-line-format (format "NOTE %s" label))
│ (widen)
│ (org-open-at-point)
│ (recenter 0))))
│
│ (defun my-org-open-at-point ()
│ (interactive)
│ (if (equal current-prefix-arg nil)
│ (org-open-at-point)
│ (my-org-open-fn-indirect-buffer)))
│
│ (with-eval-after-load 'org
│ (define-key org-mode-map (kbd "C-c C-o") nil)
│ (define-key org-mode-map (kbd "C-c C-o") 'my-org-open-at-point))
└────
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Footnote tooltips (an attempt)
@ 2022-02-22 4:32 9% Juan Manuel Macías
2022-02-22 22:15 11% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-22 4:32 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
Hi all,
I think sometimes it would be nice to have tooltips in the footnote
references, so I can see the contents of each footnote definition,
especially when I'm in a narrowed subtree; so I've tried to write some
code. I have achieved a "semi-automatic" solution. It doesn't work bad
at all, but I'm not entirely convinced either. With a minor mode the
`org-activate-footnote-links' function is overridden, and tooltips content
for all footnotes in the document are added or updated after a couple of
actions when you finish writing or editing a footnote:
`org-edit-src-exit' and `org-mark-ring-goto'. And that's where the
automatic part ends. Beyond that, tooltips must be updated/added by
calling the `my-org-fn-make-tooltips' function.
Here is a short video demo: https://cloud.disroot.org/s/a4gejYc6PSwNWHY
I attach the code of my poor man's footnote tooltips. Of course, any
comment and/or feedback is appreciated.
Best regards,
Juan Manuel
[-- Attachment #2: fn-tooltips.org --]
[-- Type: application/vnd.lotus-organizer, Size: 3405 bytes --]
^ permalink raw reply [relevance 9%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-19 9:51 12% ` Juan Manuel Macías
@ 2022-02-21 0:38 6% ` Samuel Banya
2022-02-23 2:25 1% ` Samuel Banya
0 siblings, 1 reply; 200+ results
From: Samuel Banya @ 2022-02-21 0:38 UTC (permalink / raw)
To: Charles Berry
[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]
Thanks for this, will try this for my Emacs config.
On Sat, Feb 19, 2022, at 4:51 AM, Juan Manuel Macías wrote:
> Juan Manuel Macías writes:
>
> > If you want to pass the class or id 'manually' to each link, and thus
> > have more control, you can evaluate this other version, where the class
> > or id would be added at the end of the link description, after (for
> > example) "!style":
>
> PS: Sorry, this is the correct code:
>
> (org-link-set-parameters "button"
> :face '(:foreground "green4" :underline t)
> :follow (lambda (path) (browse-url path))
> :export (lambda (path desc backend)
> (when (eq backend 'html)
> (let ((style (if (string-match "\\(!style\\)\\(.+\\)" desc)
> (match-string 2 desc)
> ""))
> (desc (replace-regexp-in-string "\\(!style .+\\)" "" desc)))
> (format "<form><button %s
> formaction=\"%s\">%s</button></form>" style
> path desc)))))
>
>
> Example:
>
> [[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style class="mybutton"]]
>
> == HTML ==>
>
> <p>
> <form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link </button></form>
> </p>
>
>
[-- Attachment #2: Type: text/html, Size: 2209 bytes --]
^ permalink raw reply [relevance 6%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-19 9:41 8% ` Juan Manuel Macías
@ 2022-02-19 9:51 12% ` Juan Manuel Macías
2022-02-21 0:38 6% ` Samuel Banya
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-19 9:51 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías writes:
> If you want to pass the class or id 'manually' to each link, and thus
> have more control, you can evaluate this other version, where the class
> or id would be added at the end of the link description, after (for
> example) "!style":
PS: Sorry, this is the correct code:
(org-link-set-parameters "button"
:face '(:foreground "green4" :underline t)
:follow (lambda (path) (browse-url path))
:export (lambda (path desc backend)
(when (eq backend 'html)
(let ((style (if (string-match "\\(!style\\)\\(.+\\)" desc)
(match-string 2 desc)
""))
(desc (replace-regexp-in-string "\\(!style .+\\)" "" desc)))
(format "<form><button %s
formaction=\"%s\">%s</button></form>" style
path desc)))))
Example:
[[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style class="mybutton"]]
== HTML ==>
<p>
<form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link </button></form>
</p>
^ permalink raw reply [relevance 12%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-19 1:02 6% ` Samuel Banya
@ 2022-02-19 9:41 8% ` Juan Manuel Macías
2022-02-19 9:51 12% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-19 9:41 UTC (permalink / raw)
To: Samuel Banya; +Cc: orgmode
Samuel Banya writes:
> To clarify, did you evaluate that code block on the org mode docs
> itself?
The code must be evaluated *before* using that new type of link, or saved
to your ~/.emacs. You can simply evaluate it in your `scratch' buffer:
(org-link-set-parameters "button"
:face '(:foreground "green4" :underline t)
:follow (lambda (path) (browse-url path))
:export (lambda (path desc backend)
(when (eq backend 'html)
(format "<form><button class=\"mybutton\" formaction=\"%s\">%s</button></form>" path desc))))
If you want to pass the class or id 'manually' to each link, and thus
have more control, you can evaluate this other version, where the class
or id would be added at the end of the link description, after (for
example) "!style":
(org-link-set-parameters "button"
:face '(:foreground "green4" :underline t)
:follow (lambda (path) (browse-url path))
:export (lambda (path desc backend)
(when (eq backend 'html)
(let* ((style (if (string-match "\\(!style .+\\)" desc)
(match-string 1 desc)
""))
(desc (replace-regexp-in-string style "" desc)))
(format "<form><button %s formaction=\"%s\">%s</button></form>" style path desc)))))
Example:
[[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link !style class="mybutton"]]
== HTML ==>
<p>
<form><button !style class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link </button></form>
</p>
> I ask because if I try to evaluate it, aka 'C-c C-c' on the
> '#begin_src' block, nothing happens.
When you evaluate the code and add the new link type 'button', does it
appear in your document with the face defined for that link: green,
underlined? Have you tried testing it on a clean Emacs/Org?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-18 20:51 12% ` Juan Manuel Macías
@ 2022-02-19 1:02 6% ` Samuel Banya
2022-02-19 9:41 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Samuel Banya @ 2022-02-19 1:02 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Charles Berry
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
To clarify, did you evaluate that code block on the org mode docs itself?
I ask because if I try to evaluate it, aka 'C-c C-c' on the '#begin_src' block, nothing happens.
And after I export the Org Doc to HTML, it still gives me that same error as before.
On Fri, Feb 18, 2022, at 3:51 PM, Juan Manuel Macías wrote:
> Juan Manuel Macías writes:
>
> > If you evaluate the `org-ling-set-parameters' expression that I gave
> > you, you should get when exporting to html:
> >
> > <p>
> > <form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link</button></form>
> > </p>
>
> P.S.: I forgot to tell you that if you want to visit the link also from the
> Org file itself, you must add this parameter to org-link-set-parameters:
>
> :follow (lambda (path) (browse-url path))
>
> Best regards,
>
> jm
>
[-- Attachment #2: Type: text/html, Size: 1481 bytes --]
^ permalink raw reply [relevance 6%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-18 20:38 10% ` Juan Manuel Macías
@ 2022-02-18 20:51 12% ` Juan Manuel Macías
2022-02-19 1:02 6% ` Samuel Banya
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-18 20:51 UTC (permalink / raw)
To: Samuel Banya; +Cc: orgmode
Juan Manuel Macías writes:
> If you evaluate the `org-ling-set-parameters' expression that I gave
> you, you should get when exporting to html:
>
> <p>
> <form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link</button></form>
> </p>
P.S.: I forgot to tell you that if you want to visit the link also from the
Org file itself, you must add this parameter to org-link-set-parameters:
:follow (lambda (path) (browse-url path))
Best regards,
jm
^ permalink raw reply [relevance 12%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-18 19:59 6% ` Samuel Banya
2022-02-18 20:04 0% ` Samuel Banya
@ 2022-02-18 20:38 10% ` Juan Manuel Macías
2022-02-18 20:51 12% ` Juan Manuel Macías
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-18 20:38 UTC (permalink / raw)
To: Samuel Banya; +Cc: orgmode
Samuel Banya writes:
> I tried to use this idea, but I'm not sure how to set the 'target' in
> your example:
> [[button:some target][This is a button]]
>
> For example, I tried this:
> [[button:http://www.sambanya.com/artgallery.html][Art Gallery Page
> Link]]
>
> But received this error:
> user-error: Unable to resolve link:
> "button:http://www.sambanya.com/artgallery.html"
Hi Samuel,
It's strange... I have tried your link, and it works fine for me. I have
made this video capture:
https://cloud.disroot.org/s/SaHR7jenTWxFWZt
If you evaluate the `org-ling-set-parameters' expression that I gave
you, you should get when exporting to html:
<p>
<form><button class="mybutton" formaction="http://www.sambanya.com/artgallery.html">Art Gallery Page Link</button></form>
</p>
What version of org are you using?
(I don't have much knowledge of html or css, in any case. Just for the
basics).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-18 19:59 6% ` Samuel Banya
@ 2022-02-18 20:04 0% ` Samuel Banya
2022-02-18 20:38 10% ` Juan Manuel Macías
1 sibling, 0 replies; 200+ results
From: Samuel Banya @ 2022-02-18 20:04 UTC (permalink / raw)
To: Charles Berry
[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]
Also, how could you possible add an 'id' or 'class' attribute to an existing lOrg mode style hyperink?
I ask because I like your approach to just modify the stylesheet, but am unaware of how to actually utilize HTML's concept or 'id' or 'class' in an Org doc itself when using basic Org mode style hyperlinks [[link address][link description]]
Also, I ask because I found a similar video to just style the hyperlink in a similar fashion but would need to somehow assign a class or id value to the HTML element that's exported from the hyperlink itself:
Styling HTML Anchor Tag (Link) To Look Like A Button | CSS Tutorial (https://www.youtube.com/watch?v=p5nogm7ul6A)
Thanks,
Sam
On Fri, Feb 18, 2022, at 2:59 PM, Samuel Banya wrote:
> I tried to use this idea, but I'm not sure how to set the 'target' in your example:
> [[button:some target][This is a button]]
>
> For example, I tried this:
> [[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link]]
>
> But received this error:
> user-error: Unable to resolve link: "button:http://www.sambanya.com/artgallery.html"
>
> Thanks,
>
> Sam
>
> On Thu, Feb 17, 2022, at 5:10 PM, Juan Manuel Macías wrote:
>> Hi Samuel:
>>
>> Samuel Banya writes:
>>
>> > Is it possible to create HTML style buttons using Org Mode itself?
>>
>> One possibility is to use a custom link. For example:
>>
>> #+begin_src emacs-lisp
>> (org-link-set-parameters "button"
>> :face '(:foreground "green" :underline t)
>> :export (lambda (path desc backend)
>> (when (eq backend 'html)
>> (format "<form><button class=\"mybutton\" formaction=\"%s\">%s</button></form>" path desc))))
>> #+end_src
>>
>> #+HTML_HEAD: <style> .mybutton{background-color:#4CAF50;border:none;color:white;padding:15px32px;text-align:center;text-decoration:none;display:inline-block;font-size:18px;margin:4px2px;cursor:pointer;</style>
>>
>> [[button:some target][This is a button]]
>>
>> NB: I have borrowed the style from here: https://www.w3schools.com/csS/css3_buttons.asp
>>
>> Best regards,
>>
>> Juan Manuel
>>
>
[-- Attachment #2: Type: text/html, Size: 3327 bytes --]
^ permalink raw reply [relevance 0%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
2022-02-17 22:10 10% ` Juan Manuel Macías
@ 2022-02-18 19:59 6% ` Samuel Banya
2022-02-18 20:04 0% ` Samuel Banya
2022-02-18 20:38 10% ` Juan Manuel Macías
0 siblings, 2 replies; 200+ results
From: Samuel Banya @ 2022-02-18 19:59 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Charles Berry
[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]
I tried to use this idea, but I'm not sure how to set the 'target' in your example:
[[button:some target][This is a button]]
For example, I tried this:
[[button:http://www.sambanya.com/artgallery.html][Art Gallery Page Link]]
But received this error:
user-error: Unable to resolve link: "button:http://www.sambanya.com/artgallery.html"
Thanks,
Sam
On Thu, Feb 17, 2022, at 5:10 PM, Juan Manuel Macías wrote:
> Hi Samuel:
>
> Samuel Banya writes:
>
> > Is it possible to create HTML style buttons using Org Mode itself?
>
> One possibility is to use a custom link. For example:
>
> #+begin_src emacs-lisp
> (org-link-set-parameters "button"
> :face '(:foreground "green" :underline t)
> :export (lambda (path desc backend)
> (when (eq backend 'html)
> (format "<form><button class=\"mybutton\" formaction=\"%s\">%s</button></form>" path desc))))
> #+end_src
>
> #+HTML_HEAD: <style> .mybutton{background-color:#4CAF50;border:none;color:white;padding:15px32px;text-align:center;text-decoration:none;display:inline-block;font-size:18px;margin:4px2px;cursor:pointer;</style>
>
> [[button:some target][This is a button]]
>
> NB: I have borrowed the style from here: https://www.w3schools.com/csS/css3_buttons.asp
>
> Best regards,
>
> Juan Manuel
>
[-- Attachment #2: Type: text/html, Size: 2292 bytes --]
^ permalink raw reply [relevance 6%]
* Re: Pandoc and nested emhases
2022-02-18 12:06 4% ` Max Nikulin
@ 2022-02-18 12:31 10% ` Juan Manuel Macías
2022-02-24 12:50 5% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-18 12:31 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Hi Maxim,
Max Nikulin writes:
> So formally this feature of pandoc is a bug (due to different kind of
> parser). It is the reason why a corpus of tests should exist in a
> format that can be easily imported from various programming languages.
Your conclusions seem logical to me. It may sound a bit surrealistic to
think that Pandoc is doing it wrong precisely for doing it "right", but...
if from Org's point of view this is not something specified in its
syntax, then here Pandoc makes a mistake parsing Org's syntax. All this
is very curious, indeed. I confess that before I did not see the need for
those corpus of tests very clearly, but this case has opened my mind.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Pandoc and nested emhases
2022-02-18 0:47 8% Pandoc and nested emhases Juan Manuel Macías
@ 2022-02-18 12:06 4% ` Max Nikulin
2022-02-18 12:31 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-02-18 12:06 UTC (permalink / raw)
To: emacs-orgmode
On 18/02/2022 07:47, Juan Manuel Macías wrote:
>
> Otherwise, if you export to LaTeX with pandoc (v. 2.14.2), the result is
> (to my surprise) correct:
>
> str="/lorem /ipsum/ dolor/"
> pandoc -f org -t latex <<< $str
> \emph{lorem \emph{ipsum} dolor}
2.5-3build2 from Ubuntu-20.04 works in the same way.
I like such behavior:
echo "/lorem =ip/ sum= dolor/" | pandoc -f org -t latex
\emph{lorem \texttt{ip/\ sum} dolor}
I know at least one more persons who will be happy as well:
https://list.orgmode.org/87pmtqp79s.fsf@web.de/T/#u
mid:87pmtqp79s.fsf@web.de
(tracked as a confirmed bug at https://updates.orgmode.org/)
printf '/lorem\nipsum [[https://orgmode.org/,service][dolor]] ipsum/\n'
| pandoc -f org -t latex
\emph{lorem ipsum \href{https://orgmode.org/,service}{dolor} ipsum}
> Another (more abstract) doubt that arises, although I am not an expert
> in matters of grammar and specifications. If nested emphases of the same
> category are not possible in Org, should this be understood as a bug or
> a feature? What implication does it have if a external parser, like
> Pandoc, parses them just "fine"?
Nicolas Goaziou explicitly stated that current behavior is correct, see
"[Patch] to correctly sort the items with emphasis marks in a list".
Tue, 20 Apr 2021 22:37:31 +0200. mid:874kg0ae0k.fsf@nicolasgoaziou.fr
https://list.orgmode.org/874kg0ae0k.fsf@nicolasgoaziou.fr/
Nicolas confirmed it when I posted a similar example later in the
following discussion:
Ihor Radchenko. c47b535bb origin/main org-element: Remove dependency on
‘org-emphasis-regexp-components’
Thu, 18 Nov 2021 20:25:33 +0800. mid:87tug93b2a.fsf@localhost
https://list.orgmode.org/87tug93b2a.fsf@localhost/
> My intuition says that the current parser behaviour is not correct. It
> would make more sense to prioritise link over italics. However, it would
> require a major change in the parser - instead of a single pass, the
> parser may parse different types of objects sequentially.
Nicolas Goaziou. c47b535bb origin/main org-element: Remove dependency on
‘org-emphasis-regexp-components’
Thu, 18 Nov 2021 13:35:19 +0100. mid:87y25l8wvs.fsf@nicolasgoaziou.fr
https://list.orgmode.org/87y25l8wvs.fsf@nicolasgoaziou.fr/
> I disagree. Priority should be given to the first object being started.
> This is, IMO, the only sane way to handle syntax.
And once more in response to my message:
Nicolas Goaziou. org parser and priorities of inline elements.
Sat, 27 Nov 2021 20:02:31 +0100. mid:87mtlppgl4.fsf@nicolasgoaziou.fr
https://list.orgmode.org/87mtlppgl4.fsf@nicolasgoaziou.fr/
> I don't see any incentive to change the order objects are parsed, once
> you know how Org does it. This is just a red herring. What is useful,
> however, is to fontify them the way Org sees them.
So formally this feature of pandoc is a bug (due to different kind of
parser). It is the reason why a corpus of tests should exist in a format
that can be easily imported from various programming languages.
^ permalink raw reply [relevance 4%]
* Pandoc and nested emhases
@ 2022-02-18 0:47 8% Juan Manuel Macías
2022-02-18 12:06 4% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-18 0:47 UTC (permalink / raw)
To: orgmode
Hi all,
Sorry in advance if this may sound too trivial, imprecise or naive: it's
just for my curiosity, as I've recently been doing some tests with Pandoc
and I've seen something that has caught my attention.
It is known that LaTeX-style nested emphases of the same category are
not possible in Org. For example, the following string does not export
to LaTeX as expected:
#+begin_src org :results latex replace
/lorem /ipsum/ dolor/
#+end_src
#+RESULTS:
#+begin_export latex
\emph{lorem /ipsum} dolor/
#+end_export
Otherwise, if you export to LaTeX with pandoc (v. 2.14.2), the result is
(to my surprise) correct:
#+begin_src sh :results latex
str="/lorem /ipsum/ dolor/"
pandoc -f org -t latex <<< $str
#+end_src
#+RESULTS:
#+begin_export latex
\emph{lorem \emph{ipsum} dolor}
#+end_export
If memory serves me, I think this was not possible before with Pandoc
(neither from Org nor from Markdown, but I insist that I don't know if
my memory is failing me too much :-)).
Anyway, I wonder if it would be possible for Org to somehow implement
some Pandoc procedure to be able to export nested emphases of the same
category.
Another (more abstract) doubt that arises, although I am not an expert
in matters of grammar and specifications. If nested emphases of the same
category are not possible in Org, should this be understood as a bug or
a feature? What implication does it have if a external parser, like
Pandoc, parses them just "fine"?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: Question Regarding Creating HTML Style Buttons With Org Mode
@ 2022-02-17 22:10 10% ` Juan Manuel Macías
2022-02-18 19:59 6% ` Samuel Banya
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-17 22:10 UTC (permalink / raw)
To: Samuel Banya; +Cc: orgmode
Hi Samuel:
Samuel Banya writes:
> Is it possible to create HTML style buttons using Org Mode itself?
One possibility is to use a custom link. For example:
#+begin_src emacs-lisp
(org-link-set-parameters "button"
:face '(:foreground "green" :underline t)
:export (lambda (path desc backend)
(when (eq backend 'html)
(format "<form><button class=\"mybutton\" formaction=\"%s\">%s</button></form>" path desc))))
#+end_src
#+HTML_HEAD: <style> .mybutton{background-color:#4CAF50;border:none;color:white;padding:15px32px;text-align:center;text-decoration:none;display:inline-block;font-size:18px;margin:4px2px;cursor:pointer;</style>
[[button:some target][This is a button]]
NB: I have borrowed the style from here: https://www.w3schools.com/csS/css3_buttons.asp
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures (was: update and add info for arbitrary :float values)
2022-02-15 13:24 6% ` Nicolas Goaziou
@ 2022-02-16 19:52 8% ` Juan Manuel Macías
2022-02-22 19:14 6% ` [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-16 19:52 UTC (permalink / raw)
To: orgmode; +Cc: Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]
Hi,
I am attaching an updated version of the patch, which retrieves the
`t' value for `:float' in tables and figures. The necessary information in
the Manual is also updated.
Best regards,
Juan Manuel
Nicolas Goaziou writes:
> Hello,
>
> Juan Manuel Macías <maciaschain@posteo.net> writes:
>
>> Ah, sorry, I hadn't noticed that :-). The thing is that I have in my
>> ~/.emacs `sentence-end-double-space' set to nil.
>
> Yes, .dir-locals.el files contains (sentence-end-double-space . t).
> Somehow, you are not evaluating it.
>
>>> However, isn't it a bug? Shouldn't t value default to "figure"
>>> environment, if only for the sake of backward compatibility?
>>
>> I think you're right. t value should be figure and table, I agree. Would
>> it be appropriate to add these two lines:
>>
>> In org-latex--inline-image:
>>
>> ((string= float "t") 'figure)
>>
>> And in org-latex--decorate-table
>>
>> ((string= float "t") "table")
>
> I think so.
>
> Regards,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-ox-latex.el-Add-a-t-value-for-float-in-tables-a.patch --]
[-- Type: text/x-patch, Size: 2955 bytes --]
From b00b1d30d66d0932d4becb3c74fe3c3837dbdec1 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Wed, 16 Feb 2022 20:27:38 +0100
Subject: [PATCH] lisp/ox-latex.el: Add a `t' value for `:float' in tables and
figures
* org-latex--inline-image: default `figure' environment
* org-latex--decorate-table: default table environment
* doc/org-manual.org (Tables in LaTeX export): add `t' and arbitrary
`:float' values
* doc/org-manual.org (Images in LaTeX export): add `t' and arbitrary
`:float' values
---
doc/org-manual.org | 15 ++++++++++++---
lisp/ox-latex.el | 2 ++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index b8c61fddd..d58f80523 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13572,7 +13572,12 @@ include:
The table environments by default are not floats in LaTeX. To make
them floating objects use =:float= with one of the following
- options: =sideways=, =multicolumn=, =t=, and =nil=.
+ options: =t= (for a default =table= environment), =sideways= (for a
+ =sidewaystable= environment), =multicolumn= (to span the table
+ across multiple columns of a page in a =table*= environment) and
+ =nil=. In addition to these three values, =:float= can pass through
+ any arbitrary value, for example a user-defined float type with the
+ =float= LaTeX package.
LaTeX floats can also have additional layout =:placement=
attributes. These are the usual =[h t b p ! H]= permissions
@@ -13686,8 +13691,7 @@ attribute to one of the following:
- =t= ::
- For a standard =figure= environment; used by default whenever an
- image has a caption.
+For a default =figure= environment.
- =multicolumn= ::
@@ -13708,6 +13712,11 @@ attribute to one of the following:
To avoid a =:float= even if using a caption.
+- Any arbitrary value ::
+
+ For example, a user-defined float type with the =float= LaTeX package.
+
+
Use the =placement= attribute to modify a floating environment's
placement.
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 5dda9b3ab..0edba9e52 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2414,6 +2414,7 @@ used as a communication channel."
(cond ((string= float "wrap") 'wrap)
((string= float "sideways") 'sideways)
((string= float "multicolumn") 'multicolumn)
+ ((string= float "t") 'figure)
((and (plist-member attr :float) (not float)) 'nonfloat)
(float float)
((or (org-element-property :caption parent)
@@ -3269,6 +3270,7 @@ Return new environment, as a string."
(cond ((and (not float) (plist-member attributes :float)) nil)
((member float '("sidewaystable" "sideways")) "sidewaystable")
((equal float "multicolumn") "table*")
+ ((string= float "t") "table")
(float float)
((org-string-nw-p caption) "table")
(t nil))))
--
2.35.0
^ permalink raw reply related [relevance 8%]
* Re: table format during html export
2022-02-15 22:16 10% ` Juan Manuel Macías
@ 2022-02-16 15:57 6% ` Leo Butler
0 siblings, 0 replies; 200+ results
From: Leo Butler @ 2022-02-16 15:57 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Leo,
>
> Leo Butler writes:
>
>> Hello,
>>
>> I have some tables like
>>
>> | a | b |
>> | c | d |
>>
>> I would like to have this export (in html) to something like
>>
>> | a b |
>> | c d |
>>
>> i.e., add a vertical bar on the extreme left and right.
>>
>> I have searched the org manual and online and I can't find a
>> solution.
>>
>> TIA,
>> Leo
>>
>
> You can modify the attributes for a certain table, for example like this:
>
> #+ATTR_HTML: :border 2 :cellspacing 0 :cellpadding 6 :rules none :frame vsides
> | a | b |
> | c | d |
>
> For all tables, you can apply a value to
> `org-html-table-default-attributes', locally or globally:
>
> #+begin_src emacs-lisp
> (setq org-html-table-default-attributes
> '(:border "2" :cellspacing "0" :cellpadding "6" :rules "none" :frame "vsides"))
> #+end_src
Thank you! That did exactly what I wanted.
Leo
^ permalink raw reply [relevance 6%]
* Re: table format during html export
@ 2022-02-15 22:16 10% ` Juan Manuel Macías
2022-02-16 15:57 6% ` Leo Butler
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-15 22:16 UTC (permalink / raw)
To: Leo Butler; +Cc: orgmode
Hi Leo,
Leo Butler writes:
> Hello,
>
> I have some tables like
>
> | a | b |
> | c | d |
>
> I would like to have this export (in html) to something like
>
> | a b |
> | c d |
>
> i.e., add a vertical bar on the extreme left and right.
>
> I have searched the org manual and online and I can't find a
> solution.
>
> TIA,
> Leo
>
You can modify the attributes for a certain table, for example like this:
#+ATTR_HTML: :border 2 :cellspacing 0 :cellpadding 6 :rules none :frame vsides
| a | b |
| c | d |
For all tables, you can apply a value to
`org-html-table-default-attributes', locally or globally:
#+begin_src emacs-lisp
(setq org-html-table-default-attributes
'(:border "2" :cellspacing "0" :cellpadding "6" :rules "none" :frame "vsides"))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [PATCH] org-manual.org: update and add info for arbitrary :float values
2022-02-13 22:21 10% ` Juan Manuel Macías
@ 2022-02-15 13:24 6% ` Nicolas Goaziou
2022-02-16 19:52 8% ` [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures (was: update and add info for arbitrary :float values) Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Nicolas Goaziou @ 2022-02-15 13:24 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Ah, sorry, I hadn't noticed that :-). The thing is that I have in my
> ~/.emacs `sentence-end-double-space' set to nil.
Yes, .dir-locals.el files contains (sentence-end-double-space . t).
Somehow, you are not evaluating it.
>> However, isn't it a bug? Shouldn't t value default to "figure"
>> environment, if only for the sake of backward compatibility?
>
> I think you're right. t value should be figure and table, I agree. Would
> it be appropriate to add these two lines:
>
> In org-latex--inline-image:
>
> ((string= float "t") 'figure)
>
> And in org-latex--decorate-table
>
> ((string= float "t") "table")
I think so.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [relevance 6%]
* Re: Root heading when exporting sub-trees
@ 2022-02-15 12:36 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-02-15 12:36 UTC (permalink / raw)
To: Michael Dauer; +Cc: orgmode
Hi Michael,
Michael Dauer writes:
> When I export a subtree I normally want to produce a document for the
> topic of the subtree. So I would expect that the contents of the
> subtree would be exported with the heading as title (and maybe file
> name) and the children promoted to level 1.
>
> What I receive is something like this:
> Title: Title of all topics
> 1. Topic
> 1.1
> 1.2
> 1.2.1
> 1.2.3
> 1.3
>
> The whole first level of this outline is pointless.
>
> What is the best way to change this behavior? I mean in
> configuration/patching not by putting the same export properties
> everywhere. But identifying the relevant export properties would be of
> help of course.
You can set specific export properties for a given subtree, for example:
* Subtree
:PROPERTIES:
:EXPORT_OPTIONS: options list
:EXPORT_TITLE: Another title
:EXPORT_FILE_NAME: another file name
:END:
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [PATCH] org-manual.org: update and add info for arbitrary :float values
2022-02-13 21:18 6% ` Nicolas Goaziou
@ 2022-02-13 22:21 10% ` Juan Manuel Macías
2022-02-15 13:24 6% ` Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-13 22:21 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: orgmode
Hi Nicolas,
Nicolas Goaziou writes:
> Thanks. Note you need to add two spaces between sentences.
Ah, sorry, I hadn't noticed that :-). The thing is that I have in my
~/.emacs `sentence-end-double-space' set to nil.
> However, isn't it a bug? Shouldn't t value default to "figure"
> environment, if only for the sake of backward compatibility?
I think you're right. t value should be figure and table, I agree. Would
it be appropriate to add these two lines:
In org-latex--inline-image:
((string= float "t") 'figure)
And in org-latex--decorate-table
((string= float "t") "table")
?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: [PATCH] org-manual.org: update and add info for arbitrary :float values
2022-02-11 20:37 8% [PATCH] org-manual.org: update and add info for arbitrary :float values Juan Manuel Macías
@ 2022-02-13 21:18 6% ` Nicolas Goaziou
2022-02-13 22:21 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Nicolas Goaziou @ 2022-02-13 21:18 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hello,
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi all,
>
> From the commit:
>
> e0bc2b37f :: lisp/ox-latex.el: Allow arbitrary float environments
>
> The `t' option for `:float' in tables and images is no longer valid.
> That is, something like
>
> #+ATTR_LaTeX: :float t
> [[file:foo.jpg]]
>
> would create in LaTeX export:
>
> \begin{t}
> \centering
> \includegraphics[width=.9\linewidth]{foo.jpg}
> \end{t}
>
> I am attaching a patch to update those changes to the Manual.
Thanks. Note you need to add two spaces between sentences.
However, isn't it a bug? Shouldn't t value default to "figure"
environment, if only for the sake of backward compatibility?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [relevance 6%]
* [PATCH] org-manual.org: update and add info for arbitrary :float values
@ 2022-02-11 20:37 8% Juan Manuel Macías
2022-02-13 21:18 6% ` Nicolas Goaziou
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-11 20:37 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
Hi all,
From the commit:
e0bc2b37f :: lisp/ox-latex.el: Allow arbitrary float environments
The `t' option for `:float' in tables and images is no longer valid.
That is, something like
#+ATTR_LaTeX: :float t
[[file:foo.jpg]]
would create in LaTeX export:
\begin{t}
\centering
\includegraphics[width=.9\linewidth]{foo.jpg}
\end{t}
I am attaching a patch to update those changes to the Manual.
Best regards,
Juan Manuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-org-manual.org-add-arbitrary-float-values.patch --]
[-- Type: text/x-patch, Size: 1932 bytes --]
From 03aacd306355741f67533325dd6dbd8c5a472ec0 Mon Sep 17 00:00:00 2001
From: Juan Manuel Macias <maciaschain@posteo.net>
Date: Fri, 11 Feb 2022 21:18:16 +0100
Subject: [PATCH] doc/org-manual.org: add arbitrary :float values
* Tables in LaTeX export: remove `t' value
* Images in LaTeX export: remove `t' value
---
doc/org-manual.org | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index b8c61fddd..4c6fcf8db 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13572,7 +13572,11 @@ include:
The table environments by default are not floats in LaTeX. To make
them floating objects use =:float= with one of the following
- options: =sideways=, =multicolumn=, =t=, and =nil=.
+ options: =sideways= (for a =sidewaystable= environment),
+ =multicolumn= (to span the table across multiple columns of a page
+ in a =table*= environment) and =nil=. In addition to these three
+ values, =:float= can pass through any arbitrary value, for example a
+ user-defined float type with the =float= LaTeX package.
LaTeX floats can also have additional layout =:placement=
attributes. These are the usual =[h t b p ! H]= permissions
@@ -13684,11 +13688,6 @@ export back-end wraps the picture in a floating =figure= environment.
To float an image without specifying a caption, set the =:float=
attribute to one of the following:
-- =t= ::
-
- For a standard =figure= environment; used by default whenever an
- image has a caption.
-
- =multicolumn= ::
To span the image across multiple columns of a page; the back-end
@@ -13708,6 +13707,11 @@ attribute to one of the following:
To avoid a =:float= even if using a caption.
+- Any arbitrary value ::
+
+ For example, a user-defined float type with the =float= LaTeX package.
+
+
Use the =placement= attribute to modify a floating environment's
placement.
--
2.35.0
^ permalink raw reply related [relevance 8%]
* Re: Org-syntax: Intra-word markup
2022-02-02 20:01 9% ` Juan Manuel Macías
@ 2022-02-03 12:10 4% ` Max Nikulin
0 siblings, 0 replies; 200+ results
From: Max Nikulin @ 2022-02-03 12:10 UTC (permalink / raw)
To: emacs-orgmode
On 03/02/2022 03:01, Juan Manuel Macías wrote:
> Max Nikulin writes:
>
>> ATTR_X attributes are supported for links as well, see
>> info "(org) Links in HTML export"
>> https://orgmode.org/manual/Links-in-HTML-export.html
>> However it is rather verbose, may have problems with LaTeX, and I am
>> unsure if they can be accessed from export link handlers
>
> Yes, I know. I use a lot in my blogs constructions of this type:
>
> #+ATTR_HTML: :target _blank
> some link...
I just have realized that example in the manual does not work. I will
start a new thread. Attributes are assigned to paragraph, not to the link:
#+ATTR_HTML: :title The Org mode homepage :style color:red;
[[https://orgmode.org]]
<p title="The Org mode homepage" style="color:red;">
<a href="https://orgmode.org" title="The Org mode homepage"
style="color:red;">https://orgmode.org</a>
</p>
> But, as far as I know, its use is line-oriented. I mean, you can't use
> multiple ATTR_X constructs inside a paragraph and for different links
> inside the paragraph.
Thank you, I confused issues related to export when keywords and export
blocks are used. For some reason I believed that affiliated keywords
have a dedicated section in https://orgmode.org/worg/dev/org-syntax.html
because they can be applied to inline objects, but you are right, they
set property for next block-level element.
Attributes from several lines are combined however.
The following snippets illustrates bugs in LaTeX exporter that I
remember from an earlier discussion:
---- >8 ----
This is a single paragraph in LaTeX export, but 3 HTML paragraphs.
First link (with =rel= attribute) is to
#+attr_html: :rel nofollow :title Org Mode web site
[[https://orgmode.org/][Org Mode]].
Another one is to
#+attr_html: :rel noopener
#+attr_html: :title GNU web site
[[https://www.gnu.org/][GNU]]. Both links have =title= HTML attributes.
This is single paragraph in HTML
@@odt:@@
but 2 paragraphs in LaTeX.
---- 8< ----
This is a single paragraph in \LaTeX{} export, but 3 HTML paragraphs.
First link (with \texttt{rel} attribute) is to
\href{https://orgmode.org/}{Org Mode}.
Another one is to
\href{https://www.gnu.org/}{GNU}. Both links have \texttt{title} HTML
attributes.
This is single paragraph in HTML
but 2 paragraphs in \LaTeX{}.
---- >8 ----
<p>
This is a single paragraph in LaTeX export, but 3 HTML paragraphs.
First link (with <code>rel</code> attribute) is to
</p>
<p rel="nofollow" title="Org Mode web site">
<a href="https://orgmode.org/" rel="nofollow" title="Org Mode web
site">Org Mode</a>.
Another one is to
</p>
<p title="GNU web site" rel="noopener">
<a href="https://www.gnu.org/" title="GNU web site"
rel="noopener">GNU</a>. Both links have <code>title</code> HTML attributes.
</p>
<p>
This is single paragraph in HTML
but 2 paragraphs in LaTeX.</p>
^ permalink raw reply [relevance 4%]
* Re: Org-syntax: Intra-word markup
2022-02-02 15:28 5% ` Max Nikulin
@ 2022-02-02 20:01 9% ` Juan Manuel Macías
2022-02-03 12:10 4% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-02-02 20:01 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> ATTR_X attributes are supported for links as well, see
> info "(org) Links in HTML export"
> https://orgmode.org/manual/Links-in-HTML-export.html
> However it is rather verbose, may have problems with LaTeX, and I am
> unsure if they can be accessed from export link handlers
Yes, I know. I use a lot in my blogs constructions of this type:
#+ATTR_HTML: :target _blank
some link...
But, as far as I know, its use is line-oriented. I mean, you can't use
multiple ATTR_X constructs inside a paragraph and for different links
inside the paragraph.
As for links and their multiple possible or future uses (I say *uses*
and never *abuses*: it's a tool, it's there to be used, and it works
great), of course I see them more as a resource ---and quite powerful
and versatile, by the way. --- that a matter of syntax. But the thing is
that for me Org is, in addition to a syntax, above all a set of
coherently assembled resources to prepare my documents and take my
notes, organize my work and a lot of other things.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: [PATCH] Intra-word markup: \relax
2022-01-28 13:13 9% ` Juan Manuel Macías
@ 2022-02-02 15:42 5% ` Max Nikulin
0 siblings, 0 replies; 200+ results
From: Max Nikulin @ 2022-02-02 15:42 UTC (permalink / raw)
To: emacs-orgmode
On 28/01/2022 20:13, Juan Manuel Macías wrote:
> Max Nikulin writes:
>
>> I have an idea how to implement *intra*/word/ markup with minimal
>> change of Org syntax. At first I had a hope that it is enough to
>> introduce \relax entity that expands to empty string, but it does not
>> work for second part of words: *intra*\relax{}/word/ is exported to
>> <b>intra</b>/word/.
>> So it is necessary to support consuming spaces after such entity
>> similar to TeX commands:
>> *intra*\relax /word/
>> In Org "a\_ b" already behaves in the same way.
>
> Maxim, I find the idea of \relax entity interesting. The only (minor)
> drawback I find (in normal use, I mean) is the verbosity it adds.
"Relax" is just a name known to TeX users. Certainly another shorter
word may be used instead. I am just lazy enough to look through HTML
named entities and LaTeX command to avoid conflicts and thus behavior
unexpected to some users.
> In my case, I have already given up on the problem of marks inside words
> :-(. My personal opinion: I think that, unless a completely
> 'revolutionary' solution emerges, it is better to leave the matter as it
> is, and consider this a feature of Org rather than a bug. I suspect that
> a single solution could not satisfy all tastes or all possible
> scenarios, so maybe it would be nice to put a list of solutions
> (including this one and also the zero space thing, and others that have
> arisen or may arise) somewhere (perhaps in the manual?).
A day before I posted my current summary why export snippets and macros
do not help with intra-word markup (before I expected that they can),
only custom links is a workaround (with some limitations, as usual):
[RFC] Creole-style / Support for **emphasis**__within__**a word**
Tue, 25 Jan 2022 23:27:50 +0700.
https://list.orgmode.org/ssp8e7$ah2$1@ciao.gmane.io/
But at that moment I forgot about entities, Another topic served as a
reminder, and I spent some time experimenting with them.
^ permalink raw reply [relevance 5%]
* Re: Org-syntax: Intra-word markup
2022-01-29 13:05 9% ` Juan Manuel Macías
@ 2022-02-02 15:28 5% ` Max Nikulin
2022-02-02 20:01 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-02-02 15:28 UTC (permalink / raw)
To: emacs-orgmode
> Ihor Radchenko writes:
>> Keeping in mind the above analogy, note that export blocks do not have
>> fallbacks, while special blocks do (for example, see
>> https://github.com/alhassy/org-special-block-extras/)
Ihor, I am sorry, but I missed your point. That project provides some
set of defined link+block pairs and some macros to define new
links/pairs. I do not see relation to export snippets or blocks that are
used when their content is not intended to be reusable.
>> Maybe we should introduce an equivalent of special blocks, but for
>> inline use? Or should we modify _both_ inline export snippets and export
>> blocks to allow fallback mechanism?
I suppose, it should be consistent to consider adjacent export blocks as
alternatives and to allow "fallback" or "default" block. Again, similar
to @@:...@@ snippets, block content should be parsed as Org markup.
On 29/01/2022 20:05, Juan Manuel Macías wrote:
> I find the idea of inline special blocks very interesting, but I think
> there are a couple of drawbacks: since special blocks support ATTR_X,
> how would that be implemented in the inline version? The most obvious
> thing I can think of is to mimic inline code blocks:
>
> my_special_block[attributes list]{content}
ATTR_X attributes are supported for links as well, see
info "(org) Links in HTML export"
https://orgmode.org/manual/Links-in-HTML-export.html
However it is rather verbose, may have problems with LaTeX, and I am
unsure if they can be accessed from export link handlers
Actually I do not like src_something[...]{...} syntax since there is no
clear mark (such as "\") at the beginning that it is a special construct.
> In any case, for things like that, aren't links and macros enough?
Ad hoc code for particular backends (and discussed fallback for other
backends) is a bit different thing. It may be used in macros, but macros
can not replace it. Moreover @@:...@@ construct proposed by Tom would
allow e.g.
[[https://orgmode.org][@@:*inter*@@@@:/word/@@]]
to be half-word bold and half-word italics without invisible zero width
spaces and filters to remove them.
^ permalink raw reply [relevance 5%]
* Re: A callygraphy notebook environment
2022-01-30 21:23 9% ` Juan Manuel Macías
@ 2022-01-31 13:55 0% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-01-31 13:55 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1432 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Uwe,
> Thanks for testing the document.
> Uwe Brauer writes:
>> Interesting I like them all. I converted your org file to latex and run
>> it with lualatex but the font used there does not correspond to all the
>> three screenshots.
> The default font for the environment 'mynotebook" is qtmerryscript
> (shown in the third screenshot, if I remember correctly). I chose that
> one because it is included in TeX live 2021.
>> Now I am not really acquainted with lualatex but with xelatex, I
>> converted QTMerryScript.otf to ttf and run it with xelatex. Nice.
> But with XelaTeX the 'mynotebook' environment will not work, since it uses
> a function in Lua to generate the grids in a notebook way.
Right. That is true, at some point I have to learn lualatex, I am
afraid..
>> What are the other otf fonts you are using for these screenshots?
> The document itself includes some links to download the other typefaces. Look
> in the non-exportable section, named 'Conf', where it says "The different options
> for the environment...". Anyway, I paste it here too:
> - Vladimir Script :: https://fontzone.net/font-details/vladimir-script
> - Anke Calligraphic :: https://fontzone.net/font-details/anke-calligraphic-fg
> - Studio Script :: https://fontzone.net/download/studioscriptctt
Thanks, that was helpful.
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: A callygraphy notebook environment
2022-01-30 20:37 1% ` Uwe Brauer
@ 2022-01-30 21:23 9% ` Juan Manuel Macías
2022-01-31 13:55 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-30 21:23 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Thanks for testing the document.
Uwe Brauer writes:
> Interesting I like them all. I converted your org file to latex and run
> it with lualatex but the font used there does not correspond to all the
> three screenshots.
The default font for the environment 'mynotebook" is qtmerryscript
(shown in the third screenshot, if I remember correctly). I chose that
one because it is included in TeX live 2021.
> Now I am not really acquainted with lualatex but with xelatex, I
> converted QTMerryScript.otf to ttf and run it with xelatex. Nice.
But with XelaTeX the 'mynotebook' environment will not work, since it uses
a function in Lua to generate the grids in a notebook way.
> What are the other otf fonts you are using for these screenshots?
The document itself includes some links to download the other typefaces. Look
in the non-exportable section, named 'Conf', where it says "The different options
for the environment...". Anyway, I paste it here too:
- Vladimir Script :: https://fontzone.net/font-details/vladimir-script
- Anke Calligraphic :: https://fontzone.net/font-details/anke-calligraphic-fg
- Studio Script :: https://fontzone.net/download/studioscriptctt
(The third font was not in the screenshots).
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: A callygraphy notebook environment
2022-01-30 12:32 9% A callygraphy notebook environment Juan Manuel Macías
@ 2022-01-30 20:37 1% ` Uwe Brauer
2022-01-30 21:23 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Uwe Brauer @ 2022-01-30 20:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Hi Juan
> Hi all,
> This is more related to LaTeX than Org, but I'm sharing it here in case
> anyone is interested. For a work I'm doing I've written a LaTeX
> environment that tries to mimic the look of a calligraphy notebook. By
> default it uses the qtmerryscript font, included in TeX live, but this
> can be changed to any other calligraphic-style font. It works only with
> LuaTeX, since it uses a function in Lua to add the grids.
> An screenshots:
> https://i.imgur.com/tgrgaWM.png
> https://i.imgur.com/AIolze2.png
> https://i.imgur.com/v2Mzyx5.png
Interesting I like them all. I converted your org file to latex and run
it with lualatex but the font used there does not correspond to all the
three screenshots.
Now I am not really acquainted with lualatex but with xelatex, I
converted QTMerryScript.otf to ttf and run it with xelatex. Nice.
What are the other otf fonts you are using for these screenshots?
Thanks
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 1%]
* A callygraphy notebook environment
@ 2022-01-30 12:32 9% Juan Manuel Macías
2022-01-30 20:37 1% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-30 12:32 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
Hi all,
This is more related to LaTeX than Org, but I'm sharing it here in case
anyone is interested. For a work I'm doing I've written a LaTeX
environment that tries to mimic the look of a calligraphy notebook. By
default it uses the qtmerryscript font, included in TeX live, but this
can be changed to any other calligraphic-style font. It works only with
LuaTeX, since it uses a function in Lua to add the grids.
An screenshots:
https://i.imgur.com/tgrgaWM.png
https://i.imgur.com/AIolze2.png
https://i.imgur.com/v2Mzyx5.png
To use it in Org, a special block would be ideal. For example:
#+ATTR_LaTeX: :options [fontfeature={Color=pen},fontsize=\large]
#+begin_mynotebook
Some text...
#+end_mynotebook
I am attaching an Org document to test it.
Best regards,
Juan Manuel
[-- Attachment #2: notebook.org --]
[-- Type: application/vnd.lotus-organizer, Size: 3824 bytes --]
^ permalink raw reply [relevance 9%]
* Re: Org-syntax: Intra-word markup
@ 2022-01-29 13:05 9% ` Juan Manuel Macías
2022-02-02 15:28 5% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-29 13:05 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: orgmode
Ihor Radchenko writes:
> Maybe we should introduce an equivalent of special blocks, but for
> inline use? Or should we modify _both_ inline export snippets and export
> blocks to allow fallback mechanism?
I find the idea of inline special blocks very interesting, but I think
there are a couple of drawbacks: since special blocks support ATTR_X,
how would that be implemented in the inline version? The most obvious
thing I can think of is to mimic inline code blocks:
my_special_block[attributes list]{content}
But it would produce a result many times too verbose. Another risk that
this would entail, IMHO, is that of the "LaTeXification" of Org...
In any case, for things like that, aren't links and macros enough? I'm
one of those who 'abuse' links for many export scenarios (I even have
written this package:
https://gitlab.com/maciaschain/org-critical-edition), and I think links
have enormous potential and versatility. John Kitchin's blog has really
helped me open my mind and explore that very productive Org component.
Macros are also a very powerful tool, except for the comma issue, which
I think is still an unfinished business and a solution should be found
one day. Still, the possibility of a special inline block is very
interesting to me.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: date format in agenda view
@ 2022-01-28 17:57 10% ` Juan Manuel Macías
2022-01-28 18:05 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-28 17:57 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe,
Uwe Brauer writes:
> How can I obtain the Spanish week names?
I have this in my init:
#+begin_src emacs-lisp
(setq calendar-week-start-day 1
calendar-day-name-array ["domingo" "lunes" "martes" "miércoles"
"jueves" "viernes" "sábado"]
calendar-month-name-array ["enero" "febrero" "marzo" "abril" "mayo"
"junio" "julio" "agosto" "septiembre"
"octubre" "noviembre" "diciembre"])
#+end_src
(https://www.emacswiki.org/emacs/CalendarLocalization#toc18)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: date format in agenda view
2022-01-28 17:57 10% ` Juan Manuel Macías
@ 2022-01-28 18:05 0% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-01-28 18:05 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Uwe Brauer, orgmode
[-- Attachment #1: Type: text/plain, Size: 689 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Uwe,
> Uwe Brauer writes:
>> How can I obtain the Spanish week names?
> I have this in my init:
> #+begin_src emacs-lisp
> (setq calendar-week-start-day 1
> calendar-day-name-array ["domingo" "lunes" "martes" "miércoles"
> "jueves" "viernes" "sábado"]
> calendar-month-name-array ["enero" "febrero" "marzo" "abril" "mayo"
> "junio" "julio" "agosto" "septiembre"
> "octubre" "noviembre" "diciembre"])
> #+end_src
Ha, thanks, I just realized I have this setting but embedded in a function in order to switch between English, Spanish and German. Memory....☹️
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: [PATCH] Intra-word markup: \relax
@ 2022-01-28 13:13 9% ` Juan Manuel Macías
2022-02-02 15:42 5% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-28 13:13 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> I have an idea how to implement *intra*/word/ markup with minimal
> change of Org syntax. At first I had a hope that it is enough to
> introduce \relax entity that expands to empty string, but it does not
> work for second part of words: *intra*\relax{}/word/ is exported to
> <b>intra</b>/word/.
> So it is necessary to support consuming spaces after such entity
> similar to TeX commands:
> *intra*\relax /word/
> In Org "a\_ b" already behaves in the same way.
>
> I do not like zero-width spaces since they are invisible, so they are
> not really "text" markup. Moreover, it is better to filter them out
> during export.
>
> Another failed idea was to use export snippet or a macro for such purpose:
> #+macro sep $1
> *intra*{{{sep()}}}/word/, *intra*@@html:@@/word/
>
> Important point that suggested solution works for all export backends.
> I do not consider explicit export snippets as a workaround since it
> requires code for all backends in org files.
Maxim, I find the idea of \relax entity interesting. The only (minor)
drawback I find (in normal use, I mean) is the verbosity it adds.
In my case, I have already given up on the problem of marks inside words
:-(. My personal opinion: I think that, unless a completely
'revolutionary' solution emerges, it is better to leave the matter as it
is, and consider this a feature of Org rather than a bug. I suspect that
a single solution could not satisfy all tastes or all possible
scenarios, so maybe it would be nice to put a list of solutions
(including this one and also the zero space thing, and others that have
arisen or may arise) somewhere (perhaps in the manual?). What doesn't
quite convince me (and I agree with you on that) is recommending zero
width space as a sort of 'official' escape character. For the reasons
you have expressed, which I think are very fair.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: latex block tikz to svg
2022-01-17 16:01 9% ` Juan Manuel Macías
@ 2022-01-25 23:24 6% ` Edouard Debry
2022-04-18 13:23 4% ` Edouard Debry
1 sibling, 0 replies; 200+ results
From: Edouard Debry @ 2022-01-25 23:24 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hi Juan,
Thanks for your answeer.
Indeed, the generated tex files are different whether you use the png or
svg extension.
It seems that for svg, a distinct build system is used from the usual
one for other image types (png, jpg).
This build system seems based on tex4ht, given the latex file preamble.
I tried to compile manually this temporary latex file (the one for svg)
with "pdflatex" which fails. Then, I tried with "htlatex" and guess what
... it works ! A svg file is created, which unfortunately does not
contain everything, but this was only manual compiling, probably some
missing options.
I think at first there may be a bug in my own configuration of the
variable "org-latex-pdf-process" which should be passed the correct
build system.
Regards
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi Edouard,
>
> Edouard Debry writes:
>
>> I would like to find a way to generate svg images from latex src blocks
>> (using tikz) which works and is compatible with default orgmode settings
>> for latex export (at least does not break it)
>>
>> Did you experience such issues ? do you have some workings settings and
>> examples ? I googled several times "org latex block tikz svg", but it is
>> difficult to guess how relevant are the elements found, some of them
>> seems quiet outdated. Hence my question on this mailing list
>
> I've done some quick tests with your example block. I don't know if I'm
> wrong, but I think the problem is on line 27 of `org-babel-execute:latex':
>
> ((string= "svg" extension)
>
> I don't know if this should be considered an Org bug, but it's clear
> that if the svg extension is detected in :file, the ':imagemagick yes'
> option is ignored, and a type of preamble is generated that fails in
> pgfsysdriver when compiling the temp tex document:
>
> \documentclass[preview]{standalone}
> \def\pgfsysdriver{pgfsys-tex4ht.def}
>
> If I replace the above line with this conditional:
>
> ((and (string= "svg" extension) (not imagemagick))
>
> then the imagemagick option is taken into account: it creates correctly
> the pdf and then converts it to svg with 'convert' imagemagick program.
> I did have to remove this line though:
>
> #+HEADER: :imoutoptions -geometry 400 :iminoptions -density 600
>
> otherwise, the conversion produced a dark image.
>
> Best regards,
>
> Juan Manuel
^ permalink raw reply [relevance 6%]
* RE: [RFC] Creole-style / Support for **emphasis**__within__**a word**
2022-01-25 17:30 9% ` Juan Manuel Macías
@ 2022-01-25 18:45 6% ` Vincent Belaïche
0 siblings, 0 replies; 200+ results
From: Vincent Belaïche @ 2022-01-25 18:45 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
Thank you so much Juan, I could adapt your filter to my needs, and this works like a charm !
V.
________________________________
De : Juan Manuel Macías <maciaschain@posteo.net>
Envoyé : mardi 25 janvier 2022 18:30
À : Vincent Belaïche <vincent.b.1@hotmail.fr>
Cc : orgmode <emacs-orgmode@gnu.org>
Objet : Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hi Vincent,
Vincent Belaïche writes:
> My conlcusion is that for what I am after, an evolution of org-mode
> would be preferable, maybe I contribute something someday, so that
> writing one of the following would make it:
>
> ~--my-option=~\relax{}/option value/
> ~--my-option=~@@:@@/option value/
> \left~--my-option=\right~/option value/
> \left~--my-option=\right~\left/option value\right/
> ~--my-option=~\left/option value\right/
Considering that Org's emphasis marks are not compromised by contact
with a single quote, I come up with this somewhat dirty solution: you
can use some kind of dummy mark (e.g. two single quotes: '') and put it
between the two emphasis parts. It would then be removed by a filter.
Something like this:
#+BIND: org-export-filter-final-output-functions (my-filter)
#+begin_src emacs-lisp :exports results :results none
(defun my-filter (text backend info)
(replace-regexp-in-string "''" "" text))
#+end_src
~some-cli-option=~''/some cli argument/
== LaTeX ==>
\texttt{some-cli-option=}\emph{some cli argument}
The solution is tricky and temporary, but at least it's not as
text-invasive as other options.
Best regards,
Juan Manuel
[-- Attachment #2: Type: text/html, Size: 2888 bytes --]
^ permalink raw reply [relevance 6%]
* RE: [RFC] Creole-style / Support for **emphasis**__within__**a word**
2022-01-25 17:18 3% ` Vincent Belaïche
2022-01-25 17:30 9% ` Juan Manuel Macías
@ 2022-01-25 18:20 5% ` Vincent Belaïche
1 sibling, 0 replies; 200+ results
From: Vincent Belaïche @ 2022-01-25 18:20 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Juan Manuel Macías, orgmode
[-- Attachment #1: Type: text/plain, Size: 4895 bytes --]
Just replying to myself : the dynamic latin9/utf8 switch does not really easily work in a LaTeX document (I am sure some people made it work, but I did not manage to make it).
Adding the ZWSP support is easy, just insert
\DeclareUnicodeCharacter{200B}{}
in the document preamble, but this does not work because the table of content gets ugly with the titles likes « germe de générateur pseudo-aléatoire » instead of « germe de générateur pseudo-aléatoire » (some sections in the UTF-8 part going to the toc that is in the latin-9 part).
I tried to circumvent this by using the following encapsulation for the UTF-8 part :
\inputencoding{utf8}\addtocontents{toc}{\protect\inputencoding{utf8}}
...
\inputencoding{latin9}\addtocontents{toc}{\protect\inputencoding{latin9}}
(there are \addtocontents commands in addition to the \inputencoding so that I also switch the encoding in the toc file), but there are still issues, the dynamic switch does not work well with moving arguments like section titles going to the toc file. This is probably a problem of non-immediate write occurring at page shipout.
V.
________________________________
De : Vincent Belaïche <vincent.b.1@hotmail.fr>
Envoyé : mardi 25 janvier 2022 18:18
À : Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc : Juan Manuel Macías <maciaschain@posteo.net>; orgmode <emacs-orgmode@gnu.org>
Objet : RE: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hello,
Actually the source was in UTF-8, but it was using only characters that exist in latin-9, and it is exported to LaTeX for inclusion in a LaTeX document that is in latin-9.
So I used an Emacs lisp snippet to make the export, and in this snippet after calling something like (org-export-to-buffer 'latex out-buffer nil nil nil t), I was doing some insertion like
(goto-char (point-max))
(insert "
% Local Variables:
% coding: latin-9
% End:
")
(save-buffer)
(kill-buffer)
so that the exported buffer is converted to latin-9 before being saved.
OK, when I inserted the zero width space this barked because of no zwsp (aka U+200B) in latin-9.
Then I tried something else, I rewrote the code with some some LaTeX snippet @@latex:\kern-0.5em\relax@@ in it, like this:
~--my-option=~ @@latex:\kern-0.5em\relax@@ /option value/
that was OK, but this really makes the OrgMode ugly (maybe a custom entity would be better), and also this works only for the LaTeX export.
Then, I tried something else, I passed « utf8,latin9 » options, to LaTeX inputenc package, instead of just « latin9 », and I kept my org mode document in UTF-8, just before exporting I did something like this in the input buffer:
(goto-char (point-max))
(insert "\n\n#+begin_export latex\n\\inputencoding{latin9}\n#+end_export\n")
(goto-char (point-min))
(insert "\n\n#+begin_export latex\n\\inputencoding{utf8}\n#+end_export\n")
this way the LaTeX processor is switching dynamically from latin9 to utf8 at the beginning of the doc, and back to latin9 at the end of it. But there are two pitfalls:
the first one is that zwsp are not defined in the inputenc utf8.def definition file, so having a zwsp character in the LaTeX code, even though utf8 is declared as input encoding make a LaTeX compilation error.
the second (but this is less serious I think …) is that my document ends with an enumerate list, and the orgmode exporter make the second begin_export go into the enumerate list, not after it. I mean I get in the output this:
\inputencoding{latin9}
\end{enumerate}
instead of this:
\end{enumerate}
\inputencoding{latin9}
My conlcusion is that for what I am after, an evolution of org-mode would be preferable, maybe I contribute something someday, so that writing one of the following would make it:
~--my-option=~\relax{}/option value/
~--my-option=~@@:@@/option value/
\left~--my-option=\right~/option value/
\left~--my-option=\right~\left/option value\right/
~--my-option=~\left/option value\right/
________________________________
De : Nicolas Goaziou <mail@nicolasgoaziou.fr>
Envoyé : mardi 25 janvier 2022 11:55
À : Vincent Belaïche <vincent.b.1@hotmail.fr>
Cc : Juan Manuel Macías <maciaschain@posteo.net>; orgmode <emacs-orgmode@gnu.org>
Objet : Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hello,
Vincent Belaïche <vincent.b.1@hotmail.fr> writes:
> Thank-you both for the reply, I should have mentioned that I am aware of
> this trick but it works only for document encodings which have the
> zero-width space, like UTF-8, I was after a fix for documents in
> ISO-8859-15, aka latin-9.
You mean the source itself is not UTF-8?
I don't think there's a solution for you then, unless you convert it to
UTF-8, of course.
Regards,
--
Nicolas Goaziou
[-- Attachment #2: Type: text/html, Size: 16912 bytes --]
^ permalink raw reply [relevance 5%]
* RE: [RFC] Creole-style / Support for **emphasis**__within__**a word**
@ 2022-01-25 17:18 3% ` Vincent Belaïche
2022-01-25 17:30 9% ` Juan Manuel Macías
2022-01-25 18:20 5% ` Vincent Belaïche
0 siblings, 2 replies; 200+ results
From: Vincent Belaïche @ 2022-01-25 17:18 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Juan Manuel Macías, orgmode
[-- Attachment #1: Type: text/plain, Size: 3431 bytes --]
Hello,
Actually the source was in UTF-8, but it was using only characters that exist in latin-9, and it is exported to LaTeX for inclusion in a LaTeX document that is in latin-9.
So I used an Emacs lisp snippet to make the export, and in this snippet after calling something like (org-export-to-buffer 'latex out-buffer nil nil nil t), I was doing some insertion like
(goto-char (point-max))
(insert "
% Local Variables:
% coding: latin-9
% End:
")
(save-buffer)
(kill-buffer)
so that the exported buffer is converted to latin-9 before being saved.
OK, when I inserted the zero width space this barked because of no zwsp (aka U+200B) in latin-9.
Then I tried something else, I rewrote the code with some some LaTeX snippet @@latex:\kern-0.5em\relax@@ in it, like this:
~--my-option=~ @@latex:\kern-0.5em\relax@@ /option value/
that was OK, but this really makes the OrgMode ugly (maybe a custom entity would be better), and also this works only for the LaTeX export.
Then, I tried something else, I passed « utf8,latin9 » options, to LaTeX inputenc package, instead of just « latin9 », and I kept my org mode document in UTF-8, just before exporting I did something like this in the input buffer:
(goto-char (point-max))
(insert "\n\n#+begin_export latex\n\\inputencoding{latin9}\n#+end_export\n")
(goto-char (point-min))
(insert "\n\n#+begin_export latex\n\\inputencoding{utf8}\n#+end_export\n")
this way the LaTeX processor is switching dynamically from latin9 to utf8 at the beginning of the doc, and back to latin9 at the end of it. But there are two pitfalls:
the first one is that zwsp are not defined in the inputenc utf8.def definition file, so having a zwsp character in the LaTeX code, even though utf8 is declared as input encoding make a LaTeX compilation error.
the second (but this is less serious I think …) is that my document ends with an enumerate list, and the orgmode exporter make the second begin_export go into the enumerate list, not after it. I mean I get in the output this:
\inputencoding{latin9}
\end{enumerate}
instead of this:
\end{enumerate}
\inputencoding{latin9}
My conlcusion is that for what I am after, an evolution of org-mode would be preferable, maybe I contribute something someday, so that writing one of the following would make it:
~--my-option=~\relax{}/option value/
~--my-option=~@@:@@/option value/
\left~--my-option=\right~/option value/
\left~--my-option=\right~\left/option value\right/
~--my-option=~\left/option value\right/
________________________________
De : Nicolas Goaziou <mail@nicolasgoaziou.fr>
Envoyé : mardi 25 janvier 2022 11:55
À : Vincent Belaïche <vincent.b.1@hotmail.fr>
Cc : Juan Manuel Macías <maciaschain@posteo.net>; orgmode <emacs-orgmode@gnu.org>
Objet : Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hello,
Vincent Belaïche <vincent.b.1@hotmail.fr> writes:
> Thank-you both for the reply, I should have mentioned that I am aware of
> this trick but it works only for document encodings which have the
> zero-width space, like UTF-8, I was after a fix for documents in
> ISO-8859-15, aka latin-9.
You mean the source itself is not UTF-8?
I don't think there's a solution for you then, unless you convert it to
UTF-8, of course.
Regards,
--
Nicolas Goaziou
[-- Attachment #2: Type: text/html, Size: 12293 bytes --]
^ permalink raw reply [relevance 3%]
* Re: [RFC] Creole-style / Support for **emphasis**__within__**a word**
2022-01-25 17:18 3% ` Vincent Belaïche
@ 2022-01-25 17:30 9% ` Juan Manuel Macías
2022-01-25 18:45 6% ` Vincent Belaïche
2022-01-25 18:20 5% ` Vincent Belaïche
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-25 17:30 UTC (permalink / raw)
To: Vincent Belaïche; +Cc: orgmode
Hi Vincent,
Vincent Belaïche writes:
> My conlcusion is that for what I am after, an evolution of org-mode
> would be preferable, maybe I contribute something someday, so that
> writing one of the following would make it:
>
> ~--my-option=~\relax{}/option value/
> ~--my-option=~@@:@@/option value/
> \left~--my-option=\right~/option value/
> \left~--my-option=\right~\left/option value\right/
> ~--my-option=~\left/option value\right/
Considering that Org's emphasis marks are not compromised by contact
with a single quote, I come up with this somewhat dirty solution: you
can use some kind of dummy mark (e.g. two single quotes: '') and put it
between the two emphasis parts. It would then be removed by a filter.
Something like this:
#+BIND: org-export-filter-final-output-functions (my-filter)
#+begin_src emacs-lisp :exports results :results none
(defun my-filter (text backend info)
(replace-regexp-in-string "''" "" text))
#+end_src
~some-cli-option=~''/some cli argument/
== LaTeX ==>
\texttt{some-cli-option=}\emph{some cli argument}
The solution is tricky and temporary, but at least it's not as
text-invasive as other options.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Missing the second '}'
@ 2022-01-24 16:46 9% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-24 16:46 UTC (permalink / raw)
To: Sharon Kimble; +Cc: orgmode
Hi Sharon,
Sharon Kimble writes:
> Hi folks.
>
> In a document that I'm compiling I seem to have failed to close the '{'
> and '}', and the second one isn't in the document. If I write '\label{}'
> then it succeeds, but at a couple of places in the document this show
> '\label{'.
>
> How can I find where I've failed to close the brackets please, so that I
> can then achieve normality please?
Is this an Org document that you are exporting to LaTeX? If there is a
compile error, you can usually see it at the end of the *Org PDF LaTeX
Output* buffer. If it is a badly closed command, it is usually a
"Runaway argument?" warning, and the compiler indicates the problematic
line, which you should look for in the *.tex document. Sometimes it's
not easy to find the problem. The fastest way is to compile the *.tex
document directly with LaTeX and review the log file. It also usually
works to raise the position of \end{document} in the document. There
will come a point where it stops giving errors, and then the problem
will be easily located in the paragraph after \end{document}.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* RE: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**
2022-01-24 12:09 9% ` Juan Manuel Macías
@ 2022-01-24 12:32 6% ` Vincent Belaïche
0 siblings, 1 reply; 200+ results
From: Vincent Belaïche @ 2022-01-24 12:32 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hello,
Thank-you both for the reply, I should have mentioned that I am aware of
this trick but it works only for document encodings which have the
zero-width space, like UTF-8, I was after a fix for documents in
ISO-8859-15, aka latin-9.
V.
De : Juan Manuel Macías <maciaschain@posteo.net>
Envoyé : lundi 24 janvier 2022 13:09
À : Vincent Belaïche <vincent.b.1@hotmail.fr>
Cc : orgmode <emacs-orgmode@gnu.org>
Objet : Re: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**
Hi Vincent,
Vincent Belaïche writes:
> Hello,
>
> Sorry to dig out this almost 8 year old discussion, but after looking
> into the git HEAD Org Mode manual (v9.5 or so) (info "(org) Emphasis and
> Monospace") node, and after looking into the mail archive I could not
> find any answer to this question: how to switch style within a word.
>
> I would like to put something like this in an OrgMode document:
>
> ~--some-cli-option=~/some cli argument/
>
> where the intent is that « --some-cli-option= » would be monospaced, and
> « some cli argument » would be italicized, and as you know this does not
> work this way.
>
> Vincent.
It seems that this topic is already a classic :-) The supported solution
for intra-word emphases is to introduce a zero width space (U+200B), for
example:
~--some-cli-option=~[zero-width space]/some cli argument/
I don't really like this solution, but at least it works. If you export
to LaTeX, you may want to remove the space using a filter, as in some
(few) cases it can alter the LaTeX result.
The other realistic possibility is to use macros:
{{{mono(--some-cli-option=)}}}{{{emph(some cli argument)}}}
That is, more or less, the state of art. By the nature of its syntax,
emphasis between words is not possible in Org.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 6%]
* Re: [O] [RFC] Creole-style / Support for **emphasis**__within__**a word**
@ 2022-01-24 12:09 9% ` Juan Manuel Macías
2022-01-24 12:32 6% ` Vincent Belaïche
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-24 12:09 UTC (permalink / raw)
To: Vincent Belaïche; +Cc: orgmode
Hi Vincent,
Vincent Belaïche writes:
> Hello,
>
> Sorry to dig out this almost 8 year old discussion, but after looking
> into the git HEAD Org Mode manual (v9.5 or so) (info "(org) Emphasis and
> Monospace") node, and after looking into the mail archive I could not
> find any answer to this question: how to switch style within a word.
>
> I would like to put something like this in an OrgMode document:
>
> ~--some-cli-option=~/some cli argument/
>
> where the intent is that « --some-cli-option= » would be monospaced, and
> « some cli argument » would be italicized, and as you know this does not
> work this way.
>
> Vincent.
It seems that this topic is already a classic :-) The supported solution
for intra-word emphases is to introduce a zero width space (U+200B), for
example:
~--some-cli-option=~[zero-width space]/some cli argument/
I don't really like this solution, but at least it works. If you export
to LaTeX, you may want to remove the space using a filter, as in some
(few) cases it can alter the LaTeX result.
The other realistic possibility is to use macros:
{{{mono(--some-cli-option=)}}}{{{emph(some cli argument)}}}
That is, more or less, the state of art. By the nature of its syntax,
emphasis between words is not possible in Org.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Exporting Org file to Html with collapsable headings
2022-01-21 16:46 6% ` Max Nikulin
@ 2022-01-22 18:20 0% ` xincheng99
0 siblings, 0 replies; 200+ results
From: xincheng99 @ 2022-01-22 18:20 UTC (permalink / raw)
To: Max Nikulin, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
Thanks a lot. This is very close to what I am looking for, and saves a lot of my time. I am grateful to all the help I received from this mailing list.
It is a lot of fun subscribing to this list.
Regards
Ziping
> On Jan 21, 2022, at 11:46 AM, Max Nikulin <manikulin_at_gmail_com_fcq2724cv3y0tc_re5x9491@icloud.com <mailto:manikulin_at_gmail_com_fcq2724cv3y0tc_re5x9491@icloud.com>> wrote:
>
> On 21/01/2022 19:23, Juan Manuel Macías wrote:
>> ZIPING CHEN writes:
>>> I may have many things like this in the middle of the file.
>>> ************************** a new heading.
>>>
>>> I wish to turn all layers of
>>> headings in org file into collapsable headline to html.
>>>
>>> Does anybody know a way I can accomplish this?
>> I think that you need to add javascript and enclose the collapsible
>> content in a div.
>
> Have a look at info "(org) JavaScript support" https://orgmode.org/manual/JavaScript-support.html <https://orgmode.org/manual/JavaScript-support.html> (I have not tried that folding view).
>
> HTML has <details><summary>header</summary>body</details> elements that works without JS, but it will require custom exporter.
>
> You should ensure that deep headings can not be recognized as org inline tasks. Check ox-html, it may has limit on number of levels that are exported as headings with switching to lists for deeper structures.
>
>
[-- Attachment #2: Type: text/html, Size: 3360 bytes --]
^ permalink raw reply [relevance 0%]
* Re: change the fontsize when exporting to HTML, header not really changed
2022-01-20 17:56 10% ` Juan Manuel Macías
@ 2022-01-21 17:21 0% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-01-21 17:21 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Uwe Brauer writes:
>> But it did not work neither. Did you test it? I am on GNU Emacs master
>> and git master (ok several weeks old, but still recent enough I'd say)
> I hadn't seen Eric's message, but what he says makes a lot of sense: are
> you applying a separate style sheet, perhaps with a *.setup document
> that already has a header style defined? It looks like one style
> overlaps another.
No I did not, but as I said in a different message, the problem is
solved thanks to you....
#+HTML_HEAD_EXTRA: <style> body {font-size:150%}</style>
Was the correct setting but deleting all the others I had left....
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: Exporting Org file to Html with collapsable headings
2022-01-21 12:23 10% ` Juan Manuel Macías
@ 2022-01-21 16:46 6% ` Max Nikulin
2022-01-22 18:20 0% ` xincheng99
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-01-21 16:46 UTC (permalink / raw)
To: emacs-orgmode
On 21/01/2022 19:23, Juan Manuel Macías wrote:
> ZIPING CHEN writes:
>
>> I may have many things like this in the middle of the file.
>> ************************** a new heading.
>>
>> I wish to turn all layers of
>> headings in org file into collapsable headline to html.
>>
>> Does anybody know a way I can accomplish this?
>
> I think that you need to add javascript and enclose the collapsible
> content in a div.
Have a look at info "(org) JavaScript support"
https://orgmode.org/manual/JavaScript-support.html (I have not tried
that folding view).
HTML has <details><summary>header</summary>body</details> elements that
works without JS, but it will require custom exporter.
You should ensure that deep headings can not be recognized as org inline
tasks. Check ox-html, it may has limit on number of levels that are
exported as headings with switching to lists for deeper structures.
^ permalink raw reply [relevance 6%]
* Re: Exporting Org file to Html with collapsable headings
@ 2022-01-21 12:23 10% ` Juan Manuel Macías
2022-01-21 16:46 6% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-21 12:23 UTC (permalink / raw)
To: ZIPING CHEN; +Cc: orgmode
ZIPING CHEN writes:
> I am working on a large org file with exceptional number of
> subheadings. For example, I may have org headings inside headings up
> to 20 or 30 layers deep.
>
> I may have many things like this in the middle of the file.
> ************************** a new heading.
>
> When I export the file to html, I like to export in such a way that
> the org headings become collapsable headline in html (toggle switch).
> I spend some time search the web, and find a theme called bigblow
> which does something close to what I want, but not exactly. It provide
> limited layer of toggle switch only. I wish to turn all layers of
> headings in org file into collapsable headline to html.
>
> Does anybody know a way I can accomplish this?
I think that you need to add javascript and enclose the collapsible
content in a div. If you google for 'html collapsible sections' there is
quite a bit of information on how to achieve this from the html side.
Here, for example:
https://levelup.gitconnected.com/collapsible-sections-with-or-without-javascript-3fd871955a9d
On the other hand, although not exactly related to what you are looking
for, you may be interested in taking a look at 'organize'. I have not
tried it, and as far as i know, it has its limitations:
https://github.com/200ok-ch/organice
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: change the fontsize when exporting to HTML, header not really changed
2022-01-20 11:48 10% ` Juan Manuel Macías
@ 2022-01-20 17:56 10% ` Juan Manuel Macías
2022-01-21 17:21 0% ` Uwe Brauer
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-20 17:56 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode, Eric S Fraga
Uwe Brauer writes:
>But it did not work neither. Did you test it? I am on GNU Emacs master
>and git master (ok several weeks old, but still recent enough I'd say)
I hadn't seen Eric's message, but what he says makes a lot of sense: are
you applying a separate style sheet, perhaps with a *.setup document
that already has a header style defined? It looks like one style
overlaps another.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: change the fontsize when exporting to HTML, header not really changed
2022-01-20 11:48 10% ` Juan Manuel Macías
@ 2022-01-20 16:14 1% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-01-20 16:14 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
Hi Juan
> Hi Uwe
> Uwe Brauer writes:
>> Now some text is changed as expected the text in the header not really.
>>
>> Any idea what would be a more appropriate setting?
> Taking into account that h1 is the title, h2, h3, etc. are the classes
> for the different header levels. You can put something like this:
> #+HTML_HEAD: <style> h2 {font-size:108%}</style>
> #+HTML_HEAD: <style> body {font-size:108%}</style>
thanks very much but it seems not to work, I also tried
#+HTML_HEAD_EXTRA: <style>*{font-size: 108%;}</style>
#+HTML_HEAD_EXTRA: <style> h1 {font-size:108%}</style>
#+HTML_HEAD_EXTRA: <style> h2 {font-size:108%}</style>
But it did not work neither. Did you test it? I am on GNU Emacs master and git master (ok several weeks old, but still recent enough I'd say)
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 1%]
* Re: change the fontsize when exporting to HTML, header not really changed
@ 2022-01-20 11:48 10% ` Juan Manuel Macías
2022-01-20 16:14 1% ` Uwe Brauer
2022-01-20 17:56 10% ` Juan Manuel Macías
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-20 11:48 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Hi Uwe
Uwe Brauer writes:
> Now some text is changed as expected the text in the header not really.
>
> Any idea what would be a more appropriate setting?
Taking into account that h1 is the title, h2, h3, etc. are the classes
for the different header levels. You can put something like this:
#+HTML_HEAD: <style> h2 {font-size:108%}</style>
#+HTML_HEAD: <style> body {font-size:108%}</style>
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Preview fonts from Dired with org-latex-preview (and test opentype features)
2022-01-10 16:47 8% Preview fonts from Dired with org-latex-preview (and test opentype features) Juan Manuel Macías
@ 2022-01-18 20:50 6% ` Ken Mankoff
0 siblings, 0 replies; 200+ results
From: Ken Mankoff @ 2022-01-18 20:50 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Please excuse brevity. Sent from tiny pocket computer with non-haptic
feedback keyboard.
On Mon, Jan 10, 2022, 08:53 Juan Manuel Macías <maciaschain@posteo.net>
wrote:
> Hi,
>
> I have written for my personal use this code (still quite crude) that
> allows me to preview with org-latex-preview small text strings in a font
> marked in dired, and test open type features too. The preview is
> compiled with LuaLaTeX, since LuaTeX allows to load fonts that are not
> installed in the system.
>
> When a font is selected, the list of opentype features included in the
> font are extracted (using the otfinfo command), and they are arranged in
> the preview buffer as buttons. By clicking on each button we can
> activate in the preview the corresponding opentype feature. For example,
> if the font includes the 'smcp' feature, clicking on the button 'smcp'
> the text will be displayed in small caps.
>
> We can enter the text strings literally or through Unicode code: each
> character separated by a space; the separation between words is marked
> with a vertical bar. For example, this code:
>
> 0063 006f 0064 0065 | 0068 0065 0072 0065
>
> returns the string "code here".
>
> As a third option, a complete specimen can be displayed from a file.
>
> Here is a demo video: https://cloud.disroot.org/s/aHXKiof36fTSZGB
>
> As I said, my function is still pretty crude, and while it works well,
> it's now more of a proof of concept than a finished thing. But if anyone
> wants to try it, I attach the code here in an org document.
>
> Best regards,
>
> Juan Manuel
>
>
[-- Attachment #2: Type: text/html, Size: 2133 bytes --]
^ permalink raw reply [relevance 6%]
* Re: latex block tikz to svg
@ 2022-01-17 16:01 9% ` Juan Manuel Macías
2022-01-25 23:24 6% ` Edouard Debry
2022-04-18 13:23 4% ` Edouard Debry
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-17 16:01 UTC (permalink / raw)
To: Edouard Debry; +Cc: orgmode
Hi Edouard,
Edouard Debry writes:
> I would like to find a way to generate svg images from latex src blocks
> (using tikz) which works and is compatible with default orgmode settings
> for latex export (at least does not break it)
>
> Did you experience such issues ? do you have some workings settings and
> examples ? I googled several times "org latex block tikz svg", but it is
> difficult to guess how relevant are the elements found, some of them
> seems quiet outdated. Hence my question on this mailing list
I've done some quick tests with your example block. I don't know if I'm
wrong, but I think the problem is on line 27 of `org-babel-execute:latex':
((string= "svg" extension)
I don't know if this should be considered an Org bug, but it's clear
that if the svg extension is detected in :file, the ':imagemagick yes'
option is ignored, and a type of preamble is generated that fails in
pgfsysdriver when compiling the temp tex document:
\documentclass[preview]{standalone}
\def\pgfsysdriver{pgfsys-tex4ht.def}
If I replace the above line with this conditional:
((and (string= "svg" extension) (not imagemagick))
then the imagemagick option is taken into account: it creates correctly
the pdf and then converts it to svg with 'convert' imagemagick program.
I did have to remove this line though:
#+HEADER: :imoutoptions -geometry 400 :iminoptions -density 600
otherwise, the conversion produced a dark image.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* [ann] org-font-spec-preview (preview fonts and test open type features)
@ 2022-01-16 16:42 9% Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-16 16:42 UTC (permalink / raw)
To: orgmode
Hi,
I've polished some raw ideas that I shared here a few days ago, and I
have written this little package:
https://gitlab.com/maciaschain/org-font-spec-preview
org-font-spec-preview allows you to preview arbitrary text strings in a
chosen font (or generate a complete specimen) as well as test opentype
features in real time. The preview is done in a temporary buffer, by
executing org-latex-preview, and must be compiled with LuaTeX, since
LuaTeX allows to load fonts that are not installed in the system.
Two user commands are provided:
- ofsp-system-font: Run ido and choose the candidate font from a list of
fonts installed on the system;
- ofsp-dired-font: Preview a font file in Dired.
Feedback welcome!
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Depreciating TeX-style LaTeX fragments
2022-01-16 13:26 9% ` Juan Manuel Macías
@ 2022-01-16 14:43 0% ` Colin Baxter 😺
0 siblings, 0 replies; 200+ results
From: Colin Baxter 😺 @ 2022-01-16 14:43 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: Sébastien Miquel, orgmode, Timothy
>>>>> Juan Manuel Macías <maciaschain@posteo.net> writes:
> Colin Baxter writes:
>> Ah, LaTeX3 - whatever happened to that?
> If you're a LaTeX user, you're already using LaTeX3 to a very high
> extent, even if you don't see it. The current idea is not to
> replace LaTeX2e with LaTeX3 as a new version, but to gradually
> incorporate elements of LaTeX3 into the LaTeX kernel, like the new
> syntax, xparse, etc. LaTeX3 is already present in many aspects of
> LaTeX, and that is an undeniable advance. If anyone is interested
> in the state of the art, this short talk by Frank Mittelbach at
> TUG 2020 is very illustrative:
Yes, I know. My remark was tongue in cheek.
^ permalink raw reply [relevance 0%]
* Re: Depreciating TeX-style LaTeX fragments
@ 2022-01-16 13:26 9% ` Juan Manuel Macías
2022-01-16 14:43 0% ` Colin Baxter 😺
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-16 13:26 UTC (permalink / raw)
To: Colin Baxter, Timothy, Sébastien Miquel; +Cc: orgmode
Colin Baxter writes:
> Ah, LaTeX3 - whatever happened to that?
If you're a LaTeX user, you're already using LaTeX3 to a very high
extent, even if you don't see it. The current idea is not to replace
LaTeX2e with LaTeX3 as a new version, but to gradually incorporate
elements of LaTeX3 into the LaTeX kernel, like the new syntax, xparse,
etc. LaTeX3 is already present in many aspects of LaTeX, and that is an
undeniable advance. If anyone is interested in the state of the art,
this short talk by Frank Mittelbach at TUG 2020 is very illustrative:
https://invidious.snopyta.org/watch?v=zNci4lcb8Vo
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: org-->html text between @ should be red.
2022-01-15 20:58 9% ` Juan Manuel Macías
@ 2022-01-15 21:01 0% ` Uwe Brauer
0 siblings, 0 replies; 200+ results
From: Uwe Brauer @ 2022-01-15 21:01 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> I think this would work:
> (setq org-export-filter-plain-text-functions
> (remove 'my-html-red org-export-filter-plain-text-functions))
> Anyway, I recommend that you take a look at the documentation on filters
> that Timothy pointed you to, as custom filters are tremendously useful
> and versatile, and very "surgical". I use them a lot!
> You can also apply a filter only in a document, by using the #+bind
> keyword and including the function in a non-exportable code block:
> #+begin_src emacs-lisp :exports results :results none
> (defun my-html-red (text backend info)
> (when (org-export-derived-backend-p backend 'html)
> (replace-regexp-in-string "@\\([^@]*\\)@"
> "<span style=\"color:red\">\\1</span>"
> text)))
> #+end_src
> #+bind: org-export-filter-plain-text-functions (my-html-red)
> (You need to set org-export-allow-bind-keywords to non-nil)
Thanks very much!!!
Regards
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: org-->html text between @ should be red.
2022-01-15 20:24 0% ` Uwe Brauer
@ 2022-01-15 20:58 9% ` Juan Manuel Macías
2022-01-15 21:01 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-15 20:58 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Uwe Brauer writes:
> (add-to-list 'org-export-filter-plain-text-functions 'my-html-red)
>
> How could I remove something from a list?
I think this would work:
(setq org-export-filter-plain-text-functions
(remove 'my-html-red org-export-filter-plain-text-functions))
Anyway, I recommend that you take a look at the documentation on filters
that Timothy pointed you to, as custom filters are tremendously useful
and versatile, and very "surgical". I use them a lot!
You can also apply a filter only in a document, by using the #+bind
keyword and including the function in a non-exportable code block:
#+begin_src emacs-lisp :exports results :results none
(defun my-html-red (text backend info)
(when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "@\\([^@]*\\)@"
"<span style=\"color:red\">\\1</span>"
text)))
#+end_src
#+bind: org-export-filter-plain-text-functions (my-html-red)
(You need to set org-export-allow-bind-keywords to non-nil)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: org-->html text between @ should be red.
2022-01-15 19:59 10% ` Juan Manuel Macías
@ 2022-01-15 20:24 0% ` Uwe Brauer
2022-01-15 20:58 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Uwe Brauer @ 2022-01-15 20:24 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Uwe Brauer writes:
>> Thanks very much it works as expected. However I just realized (and
>> this is true also for the org-mime filter that the reg-exp has a flaw.
>>
>> I used the text
>>
>>
>> =email:oub@mat.ucm.es=
>>
>> So there is only one @, nevertheless the exporter translated that to
>> <code>email:oub<span style="color:red">mat.ucm.es</code><br />
>>
>> But this is wrong in my view.
>>
>> Any ideas how to deal with such a situation?
> You can bind the function to org-export-filter-plain-text-functions
> instead of ...-final-output-functions.
Perfect, thanks.
Just out of curiosity because google does not know the answer
There is
(add-hook 'some-hook 'some-function)
(remove-hook 'some-hook 'some-function)
So if I have
(add-to-list 'org-export-filter-plain-text-functions 'my-html-red)
How could I remove something from a list?
Regards
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: org-->html text between @ should be red.
2022-01-15 19:39 0% ` Uwe Brauer
@ 2022-01-15 19:59 10% ` Juan Manuel Macías
2022-01-15 20:24 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-15 19:59 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Uwe Brauer writes:
> Thanks very much it works as expected. However I just realized (and
> this is true also for the org-mime filter that the reg-exp has a flaw.
>
> I used the text
>
>
> =email:oub@mat.ucm.es=
>
> So there is only one @, nevertheless the exporter translated that to
> <code>email:oub<span style="color:red">mat.ucm.es</code><br />
>
> But this is wrong in my view.
>
> Any ideas how to deal with such a situation?
You can bind the function to org-export-filter-plain-text-functions
instead of ...-final-output-functions.
That way you wouldn't get false positives on lines like:
=email:oub@mat.ucm.es= some text @some text@
<code>email:oub@mat.ucm.es</code> some text <span style="color:red">some text</span>
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: org-->html text between @ should be red.
2022-01-15 18:21 10% ` Juan Manuel Macías
@ 2022-01-15 19:39 0% ` Uwe Brauer
2022-01-15 19:59 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Uwe Brauer @ 2022-01-15 19:39 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
>>> "JMM" == Juan Manuel Macías <maciaschain@posteo.net> writes:
> Uwe Brauer writes:
>> Can I have a similar setting when exporting an org file to html via the
>> «normal» html exporter?
> Using a custom filter?
> #+begin_src emacs-lisp
> (defun foo (text backend info)
> (when (org-export-derived-backend-p backend 'html)
> (replace-regexp-in-string "@\\([^@]*\\)@"
> "<span style=\"color:red\">\\1</span>"
> text)))
> (add-to-list 'org-export-filter-final-output-functions 'foo)
> #+end_src
Thanks very much it works as expected. However I just realized (and this is true also for the org-mime filter that the reg-exp has a flaw.
I used the text
=email:oub@mat.ucm.es=
So there is only one @, nevertheless the exporter translated that to
<code>email:oub<span style="color:red">mat.ucm.es</code><br />
But this is wrong in my view.
Any ideas how to deal with such a situation?
Thanks
Uwe
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]
^ permalink raw reply [relevance 0%]
* Re: org-->html text between @ should be red.
@ 2022-01-15 18:21 10% ` Juan Manuel Macías
2022-01-15 19:39 0% ` Uwe Brauer
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-15 18:21 UTC (permalink / raw)
To: Uwe Brauer; +Cc: orgmode
Uwe Brauer writes:
> Can I have a similar setting when exporting an org file to html via the
> «normal» html exporter?
Using a custom filter?
#+begin_src emacs-lisp
(defun foo (text backend info)
(when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "@\\([^@]*\\)@"
"<span style=\"color:red\">\\1</span>"
text)))
(add-to-list 'org-export-filter-final-output-functions 'foo)
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Playing down the text in org-mode
@ 2022-01-14 22:44 6% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-14 22:44 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty--- via "General discussions about Org-mode." writes:
> Doing describe-face on the footnote I have "Background: unspecified"
So org-footnote does not have a defined background, which is usual. You
don't need to remove any background color. You should be seeing in your
notes the background for 'default' face in that theme.
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-14 22:23 6% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-14 22:23 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty--- via "General discussions about Org-mode." writes:
> It is much better now. In Emacs, footnotes have a background color. I still
> can see the footnote background colour with ":background 'nil".
What theme are you using? Usually, org-footnote does not have a defined background.
In any case, you can evaluate (describe-face default), and add the value
of background in default to org-footnote.
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-14 21:16 6% ` Juan Manuel Macías
[not found] ` <87r19adnm9.fsf@posteo.net-MtPRzO3----2>
1 sibling, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-14 21:16 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty@tutanota.com writes:
> That works well. But although I am atttempting to remove the
> background and change the foreground colour, the old colours remain.
>
> (with-eval-after-load 'org
> (set-face-attribute 'org-footnote nil
> :foreground "d2691e" :background 'nil :underline 'nil
> :weight 'normal :slant 'italic :height 0.8))
You are missing a "#" symbol in the color name:
:foreground "#d2691e"
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-14 20:57 6% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-14 20:57 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty--- via "General discussions about Org-mode." writes:
> Is this requirement just associated with org-footnote, as it is not usual to use "with-eval-after-load"
> to apply customisations.
It's a face defined by org, and org must be loaded before. You can also
put before, simply, (require 'org) or (require 'org-faces).
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-14 20:41 6% ` Juan Manuel Macías
[not found] ` <87zgnydp8d.fsf@posteo.net-MtPKW6j----2>
1 sibling, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-14 20:41 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty@tutanota.com writes:
> But this is giving "error: Invalid face, org-footnote"
Try this (I forgot to mention this, sorry):
(with-eval-after-load 'org
(set-face-attribute 'org-footnote nil :foreground "d2691e" :height 0.8 :extend t :underline "red"))
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-14 20:00 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-14 20:00 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty--- via "General discussions about Org-mode." writes:
> What is the face name associated with inline footnotes?
M-x describe-face RET Is your friend. Place the cursor on any inline
note, run this command and you will see that the face you need to modify
is called `org-footnote'.
M-: (info "(elisp)faces") RET
With this you have at your disposal all the information about faces, how
to manipulate them, etc.
I use a lot the `set-face-attribute' function in my init, to modify some
things of the theme that I have loaded. For example, if you want to
change the color of your notes and make them a little smaller in size:
(set-face-attribute 'org-footnote nil :foreground "DimGray" :height 0.9)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Playing down the text in org-mode
[not found] ` <874k66irh4.fsf@ucl.ac.uk-MtMyJM6----2>
@ 2022-01-14 13:03 0% ` fatiparty--- via General discussions about Org-mode.
[not found] ` <87o84efnqk.fsf@ucl.ac.uk-MtNobqT----2>
0 siblings, 1 reply; 200+ results
From: fatiparty--- via General discussions about Org-mode. @ 2022-01-14 13:03 UTC (permalink / raw)
To: Eric S Fraga; +Cc: Juan Manuel Macías, orgmode
Jan 14, 2022, 21:41 by e.fraga@ucl.ac.uk:
> On Thursday, 13 Jan 2022 at 21:39, Juan Manuel Macías wrote:
>
>> I think a custom link would suffice for text within the paragraph. A
>> quick example:
>>
>
> Very nice example. Thank you.
>
> Custom links are excellent for this kind of behaviour tuning while being
> portable if the link definition is included in the org file. I use this
> approach in lieu of inline tasks for creating margin notes (in the
> export), for instance.
>
How can I remove the background and underline for footnotes, and change
foreground colour.
> --
> : Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
>
^ permalink raw reply [relevance 0%]
* Re: Playing down the text in org-mode
2022-01-13 21:39 10% ` Juan Manuel Macías
@ 2022-01-14 9:41 6% ` Eric S Fraga
[not found] ` <874k66irh4.fsf@ucl.ac.uk-MtMyJM6----2>
1 sibling, 0 replies; 200+ results
From: Eric S Fraga @ 2022-01-14 9:41 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: fatiparty, orgmode
On Thursday, 13 Jan 2022 at 21:39, Juan Manuel Macías wrote:
> I think a custom link would suffice for text within the paragraph. A
> quick example:
Very nice example. Thank you.
Custom links are excellent for this kind of behaviour tuning while being
portable if the link definition is included in the org file. I use this
approach in lieu of inline tasks for creating margin notes (in the
export), for instance.
--
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-13 23:08 6% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-13 23:08 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty@tutanota.com writes:
> but with the variation that the text is also within the square brackets
You can use inline footnotes, but I'm afraid you couldn't stop using
"fn" here (unless you hack the Org code). However you can use a
convention, something like:
Lorem[fn:mg1:blah blah blah] ipsum dolor sit amet, consectetuer
adipiscing elit. Donec hendrerit tempor[fn:mg2:blah blah blah] tellus.
Donec pretium posuere tellus...
And you can also use anonymous online footnotes:
Lorem[fn::dolor ipsum lorem] ipsum dolor sit amet, consectetuer
adipiscing elit. Donec hendrerit tempor[fn::blah blah blah] tellus.
Donec pretium posuere tellus...
(and for more contrast, you can also modify the orf-footnote face to
your liking).
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-13 21:39 10% ` Juan Manuel Macías
2022-01-14 9:41 6% ` Eric S Fraga
[not found] ` <874k66irh4.fsf@ucl.ac.uk-MtMyJM6----2>
[not found] ` <878rvjco35.fsf@posteo.net-MtKOBaG----2>
1 sibling, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-13 21:39 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty@tutanota.com writes:
> If I do something in emacs-lisp I would still need some form of
> containment characters.
I think a custom link would suffice for text within the paragraph. A
quick example:
#+begin_src emacs-lisp
(defface smaller
'((t :foreground "#8D8D84" :height 0.9))
"")
(org-link-set-parameters "smaller"
:face 'smaller
:export (lambda (path desc format)
(cond
((eq format 'latex)
(format "{\\small %s}" desc)))))
#+end_src
This text is important, [[smaller:x][but this one is not so important]]
A screenshot:
https://i.imgur.com/11KbJHQ.png
if you want finer tuning and more control over the format, John's
scimax-editmarks package seems like a very interesting option (although
I think Org should remain as format-agnostic as possible...)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Playing down the text in org-mode
@ 2022-01-13 20:20 9% ` Juan Manuel Macías
[not found] ` <87iluncrr6.fsf@posteo.net-MtK5wx2----2>
1 sibling, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-13 20:20 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty@tutanota.com writes:
> I am discussing something slightly different.
>
> Here is normal text within -which there is some understated text- before continuing with normal text.
Yes, it seems that I have understood you horribly wrong, sorry for the
noise (it must be the effects of the third modern vaccine that they gave
me yesterday :-)
In short, what you want is that a part of the text is "obscured" in some
way with respect to the main body text, and you would like Org to have
some marks for it. I see an important basic problem: there are many
procedures to reduce the reading importance of a text: simply pass that
text to a footnote, use dashes, parentheses or brackets, put the text in
a smaller size (which is the usual when these passages are isolated
paragraphs). I think it is better to define all these questions in the
output formats, through post-processing, and in Org use macros, custom
links, special blocks, the procedure that John has shared here, etc. But a
"universal" no-emphasis mark doesn't seem viable to me, IMHO.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Playing down the text in org-mode
@ 2022-01-13 19:42 5% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-13 19:42 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
fatiparty--- via "General discussions about Org-mode." writes:
> _a geographical region that corresponds to present-day Israel and Palestine_
In any case, from a strictly (ortho)typographical point of view this is a
matter of nesting emphasis. If what you want to do is highlight a word
within another emphasis (an underline), the correct typographical
procedure is to italicize or bold that word:
_a /geographical/ region that corresponds to present-day Israel and
Palestine_
==>
\uline{a \emph{geographical} region that corresponds to present-day
Israel and Palestine}
What you can't do in Org is nest emphases of the same order:
#+begin_example
/The translators of the /Odyssey/ in the Hispanic tradiction/
#+end_example
It does not produce in LaTeX:
#+begin_src latex
\emph{The translators of the \emph{Odyssey} in the Hispanic tradiction}
#+end_src
It is not a matter of a passage being de-emphasized (it doesn't work
that way), but rather that it is emphasized within another emphasis
text. In the above case, the way to emphasize Odyssey in a text already
emphasized in italics is with a normal font or with an underline (the
correct thing is with a normal font).
There are two separate questions here: how that is represented in Org
and how it should be exported.
^ permalink raw reply [relevance 5%]
* Re: Playing down the text in org-mode
@ 2022-01-13 19:19 6% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-13 19:19 UTC (permalink / raw)
To: John Kitchin, fatiparty; +Cc: orgmode
John Kitchin writes:
> It depends on what you mean. I can't think of a standard markup for
> de-emphasis. You could imply it with color perhaps, e.g. some shade of
> grey, or size by making it smaller. At least for LaTex/HTML, both of
> those can be done. You would either need to use something like a
> macro, or a link for something like that I think.
The problem is that the concept of nested emphasis only works in LaTeX.
I agree that a macro would be a good solution, putting the argument in
'normal' text. An approximation could be:
#+begin_src emacs-lisp
(defun macro-no-emph (arg)
(let* ((backend org-export-current-backend))
(cond ((eq org-export-current-backend 'latex)
(concat "@@latex:{\\normalfont @@" arg "@@latex:}@@"))
((eq org-export-current-backend 'html)
(concat "@@html:<span style=\"font-style:normal;\">@@" arg "@@html:</span>@@"))
((eq org-export-current-backend 'odt)
;; a character style `normal' must be definded for odt
(concat "@@odt:<text:span text:style-name=\"normal\">@@" arg "@@odt:</text:span>@@")))))
(setq org-export-global-macros
'(("noemph" . "(eval (mi-macro-emph $1))")))
#+end_src
/foo {{{noemph(bar)}}} baz/
^ permalink raw reply [relevance 6%]
* Re: Playing down the text in org-mode
@ 2022-01-13 18:50 10% ` Juan Manuel Macías
[not found] ` <87bl0feahc.fsf@posteo.net-MtJnHBm----2>
2 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-13 18:50 UTC (permalink / raw)
To: fatiparty; +Cc: orgmode
Hi,
fatiparty--- via "General discussions about Org-mode." writes:
> Is there anything to perform the opposite, playing down the text?
Are you referring to nested emphasis, something like in LaTeX
\emph{foo \emph{bar} baz}
= foo...baz in italic; bar in normal font?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: puzzled about :fit for LaTeX src block
2022-01-13 15:41 8% ` Juan Manuel Macías
@ 2022-01-13 16:14 6% ` Eric S Fraga
0 siblings, 0 replies; 200+ results
From: Eric S Fraga @ 2022-01-13 16:14 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Thursday, 13 Jan 2022 at 15:41, Juan Manuel Macías wrote:
> Well, it seems that if you use ":imagemagick yes", the image is created
> with the `org-babel-latex-convert-pdf' function.
Indeed. I went to the code. Thank you. Everything is working like I
want it!
--
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: puzzled about :fit for LaTeX src block
2022-01-13 12:05 6% ` Eric S Fraga
@ 2022-01-13 15:41 8% ` Juan Manuel Macías
2022-01-13 16:14 6% ` Eric S Fraga
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-13 15:41 UTC (permalink / raw)
To: Eric S Fraga; +Cc: orgmode
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
^ permalink raw reply [relevance 8%]
* Re: puzzled about :fit for LaTeX src block
2022-01-13 11:17 10% ` Juan Manuel Macías
@ 2022-01-13 12:05 6% ` Eric S Fraga
2022-01-13 15:41 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Eric S Fraga @ 2022-01-13 12:05 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Thursday, 13 Jan 2022 at 11:17, Juan Manuel Macías wrote:
> Another possibility: please try adding the header arg. :imagemagick yes
This did it! Thank you. I am curious now to find out what tool was
used instead... something for later today!
Thanks again,
eric
--
Professor Eric S Fraga, UCL; GnuPG: 0xc89193d8fffcf67d
^ permalink raw reply [relevance 6%]
* Re: puzzled about :fit for LaTeX src block
2022-01-13 10:14 6% ` Eric S Fraga
@ 2022-01-13 11:17 10% ` Juan Manuel Macías
2022-01-13 12:05 6% ` Eric S Fraga
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-13 11:17 UTC (permalink / raw)
To: Eric S Fraga; +Cc: orgmode
Hi Eric,
Eric S Fraga writes:
> Both the same and the default value from org.
I'm not sure, but maybe the problem comes from the
\documentclass{article} in org-format-latex-header. Can you try
replacing that with "\\documentclass[varwidth]{standalone}"?
Another possibility: please try adding the header arg. :imagemagick yes
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: puzzled about :fit for LaTeX src block
2022-01-12 17:22 10% ` Juan Manuel Macías
@ 2022-01-13 10:14 6% ` Eric S Fraga
2022-01-13 11:17 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Eric S Fraga @ 2022-01-13 10:14 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
Hi Juan,
On Wednesday, 12 Jan 2022 at 17:22, Juan Manuel Macías wrote:
> Testing two possibilities:
>
> What (latex) code produces that image in the output *tex file of your book?
They both use the same LaTeX src block (as was in the attachment) which
creates an org link to the generated PDF or PNG file. It's the
generation of the image file that is the problem, not how the file is
used in the end unfortunately.
> C-h v RET org-format-latex-header RET: what value?
Both the same and the default value from org.
thank you,
eric
--
: Eric S Fraga, with org release_9.5.2-298-g1f48d2 in Emacs 29.0.50
^ permalink raw reply [relevance 6%]
* Re: puzzled about :fit for LaTeX src block
@ 2022-01-12 17:22 10% ` Juan Manuel Macías
2022-01-13 10:14 6% ` Eric S Fraga
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-12 17:22 UTC (permalink / raw)
To: Eric S Fraga; +Cc: orgmode
Hi Eric,
Eric S Fraga writes:
> I have a LaTeX src block which creates an image using tikz. In a book
> I'm writing, the image, when created as a png, does not get shrunk but
> is instead a full page (with the actual diagram in the top left corner).
> If I create a PDF, instead, it works fine.
Testing two possibilities:
What (latex) code produces that image in the output *tex file of your book?
and
C-h v RET org-format-latex-header RET: what value?
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Filter to put decorative initial letters
2022-01-11 0:43 6% ` William Denton
@ 2022-01-11 16:21 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-11 16:21 UTC (permalink / raw)
To: William Denton; +Cc: orgmode
Hi William,
William Denton writes:
> This is beautiful, and a nice Org hack. I appreciate the
> typographical and design examples you send, and have learned a lot
> from them. Thank you.
>
> Bill
Thanks for your kind words, I'm glad you found that code useful.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: Filter to put decorative initial letters
2022-01-07 0:41 9% Filter to put decorative initial letters Juan Manuel Macías
@ 2022-01-11 0:43 6% ` William Denton
2022-01-11 16:21 10% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: William Denton @ 2022-01-11 0:43 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]
On 7 January 2022, Juan Manuel Macías wrote:
> These past holidays I've been experimenting with some little useful, but
> fun stuff. This is an export filter to put a decorative initial letter
> in the first paragraphs of the first level sections, using the LaTeX
> package lettrine (https://www.ctan.org/pkg/lettrine).
>
> A screenshot: https://i.imgur.com/mLQVHFC.png
This is beautiful, and a nice Org hack. I appreciate the typographical and
design examples you send, and have learned a lot from them. Thank you.
Bill
--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada
^ permalink raw reply [relevance 6%]
* Preview fonts from Dired with org-latex-preview (and test opentype features)
@ 2022-01-10 16:47 8% Juan Manuel Macías
2022-01-18 20:50 6% ` Ken Mankoff
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-10 16:47 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]
Hi,
I have written for my personal use this code (still quite crude) that
allows me to preview with org-latex-preview small text strings in a font
marked in dired, and test open type features too. The preview is
compiled with LuaLaTeX, since LuaTeX allows to load fonts that are not
installed in the system.
When a font is selected, the list of opentype features included in the
font are extracted (using the otfinfo command), and they are arranged in
the preview buffer as buttons. By clicking on each button we can
activate in the preview the corresponding opentype feature. For example,
if the font includes the 'smcp' feature, clicking on the button 'smcp'
the text will be displayed in small caps.
We can enter the text strings literally or through Unicode code: each
character separated by a space; the separation between words is marked
with a vertical bar. For example, this code:
0063 006f 0064 0065 | 0068 0065 0072 0065
returns the string "code here".
As a third option, a complete specimen can be displayed from a file.
Here is a demo video: https://cloud.disroot.org/s/aHXKiof36fTSZGB
As I said, my function is still pretty crude, and while it works well,
it's now more of a proof of concept than a finished thing. But if anyone
wants to try it, I attach the code here in an org document.
Best regards,
Juan Manuel
[-- Attachment #2: font-preview.org --]
[-- Type: application/vnd.lotus-organizer, Size: 10258 bytes --]
^ permalink raw reply [relevance 8%]
* Re: [tip] Inline tasks as anonymous sections
2022-01-08 11:32 9% [tip] Inline tasks as anonymous sections Juan Manuel Macías
2022-01-08 13:09 6% ` Marcin Borkowski
@ 2022-01-09 7:13 6% ` Ihor Radchenko
1 sibling, 0 replies; 200+ results
From: Ihor Radchenko @ 2022-01-09 7:13 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
Juan Manuel Macías <maciaschain@posteo.net> writes:
> I think that a very efficient way to take advantage of inline tasks (in
> the framework of document authoring and exporting) is to treat them as
> anonymous sections, that is, those sections that do not have a title and
> are normally separated in books by some special symbol: three asterisks
> (a dinkus: https://en.wikipedia.org/wiki/Dinkus), an asterism (three
> asterisks forming a triangle), or any other fancy symbol. Users can
> associate their own export functions with the variables
> `org-latex-format-inlinetask-function',
Thanks! It is an interesting idea.
In Org, I also prefer to display inline tasks using "⇒⇒⇒" instead of all
the asterisks. (see the attached screenshot)
Best,
Ihor
[-- Attachment #2: 2022-01-09_15-12.png --]
[-- Type: image/png, Size: 74727 bytes --]
^ permalink raw reply [relevance 6%]
* Re: Way to mark contents of an Org special block as verbatim?
2022-01-06 19:46 5% ` Kaushal Modi
@ 2022-01-08 21:52 0% ` Berry, Charles
0 siblings, 0 replies; 200+ results
From: Berry, Charles @ 2022-01-08 21:52 UTC (permalink / raw)
To: Kaushal Modi; +Cc: Juan Manuel Macías, orgmode
> On Jan 6, 2022, at 11:46 AM, Kaushal Modi <kaushal.modi@gmail.com> wrote:
>
> On Thu, Jan 6, 2022 at 2:33 PM Juan Manuel Macías
> <maciaschain@posteo.net> wrote:
>> I just realized that there is a much simpler solution for your katex
>> environment :-)
>>
>> You can use an example block, and define your custom environment using
>> the attribute :environment
>
> Sorry, but this exporter is derived from md, and before exporting the
> verbatim body of the special block needs to be surrounded with some
> special syntax, with some optional stuff that the user specifies. Also
> it could any special block name:
> - katex
> - tikz
> - tikzjax
>
> In any case, if user has this in Org:
>
> #+begin_FOO
> <body verbatim>
> #+end_FOO
>
> I need to export:
>
> {{< FOO custom stuff >}}
> <body verbatim>
> {{< /FOO >}}
>
>
What am I missing?
It seems like you want your derived backend to transcode special blocks somewhat differently than the parent backend. And adding a special block export filter doesn't quite do the job.
For that purpose, you should write a special block transcoder - perhaps falling back to the parent backend for block types you do not wish to handle as described above.
Block specific customizations could rely on a backend specific attribute.
HTH,
Chuck
^ permalink raw reply [relevance 0%]
* Re: [tip] Inline tasks as anonymous sections
2022-01-08 11:32 9% [tip] Inline tasks as anonymous sections Juan Manuel Macías
@ 2022-01-08 13:09 6% ` Marcin Borkowski
2022-01-09 7:13 6% ` Ihor Radchenko
1 sibling, 0 replies; 200+ results
From: Marcin Borkowski @ 2022-01-08 13:09 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On 2022-01-08, at 12:32, Juan Manuel Macías <maciaschain@posteo.net> wrote:
> Hi,
>
> I think that a very efficient way to take advantage of inline tasks (in
> the framework of document authoring and exporting) is to treat them as
> anonymous sections, that is, those sections that do not have a title and
> are normally separated in books by some special symbol: three asterisks
> (a dinkus: https://en.wikipedia.org/wiki/Dinkus), an asterism (three
> asterisks forming a triangle), or any other fancy symbol. Users can
> associate their own export functions with the variables
> `org-latex-format-inlinetask-function',
> `org-odt-format-inlinetask-function', etc. Well, you can always add the
> separation symbol directly in your text, but the advantage of using
> inline task is that we can conveniently have those sections delimited,
> as real sections (with properties, todo states, etc).
>
> If anyone wants to explore this possibility, I am attaching a test org
> document. I have defined two LaTeX commands: \anonsectionbreak and
> \anonsectionmark; and the 'anonsection' environment[1].
I don't expect this to be useful for me personally, but I love the idea!
Best,
--
Marcin Borkowski
http://mbork.pl
^ permalink raw reply [relevance 6%]
* [tip] Inline tasks as anonymous sections
@ 2022-01-08 11:32 9% Juan Manuel Macías
2022-01-08 13:09 6% ` Marcin Borkowski
2022-01-09 7:13 6% ` Ihor Radchenko
0 siblings, 2 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-08 11:32 UTC (permalink / raw)
To: orgmode
[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]
Hi,
I think that a very efficient way to take advantage of inline tasks (in
the framework of document authoring and exporting) is to treat them as
anonymous sections, that is, those sections that do not have a title and
are normally separated in books by some special symbol: three asterisks
(a dinkus: https://en.wikipedia.org/wiki/Dinkus), an asterism (three
asterisks forming a triangle), or any other fancy symbol. Users can
associate their own export functions with the variables
`org-latex-format-inlinetask-function',
`org-odt-format-inlinetask-function', etc. Well, you can always add the
separation symbol directly in your text, but the advantage of using
inline task is that we can conveniently have those sections delimited,
as real sections (with properties, todo states, etc).
If anyone wants to explore this possibility, I am attaching a test org
document. I have defined two LaTeX commands: \anonsectionbreak and
\anonsectionmark; and the 'anonsection' environment[1].
[1] The Memoir class includes code for these types of divisions (see
section 6.7 FANCY ANONYMOUS BREAKS in Memoir documentation).
Best regards,
Juan Manuel
[-- Attachment #2: anon-sec-test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 1862 bytes --]
^ permalink raw reply [relevance 9%]
* Re: A simple Lua filter for Pandoc
2022-01-07 14:29 5% ` Max Nikulin
@ 2022-01-07 15:14 8% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-07 15:14 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> Form my point of view it is not worse than "\slash{}" entities.
Yes, I also use macros a lot, especially for more complex constructions.
Macros, entities and other tricks have their pros and cons, but they
allow me to have a certain group of characters under control.
>> https://i.imgur.com/f6X7qLs.png
>
> In this example there is no need to replace "<" by entity since it can
> not be confused with <http://te.st/> links.
As I have already said, this comes from a desire to keep a series of
characters under control, because they can be confused with the Org
marks or because I can get confused when working with the text,
especially if it is an imported text. In the case of "<" and ">", many
authors usually use them for various contexts in philology (instead of
the correct characters for some of those contexts, such as
RIGHT-POINTING ANGLE BRACKET and LEFT-POINTING ANGLE BRACKET: in that
case, I have to replace with the correct symbol). In general, I am
calmer if I have, in one way or another, all those symbols conveniently
"delimited", because even if Org is not wrong, I can get confused.
Anyway, regardless of the idiosyncrasy of my workflow, the origin of
this thread (the function in Lua) was in case someone wants to adapt it
to their own workflow, and needs to substitute some strings for others
when importing from docx or odt.
Best regards,
Juan Manuel
^ permalink raw reply [relevance 8%]
* Re: A simple Lua filter for Pandoc
2022-01-05 17:08 9% ` Juan Manuel Macías
@ 2022-01-07 14:29 5% ` Max Nikulin
2022-01-07 15:14 8% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-01-07 14:29 UTC (permalink / raw)
To: emacs-orgmode
On 06/01/2022 00:08, Juan Manuel Macías wrote:
> Max Nikulin writes:
>
>> It seems, lightweight markup is more annoyance than advantage for you.
>> Tom posted some thoughts on more rigorous syntax in the following message:
>
> It's generally the opposite: working in Org is a pleasant journey for
> me... except when there are dozens of "/" and "*" in a document, and
> they placed in 'unhappy' positions. For example, in phonetics the
> "/ ... /" notation is used a lot, and there may be cases like:
>
> #+begin_example
> /foo/ /bar/ /baz/
> #+end_example
Unless you were seeking for a lightweight markup I would remind you
about macro:
---- >8 ----
#+macro: ph @@x:@@/@@x:@@$1@@x:@@/@@x:@@
/{{{ph(foo)}}} {{{ph(bar)}}} {{{ph(baz)}}}/
---- 8< ----
Form my point of view it is not worse than "\slash{}" entities.
LISP can bee easily transformed to a domain specific language by means
of LISP macros (it is its strong and weak side simultaneously). I am
unaware whether a comparable framework exists for creating custom
lightweight markups. In LaTeX for your examples I expect something like
\phonetic{foo} commands to have logical markup. Certainly with some
hints /foo/ in particular part of text might be considered as "phonetic"
rather than "italic" in intermediate representation keeping source
easily readable.
> https://i.imgur.com/f6X7qLs.png
In this example there is no need to replace "<" by entity since it can
not be confused with <http://te.st/> links.
^ permalink raw reply [relevance 5%]
* Filter to put decorative initial letters
@ 2022-01-07 0:41 9% Juan Manuel Macías
2022-01-11 0:43 6% ` William Denton
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-07 0:41 UTC (permalink / raw)
To: orgmode
Hi,
These past holidays I've been experimenting with some little useful, but
fun stuff. This is an export filter to put a decorative initial letter
in the first paragraphs of the first level sections, using the LaTeX
package lettrine (https://www.ctan.org/pkg/lettrine).
A screenshot: https://i.imgur.com/mLQVHFC.png
#+BIND: org-export-filter-parse-tree-functions (lettrine)
#+begin_src emacs-lisp :exports results :results none
(defun lettrine (tree backend info)
(when (org-export-derived-backend-p backend 'latex)
(org-element-map tree 'headline
(lambda (section)
(when (eq 1 (org-element-property :level section))
(let* ((contents (org-element-interpret-data (org-element-contents section)))
(lettrine-opt (org-export-get-node-property :LETTRINE_OPTIONS section t))
(contents-lettrine (with-temp-buffer
(insert contents)
(save-excursion
(goto-char (point-min))
(re-search-forward "\\(\\b.\\)\\([^\s]+\\b\\)" nil t)
(replace-match (concat "\\\\lettrine"
(if lettrine-opt (format "[%s]"
lettrine-opt) "")
"{" "\\1" "}" "{" "\\2" "}")
t nil)
(org-element-parse-buffer)))))
(apply #'org-element-set-contents
section
(list contents-lettrine)))))
info)
tree))
#+end_src
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: Way to mark contents of an Org special block as verbatim?
2022-01-06 19:33 6% ` Juan Manuel Macías
@ 2022-01-06 19:46 5% ` Kaushal Modi
2022-01-08 21:52 0% ` Berry, Charles
0 siblings, 1 reply; 200+ results
From: Kaushal Modi @ 2022-01-06 19:46 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Thu, Jan 6, 2022 at 2:33 PM Juan Manuel Macías
<maciaschain@posteo.net> wrote:
> I just realized that there is a much simpler solution for your katex
> environment :-)
>
> You can use an example block, and define your custom environment using
> the attribute :environment
Sorry, but this exporter is derived from md, and before exporting the
verbatim body of the special block needs to be surrounded with some
special syntax, with some optional stuff that the user specifies. Also
it could any special block name:
- katex
- tikz
- tikzjax
In any case, if user has this in Org:
#+begin_FOO
<body verbatim>
#+end_FOO
I need to export:
{{< FOO custom stuff >}}
<body verbatim>
{{< /FOO >}}
^ permalink raw reply [relevance 5%]
* Re: Way to mark contents of an Org special block as verbatim?
2022-01-06 19:14 5% ` Kaushal Modi
@ 2022-01-06 19:33 6% ` Juan Manuel Macías
2022-01-06 19:46 5% ` Kaushal Modi
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-06 19:33 UTC (permalink / raw)
To: Kaushal Modi; +Cc: orgmode
Kaushal Modi writes:
> Wow, thanks for that complete code. I didn't know about the parse tree
> functions.
>
> I was thinking if below is possible as any user running my exporter
> would need to use this feature easily.
>
> #+begin_katex :verbatim t
> E = -J \sum_{i=1}^N s_i s_{i+1}
> #+end_katex
I just realized that there is a much simpler solution for your katex
environment :-)
You can use an example block, and define your custom environment using
the attribute :environment
#+ATTR_LaTeX: :environment katex
#+begin_example
E = -J \sum_{i=1}^N s_i s_{i+1}
#+end_example
^ permalink raw reply [relevance 6%]
* Re: Way to mark contents of an Org special block as verbatim?
2022-01-06 18:27 9% ` Juan Manuel Macías
@ 2022-01-06 19:14 5% ` Kaushal Modi
2022-01-06 19:33 6% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Kaushal Modi @ 2022-01-06 19:14 UTC (permalink / raw)
To: Juan Manuel Macías; +Cc: orgmode
On Thu, Jan 6, 2022 at 1:27 PM Juan Manuel Macías
<maciaschain@posteo.net> wrote:
> I think one possibility would be using a parse tree export filter:
>
> #+BIND: org-export-filter-parse-tree-functions (katex-verbatim)
> #+begin_src emacs-lisp :exports results :results none
> (defun katex-verbatim (tree backend info)
> (when (org-export-derived-backend-p backend 'latex)
> (org-element-map tree 'special-block
> (lambda (block)
> (when (equal "katex" (org-element-property :type block))
> (let ((cont (org-element-interpret-data (org-element-contents block)))
> (create-export-snippet ;; idea from Nicolas Goaziou
> (lambda (v)
> (org-element-create 'export-snippet (list :back-end "latex" :value v)))))
> (apply #'org-element-set-contents
> block
> (list (funcall create-export-snippet cont))))))
> info)
> tree))
> #+end_src
>
> #+begin_katex
> E = -J \sum_{i=1}^N s_i s_{i+1}
> #+end_katex
>
> ==>
>
> \begin{katex}
> E = -J \sum_{i=1}^N s_i s_{i+1}
> \end{katex}
Wow, thanks for that complete code. I didn't know about the parse tree
functions.
I was thinking if below is possible as any user running my exporter
would need to use this feature easily.
#+begin_katex :verbatim t
E = -J \sum_{i=1}^N s_i s_{i+1}
#+end_katex
Is it possible to do anything inside the org-hugo-special-block
function that's defined in the exporter?
^ permalink raw reply [relevance 5%]
* Re: Way to mark contents of an Org special block as verbatim?
@ 2022-01-06 18:27 9% ` Juan Manuel Macías
2022-01-06 19:14 5% ` Kaushal Modi
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-06 18:27 UTC (permalink / raw)
To: Kaushal Modi; +Cc: orgmode
Hi Kaushal,
Kaushal Modi writes:
> I would like to treat that block /like/ how Org treats the latex
> environment blocks, but it needs to be a special block as
> begin_katex/end_katex here is special and it could be a different
> equation rendering backend for another user.
>
> So is that a header switch or arg that can be passed on to this
> special block that enables the verbatim mode (prevent Org from
> replacing the Org entities, do the sub/superscript expansion, etc.)?
I think one possibility would be using a parse tree export filter:
#+BIND: org-export-filter-parse-tree-functions (katex-verbatim)
#+begin_src emacs-lisp :exports results :results none
(defun katex-verbatim (tree backend info)
(when (org-export-derived-backend-p backend 'latex)
(org-element-map tree 'special-block
(lambda (block)
(when (equal "katex" (org-element-property :type block))
(let ((cont (org-element-interpret-data (org-element-contents block)))
(create-export-snippet ;; idea from Nicolas Goaziou
(lambda (v)
(org-element-create 'export-snippet (list :back-end "latex" :value v)))))
(apply #'org-element-set-contents
block
(list (funcall create-export-snippet cont))))))
info)
tree))
#+end_src
#+begin_katex
E = -J \sum_{i=1}^N s_i s_{i+1}
#+end_katex
==>
\begin{katex}
E = -J \sum_{i=1}^N s_i s_{i+1}
\end{katex}
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: A simple Lua filter for Pandoc
2022-01-05 16:29 5% ` Max Nikulin
@ 2022-01-05 17:08 9% ` Juan Manuel Macías
2022-01-07 14:29 5% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-05 17:08 UTC (permalink / raw)
To: Max Nikulin; +Cc: orgmode
Max Nikulin writes:
> It seems, lightweight markup is more annoyance than advantage for you.
> Tom posted some thoughts on more rigorous syntax in the following message:
It's generally the opposite: working in Org is a pleasant journey for
me... except when there are dozens of "/" and "*" in a document, and
they placed in 'unhappy' positions. For example, in phonetics the
"/ ... /" notation is used a lot, and there may be cases like:
#+begin_example
/foo/ /bar/ /baz/
#+end_example
In grammar the asterisk is also used a lot, to designate that a term is
not attested or to indicate that it is ungrammatical:
#+begin_example
*foo *bar *baz
#+end_example
And we can even have the combination of both:
#+begin_example
/*foo/ /*bar/ /*baz/
#+end_example
And in certain cases, they are usually expressed in italics. With these
landscapes, it's worth having a few entities rather than working from
pure LaTeX, which is more accurate, but horribly more verbose.
This is a page from a book I typesetted a couple of years ago (when the
pandemic started), entirely from Org:
https://i.imgur.com/f6X7qLs.png
Best regards,
Juan Manuel
^ permalink raw reply [relevance 9%]
* Re: A simple Lua filter for Pandoc
2022-01-04 15:06 5% ` Juan Manuel Macías
@ 2022-01-05 16:29 5% ` Max Nikulin
2022-01-05 17:08 9% ` Juan Manuel Macías
0 siblings, 1 reply; 200+ results
From: Max Nikulin @ 2022-01-05 16:29 UTC (permalink / raw)
To: orgmode; +Cc: Tom Gillespie
On 04/01/2022 22:06, Juan Manuel Macías wrote:
> Max Nikulin writes:
>
>> Ideally it should be done pandoc and only if it causes incorrect
>> parsing of org markup. NBSP, probably, should be replaced by some
>> exporters, I do not think, it is a problem e.g. in HTML files.
>
> The reason for this filter is my own comfort. Linguistics texts contains
> a lot of certain characters such as "/" or "*", and they are often
> italicized or bold. So, in order not to be more confused than necessary,
> I prefer that they pass as entities.
It seems, lightweight markup is more annoyance than advantage for you.
Tom posted some thoughts on more rigorous syntax in the following message:
Tom Gillespie. Re: Org-syntax: Intra-word markup.
Sat, 4 Dec 2021 09:53:11 -0800.
https://list.orgmode.org/CA+G3_PNca3HY6TUDPMfHGt35Amj9a-y8dBNQo+ZvBOV6y3nHYw@mail.gmail.com
For C and C++ it is possible to tune some aspects of compiler behavior using
#pragma something
directives. In some cases it might be convenient to e.g. temporary
disable emphasis markers (or switch to more verbose alternative) through
#+some: keyword
> In general, there are certain
> characters that I am more comfortable working with as entities than as
> literal characters (for example, a lot of zero-width combining
> diacritics that are used a lot in linguistics or epigraphy (and there
> are no fonts that include the NFC normalized version of all possible
> combinations: in fact, they are not in Unicode, and would have to go to
> the private use area). Summarizing, I prefer that these characters have
> their actual typographic representation only with LuaTeX. A very typical
> example is the character U+0323 (COMBINING DOT BELOW). It is very
> uncomfortable to work /in situ/, although there are fonts that usually
> render it well (with the 'mark' otf tag).
I have seen warnings concerning complications due to variants of
character representation, but I have no experience such nuances (either
typing and editing or processing text programmatically). Dagger and
non-breaking space in your code snippet were much more simpler cases.
^ permalink raw reply [relevance 5%]
* Re: Tool to compare and choose fonts
@ 2022-01-05 10:16 10% ` Juan Manuel Macías
0 siblings, 0 replies; 200+ results
From: Juan Manuel Macías @ 2022-01-05 10:16 UTC (permalink / raw)
To: Ypo; +Cc: orgmode
Ypo writes:
> Was a tool to compare fonts presented in this list some time ago?
>
> I lost it, I thought I discovered it on Reddit, but now I am thinking
> I found it here.
>
> It was a script that presented on emacs every font in the computer, in
> pairs; so the user chose one font each time, like if it were a
> "championship" between fonts.
https://github.com/alphapapa/unpackaged.el#font-compare
Outside of Emacs there are many tools for auditing fonts. In TeX live
you have the otfinfo script, for example, very useful. And recently the
Unicode Font Table package has been uploaded to CTAN, to represent
character tables in (Lua/Xe)LaTeX:
https://www.ctan.org/pkg/unicodefonttable
(an example that I have done inside Org, using LaTeX blocks:
https://i.imgur.com/eiiAUlB.png)
Best regards,
Juan Manuel
^ permalink raw reply [relevance 10%]
* Re: A simple Lua filter for Pandoc
@ 2022-01-04 16:28 6% ` Thomas S. Dye
1 sibling, 0 replies; 200+ results
From: Thomas S. Dye @ 2022-01-04 16:28 UTC (permalink / raw)
To: emacs-orgmode
Juan Manuel Macías <maciaschain@posteo.net> writes:
> Hi,
>
> Very often I need to convert docx documents to Org. There are a
> series
> of characters that I prefer to be passed to Org as Org entities
> and not
> literally, so I have written this little filter in Lua for
> Pandoc. I
> share it here in case it could be useful to someone. Of course,
> the
> associative table can be expanded with more replacement cases:
>
> #+begin_src lua :tangle entities.lua
> local chars = {["/"] = "\\slash{}", ["*"] = "\\lowast{}",
> ["<"] = "\\lt{}",
> [">"] = "\\gt{}", ["†"] = "\\dagger{}", [utf8.char(0x00A0)]
> = "\\nbsp{}"}
>
> function Str (elem)
> x = elem.text:match 'http[^%s]'
> if not x then
> for i in pairs(chars) do
> elem = pandoc.Str(elem.text:gsub (i, chars[i]))
> end
> return elem
> end
> end
> #+end_src
Neat! Converting Word documents is no fun at all.
BTW, Babel support for Lua isn't very good AFAICT. I poked around
ob-lua.el recently and concluded that one problem is that the Lua
interpreter prints pointers for some data types instead of a
human-readable form that might be parsed.
All the best,
Tom
--
Thomas S. Dye
https://tsdye.online/tsdye
^ permalink raw reply [relevance 6%]
* Re: A simple Lua filter for Pandoc
@ 2022-01-04 15:06 5% ` Juan Manuel Macías
2022-01-05 16:29 5% ` Max Nikulin
0 siblings, 1 reply; 200+ results
From: Juan Manuel Macías @ 2022-01-04 15:06 UTC (permalink / raw)
To: orgmode
Max Nikulin writes:
> Ideally it should be done pandoc and only if it causes incorrect
> parsing of org markup. NBSP, probably, should be replaced by some
> exporters, I do not think, it is a problem e.g. in HTML files.
The reason for this filter is my own comfort. Linguistics texts contains
a lot of certain characters such as "/" or "*", and they are often
italicized or bold. So, in order not to be more confused than necessary,
I prefer that they pass as entities. In general, there are certain
characters that I am more comfortable working with as entities than as
literal characters (for example, a lot of zero-width combining
diacritics that are used a lot in linguistics or epigraphy (and there
are no fonts that include the NFC normalized version of all possible
combinations: in fact, they are not in Unicode, and would have to go to
the private use area). Summarizing, I prefer that these characters have
their actual typographic representation only with LuaTeX. A very typical
example is the character U+0323 (COMBINING DOT BELOW). It is very
uncomfortable to work /in situ/, although there are fonts that usually
render it well (with the 'mark' otf tag).
(Naturally, I have to do, inside Org, a lot of corrections in italics
later, due to the bad habit that Word users have of applying direct
formatting. Interestingly only the pandoc docx reader trims the emphasis
before exporting to Org or Markdown, so as not to produce things like
"/ foo /". But the odt reader doesn't. I don't know if I'm missing
something.
^ permalink raw reply [relevance 5%]
Results 801-1000 of ~1600 next (older) | prev (newer) | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-03-04 13:11 [RFC] Creole-style / Support for **emphasis**__within__**a word** Jambunathan K
2014-03-22 14:05 ` Nicolas Goaziou
2014-03-23 2:59 ` Jambunathan K
2022-01-24 10:50 ` [O] " Vincent Belaïche
2022-01-24 12:09 9% ` Juan Manuel Macías
2022-01-24 12:32 6% ` Vincent Belaïche
2022-01-25 10:55 ` Nicolas Goaziou
2022-01-25 17:18 3% ` Vincent Belaïche
2022-01-25 17:30 9% ` Juan Manuel Macías
2022-01-25 18:45 6% ` Vincent Belaïche
2022-01-25 18:20 5% ` Vincent Belaïche
2021-12-02 10:50 Org-syntax: Intra-word markup Denis Maier
2021-12-02 11:58 ` Timothy
2021-12-02 12:26 ` Denis Maier
2021-12-02 13:07 ` Ihor Radchenko
2021-12-02 19:03 ` Nicolas Goaziou
2021-12-03 14:24 ` Max Nikulin
2021-12-04 15:57 ` Denis Maier
2021-12-04 17:53 ` Tom Gillespie
2021-12-04 19:04 ` Timothy
2021-12-04 21:48 ` Tom Gillespie
2022-01-28 14:52 ` Max Nikulin
2022-01-29 3:13 ` Ihor Radchenko
2022-01-29 13:05 9% ` Juan Manuel Macías
2022-02-02 15:28 5% ` Max Nikulin
2022-02-02 20:01 9% ` Juan Manuel Macías
2022-02-03 12:10 4% ` Max Nikulin
2022-01-28 12:12 ` [PATCH] Intra-word markup: \relax Max Nikulin
2022-01-28 13:13 9% ` Juan Manuel Macías
2022-02-02 15:42 5% ` Max Nikulin
2022-01-04 10:14 A simple Lua filter for Pandoc Juan Manuel Macías
2022-01-04 14:05 ` Max Nikulin
2022-01-04 15:06 5% ` Juan Manuel Macías
2022-01-05 16:29 5% ` Max Nikulin
2022-01-05 17:08 9% ` Juan Manuel Macías
2022-01-07 14:29 5% ` Max Nikulin
2022-01-07 15:14 8% ` Juan Manuel Macías
2022-01-04 16:28 6% ` Thomas S. Dye
2022-01-05 2:09 Tool to compare and choose fonts Ypo
2022-01-05 10:16 10% ` Juan Manuel Macías
2022-01-06 17:00 Way to mark contents of an Org special block as verbatim? Kaushal Modi
2022-01-06 18:27 9% ` Juan Manuel Macías
2022-01-06 19:14 5% ` Kaushal Modi
2022-01-06 19:33 6% ` Juan Manuel Macías
2022-01-06 19:46 5% ` Kaushal Modi
2022-01-08 21:52 0% ` Berry, Charles
2022-01-07 0:41 9% Filter to put decorative initial letters Juan Manuel Macías
2022-01-11 0:43 6% ` William Denton
2022-01-11 16:21 10% ` Juan Manuel Macías
2022-01-08 11:32 9% [tip] Inline tasks as anonymous sections Juan Manuel Macías
2022-01-08 13:09 6% ` Marcin Borkowski
2022-01-09 7:13 6% ` Ihor Radchenko
2022-01-09 18:02 Org Syntax Specification Timothy
2022-01-15 12:40 ` Sébastien Miquel
2022-01-15 16:36 ` Depreciating TeX-style LaTeX fragments (was: Org Syntax Specification) Timothy
2022-01-16 8:08 ` Sébastien Miquel
2022-01-16 9:46 ` Depreciating TeX-style LaTeX fragments Colin Baxter 😺
2022-01-16 13:26 9% ` Juan Manuel Macías
2022-01-16 14:43 0% ` Colin Baxter 😺
2022-01-10 16:47 8% Preview fonts from Dired with org-latex-preview (and test opentype features) Juan Manuel Macías
2022-01-18 20:50 6% ` Ken Mankoff
2022-01-12 13:08 puzzled about :fit for LaTeX src block Eric S Fraga
2022-01-12 17:22 10% ` Juan Manuel Macías
2022-01-13 10:14 6% ` Eric S Fraga
2022-01-13 11:17 10% ` Juan Manuel Macías
2022-01-13 12:05 6% ` Eric S Fraga
2022-01-13 15:41 8% ` Juan Manuel Macías
2022-01-13 16:14 6% ` Eric S Fraga
2022-01-13 18:27 Playing down the text in org-mode fatiparty--- via General discussions about Org-mode.
2022-01-13 18:50 10% ` Juan Manuel Macías
2022-01-13 19:04 ` John Kitchin
2022-01-13 19:19 6% ` Juan Manuel Macías
[not found] ` <87bl0feahc.fsf@posteo.net-MtJnHBm----2>
2022-01-13 19:15 ` fatiparty--- via General discussions about Org-mode.
2022-01-13 19:42 5% ` Juan Manuel Macías
2022-01-13 19:53 ` fatiparty--- via General discussions about Org-mode.
2022-01-13 20:20 9% ` Juan Manuel Macías
[not found] ` <87iluncrr6.fsf@posteo.net-MtK5wx2----2>
2022-01-13 20:53 ` fatiparty--- via General discussions about Org-mode.
2022-01-13 21:39 10% ` Juan Manuel Macías
2022-01-14 9:41 6% ` Eric S Fraga
[not found] ` <874k66irh4.fsf@ucl.ac.uk-MtMyJM6----2>
2022-01-14 13:03 0% ` fatiparty--- via General discussions about Org-mode.
[not found] ` <87o84efnqk.fsf@ucl.ac.uk-MtNobqT----2>
2022-01-14 13:44 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 14:13 ` Eric S Fraga
2022-01-14 19:27 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 20:00 9% ` Juan Manuel Macías
2022-01-14 20:25 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 20:41 6% ` Juan Manuel Macías
2022-01-14 20:45 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 20:57 6% ` Juan Manuel Macías
[not found] ` <87zgnydp8d.fsf@posteo.net-MtPKW6j----2>
2022-01-14 21:00 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 21:16 6% ` Juan Manuel Macías
[not found] ` <87r19adnm9.fsf@posteo.net-MtPRzO3----2>
2022-01-14 22:01 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 22:23 6% ` Juan Manuel Macías
2022-01-14 22:31 ` fatiparty--- via General discussions about Org-mode.
2022-01-14 22:44 6% ` Juan Manuel Macías
[not found] ` <878rvjco35.fsf@posteo.net-MtKOBaG----2>
2022-01-13 22:45 ` fatiparty--- via General discussions about Org-mode.
2022-01-13 23:08 6% ` Juan Manuel Macías
2022-01-15 18:04 org-->html text between @ should be red Uwe Brauer
2022-01-15 18:21 10% ` Juan Manuel Macías
2022-01-15 19:39 0% ` Uwe Brauer
2022-01-15 19:59 10% ` Juan Manuel Macías
2022-01-15 20:24 0% ` Uwe Brauer
2022-01-15 20:58 9% ` Juan Manuel Macías
2022-01-15 21:01 0% ` Uwe Brauer
2022-01-16 16:42 9% [ann] org-font-spec-preview (preview fonts and test open type features) Juan Manuel Macías
2022-01-17 14:14 latex block tikz to svg Edouard Debry
2022-01-17 16:01 9% ` Juan Manuel Macías
2022-01-25 23:24 6% ` Edouard Debry
2022-04-18 13:23 4% ` Edouard Debry
2022-01-20 8:43 change the fontsize when exporting to HTML, header not really changed Uwe Brauer
2022-01-20 11:48 10% ` Juan Manuel Macías
2022-01-20 16:14 1% ` Uwe Brauer
2022-01-20 17:56 10% ` Juan Manuel Macías
2022-01-21 17:21 0% ` Uwe Brauer
2022-01-20 14:33 Exporting Org file to Html with collapsable headings ZIPING CHEN
2022-01-21 12:23 10% ` Juan Manuel Macías
2022-01-21 16:46 6% ` Max Nikulin
2022-01-22 18:20 0% ` xincheng99
2022-01-24 15:59 Missing the second '}' Sharon Kimble
2022-01-24 16:46 9% ` Juan Manuel Macías
2022-01-28 17:41 date format in agenda view Uwe Brauer
2022-01-28 17:57 10% ` Juan Manuel Macías
2022-01-28 18:05 0% ` Uwe Brauer
2022-01-30 12:32 9% A callygraphy notebook environment Juan Manuel Macías
2022-01-30 20:37 1% ` Uwe Brauer
2022-01-30 21:23 9% ` Juan Manuel Macías
2022-01-31 13:55 0% ` Uwe Brauer
2022-02-11 20:37 8% [PATCH] org-manual.org: update and add info for arbitrary :float values Juan Manuel Macías
2022-02-13 21:18 6% ` Nicolas Goaziou
2022-02-13 22:21 10% ` Juan Manuel Macías
2022-02-15 13:24 6% ` Nicolas Goaziou
2022-02-16 19:52 8% ` [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures (was: update and add info for arbitrary :float values) Juan Manuel Macías
2022-02-22 19:14 6% ` [PATCH] ox-latex.el: Add a `t' value for `:float' in tables and figures Nicolas Goaziou
2022-02-12 20:12 Bug with exporting list with link item containing "::" to markdown Cash Weaver
2022-02-23 16:59 5% ` Max Nikulin
2022-02-15 10:23 Root heading when exporting sub-trees Michael Dauer
2022-02-15 12:36 10% ` Juan Manuel Macías
2022-02-15 20:48 table format during html export Leo Butler
2022-02-15 22:16 10% ` Juan Manuel Macías
2022-02-16 15:57 6% ` Leo Butler
2022-02-17 14:56 Question Regarding Creating HTML Style Buttons With Org Mode Samuel Banya
2022-02-17 22:10 10% ` Juan Manuel Macías
2022-02-18 19:59 6% ` Samuel Banya
2022-02-18 20:04 0% ` Samuel Banya
2022-02-18 20:38 10% ` Juan Manuel Macías
2022-02-18 20:51 12% ` Juan Manuel Macías
2022-02-19 1:02 6% ` Samuel Banya
2022-02-19 9:41 8% ` Juan Manuel Macías
2022-02-19 9:51 12% ` Juan Manuel Macías
2022-02-21 0:38 6% ` Samuel Banya
2022-02-23 2:25 1% ` Samuel Banya
2022-02-23 2:33 10% ` Juan Manuel Macías
2022-02-18 0:47 8% Pandoc and nested emhases Juan Manuel Macías
2022-02-18 12:06 4% ` Max Nikulin
2022-02-18 12:31 10% ` Juan Manuel Macías
2022-02-24 12:50 5% ` Max Nikulin
2022-02-22 4:32 9% Footnote tooltips (an attempt) Juan Manuel Macías
2022-02-22 22:15 11% ` Juan Manuel Macías
2022-02-22 16:04 8% Open a footnote definition outside a narrowed subtree (workaround) Juan Manuel Macías
2022-02-22 16:45 6% ` Nicolas Goaziou
2022-02-22 17:34 10% ` Juan Manuel Macías
[not found] <mailman.57.1645549224.6185.emacs-orgmode@gnu.org>
2022-02-22 22:30 ` Footnote tooltips (an attempt) Ypo
2022-02-23 2:26 9% ` Juan Manuel Macías
[not found] ` <CAJcAo8tsK5o+789Wv=i6ddiSrM4fDyX8HCvjAgDLXGyLXWRWmQ@mail.gmail.com>
2022-02-23 19:52 9% ` Juan Manuel Macías
2022-02-23 22:05 4% ` John Kitchin
2022-02-24 2:04 8% ` Juan Manuel Macías
2022-02-24 13:01 6% ` John Kitchin
2022-02-24 16:25 10% ` Juan Manuel Macías
2022-02-24 19:12 ConTeXt exporter makes me happy juh
2022-02-24 19:58 9% ` Juan Manuel Macías
2022-02-26 14:33 including one double quote in an anonymous footnote? Greg Minshall
2022-02-26 14:47 10% ` Juan Manuel Macías
2022-02-26 15:00 ` Greg Minshall
2022-02-26 19:20 9% ` Juan Manuel Macías
2022-02-28 14:47 6% ` Nicolas Goaziou
2022-02-28 18:36 ` Greg Minshall
2022-02-28 20:57 10% ` Juan Manuel Macías
2022-03-05 15:40 Filter for HTML footnotes? M. ‘quintus’ Gülker
2022-03-06 4:03 9% ` Juan Manuel Macías
2022-03-08 7:40 5% ` Filter for HTML (cite) footnotes? M. ‘quintus’ Gülker
2022-03-08 10:14 10% ` Juan Manuel Macías
2022-03-05 19:58 9% Move or rename a file in a link Juan Manuel Macías
2022-03-06 8:09 3% ` Uwe Brauer
2022-03-09 20:30 6% ` João Pedro de Amorim Paula
2022-03-10 14:58 10% ` Juan Manuel Macías
2022-03-18 18:52 6% ` João Pedro de Amorim Paula
2022-03-19 11:25 8% ` Juan Manuel Macías
2022-03-22 15:30 5% ` João Pedro de Amorim Paula
2022-03-07 15:18 interleaving comment between rows of a table? Greg Minshall
2022-03-07 15:54 10% ` Juan Manuel Macías
2022-03-11 22:24 10% helm-org-names: browse the names of code blocks, tables and figures Juan Manuel Macías
2022-03-13 10:54 Code blocks and quotes export style Sébastien Gendre
2022-03-13 16:06 ` Kaushal Modi
2022-03-13 18:39 7% ` Juan Manuel Macías
2022-03-14 12:50 6% ` Max Nikulin
2022-03-14 18:09 10% ` Juan Manuel Macías
2022-03-15 3:28 LaTeX export of a file with some accented characters Vikas Rawal
2022-03-15 20:23 10% ` Juan Manuel Macías
2022-03-16 11:23 leading superscript on a line for ODT export Eric S Fraga
2022-03-16 12:03 10% ` Juan Manuel Macías
2022-03-16 12:46 6% ` Eric S Fraga
2022-03-16 13:12 10% ` Juan Manuel Macías
2022-03-16 13:42 6% ` Eric S Fraga
2022-03-16 13:46 ` Max Nikulin
2022-03-16 14:07 10% ` Juan Manuel Macías
2022-03-17 22:44 7% Org and multimedia (tips?) Juan Manuel Macías
2022-03-18 14:40 6% ` Max Nikulin
2022-03-19 11:13 10% ` Juan Manuel Macías
2022-05-05 1:14 5% ` TRS-80
2022-04-01 23:22 TOC and latex memoir class Steve Downey
2022-04-02 7:21 10% ` Juan Manuel Macías
2022-04-03 9:18 when exporting latex how to set with in the includegraphics command Uwe Brauer
2022-04-03 10:19 10% ` Juan Manuel Macías
2022-04-03 15:09 3% ` Uwe Brauer
2022-04-05 10:18 [BUG] Exporting italic link with bang inside to html fails to parse the link [9.5.2 (N/A @ /gnu/store/89yvbijwnvsbpa5h33mvbgh1gy9w30n2-emacs-org-9.5.2/share/emacs/site-lisp/org-9.5.2/)] Dr. Arne Babenhauserheide
2022-04-30 9:37 ` Ihor Radchenko
2022-04-30 11:47 5% ` Max Nikulin
2022-04-10 8:49 9% Save Gnus attachments to Org using org-attach and helm-org-ql Juan Manuel Macías
2022-04-12 0:46 4% #+latex_header blocks, or, managing lots of LaTeX headers William Denton
2022-04-12 2:51 0% ` Vikas Rawal
2022-04-12 6:16 0% ` Tim Cross
2022-04-12 8:55 8% ` Juan Manuel Macías
2022-04-16 5:17 [PATCH] org-element-export-snippet-parser: Fix snippets without ending @@ Ihor Radchenko
2022-04-16 10:46 10% ` Juan Manuel Macías
2022-04-26 14:00 9% [tip] Org speed commands improved Juan Manuel Macías
2022-04-27 4:20 6% ` Ihor Radchenko
2022-04-27 5:37 0% ` Tim Cross
2022-04-27 7:08 9% ` Juan Manuel Macías
2022-05-04 22:12 6% ` TRS-80
2022-04-27 16:30 6% ` Daniel Fleischer
2022-04-29 15:03 7% Org as a workspace (an impromptu reflection) Juan Manuel Macías
2022-04-29 23:46 6% ` Matt
2022-05-02 19:17 6% ` Nick Dokos
2022-05-03 23:41 10% ` Juan Manuel Macías
2022-04-30 11:25 9% [PATCH] speed commands: error message when a key is not associated with a command Juan Manuel Macías
2022-04-30 13:06 6% ` Ihor Radchenko
2022-04-30 14:41 8% ` Juan Manuel Macías
2022-04-30 19:39 8% ` Juan Manuel Macías
2022-05-01 4:01 5% ` Ihor Radchenko
2022-05-01 11:00 9% ` Juan Manuel Macías
2022-05-02 3:31 6% ` Ihor Radchenko
2022-05-03 23:08 8% ` Juan Manuel Macías
2022-05-07 14:31 8% [PATCH] org-attach: Attach current Gnus article parts Juan Manuel Macías
2022-05-08 12:30 5% ` Ihor Radchenko
2022-05-08 13:23 9% ` Juan Manuel Macías
2022-05-08 14:18 5% ` Ihor Radchenko
2022-05-08 18:06 10% ` Juan Manuel Macías
2022-05-07 23:43 Export LaTeX command inside figure environment Thomas S. Dye
2022-05-08 0:30 10% ` Juan Manuel Macías
2022-05-08 0:57 7% ` Thomas S. Dye
2022-05-08 5:08 5% ` Max Nikulin
2022-05-08 6:06 0% ` Thomas S. Dye
2022-05-08 16:12 8% ` Juan Manuel Macías
2022-05-08 22:22 8% [tip] Insert arbitrary LaTeX code at the beginning of any float environment Juan Manuel Macías
2022-05-09 12:47 6% ` Ihor Radchenko
2022-05-09 14:01 10% ` Juan Manuel Macías
2022-05-09 14:14 6% ` Eric S Fraga
2022-05-10 10:32 7% A function that converts a LaTeX document to an Elisp expression (for org-latex-classes) Juan Manuel Macías
2022-05-12 7:13 export to latex: begin_example gets exported to verbatim ( Uwe Brauer
2022-05-12 7:31 ` Eric S Fraga
2022-05-12 8:05 ` Uwe Brauer
2022-05-12 8:52 10% ` Juan Manuel Macías
2022-05-12 10:02 0% ` Uwe Brauer
2022-05-12 10:44 9% citation-style-language: new LaTeX package in TL 2022 Juan Manuel Macías
2022-05-12 11:34 6% ` Bruce D'Arcus
2022-05-13 16:37 simple request letter - help Andrés Ramírez
2022-05-13 17:04 10% ` Juan Manuel Macías
2022-05-13 17:19 2% ` andrés ramírez
2022-05-13 18:22 8% ` Juan Manuel Macías
2022-05-13 19:06 3% ` andrés ramírez
2022-05-13 20:30 9% ` Juan Manuel Macías
2022-05-14 19:58 I can't set dabbrev to respect the writen case Ypo
2022-05-14 22:32 10% ` Juan Manuel Macías
2022-05-15 10:40 7% ` Ypo
2022-05-15 13:58 10% ` Juan Manuel Macías
2022-05-15 11:54 9% [tip] Export and open a PDF in Android via Termux Juan Manuel Macías
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).