[BUG] Citations: exporting with csl crashes [9.5 (9.5-g0a86ad @ /home/quintus/.emacs.d/elpa/org-9.5/)]

2021-10-03 Thread Marvin Gülker


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Hi there,

I've been trying to use the new citation facilities in the just-released
9.5 version of org for a simple test document with my preferred CSL
style (the one usually used in German law discipline in one way or
another), but did not have luck with it so far. That being said,
exporting with the default "bare" citation processor appears to be fine.
With the "csl" processor, I receive this error when I export to LaTeX
with `org-latex-export-as-latex':

Debugger entered--Lisp error: (wrong-type-argument sequencep splice)
  citeproc-rt--cquote-pstns-1(splice 15)
  citeproc-rt--cquote-pstns-1((nil (nil (nil (((font-style . "italic")) 
(((rendered-var . author) (rendered-names)) ((...) (nil "Goldsmith")) "/" 
((...) (nil "Wu") ", ") splice (nil ", " (((rendered-var . locator)) #("83" 
0 2 (:parent (citation-reference (:key "goldsmith-wu2008netctrl" :begin 162 
:end 192 :post-blank 0 :suffix ... :parent ...))) 1)
  citeproc-rt--cquote-pstns((nil (nil (nil (((font-style . "italic")) 
(((rendered-var . author) (rendered-names)) ((...) (nil "Goldsmith")) "/" 
((...) (nil "Wu") ", ") splice (nil ", " (((rendered-var . locator)) #("83" 
0 2 (:parent (citation-reference (:key "goldsmith-wu2008netctrl" :begin 162 
:end 192 :post-blank 0 :suffix ... :parent ...
  citeproc-rt-punct-in-quote((nil (nil (nil (((font-style . "italic")) 
(((rendered-var . author) (rendered-names)) ((...) (nil "Goldsmith")) "/" 
((...) (nil "Wu") ", ") splice (nil ", " (((rendered-var . locator)) #("83" 
0 2 (:parent (citation-reference (:key "goldsmith-wu2008netctrl" :begin 162 
:end 192 :post-blank 0 :suffix ... :parent ...
  citeproc-rt-finalize((nil (nil (nil (((font-style . "italic")) 
(((rendered-var . author) (rendered-names)) ((...) (nil "Goldsmith")) "/" 
((...) (nil "Wu") ", ") splice (nil ", " (((rendered-var . locator)) #("83" 
0 2 (:parent (citation-reference (:key "goldsmith-wu2008netctrl" :begin 162 
:end 192 :post-blank 0 :suffix ... :parent ...))) t)
  citeproc-citation--render(#s(citeproc-citation :cites ((... ... ... ... 
... ... ... ...)) :note-index nil :mode nil :suppress-affixes nil 
:capitalize-first nil :ignore-et-al nil :grouped nil) #s(citeproc-proc :style 
#s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... ...) 
:opts (... ... ... ... ...) :bib-opts (... ... ...) :bib-sort (lambda ... ...) 
:bib-sort-orders (t t) :bib-layout (lambda ... ...) :cite-opts (... ... ...) 
:cite-note t :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... ...) 
:cite-layout-attrs (...) :locale-opts (... ...) :macros (... ... ... ... ... 
... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... ... 
... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil 
:date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter 
#f(compiled-function (itemids) #) :itemdata 
# :citations #s(queue :head (...) :tail 
(...)) :names # :finalized t) t)
  citeproc-citation--render-formatted-citation(#s(citeproc-citation :cites 
((... ... ... ... ... ... ... ...)) :note-index nil :mode nil :suppress-affixes 
nil :capitalize-first nil :ignore-et-al nil :grouped nil) #s(citeproc-proc 
:style #s(citeproc-style :info (... ... ... ... ... ... ... ... ... ... ... ... 
...) :opts (... ... ... ... ...) :bib-opts (... ... ...) :bib-sort (lambda ... 
...) :bib-sort-orders (t t) :bib-layout (lambda ... ...) :cite-opts (... ... 
...) :cite-note t :cite-sort nil :cite-sort-orders nil :cite-layout (lambda ... 
...) :cite-layout-attrs (...) :locale-opts (... ...) :macros (... ... ... ... 
... ... ... ... ...) :terms (... ... ... ... ... ... ... ... ... ... ... ... 
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) :uses-ys-var nil 
:date-text (... ... ... ...) :date-numeric (... ... ... ...)) :getter 
#f(compiled-function (itemids) #) :itemdata 
# :citations #s(queue :head (...) :tail 
(...)) :names # :finalized t) latex t)
  #f(compiled-function (it) #)(#s(citeproc-citation :cites (((position . first) (itd . 
#s(citeproc-itemdata :varvals ((citation-number . "1") (label . "page") 
(publisher-place . "New York") (publisher . "Oxford University Press") (title . 
"Who Controls the Internet?") (issued ...) (type . "book") (author ... ...) 
(ISBN . "978-0-19-534064-8")) :rawcite nil :rc-uptodate nil :sort-key 
("Goldsmith, Jack/ Wu, Tim" "7008") :occurred-before t :disamb-pos first)) 
(id . "goldsmith-wu2008netctrl") (prefix) (suffix) (locator . #("83" 0 2 
(:parent (citation-reference ... (label . "page") (location . #("p. 83" 0 5 
(:parent (citation-reference ...)) :note-index

[BUG] Elisp error when exporting citation [9.5 (release_9.5-104-g2b1fc6 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-10-29 Thread Marvin Gülker
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Dear all,

trying to export the following org-document results in an Elisp error:

#+TITLE: Test
#+AUTHOR: Testauthor
#+LANGUAGE: de
#+bibliography: /tmp/mwe/mwe.bib
#+cite_export: csl /tmp/mwe/juristische-schulung.csl

Test [cite:raubenheimer1996dongle p. 76; /Dreier/, in: @ds2018urhg § 69d 
Rn. 10]

In case you wonder why there's a name in the prefix for @ds2018urhg:
another speciality of German judicial citations. We have a special kind
of literature called commentaries. In these, a specific law's articles
are explained one by one, where different authors comment on different
articles. In the above example, Mr. Dreier comments § 69d of the German
Copyright Act (UrhG). Still, the entire commentary is to be cited as one
work. Each footnote is prefixed with the (typically italicised) name of
the person commenting the specific article, resulting in the above cite
command.

The exported footnote should have looked like this:

Raubenheimer, CR 1996, 69, 76; Dreier, in: Dreier/Schulze (Hrsg.), UrhG, 6. 
Aufl. 2018

This is mwe.bib:

@Article{raubenheimer1996dongle,
author   = {Andreas Raubenheimer},
title= {Beseitigung/Umgehung eines technischen Programmschutzes 
nach UrhG und UWG},
journaltitle = {Computer und Recht},
shortjournal = {CR},
year  = {1996},
pages = {69-79},
langid= {german}}

@commentary{ds2018urhg,
title = "Urheberrechtsgesetz",
shorttitle = "UrhG",
editor = "Thomas Dreier and Gernot Schulze",
edition = "6",
year = "2018",
publisher = "C.H. Beck",
location = "München"
}

juristische-schulung.csl is 
https://github.com/citation-style-language/styles/raw/e22b8a566bad9b4c7f52720f60dd875057a5d210/juristische-schulung.csl

I use Org mode version 9.5 (release_9.5-104-g2b1fc6 @ 
/home/quintus/.emacs.d/org-mode/lisp/).
Citeproc.el is at 34e66583d95a8d80fb5b9f2960f3382ca0e6d3ab.

The following error is produced when exporting to HTML (C-c C-e h o):

Debugger entered--Lisp error: (wrong-type-argument plistp (prefix . 
#("Dreier, in:" 3 9 (:parent (italic (:begin 179 :end 187 
:contents-begin 180 :contents-end 186 :post-blank 0 :parent (citation-reference 
(:key "ds2018urhg" :begin 178 :end 217 :post-blank 0 :prefix ... :suffix ... 
:parent ...))) #("Dreier" 0 6 (:parent #7 13 18 (:parent 
(citation-reference (:key "ds2018urhg" :begin 178 :end 217 :post-blank 0 
:prefix (#(" " 0 1 ...) (italic ... ...) #(", in: " 0 6 ...)) :suffix (#(" § 
69d Rn. 10" 0 13 ...)) :parent (citation (:style nil :begin 143 :post-blank 0 
:end 218 :prefix ... :contents-begin 178 :contents-end 217 :parent ...) 
#7)))
  plist-put((prefix . #("Dreier, in:" 3 9 (:parent (italic (:begin 
179 :end 187 :contents-begin 180 :contents-end 186 :post-blank 0 :parent 
(citation-reference (:key "ds2018urhg" :begin 178 :end 217 :post-blank 0 
:prefix ... :suffix ... :parent ...))) #("Dreier" 0 6 (:parent #5 13 18 
(:parent (citation-reference (:key "ds2018urhg" :begin 178 :end 217 :post-blank 
0 :prefix (#(" " 0 1 ...) (italic ... ...) #(", in: " 0 6 ...)) :suffix (#(" § 
69d Rn. 10" 0 13 ...)) :parent (citation (:style nil :begin 143 :post-blank 0 
:end 218 :prefix ... :contents-begin 178 :contents-end 217 :parent ...) 
#5)) :prefix (#("raubenheimer1996dongle p. 76" 0 28 (:parent (citation 
(:style nil :begin 143 :post-blank 0 :end 218 :prefix (#4) :contents-begin 178 
:contents-end 217 :parent (paragraph (:begin 138 :end 219 :contents-begin 138 
:contents-end 219 :post-blank 0 :post-affiliated 138 :parent ...) #("Test " 0 5 
...) #7 #("\n" 0 1 ...))) (citation-reference (:key "ds2018urhg" :begin 178 
:end 217 :post-blank 0 :prefix (... ... ...) :suffix (...) :parent #7)))
  (setcar (cdr element) (plist-put (nth 1 element) property value))
  (if (stringp element) (org-add-props element nil property value) (setcar 
(cdr element) (plist-put (nth 1 element) property value)) element)
  org-element-put-property(((id . "ds2018urhg") (prefix . #("Dreier, 
in:" 3 9 (:parent (italic (:begin 179 :end 187 :contents-begin 180 
:contents-end 186 :post-blank 0 :parent (citation-reference ...)) #("Dreier" 0 
6 (:parent #7 13 18 (:parent (citation-reference (:key "ds2018urhg" :begin 
178 :end 217 :post-blank 0 :prefix (... ... ...) :suffix (...) :parent 
(citation ... #7)) (suffix) (locator . #("69d Rn. 10" 0 10 (:parent 
(citation-reference (:key "ds2018urhg" :begin 178 :end 217 :post-blank 0 
:prefix (... ... ...) :suffix (...) :parent (citation ... #9)) (label . 
"section") (location . #(" § 69d Rn. 10" 0 13 (:parent (citation-reference 
(:key "ds2018ur

Re: [BUG] Elisp error when exporting citation [9.5 (release_9.5-104-g2b1fc6 @ /home/quintus/.emacs.d/org-mode/lisp/)]

2021-10-30 Thread Marvin Gülker
Am Samstag, dem 30. Oktober 2021 schrieb Marvin Gülker:
> trying to export the following org-document results in an Elisp error:
>
> #+TITLE: Test
> #+AUTHOR: Testauthor
> #+LANGUAGE: de
> #+bibliography: /tmp/mwe/mwe.bib
> #+cite_export: csl /tmp/mwe/juristische-schulung.csl
> 
> Test [cite:raubenheimer1996dongle p. 76; /Dreier/, in: @ds2018urhg § 69d 
> Rn. 10]

It turns out my cite command lacks an @ before `raubenheimer1996dongle'.
With the @ it does not error. I leave it to the org maintainers to
decide whether the resulting error should be more human-readable or not.

