emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Titus von der Malsburg <malsburg@posteo.de>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Nick Dokos <ndokos@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: [Bug] ~Verbatim~ in headlines breaks LaTeX
Date: Fri, 05 Jun 2015 12:28:20 -0700	[thread overview]
Message-ID: <877fri6jl7.fsf@posteo.de> (raw)
In-Reply-To: <87r3px5ee3.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1808 bytes --]


On 2015-05-31 Sun 01:40, Nicolas Goaziou wrote:
> Titus von der Malsburg <malsburg@posteo.de> 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2015-06-05 19:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-30  3:38 [Bug] ~Verbatim~ in headlines breaks LaTeX Titus von der Malsburg
2015-05-30  4:32 ` Nick Dokos
2015-05-30  5:18   ` Titus von der Malsburg
2015-05-30  8:09     ` Nicolas Goaziou
2015-05-30 15:19       ` Titus von der Malsburg
2015-05-31  8:40         ` Nicolas Goaziou
2015-06-05 19:28           ` Titus von der Malsburg [this message]
2015-06-05 21:27             ` Nicolas Goaziou
2015-06-05 22:58               ` Titus von der Malsburg
2015-06-06  7:28                 ` Nicolas Goaziou
2015-06-06 17:32                   ` Titus von der Malsburg
2015-06-06 22:15                   ` Suvayu Ali
2015-06-06 23:20                     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fri6jl7.fsf@posteo.de \
    --to=malsburg@posteo.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).