bugGNU TeXmacs - Bugs: bug #32893, 2 apostrophe's not fixed with in...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

bug #32893: 2 apostrophe's not fixed with in mode prog or verbatim

Submitted by:  Sam Liddicott <samjam>
Submitted on:  Wed 23 Mar 2011 03:18:38 PM UTC  
 
Category: TypesetterPriority: 5 - Normal
Item Group: ErrorStatus: Need Info
Privacy: PublicAssigned to: Miguel de Benito <mdbenito>
Originator Name: Open/Closed: Open
Release: Release: None
Fixed Release: NoneFixed Release: svn 6076
Keywords: 

(Jump to the original submission Jump to the original submission)

Fri 04 Jan 2013 01:08:03 PM UTC, comment #8:

(I must repost due to some strange bug in savannah)

This is due to the following kbd-map in text-kbd.scm:

(kbd-map
(:mode in-text?)
("\"" (insert-quote))
...

I overwrote this at the end of the file when in-verbatim? and it's only a matter of adding some in-code? check. However I'm not sure this is the right solution: Whenever a new tag is created which should render verbatim text, the default (:mode in-text?) will apply and this problem will reappear. I think we should do one of these:

  • Add <with|mode=prog|...> to the definition of any tag which should render as verbatim text. This should include <verbatim>, <code>, etc. and would fix problems with shortcuts and undue ligatures and kerning. I don't know if this should extend to changes in the font family to a monospaced font (like the tag <tt>).
  • Create a new environment mode (as used in edit_env_rep::update_mode ()) which signals text must be rendered without ligatures nor kerning (maybe the font family should be set to fixed width too, but I don't know). This would disable text mode specific shortcuts right away and fix the problem with double quotes, commas, etc.. We'd have four basic modes: text, math, prog and, say, plain (or whatever name is appropriate). This new mode could also be used to mark arguments in tags which should render as-is to the typesetter. This is a problem for arguments defined as TYPE_URL in drd_std.cpp among others (e.g. arguments to cite tags). See edit_env_rep::rewrite_inactive_arg() and hilghlight() for instance. More generally the env variable "src-tt" should be set to this new "plain" mode. But there may arise problems elsewhere, I don't know...

I personally prefer the second approach if it also helps solving the problem with the arguments. It also seems reasonable to be able to tell the typesetter to stop messing with our whitespace when we want it to. :)

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Fri 04 Jan 2013 01:06:16 PM UTC, comment #7:

This is due to the following kbd-map in text-kbd.scm:

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Fri 04 Jan 2013 09:49:44 AM UTC, comment #6:

Confirm fixed for apostrophe in code/verbatim/mode=prog - thankyou

but related comma problem (see comment #1) and ascii double-quote
(ascii 34) problem are not fixed for <code|...>

In <code|...> the asci 34 (shift-2 on a UK keyboard) inserts two apostrophes (now properly spaced) and a double comma is still replaced by something which cut-n-paste as \R. A work-around is to use SHIFT-F5 to precede each character to prevent the wrong interpolation.

ascii double-quote and comma work find in verbatim/mode=prog

Sam Liddicott <samjam>
Project Member
Wed 02 Jan 2013 09:57:23 PM UTC, comment #5:

The fix disabling ligatures for verbatim seems to work. Also I think I found all the kbd-maps for text mode which were incompatible with verbatim (svn 6076). I'm closing this item. Please reopen if you find any related problems.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Mon 31 Dec 2012 12:39:55 AM UTC, comment #4:

Now fixed for verbatim tags too. (SVN 6058)

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sun 30 Dec 2012 11:40:08 PM UTC, comment #3:

A fix for program mode (i.e. sessions) is on SVN 6052.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sat 28 Jan 2012 11:39:27 PM UTC, comment #2:

It seems that "ligature kerning" (i.e. packing several characters together), which is performed by the font (although it sounds weird), is not disabled in verbatim mode. I traced the code up to tex_font_metric_rep::execute in Plugins/Metafont/load_tfm.cpp, but I'm incapable of deciphering that code. Any help would be appreciated.

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Thu 28 Jul 2011 11:37:50 AM UTC, comment #1:

Same also hold for commas - multiple commas a bunched together.

Michael Lachmann Tamarlin <ghostwheel>
Project Member
Wed 23 Mar 2011 03:18:38 PM UTC, original submission:

In verbaitim or mode prog, two adjacent apostrophes take up the same width as a single apostrophe

This is not correct, fixed width font should be used.

Also in verbatim mode, the double-quote-key (usually shift-2) does not enter an ascii quote but a pair of apostrophes. This seems wrong for fixed-width verbatim mode.

Sam Liddicott <samjam>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mdbenito (Updated the item)
  • -unavailable- added by ghostwheel (Posted a comment)
  • -unavailable- added by samjam (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 04 Jan 2013 01:06:16 PM UTCmdbenitoStatusNone=>Need Info
      Open/ClosedClosed=>Open
    Fri 04 Jan 2013 09:49:44 AM UTCsamjamStatusFixed=>None
    Wed 02 Jan 2013 09:57:23 PM UTCmdbenitoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Fixed Release=>svn 6076
    Mon 31 Dec 2012 12:39:55 AM UTCmdbenitoStatusIn Progress=>Ready For Test
    Sun 30 Dec 2012 11:40:08 PM UTCmdbenitoCategoryNone=>Typesetter
      Item GroupNone=>Error
      StatusConfirmed=>In Progress
      Assigned tovdhoeven=>mdbenito
    Thu 08 Mar 2012 11:46:40 AM UTCmdbenitoAssigned tomdbenito=>vdhoeven
    Sat 28 Jan 2012 12:35:08 AM UTCmdbenitoStatusNone=>Confirmed
      Assigned toNone=>mdbenito

    Back to the top


    Powered by Savane 3.1-cleanup