helpListings package for LaTeX - Support: sr #141, copy and paste produces corrupt...

 
 
Show feedback again

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

sr #141: copy and paste produces corrupt output

Submitted by:  Brooks Moses <brooks>
Submitted on:  Tue Apr 5 05:18:15 2011  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: None

Tue Apr 5 06:26:29 2011, comment #1:

This is https://puszcza.gnu.org.ua/bugs/index.php?138, roughly.

Brooks Moses <brooks>
Project Administrator
Tue Apr 5 05:18:15 2011, original submission:

Helmut Tessarek writes, on Wed, 05 Dec 2007 15:24:00 -0500:


Hi Brooks,

I'm sorry to bother you with this, but it seems that I have found a bug.
Attached are the .tex, .log and .pdf files.
I have tested it under Linux and Windows. Same effect.

Problem description: If you try to copy a listing and paste it, the
output is corrupted. There are characters missing and there are
additional spaces.
Unfortunately this makes the package useless, if you want that people
are able to copy and paste your listings.

The package is very powerful and I really would like to use it.

Regards,
Helmut

P.S.: Here is the output from the paste:

CREATE PROCEDURE b p h r a l l ( )
SPECIFIC t e s s u s b p h r a l l LANGUAGE SQL DYNAMIC RESULT SETS 1
BEGIN
DECLARE r e s CURSOR WITH RETURN FOR
WITH bp snap ( snapshot timestamp , database , buf f e rpo o l , bp hr ,
data hr , idx hr ,
p a g e c l e a n r a t i o )
AS
(
SELECT
SNAPSHOT TIMESTAMP, substr ( db name , 1 , 1 6 ) , substr ( bp name , 1
, 3 2 ) ,
CASE
WHEN ( ( p o o l d a t a p r e a d s > 0 or p o o l i n d e x p r e a d
s > 0) and (
p o o l d a t a l r e a d s > 0 or p o o l i n d e x l r e a d s > 0) )
THEN
decimal ( ((1ô€€€ ( double ( po o l d a t a p r e a d s + p o o l i n d e
x p r e a d s ) / double (
p o o l d a t a l r e a d s + p o o l i n d e x l r e a d s+1) ) ) 1 0

  1. . 0 ) ,3 ,1 )

ELSE
NULL
END CASE,
cast ( ( cast ( p o o l d a t a l r e a d s ô€€€ p o o l d a t a p r e a d s
as double ) 1 0 0 . 0 ) /( p o o l d a t a l r e a d s+1) as decimal (
3 , 1 ) ) ,
cast ( ( cast ( p o o l i n d e x l r e a d s ô€€€ p o o l i n d e x p r e
a d s
as double ) 1 0 0 . 0 ) /( p o o l i n d e x l r e a d s+1) as decimal
( 3 , 1 ) ) ,
cast ( ( cast ( p o o l a s y n c d a t a wr i t e s + p o o l a s y n c
i n d e x wr i t e s
as double ) 1 0 0 . 0 ) /( p o o l d a t a wr i t e s+p o o l i n d e x
wr i t e s+1) as decimal
( 3 , 1 ) )
FROM table ( snapshot bp ( cast (NULL as varchar (128) ) ,ô€€€1) ) as BP
ORDER BY 2 ,3
)
SELECT snapshot timestamp , database , buf f e rpo o l , bp hr , data hr
, idx hr FROM
bp snap ;
OPEN r e s ;
END@
1

