Re: Latex Export

2024-10-09 Thread Orm Finnendahl
Hi Arne,

Am Mittwoch, den 09. Oktober 2024 um 17:48:09 Uhr (+0200) schrieb
Dr. Arne Babenhauserheide:
> #+options: num:t

Ah, that was it, thx!

--
Orm


signature.asc
Description: PGP signature


Re: Latex Export

2024-10-09 Thread Dr. Arne Babenhauserheide
Orm Finnendahl  writes:

>  when exporting to Latex, all parts/chapters/sections/... get an
> asterisk added to the latex command, like \part*{...}, \chapter*{...},
> etc.
This should only happen with

#+options: num:nil
…
> - Is there another way to accomplish rendering a full toc with
>   org-export to latex?

#+options: num:t

If you want both HTML and LaTeX export to look good, you can use

#+MACRO: if-latex-else (eval (if (org-export-derived-backend-p 
org-export-current-backend 'latex) "#+OPTIONS: num:t" "#+OPTIONS: num:nil"))
{{{if-latex-else}}}

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de


signature.asc
Description: PGP signature


Re: [BUG] Can't export variable named "nil" to Texinfo

2024-10-09 Thread 8dcc
Ihor Radchenko  writes:

> It happens to be that :options nil is treated specially by Org
> export. "nil" is not read literally, but is instead interpreted as
> removing the option value - when one needs to combine multiple
> attributes and override previous setting.

I see. I didn't know about "combining attributes", but I guess that
makes sense.

> In theory, we may fix this edge case just for ox-texinfo. But is it
> worth it?

I am not sure if it's worth fixing, specially since I don't know any
possible alternatives apart from using another keyword for specifying
this "attribute combination" (again, not sure how that works). Either
way, modifying existing behavior doesn't sound too good to me, specially
considering the amount of "nil" variables :)

> Do you _really_ have variable name "nil"?

Yes, I was not looking for this error, I didn't even know why it
happened before you told me. I am using Org to write the manual for my
Lisp interpreter, and I am exporting it to Texinfo. I wanted to explain
how `nil' works, and when it's used.


signature.asc
Description: PGP signature


Re: Logos of BibTeX, etc.

2024-10-09 Thread Raghavendra Nyshadham
Hi Divya,

Thanks for pointing that out. So the logos are correctly typeset with
these settings:

(add-to-list 'org-latex-packages-alist '("" "hologo" nil))

(defun my-latex-format-logos (text backend info)
  "Typeset \"BibTeX\", \"XeTeX\", etc., as logos in LaTeX export."
  (when (org-export-derived-backend-p backend 'latex)
(dolist (name '("BibTeX" "LaTeX2e" "LaTeX3" "LuaLaTeX" "LuaTeX"
"XeLaTeX" "XeTeX") text)
  (setq text (string-replace name (format "\\hologo{%s}" name) text)

(add-to-list 'org-export-filter-plain-text-
functions #'my-latex-format-logos)


I didn't realise that there is no logo for biblatex; it is written
simply as biblatex in its manual.

Cheers,
Raghavendra.

On Wed, Oct 9, 2024 at 8:51 PM Divya  wrote:
>
> On 9 October 2024 12:08:26 GMT, Raghavendra Nyshadham  
> wrote:
>>
>> How do I get the logos of BibTeX, BibLaTeX, XeTeX, XeLaTeX, etc., when
>> I export an Org document to LaTeX?
>>
>> At the moment, when I export an Org file with the content
>> 
>> LaTeX, BibTeX, BibLaTeX, XeTeX, and XeLaTeX are some associates of TeX.
>> 
>> using the command C-c C-e l p, I get the correct logos for LaTeX and
>> TeX, but BibTeX, BibLaTeX, XeTeX, and XeLaTeX are rendered as they
>> are, i.e., not as logos.
>>
>> I am using the builtin Org mode version 9.6.6 in Emacs version 29.1 on
>> NixOS version 23.05.
>>
>> Thank you.
>>
>> Raghavendra.
>>
>
> Hello Raghavendra,
>
> This is not an Org specific issue, it has to do with what LaTeX class you are 
> using. If you try to render logos for the aforementioned Tex derivatives in 
> vanilla LaTeX with the article/book class then you won't get them rendered.
>
> For a discussion on this, see the following exchanges:
>
> https://tex.stackexchange.com/questions/281333/how-do-i-get-a-bibtex-logo#281337
>
> https://tex.stackexchange.com/questions/11095/how-to-write-latex-with-parentheses-or-any-other-tex-related-logo
>
> Regards,
>
> Divya Ranjan,
> Mathematics, Philosophy and Libre Software



Re: Logos of BibTeX, etc.

2024-10-09 Thread Divya
On 9 October 2024 12:08:26 GMT, Raghavendra Nyshadham  
wrote:
>How do I get the logos of BibTeX, BibLaTeX, XeTeX, XeLaTeX, etc., when
>I export an Org document to LaTeX?
>
>At the moment, when I export an Org file with the content
>
>LaTeX, BibTeX, BibLaTeX, XeTeX, and XeLaTeX are some associates of TeX.
>
>using the command C-c C-e l p, I get the correct logos for LaTeX and
>TeX, but BibTeX, BibLaTeX, XeTeX, and XeLaTeX are rendered as they
>are, i.e., not as logos.
>
>I am using the builtin Org mode version 9.6.6 in Emacs version 29.1 on
>NixOS version 23.05.
>
>Thank you.
>
>Raghavendra.
>

Hello Raghavendra,

This is not an Org specific issue, it has to do with what LaTeX class you are 
using. If you try to render logos for the aforementioned Tex derivatives in 
vanilla LaTeX with the article/book class then you won't get them rendered.

For a discussion on this, see the following exchanges:

https://tex.stackexchange.com/questions/281333/how-do-i-get-a-bibtex-logo#281337

https://tex.stackexchange.com/questions/11095/how-to-write-latex-with-parentheses-or-any-other-tex-related-logo

Regards,

Divya Ranjan,
Mathematics, Philosophy and Libre Software

Re: [BUG] Can't export variable named "nil" to Texinfo

2024-10-09 Thread Ihor Radchenko
8dcc <8dcc@gmail.com> writes:

> However, if the variable is named "nil" (without the quotes), the
> variable name is not exported, and a warning is generated when
> processing the .texi file:
>
>   - Variable: nil ::
>
> Content...
>
> Results in:
>
>   @defvar
>   Content@dots{}
>   @end defvar

Confirmed.
Although, I am not sure if this is worth fixing.

The reason why you observe this behavior is in implementation detail in
ox-texinfo - `org-texinfo--split-definition' parses description lists,
replacing them with

