PPS: as suggested... this could be an ELisp recipe to automate this

#+BEGIN_SRC emacs_lisp
(defun my-latex-filter-verb (text backend info)
  "Export verbatim quoted for LaTeX à la texfinfo.

Make regex \"``\\1''\\2\" for double quotes."
  (when (org-export-derived-backend-p backend 'latex)
    (replace-regexp-in-string "^\\(.*\\S-\\)\\(\\s-*\\)$" "`\\1'\\2" text)))

(add-to-list 'org-export-filter-verbatim-functions
             'my-latex-filter-verb)
#+END_SRC

Best, /PA

On Sun, 31 May 2026 at 07:39, Pedro Andres Aranda Gutierrez <
[email protected]> wrote:

> HI, a quick PS...
>
> Maybe the solution to this would be to somehow cater for
> `~verb~'
> being parsed as
> `\texttt{verb}'
>
> If memory served me well, similar situations have already been discussed
> in the list.
> I know it may be solved with zero-width spaces, but that is a
> far-less-than-optimal solution from many points of view...
>
> Just for the record,
> /PA
>
> On Sat, 30 May 2026 at 17:45, Pedro Andres Aranda Gutierrez <
> [email protected]> wrote:
>
>> Hi,
>>
>> On Sat, 30 May 2026 at 16:00, Max Nikulin <[email protected]> wrote:
>>
>>> On 30/05/2026 1:21 pm, Pedro Andres Aranda Gutierrez wrote:
>>> >
>>> > 1) not all users may have enough ELisp knowledge to add a hack to
>>> their
>>> > configuration, specifically when it comes to modifying an alist.
>>>
>>> Have you tried the following?
>>>
>>>      M-x customize-variable RET org-latex-text-markup-alist RET
>>>
>>> As Ihor writes it can be improved, but even in the current form it is
>>> usable.
>>>
>>
>> Sort of...  you are right. So maybe the effort should go this way.
>>
>>
>>> I do not like alists as user options in general and for this variable in
>>> particular, but adding more options is confusing. It adds cognitive load
>>> related to priorities.
>>>
>>
>> Hmm... never thought of that...
>>
>> > 2) not all documents you produce may need the hack, so adding config
>>> > options may be appealing to people who, like me, need them only
>>> > sometimes and don't want to be retouching their Emacs configuration
>>> > depending on the doc.
>>>
>>> I believed, you like .dir-locals.el files more than me.
>>
>> And # Local variables: ;-)
>>
>> It would be my choice in this instance, since not all documents need it...
>>
>> Anyway you added
>>> another `defcustom' that is not per-document setting, so it behaves in
>>> the same way as `org-latex-text-markup-alist'.
>>>
>>
>> Would have been the next step... just getting a feeling of whether that
>> is needed or not.
>>
>>
>>> > 3) export filters... I have also tried a post-export filter, but since
>>> > ~~ and == both produce \texttt{}, it was difficult to control. Will
>>> > continue exploring that.
>>>
>>> I had in mind either "parse-tree" or "verbatim".
>>
>>
>> Hmmm... that's for the food for thought... thanks.
>>
>> As another option, you may try to redefine \verb LaTeX macro to add
>>> quotes.
>>>
>>
>> Don't we want to hide all this from users...
>>
>> > Re \verb@@ in captions, you are absolutely right. LaTeX will complain,
>>> > but this can be fixed by educating users, i.e. by adding a CAVEAT in
>>> the
>>> > manual in the lines of
>>>
>>> I believe, Org should use non-fragile LaTeX markup in captions and
>>> headings (... and footnotes?) out of the box. A warning to the manual
>>> still might be added.
>>>
>>> > BTW, instead of posting filtering code to the mailing list, this may
>>> be
>>> > something for worg... WDYT?
>>>
>>> If you are sure that a worg page will have higher rank in search engines
>>> and higher chance (and weight) to be included in AI training set than
>>> worg is better.
>>>
>>
>> <joking class="ending in a lighter tone">
>> AI ... or IA in Spanish... and that's what donkeys do over here ;-)
>> </joking>
>>
>> Thx, /PA
>>
>> --
>> Fragen sind nicht da, um beantwortet zu werden,
>> Fragen sind da um gestellt zu werden
>> Georg Kreisler
>>
>> "Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
>> Year 2 of the New Koprocracy
>>
>>
>
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> "Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
> Year 2 of the New Koprocracy
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

"Sagen's Paradeiser" (ORF: Als Radiohören gefährlich war) => write BE!
Year 2 of the New Koprocracy

Reply via email to