However, if exported to LaTeX the italic on the name `Dreier' comes out
wrong:

{ Dreier}, in: Dreier/Schulze

The braces are included literally in the PDF, with the first brace being
italicised. Exporting to HTML applies the italic correctly.

  -quintus

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



[BUG] Setting compile command causes fontification error [9.5 (release_9.5-661-g5e0afb @ /home/quintus/.emacs.d/org-mode/lisp/)]

2022-05-27 Thread Marvin Gülker
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


Dear all,

trying to access a file with the content shown further below results in
this message:

Org mode fontification error in # at 31

Trying to export said file to HTML yields this backtrace:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  substring(nil 0 0)
  replace-regexp-in-string("[^-0-9a-zA-Z_./\n]" "\\&" nil)
  shell-quote-argument(nil)
  (concat "lualatex " (shell-quote-argument (buffer-file-name)))
  (set (make-local-variable 'compile-command) (concat "lualatex " 
(shell-quote-argument (buffer-file-name
  (lambda nil (set (make-local-variable 'compile-command) (concat "lualatex 
" (shell-quote-argument (buffer-file-name)()
  run-hooks(change-major-mode-after-body-hook text-mode-hook tex-mode-hook 
latex-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook 
tex-mode-hook latex-mode-hook))
  run-mode-hooks(latex-mode-hook)
  latex-mode()
  funcall(latex-mode)
  (progn (funcall lang-mode) (insert code) (org-font-lock-ensure) 
(save-excursion (let ((beg (point-min)) (end (point-max))) (goto-char beg) 
(while (progn (end-of-line) (< (point) end)) (put-text-property (point) (1+ 
(point)) 'face nil) (forward-char 1 (org-src-mode) (set-buffer-modified-p 
nil) (let ((org-html-htmlize-output-type output-type) 
(org-html-htmlize-font-prefix font-prefix)) (org-html-htmlize-region-for-paste 
(point-min) (point-max
  (unwind-protect (progn (funcall lang-mode) (insert code) 
(org-font-lock-ensure) (save-excursion (let ((beg (point-min)) (end 
(point-max))) (goto-char beg) (while (progn (end-of-line) (< (point) end)) 
(put-text-property (point) (1+ (point)) 'face nil) (forward-char 1 
(org-src-mode) (set-buffer-modified-p nil) (let ((org-html-htmlize-output-type 
output-type) (org-html-htmlize-font-prefix font-prefix)) 
(org-html-htmlize-region-for-paste (point-min) (point-max (and (buffer-name 
temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(funcall lang-mode) (insert code) (org-font-lock-ensure) (save-excursion (let 
((beg (point-min)) (end (point-max))) (goto-char beg) (while (progn 
(end-of-line) (< ... end)) (put-text-property (point) (1+ ...) 'face nil) 
(forward-char 1 (org-src-mode) (set-buffer-modified-p nil) (let 
((org-html-htmlize-output-type output-type) (org-html-htmlize-font-prefix 
font-prefix)) (org-html-htmlize-region-for-paste (point-min) (point-max 
(and (buffer-name temp-buffer) (kill-buffer temp-buffer
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer 
(set-buffer temp-buffer) (unwind-protect (progn (funcall lang-mode) (insert 
code) (org-font-lock-ensure) (save-excursion (let ((beg ...) (end ...)) 
(goto-char beg) (while (progn ... ...) (put-text-property ... ... ... nil) 
(forward-char 1 (org-src-mode) (set-buffer-modified-p nil) (let 
((org-html-htmlize-output-type output-type) (org-html-htmlize-font-prefix 
font-prefix)) (org-html-htmlize-region-for-paste (point-min) (point-max 
(and (buffer-name temp-buffer) (kill-buffer temp-buffer)
  (let ((output-type org-html-htmlize-output-type) (font-prefix 
org-html-htmlize-font-prefix) (inhibit-read-only t)) (let ((temp-buffer 
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) 
(unwind-protect (progn (funcall lang-mode) (insert code) (org-font-lock-ensure) 
(save-excursion (let (... ...) (goto-char beg) (while ... ... ...))) 
(org-src-mode) (set-buffer-modified-p nil) (let ((org-html-htmlize-output-type 
output-type) (org-html-htmlize-font-prefix font-prefix)) 
(org-html-htmlize-region-for-paste (point-min) (point-max (and (buffer-name 
temp-buffer) (kill-buffer temp-buffer))
  (setq code (let ((output-type org-html-htmlize-output-type) (font-prefix 
org-html-htmlize-font-prefix) (inhibit-read-only t)) (let ((temp-buffer 
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) 
(unwind-protect (progn (funcall lang-mode) (insert code) (org-font-lock-ensure) 
(save-excursion (let ... ... ...)) (org-src-mode) (set-buffer-modified-p nil) 
(let (... ...) (org-html-htmlize-region-for-paste ... ...))) (and (buffer-name 
temp-buffer) (kill-buffer temp-buffer)))
  (cond ((not (functionp lang-mode)) (org-html-encode-plain-text code)) (t 
(setq code (let ((output-type org-html-htmlize-output-type) (font-prefix 
org-html-htmlize-font-prefix) (inhibit-read-only t)) (let ((temp-buffer 
(generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) 
(unwind-protect (progn ... ... ... ..

Re: [BUG] Mention #+PRINT_BIBLIOGRAPHY in the Org manual

2022-06-13 Thread Marvin Gülker


Am Montag, dem 13. Juni 2022 schrieb Rudolf Adamkovič:
> It all makes no sense without printing the bibliography, right?

In a footnote citation style, it can make sense, and it is common in
German judicial articles. We do not need separate bibliographies there,
because we instead do cross-referencing in footnotes. The first footnote
contains the full bibliographic information, the subsequent ones
abbreviate it and reference the first footnote.

But I do agree that the manual should of course mention it.

  -quintus

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Formatting in citation locator

2022-06-14 Thread Marvin Gülker
Dear list,

is it possible to apply formatting within the citation locator? It is
sometimes useful to me. For example, when I want to cite a dissenting
opinion contained in a judgment of the German Constitutonal Court, it is
helpful to highlight that the cited location is a dissenting opinion and
not the majority’s position. Take for example this bibliographic entry:

@Jurisdiction{bverfg2010vds,
author = {BVerfG},
type = {Urteil},
number = {1 BvR 256/08 u.a.},
date = {2010-03-02},
title = {Vorratsdatenspeicherung},
shortjournal = {BVerfGE},
journaltitle = {Entscheidungen des Bundesverfassungsgerichts},
pages = {260-385},
volume = {125},
jurisdiction = {de},
langid = {ngerman}
}

The decision contains two dissenting opinions at its end. Now I try to
cite the first one like this:

#+TITLE: Test
#+AUTHOR: Test
#+LANGUAGE: de
#+cite_export: csl /tmp/juristische-schulung.csl
#+bibliography: /tmp/test.bib

Abweichende Meinung. [cite:@bverfg2010vds p. 373 [Sondervotum 
/Schluckebier/],]

juristische-schulung.csl is this style: 
https://github.com/citation-style-language/styles/blob/e22b8a566bad9b4c7f52720f60dd875057a5d210/juristische-schulung.csl

Exporting this to HTML comes out as:

¹ BVerfGE 125, 260 (373 [Sondervotum /Schluckebier/])

I would have expected that the word “Schluckebier” – which is the
dissenting judge’s name – is italicised, but instead the raw markup is
exported. I want it italicised, because it is common to italicise names
in German judicial citation styles.

Is this expected behaviour?

Org mode version 9.5 (release_9.5-661-g5e0afb @ 
/home/quintus/.emacs.d/org-mode/lisp/)
citeproc.el at ba49516265fa24b138346c4918d39d19b4de8a62

  -quintus

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Feature request: export form feed as page break

2023-10-21 Thread Marvin Gülker
Dear list,

I am creating training material for the education of German law
students, which usually consists of a case story on one or two pages,
followed by a page break after which a proposal for resolving the case
is provided. The structure is like this because usually I provide the
case story before the meeting, where I work out a solution with the
students, and afterwards I want to provide them with complete material,
while still having everything contained in one file.

With org, I can easily export to LaTeX and thereby to PDF, and it works
quite nicely. However, for the page break I always need to write a
literal \newpage into the document, which does work, but only in LaTeX.
Since I am the only one using org/LaTeX at my chair, I have to convert
these documents to DOCX (using the ODT exporter) when a collegue wants
an editable version of them. As a LaTeX command, \newpage does not work
when exporting to ODT. I thus open the exported document manually after
the export and insert the page break using LibreOffice.

To ease this process, I would like to request that the ASCII control
character U+000C FORM FEED (displayed by emacs as ^L and also known as
`\f' in C string notation) is recognised by exporters and translated to
the corresponding page break command, that is, in LaTeX \newpage and in
ODT to the XML that makes LibreOffice start a new page. For HTML, it
could be exported as  or similar, and for exporters which have no notion of
pages, it could just be copied over to the exported document as-is.

  -MG

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: Feature request: export form feed as page break