#+attr_texinfo: :options name
#+begin_defvar
...
#+end_defvar

block, and it happens to be that :options nil is treated specially by
Org export (See `org-texinfo-special-block' calling
`org-export-read-attribute')). "nil" is not read literally, but is
instead interpreted as removing the option value - when one needs to
combine multiple attributes and override previous setting.

In theory, we may fix this edge case just for ox-texinfo. But is it
worth it? Do you _really_ have variable name "nil"?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[BUG] Texinfo: Commas in URL text are not escaped

2024-10-09 Thread 8dcc
Hello,

The following Org file:

  [[https://example.com][Foo]]

  [[https://example.com][Foo, Bar]]

When exported to Texinfo using `org-texinfo-export-to-texinfo',
generates the following file:

  ...
  @uref{https://example.com, Foo}

  @uref{https://example.com, Foo, Bar}
  ...

The comma on the text of the second URL is being interpreted by Texinfo
as an argument separator, which in the case of `@uref', only the third
argument is displayed, hiding the second argument and the actual URL
when exporting the file.


Therefore, it should be escaped to `@comma{}', according to the Texinfo
manual[1]:

  ...
  @uref{https://example.com, Foo}

  @uref{https://example.com, Foo@comma{} Bar}
  ...

This produces the expected output.


[1] Section 11.1.3, Inserting `,' with `@comma{}'.

https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Inserting-a-Comma.html


signature.asc
Description: PGP signature


Logos of BibTeX, etc.

2024-10-09 Thread Raghavendra Nyshadham
How do I get the logos of BibTeX, BibLaTeX, XeTeX, XeLaTeX, etc., when
I export an Org document to LaTeX?

At the moment, when I export an Org file with the content

LaTeX, BibTeX, BibLaTeX, XeTeX, and XeLaTeX are some associates of TeX.

using the command C-c C-e l p, I get the correct logos for LaTeX and
TeX, but BibTeX, BibLaTeX, XeTeX, and XeLaTeX are rendered as they
are, i.e., not as logos.

I am using the builtin Org mode version 9.6.6 in Emacs version 29.1 on
NixOS version 23.05.

Thank you.

Raghavendra.



Latex Export

2024-10-09 Thread Orm Finnendahl
Hi,

 when exporting to Latex, all parts/chapters/sections/... get an
asterisk added to the latex command, like \part*{...}, \chapter*{...},
etc.

Rendering to pdf works, but no toc is generated for the file. If
removing the asterisk it works with generating the toc.

It wasn't like that before (I don't know when it changed), so my
questions:

- Is something wrong with my setup?

- Is there a straightforward way to reset to exporting without
  asterisk?

- Is there another way to accomplish rendering a full toc with
  org-export to latex?

--
Orm



Re: [BUG] BBDB anniversary entries with a format-string produce error [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.4/lisp/org/)]

2024-10-09 Thread Alexander Lazarević
There seems to be no problem when I change the entry from

%%(org-bbdb-anniversaries-future 3)

to

%%(org-bbdb-anniversaries)

On Tue, 8 Oct 2024 at 02:58, Alexander Lazarević 
wrote:

> In one agenda (personal.org) I have the following entry:
>
> * Anniversaries
> :PROPERTIES:
> #+CATEGORY: Ann
> :END:
> %%(org-bbdb-anniversaries-future 3)
>
> This works for BBDB entries that have an anniversary like "1973-06-22"
> or "2021-04-91 wedding", but it fails for something like "1998-03-12 %s
> created bbdb-anniv.el %d years ago" (from the examples in ol-bbdb.el).
>
> The error message is like:
>
> Bad sexp at line 5 in /home/laza/exobrain/org/personal/personal.org: (let
> ((entry ) (date '(12 3 1998))) (org-bbdb-anniversaries-future 3))
>
> Emacs  : GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version
> 3.24.43, cairo version 1.18.0)
> Package: Org mode version 9.6.15 (release_9.6.15 @
> /usr/share/emacs/29.4/lisp/org/)
>
> current state:
> ==
> (setq
>  org-archive-location "~/org/archive/%s_archive::"
>  org-link-elisp-confirm-function 'yes-or-no-p
>  org-directory "~/org"
>  org-global-properties '(("Effort_ALL" . "0 0:10 0:30 1:00 2:00 3:00 4:00
> 5:00 6:00 7:00"))
>  org-ditaa-jar-path "/usr/share/java/ditaa/ditaa.jar"
>  org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
> "\n\n(fn ENTRY)"]
>  org-log-into-drawer t
>  org-startup-folded t
>  org-agenda-files "~/org/agendas"
>  org-persist-after-read-hook '(org-element--cache-persist-after-read)
>  org-bbdb-anniversary-format-alist '(("birthday" lambda (name years suffix)
>  (concat "Birthday: [[bbdb:" name "][" name " ("
>   (format "%s" years) suffix ")]]")
>  )
> ("wedding" lambda (name years suffix)
>  (concat "[[bbdb:" name "][" name "'s "
>   (format "%s" years) suffix " wedding anniversary]]")
>  )
> ("dayofdeath" lambda (name years suffix)
>  (concat "Day of death: [[bbdb:" name "][" name " ("
>   (format "%s" years) suffix ")]]")
>  )
> )
>  org-refile-targets '((org-agenda-files :maxlevel . 9))
>  org-export-before-parsing-hook '(org-attach-expand-links)
>  org-cycle-tab-first-hook '(org-babel-hide-result-toggle-maybe
> org-babel-header-arg-expand)
>  org-default-notes-file "~/org/notes.org"
>  org-archive-hook '(org-attach-archive-delete-maybe)
>  org-file-apps '((auto-mode . emacs) (directory . emacs) ("\\.mm\\'" .
> default)
> ("\\.x?html?\\'" . default) ("\\.pdf\\'" . "evince %s"))
>  org-columns-default-format "%40ITEM(Task) %17Effort(Estimated Effort){:}
> %CLOCKSUM"
>  org-odt-format-inlinetask-function
> 'org-odt-format-inlinetask-default-function
>  org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME
> CONTENTS WIDTH)"]
>  org-cycle-hook '(org-cycle-hide-archived-subtrees
> org-cycle-show-empty-lines
>  org-cycle-optimize-window-after-visibility-change
>  org-cycle-display-inline-images)
>  org-persist-before-read-hook '(org-element--cache-persist-before-read)
>  org-modules '(ol-bbdb ol-bibtex ol-docview ol-doi ol-eww ol-gnus
> org-habit ol-info ol-irc
>   ol-mhe ol-rmail ol-w3m)
>  org-mode-hook '(org-clock-load
> #[0 "\300\301\302\303\304$\207"
>   [add-hook change-major-mode-hook org-fold-show-all append local] 5]
> #[0 "\300\301\302\303\304$\207"
>   [add-hook change-major-mode-hook org-babel-show-result-all append local]
>   5]
> org-babel-result-hide-spec org-babel-hide-all-hashes
> #[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2])
>  org-babel-load-languages '((emacs-lisp . t) (calc . t) (shell . t)
> (python . t) (dot . t)
>(ditaa . t) (latex . t) (gnuplot . t) (plantuml . t))
>  org-agenda-span 15
>  org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
>  org-latex-format-headline-function
> 'org-latex-format-headline-default-function
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME
> CONTENTS)"]
>  outline-isearch-open-invisible-function 'outline-isearch-open-invisible
>  org-habit-graph-column 60
>  org-export-before-processing-hook
> '(org-blackfriday--reset-org-blackfriday--code-block-num-backticks)
>  org-fold-catch-invisible-edits 'error
>  org-plantuml-jar-path "/usr/share/java/plantuml/plantuml.jar"
>  org-odt-format-headline-function 'org-odt-format-headline-default-function
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-tangle-lang-exts '(("latex" . "tex") ("python" . "py")
> ("emacs-lisp" . "el")
>  ("elisp" . "el"))
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-clock-idle-time 15
>  org-speed-command-hook '(org-speed-command-activate
> org-babel-speed-command-activate)
>  org-html-format-inlinetask-function
> 'org-html-format-inlinetask-default-function
>  org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
>  org-odt-format-drawer-function #[514