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 Mar 23 15:18:38 2011  
 
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 Jan 4 13:08:03 2013, 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 Jan 4 13:06:16 2013, 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 Jan 4 09:49:44 2013, 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 Jan 2 21:57:23 2013, 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 Dec 31 00:39:55 2012, comment #4:

Now fixed for verbatim tags too. (SVN 6058)

Miguel de Benito <mdbenito>
Project MemberIn charge of this item.
Sun Dec 30 23:40:08 2012, 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 Jan 28 23:39:27 2012, 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 Jul 28 11:37:50 2011, comment #1:

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

Michael Lachmann Tamarlin <ghostwheel>
Project Member
Wed Mar 23 15:18:38 2011, 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 Jan 4 13:06:16 2013mdbenitoStatusNone=>Need Info
      Open/ClosedClosed=>Open
    Fri Jan 4 09:49:44 2013samjamStatusFixed=>None
    Wed Jan 2 21:57:23 2013mdbenitoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Fixed Release=>svn 6076
    Mon Dec 31 00:39:55 2012mdbenitoStatusIn Progress=>Ready For Test
    Sun Dec 30 23:40:08 2012mdbenitoCategoryNone=>Typesetter
      Item GroupNone=>Error
      StatusConfirmed=>In Progress
      Assigned tovdhoeven=>mdbenito
    Thu Mar 8 11:46:40 2012mdbenitoAssigned tomdbenito=>vdhoeven
    Sat Jan 28 00:35:08 2012mdbenitoStatusNone=>Confirmed
      Assigned toNone=>mdbenito

    Back to the top


    Powered by Savane 3.1-cleanup