2023-10-21 Thread Marvin Gülker
Am Samstag, dem 21. Oktober 2023 schrieb Max Nikulin:
> As a workaround you may define an Org macro that expands to
> @@latex:\newpage@@ and appropriate XML element inside @@odt:…@@.

Fair enough, this is possible, but then I have to consider each backend
I may export to and read up on how the respective backend does this. As
it stands, I just do not know how the piece inside @@odt:…@@ would have
to look like. If the decision here is to not add a page break feature to
org, then I will probably go that route, though.

> P.S. I am against using non-printable characters for markup. It might
> be an \... entity for page break inside a paragraph, "#+...:" keyword
> between block-level elements, etc.

I have no strong opinion on that, but I just thought that ^L seems like
a good fit, and I saw it used in Elisp files earlier so I thought it is
common enough to just reuse it.

  -MG

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: Feature request: export form feed as page break

2023-10-21 Thread Marvin Gülker


Am Samstag, dem 21. Oktober 2023 schrieb Ihor Radchenko:
> In general, adding page breaks can make sense. The main concern is that
> the location of page breaks may or may not be export
> backend-independent. In certain scenarios, you may need to put page
> breaks in one place for odt export, but in other place in LaTeX export
> (for example, when page size is different in these two cases).

I think this conflates two different things. On the one hand, there are
typographically indicated page breaks, which appear to be those you are
thinking of here. For instance, the question where to break the page
within a running paragraph of text does depend on how many lines will
show up on the next page; if the answer is 1, better not put a break
here and rather break after the paragraph. Another example would be if
you want a page break before a heading only in certain cases dependent
on other material on the page or the page (size) itself. I agree that
this kind of page break feature cannot be represented properly in (org)
markup.