This is pdfTeX, Version 3.141592-1.40.4 (MiKTeX 2.6) (preloaded format=latex 2007.10.25) 5 DEC 2007 15:11
entering extended mode
**bug.tex
(bug.tex
LaTeX2e <2005/12/01>
Babel <v3.8g> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, french, loaded.
("C:\Program Files\MiKTeX 2.6\tex\latex\base\article.cls"
Document Class: article 2005/09/16 v1.4f Standard LaTeX document class
("C:\Program Files\MiKTeX 2.6\tex\latex\base\size10.clo"
File: size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.6\tex\latex\listings\listings.sty"
("C:\Program Files\MiKTeX 2.6\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
\lst@mode=\count87
\lst@gtempboxa=\box26
\lst@token=\toks15
\lst@length=\count88
\lst@currlwidth=\dimen103
\lst@column=\count89
\lst@pos=\count90
\lst@lostspace=\dimen104
\lst@width=\dimen105
\lst@newlines=\count91
\lst@lineno=\count92
\lst@maxwidth=\dimen106

("C:\Program Files\MiKTeX 2.6\tex\latex\listings\lstmisc.sty"
File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)
\c@lstnumber=\count93
\lst@skipnumbers=\count94
\lst@framebox=\box27
)
("C:\Program Files\MiKTeX 2.6\tex\latex\listings\listings.cfg"
File: listings.cfg 2007/02/22 1.4 listings configuration
))
Package: listings 2007/02/22 1.4 (Carsten Heinz)

("C:\Program Files\MiKTeX 2.6\tex\latex\hyperref\hyperref.sty"
Package: hyperref 2007/06/14 v6.76i Hypertext links for LaTeX

("C:\Program Files\MiKTeX 2.6\tex\latex\oberdiek\hycolor.sty"
Package: hycolor 2007/04/11 v1.1 Code for color options of hyperref/bookmark (H
O)
)
\@linkdim=\dimen107
\Hy@linkcounter=\count95
\Hy@pagecounter=\count96

("C:\Program Files\MiKTeX 2.6\tex\latex\hyperref\pd1enc.def"
File: pd1enc.def 2007/06/14 v6.76i Hyperref: PDFDocEncoding definition (HO)
)
("C:\Program Files\MiKTeX 2.6\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2007/09/09 v1.1 Providing prefix for e-TeX command names (HO)

("C:\Program Files\MiKTeX 2.6\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
))
("C:\Program Files\MiKTeX 2.6\tex\latex\00miktex\hyperref.cfg"
File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
)
("C:\Program Files\MiKTeX 2.6\tex\latex\oberdiek\kvoptions.sty"
Package: kvoptions 2007/06/11 v2.7 Connects package keyval with LaTeX options (
HO)
)
Package hyperref Info: Option `bookmarks' set `true' on input line 2537.
Package hyperref Info: Option `bookmarksnumbered' set `true' on input line 2537
.

Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `math shift' on input line 2537.

Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `math shift' on input line 2537.

Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `math shift' on input line 2537.

Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `math shift' on input line 2537.

Package hyperref Info: Option `colorlinks' set `false' on input line 2537.

Package hyperref Warning: Unexpected value `true'
(hyperref) of option `backref' instead of
(hyperref) `section', `slide', `page', `none',
(hyperref) or `false' on input line 2537.

Package hyperref Info: Option `breaklinks' set `true' on input line 2537.
Package hyperref Info: Hyper figures OFF on input line 2571.
Package hyperref Info: Link nesting OFF on input line 2576.
Package hyperref Info: Hyper index ON on input line 2579.
Package hyperref Info: Plain pages OFF on input line 2586.
Package hyperref Info: Backreferencing OFF on input line 2591.
Implicit mode ON; LaTeX internals redefined
Package hyperref Info: Bookmarks ON on input line 2741.
("C:\Program Files\MiKTeX 2.6\tex\latex\ltxmisc\url.sty"
\Urlmuskip=\muskip10
Package: url 2005/06/27 ver 3.2 Verb mode for urls, etc.
)
LaTeX Info: Redefining \url on input line 2909.
\Fld@menulength=\count97
\Field@Width=\dimen108
\Fld@charsize=\dimen109
\Choice@toks=\toks16
\Field@toks=\toks17
Package hyperref Info: Hyper figures OFF on input line 3393.
Package hyperref Info: Link nesting OFF on input line 3398.
Package hyperref Info: Hyper index ON on input line 3401.
Package hyperref Info: backreferencing OFF on input line 3408.
Package hyperref Info: Link coloring OFF on input line 3413.
\Hy@abspage=\count98
\c@Item=\count99
\c@Hfootnote=\count100
)
hyperref using driver hpdftex
("C:\Program Files\MiKTeX 2.6\tex\latex\hyperref\hpdftex.def"
File: hpdftex.def 2007/06/14 v6.76i Hyperref driver for pdfTeX
\Fld@listcount=\count101
) (bug.aux)
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 16.
LaTeX Font Info: ... okay on input line 16.
\c@lstlisting=\count102
Package hyperref Info: Link coloring OFF on input line 16.

("C:\Program Files\MiKTeX 2.6\tex\latex\hyperref\nameref.sty"
Package: nameref 2007/05/29 v2.31 Cross-referencing by name of section

("C:\Program Files\MiKTeX 2.6\tex\latex\oberdiek\refcount.sty"
Package: refcount 2006/02/20 v3.0 Data extraction from references (HO)
)
\c@section@level=\count103
)
LaTeX Info: Redefining \ref on input line 16.
LaTeX Info: Redefining \pageref on input line 16.
(bug.out)
(bug.out)
\@outlinefile=\write3
("C:\Program Files\MiKTeX 2.6\tex\latex\listings\lstlang1.sty"
File: lstlang1.sty 2004/09/05 1.3 listings language file
)
LaTeX Font Info: Try loading font information for OML+cmr on input line 30.

("C:\Program Files\MiKTeX 2.6\tex\latex\base\omlcmr.fd"
File: omlcmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OML/cmr/m/n' in size <10> not available
(Font) Font shape `OML/cmm/m/it' tried instead on input line 30.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 32.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 32.
LaTeX Font Info: Try loading font information for OMS+cmr on input line 32.

("C:\Program Files\MiKTeX 2.6\tex\latex\base\omscmr.fd"
File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 32.
[1

{psfonts.map}]
(bug.aux) )
Here is how much of TeX's memory you used:
3992 strings out of 95283
55468 string characters out of 1184703
176393 words of memory out of 1125821
7097 multiletter control sequences out of 60000
3948 words of font info for 15 fonts, out of 1000000 for 2000
14 hyphenation exceptions out of 8191
26i,4n,40p,224b,1337s stack positions out of 5000i,500n,10000p,200000b,32768s
<C:/Program Files/MiKTeX 2.6/fonts/type1/bluesky/cm/cmbx10.pfb><C:/P
rogram Files/MiKTeX 2.6/fonts/type1/bluesky/cm/cmmi10.pfb><C:/Program Files/MiK
TeX 2.6/fonts/type1/bluesky/cm/cmr10.pfb><C:/Program Files/MiKTeX 2.6/fonts/typ
e1/bluesky/cm/cmsy10.pfb>
Output written on bug.pdf (1 page, 34521 bytes).
PDF statistics:
68 PDF objects out of 300000 (max. 8388607)
33 named destinations out of 300000 (max. 131072)
17 words of extra memory for PDF output out of 65536 (max. 10000000)


\documentclass{article}
\usepackage{listings}
\usepackage[
bookmarks=true,
bookmarksnumbered=true,
pdftitle={Title},
pdfauthor={Helmut K. C. Tessarek},
pdfcreator={$ $Id$ $},
colorlinks=false,
linkcolor={blue},
citecolor={blue},
backref=true,
breaklinks=true,
pdftex
]{hyperref}
\begin{document}
\lstset{language=SQL,tabsize=4,breaklines=true,xleftmargin=-15ex,xrightmargin=-15ex}
\begin{lstlisting}
CREATE PROCEDURE bphr_all ()
SPECIFIC tessus_bphr_all LANGUAGE SQL DYNAMIC RESULT SETS 1

BEGIN
DECLARE res CURSOR WITH RETURN FOR
WITH bp_snap (snapshot_timestamp, database, bufferpool, bp_hr, data_hr, idx_hr, page_clean_ratio )
AS
(
SELECT
SNAPSHOT_TIMESTAMP, substr(db_name,1,16), substr(bp_name,1,32),
CASE
WHEN ((pool_data_p_reads > 0 or pool_index_p_reads > 0) and (pool_data_l_reads > 0 or pool_index_l_reads > 0))
THEN
decimal( ((1- (double(pool_data_p_reads + pool_index_p_reads)/double(pool_data_l_reads + pool_index_l_reads+1)) ) * 100.0),3,1 )
ELSE
NULL
END CASE,
cast( (cast( pool_data_l_reads - pool_data_p_reads
as double)*100.0)/(pool_data_l_reads+1) as decimal(3,1)),
cast( (cast( pool_index_l_reads - pool_index_p_reads
as double)*100.0)/(pool_index_l_reads+1) as decimal(3,1)),
cast( (cast( pool_async_data_writes + pool_async_index_writes
as double)*100.0)/(pool_data_writes+pool_index_writes+1) as decimal(3,1))
FROM table(snapshot_bp(cast(NULL as varchar(128)),-1)) as BP
ORDER BY 2,3
)
SELECT snapshot_timestamp, database, bufferpool, bp_hr, data_hr, idx_hr FROM bp_snap;

OPEN res;
END@
\end{lstlisting}
\end{document}

Brooks Moses <brooks>
Project Administrator

 

Attached Files
file #25:  bug.pdf added by brooks (34kB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by brooks (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):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Apr 5 05:18:15 2011brooksAttached File-=>Added bug.pdf, #25
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray