emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [Bug] ~Verbatim~ in headlines breaks LaTeX


From: Titus von der Malsburg
Subject: Re: [O] [Bug] ~Verbatim~ in headlines breaks LaTeX
Date: Fri, 05 Jun 2015 12:28:20 -0700

On 2015-05-31 Sun 01:40, Nicolas Goaziou wrote:
> Titus von der Malsburg <address@hidden> writes:
>
>> Huh, ~code~ is translated to \verb and =verbatim= is translated to
>> \texttt (plus escaping of some special characters)?
>
> Correct.
>
>> If \verb is used at all, shouldn’t it be generated by =verbatim=
>> instead of by ~code~?
>
> Why is that? Because \verb reminds =verbatim=? Really, both "code" and
> "verbatim" syntax produces verbatim contents. Therefore both are
> eligible for "\verb".

Well, \verb is short for verbatim.  So, yeah, it is pretty unexpected
that =verbatim= is translated to testtt and ~code~ to \verb.

>>> Note that we could do better anyway and switch command depending on
>>> context.
>>
>> Yes, I suppose anything is better than producing malformed LaTeX.
>
> Could you give the list of all contexts requiring such a switch, and
> what the result should be in each case?

Below is a list of things that I tested.  This list of test cases is
probably not exhaustive.

Things that don't work with \verb (produce malformed LaTeX):

    #+TITLE: ~test~

    #+CAPTION: ~test~
    [[/tmp/img.png]]

    * ~test~
    ** ~test~
    …

These two did not produce the intended results (sub and super script
don’t work) but the LaTeX is not malformed:

    test^~test~
    test_~test~

Things that did work as expected with \verb:

    ~test~

    | ~test~ |

    [[http://www.fsf.org/][~test~]]

    - ~test~ :: this is a ~test~

    [fn:1]
    [fn:1] ~test~

    *~test~*
    =~test~=
    /~test~/
    +~test~+
    _~test~_



-- 
Dr Titus von der Malsburg
Feodor Lynen Research Fellow
Dept. Psychology & Dept. Linguistics
University of California, San Diego
http://pages.ucsd.edu/~tvondermalsburg/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]