On the other hand, there are semantic page breaks. The page break I
described in the OP is of this kind – it has been added specifically to
hide the proposed solution from the first page and allow me to just
print page 1 and hand that one to the students. For this page break, the
paper size is completely irrelevant. Even if I printed on A3 for
whatever reason (maybe I ran out of A4 paper), the semantic still
requires the solution to be on page 2. It is this kind of page break I
am referring to and which I think is representable in markup.

> - In LaTeX, this is easy to achieve simply putting =\clearpage=

A quick note here: \newpage and \clearpage do different things in LaTeX
if there is floating material in the document. \clearpage typesets the
floats and then breaks the page, whereas \newpage does not consider them.

  -MG

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: Feature request: export form feed as page break

2023-10-23 Thread Marvin Gülker
Am Sonntag, dem 22. Oktober 2023 schrieb Jambunathan K:
> I am the original author of ox-odt.el.
>
> The page break feature is available as part of
> https://github.com/kjambunathan/org-mode-ox-odt

I took a look at 
https://github.com/kjambunathan/org-mode-ox-odt/blob/master/notes/SNIPPETS.org#improve-support-for-pagebreaks
and indeed, there is a page break feature, but it seems to be exclusive
to this backend. I would prefer it if the page break feature was part of
org’s actual markup and thus work with all backends, including LaTeX,
without backend-specific markup.

