{"id":287,"date":"2022-08-30T14:58:50","date_gmt":"2022-08-30T14:58:50","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/09\/26\/problem-about-fancyvrb-record-and-share-programming-errors\/"},"modified":"2022-08-30T14:58:50","modified_gmt":"2022-08-30T14:58:50","slug":"problem-about-fancyvrb-record-and-share-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/problem-about-fancyvrb-record-and-share-programming-errors\/","title":{"rendered":"problem about fancyvrb-Record and share programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/f02925eef8f737905a8702b9cc21ff07?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAdobe<br \/>\nxetex fancyvrb sphinx<br \/>\nI generate latex from sphinx, and I use UFT8, so I stick to xelatex.Code listings are given in the Verbatim environment. And long lines get out of the page. The only way I found to keep long lines withing the page &#8212; is to load fancevrb package. It modifies Verbatim so that code stays withing the page (words gets wrapped). But now it won&#8217;t render syntax highlighting &#8212; even after I give it commandchars:\\begin{Verbatim}[commandchars=\\\\\\{\\}] \\PYG{n+nv}{get-buffer-create} \\PYG{c+c1}{;; retrieves a buffer by name, creating it if necessary} \\PYG{n+nv}{load-library} \\PYG{n+nv}{RET} \\PYG{n+nv}{\\PYGZti{}\/.emacs} \\PYG{c+c1}{;; to re-init user&#8217;s .emacs} \\PYG{n+nv}{number-lines-region} \\PYG{c+c1}{;; numbers the lines. (if (= (point) (region-end)) (setq type &#8220;descending&#8221;) (setq type &#8220;ascending&#8221;))} \\end{Verbatim}Some docs suggested that I should add \\fvset{commandchars=\\\\\\{\\}} &#8212; I did but doesn&#8217;t solve the problem.Please find attacked the full minimal example: sty and cls generated by sphinx, and MWE of tex. Basically it works with xelatex.Here&#8217;s the full codes (I can&#8217;t find &#8220;upload a file&#8221; button):TestexporttoXeTeX.tex:% Generated by Sphinx. \\def\\sphinxdocclass{report} \\documentclass[letterpaper,10pt,english]{sphinxmanual} % \\usepackage[utf8]{inputenc}% \\usepackage{listings} \\usepackage{fancyvrb} \\usepackage[T1]{fontenc} \\usepackage{babel} \\usepackage{times} \\usepackage[Bjarne]{fncychap} \\usepackage{longtable} \\usepackage{sphinx} \\usepackage{multirow}\\title{Test export to XeTeX Documentation} \\date{August 22, 2012} \\release{0.1} \\author{Boris Kheyfets} \\newcommand{\\sphinxlogo}{} \\renewcommand{\\releasename}{Release} \\makeindex\\makeatletter \\def\\PYG@reset{\\let\\PYG@it=\\relax \\let\\PYG@bf=\\relax%\\let\\PYG@ul=\\relax \\let\\PYG@tc=\\relax%\\let\\PYG@bc=\\relax \\let\\PYG@ff=\\relax} \\def\\PYG@tok#1{\\csname PYG@tok@#1\\endcsname} \\def\\PYG@toks#1+{\\ifx\\relax#1\\empty\\else%\\PYG@tok{#1}\\expandafter\\PYG@toks\\fi} \\def\\PYG@do#1{\\PYG@bc{\\PYG@tc{\\PYG@ul{%\\PYG@it{\\PYG@bf{\\PYG@ff{#1}}}}}}} \\def\\PYG#1#2{\\PYG@reset\\PYG@toks#1+\\relax+\\PYG@do{#2}}\\def\\PYG@tok@gd{\\def\\PYG@tc##1{\\textcolor[rgb]{0.63,0.00,0.00}{##1}}} \\def\\PYG@tok@gu{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.50,0.00,0.50}{##1}}} \\def\\PYG@tok@gt{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.25,0.82}{##1}}} \\def\\PYG@tok@gs{\\let\\PYG@bf=\\textbf} \\def\\PYG@tok@gr{\\def\\PYG@tc##1{\\textcolor[rgb]{1.00,0.00,0.00}{##1}}} \\def\\PYG@tok@cm{\\let\\PYG@it=\\textit\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.50,0.56}{##1}}} \\def\\PYG@tok@vg{\\def\\PYG@tc##1{\\textcolor[rgb]{0.73,0.38,0.84}{##1}}} \\def\\PYG@tok@m{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@mh{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@cs{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.50,0.56}{##1}}\\def\\PYG@bc##1{\\colorbox[rgb]{1.00,0.94,0.94}{##1}}} \\def\\PYG@tok@ge{\\let\\PYG@it=\\textit} \\def\\PYG@tok@vc{\\def\\PYG@tc##1{\\textcolor[rgb]{0.73,0.38,0.84}{##1}}} \\def\\PYG@tok@il{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@go{\\def\\PYG@tc##1{\\textcolor[rgb]{0.19,0.19,0.19}{##1}}} \\def\\PYG@tok@cp{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@gi{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.63,0.00}{##1}}} \\def\\PYG@tok@gh{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.00,0.50}{##1}}} \\def\\PYG@tok@ni{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.84,0.33,0.22}{##1}}} \\def\\PYG@tok@nl{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.13,0.44}{##1}}} \\def\\PYG@tok@nn{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.05,0.52,0.71}{##1}}} \\def\\PYG@tok@no{\\def\\PYG@tc##1{\\textcolor[rgb]{0.38,0.68,0.84}{##1}}} \\def\\PYG@tok@na{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.44,0.63}{##1}}} \\def\\PYG@tok@nb{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@nc{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.05,0.52,0.71}{##1}}} \\def\\PYG@tok@nd{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.33,0.33,0.33}{##1}}} \\def\\PYG@tok@ne{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@nf{\\def\\PYG@tc##1{\\textcolor[rgb]{0.02,0.16,0.49}{##1}}} \\def\\PYG@tok@si{\\let\\PYG@it=\\textit\\def\\PYG@tc##1{\\textcolor[rgb]{0.44,0.63,0.82}{##1}}} \\def\\PYG@tok@s2{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.44,0.63}{##1}}} \\def\\PYG@tok@vi{\\def\\PYG@tc##1{\\textcolor[rgb]{0.73,0.38,0.84}{##1}}} \\def\\PYG@tok@nt{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.02,0.16,0.45}{##1}}} \\def\\PYG@tok@nv{\\def\\PYG@tc##1{\\textcolor[rgb]{0.73,0.38,0.84}{##1}}} \\def\\PYG@tok@s1{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.44,0.63}{##1}}} \\def\\PYG@tok@gp{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.78,0.36,0.04}{##1}}} \\def\\PYG@tok@sh{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.44,0.63}{##1}}} \\def\\PYG@tok@ow{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@sx{\\def\\PYG@tc##1{\\textcolor[rgb]{0.78,0.36,0.04}{##1}}} \\def\\PYG@tok@bp{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@c1{\\let\\PYG@it=\\textit\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.50,0.56}{##1}}} \\def\\PYG@tok@kc{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@c{\\let\\PYG@it=\\textit\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.50,0.56}{##1}}} \\def\\PYG@tok@mf{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@err{\\def\\PYG@bc##1{\\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{##1}}} \\def\\PYG@tok@kd{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@ss{\\def\\PYG@tc##1{\\textcolor[rgb]{0.32,0.47,0.09}{##1}}} \\def\\PYG@tok@sr{\\def\\PYG@tc##1{\\textcolor[rgb]{0.14,0.33,0.53}{##1}}} \\def\\PYG@tok@mo{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@mi{\\def\\PYG@tc##1{\\textcolor[rgb]{0.13,0.50,0.31}{##1}}} \\def\\PYG@tok@kn{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@o{\\def\\PYG@tc##1{\\textcolor[rgb]{0.40,0.40,0.40}{##1}}} \\def\\PYG@tok@kr{\\let\\PYG@bf=\\textbf\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@s{\\def\\PYG@tc##1{\\textcolor[rgb]{0.25,0.44,0.63}{##1}}} \\def\\PYG@tok@kp{\\def\\PYG@tc##1{\\textcolor[rgb]{0.00,0.44,0.13}{##1}}} \\def\\PYG@tok@w{\\def\\PYG@tc##1{\\textcolor[rgb]{0.73,0.73,0.73}{##1}}} \\def\\PYG@tok@kt{\\d<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fea119cd75e85ff3356c1987bfed76c1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlan Munn<br \/>\ntikz-pgf errors fancyvrb<br \/>\nI&#8217;ve been working on a document that has a lot of little verbatim bits so I&#8217;m using fancyvrb \\DeflneShortVerb{\\|}. Now I want to add a tikz picture, and the whole thing fails. It there a<\/li>\n<\/ul>\n<p id=\"rop\"><small>Originally posted 2013-09-26 03:14:48. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>Adobe xetex fancyvrb sphinx I generate latex from sphinx, and I use UFT8, so I stick to xelatex.Code listings are given in the Verbatim environment. And long lines get out of the page. The only way I found to keep long lines withing the page &#8212; is to load fancevrb package. It modifies Verbatim so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=287"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/287\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}