> This is a fork of the ODT exporter in Emacs Orgmode.

I heard of it before; for now I think I want to stick with upstream org.
I do keep an eye on this fork in case I need one of its exclusive
features. Since from a technical point, I am mostly writing pretty
boring pure text documents, it worked out until now mostly.

  -MG

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [DISCUSSION] Allowing footnote-references inside parsed keywords (#+AUTHOR, #+TITLE, etc)

2024-02-01 Thread Marvin Gülker


Am Donnerstag, dem 01. Februar 2024 schrieb Juan Manuel Macías:
> How about using dedicated keywords? Something like:
>
> #+FN_AUTHOR: footnote text
> #+FN_TITLE: footnote text

For reference -- I do not know if this prompted the discussion here --
just a few days ago I asked about footnotes in author information
because such footnotes are just so common in the field I write in. They
are used to give a short description of the author's position usually
("XY is a researcher at the chair of Foo Bar..."). Since in my field I
have to submit DOCX to journals, such footnotes should be properly
exported by ox-odt in particular.

Here is the thread over at emacs-humanities:
https://lists.gnu.org/archive/html/emacs-humanities/2024-01/msg0.html
It includes an ugly workaround I applied in form of an advice. A proper
solution directly in org would of course be much preferable.

I like the dedicated keyword solution. This way third party backends
will probably ignore the new keywords, because for them they will look
like a comment.

Marvin

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [DISCUSSION] Allowing footnote-references inside parsed keywords (#+AUTHOR, #+TITLE, etc)

2024-02-02 Thread Marvin Gülker


Am Freitag, dem 02. Februar 2024 schrieb Ihor Radchenko:
> What if you have multiple authors?

At least in my discipline, we only have one footnote even in such a
case, which then is a little longer and describes each author
individually in a separate sentence. So, one AUTHOR_FN keyword would be
enough for me.

Marvin

-- 
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [RFC] Org syntax: "." in citation keys

2025-04-16 Thread Marvin Gülker

Am 16. April 2025 um 12:29 Uhr -0400 schrieb Zac E:

I should add that exporting to PDF
via LaTeX is the main use-case for those requiring any
of this functionality.


I disagree. I export excessively to ODT with footnote-based citation 
styles, because the legal publishers I need to work with only accept 
DOCX documents.



Rather, one needs to be able to list several works, separated by
semicolons (the standard behavior already), then end that list with
a period and begin a new list of works within the same note.


Explicit footnotes work just fine for that. I have done so multiple 
times in several legal articles written with org’s formidable citation 
system and am currently using this in my PhD thesis as well.


The example given by Christian Moe contains an error; you need to 
repeat the “cite:” keyword again for each chain of citations. I have 
made the experience that this produces a superfluous period at the end 
of the citation chain, which however can be surpressed by using the 
full citation syntax. Here is an example from one of my recent papers:


[fn:7] Übersehen von [cite/default/b:@könig1995dongle pp. 3294 f.,]
der dem Kaufrecht ein Recht auf Selbsthilfe entnehmen will. Er stützte
sich dabei auch noch auf das vor der Schuldrechtsreform geltende
Kaufrecht, das einen Nacherfüllungsanspruch nicht kannte. Das „Recht
zur zweiten Andienung“ besteht, wie sich aus § 327m Abs. 1 und 3 BGB
n.F. ergibt, auch bei der Aktualisierungspflicht, deren Verletzung als
Sachmangel angesehen wird ([cite/default/b:@spindler2021didrlu2 p.
528]). Ein sofortiges Übergehen auf die nachrangigen Rechtsbehelfe
Schadensersatz und „Vertragsbeendigung“ (sic, s. amtl. Überschrift
§ 327m BGB n.F., amtl. Überschrift § 327o BGB n.F. und § 327i Nr. 2
BGB n.F.: das Rechtsinstitut ist neu, s.
[cite/default/b:@spindler2021didrlu2 p. 528 f.,]) ist nicht erlaubt.

This exports fine to both ODT and LaTeX/PDF.

-MG

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<



Re: [BUG] Getting an error with org-cite when exporting to PDF using CSL backend [9.7.30 (9.7.30-84f18c @ /home/fsantos/.emacs.d/elpa/org-9.7.30/)]

2025-05-21 Thread Marvin Gülker

Dear list,

Am 20. Mai 2025 um 13:25 Uhr +0200 schrieb Frederic Santos:

Hi!

Not sure exactly when it began (probably starting with Org 9.7.30), but I'm no 
longer able to export my Org files to PDF files (via LaTeX) if they contain 
references and if I'm using the CSL backend. More precisely, on a minimal 
reproducible example hosted here: 
https://github.com/frederic-santos/mwe-citeproc, I'm getting:

```
citeproc-proc--parse-csl-var-val: Wrong type argument: listp, "A robust tangent 
"
```


I have experienced a similar error recently. The culprit is in the 
.bib file, namely this line:


title = {A Robust Tangent {{PCA}} via Shape Restoration for Shape 
Variability Analysis},


The error happens when you force capitalisation with braces {}. Try 
this instead:


title = {A Robust Tangent PCA via Shape Restoration for Shape Variability 
Analysis},

I predict the error vanishes.

As a sidenote, I would appreciate it if errors in parsing the .bib 
file would print the citation key and a message like “cannot parse 
entry” instead of messages like this, because this kind of message is 
rather opaque to the user.


- M. Gülker

--
Dipl.-Jur. M. Gülker | https://mg.guelker.eu | PGP: Siehe Webseite
Passau, Deutschland  | kont...@guelker.eu| O<