CQuIC / qcircuit

A quantum circuit drawing application
GNU General Public License v2.0
164 stars 42 forks source link

Q-circuit with XeLatex problem #20

Closed smkhossain closed 8 years ago

smkhossain commented 8 years ago

After compiling a latex file having Q-circuit with Xelatex, the generated circuits are not showing up correctly. The connection lines and the negative controls are missing. A workaround is to use \xyoption{all} instead of "\xyoption{ps}" and "\xyoption{dvips}" in qcircuit.sty. The generated images in this case are correctly showing up, but the image quality is not as good as before.

Travis-S commented 8 years ago

@smkhossain, would it be possible for you to explain more as to what you mean by the image quality not being as good as before? We were thinking of incorporating this workaround as the workaround, but not if the images turn out really poorly as a result.

Travis-S commented 8 years ago

For completeness, I'm including the output of the log file when compiling qtutorial.tex using XeLaTeX:

This is XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./Qtutorial.tex
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/revtex4/revtex4.cls
Document Class: revtex4 2001/08/02 v4.0 (http://publish.aps.org/revtex4/ for do
cumentation)
ltxutil: portions licensed from W. E. Baxter (web@superscript.com)
ltxgrid: portions licensed from W. E. Baxter (web@superscript.com)
(/usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/natbib/natbib.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/revtex4/revsymb.sty))

Class revtex4 Warning: No Society specified, using generic APS style.

(/usr/local/texlive/2014/texmf-dist/tex/latex/revtex4/aps.rtx)
(/usr/local/texlive/2014/texmf-dist/tex/latex/revtex4/10pt.rtx)
(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hyperref.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/hyperref.cfg)

Package hyperref Warning: Values of option `pdfpagemode':
(hyperref)                * `UseNone'
(hyperref)                * `UseOutlines'
(hyperref)                * `UseThumbs'
(hyperref)                * `FullScreen'
(hyperref)                * `UseOC' (PDF 1.5)
(hyperref)                * `UseAttachments' (PDF 1.6)
(hyperref)                * An empty value disables the option.
(hyperref)                Unknown value `None' on input line 4319.

)

Package hyperref Message: Driver (autodetected): hxetex.

(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hxetex.def
(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/puenc.def)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/stringenc.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(./qcircuit.sty (/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xy.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xy.tex Bootstrap'ing:
catcodes, docmode,
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyrecat.tex)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyidioms.tex)

 Xy-pic version 3.8.9 <2013/10/06>
 Copyright (c) 1991-2013 by Kristoffer H. Rose <krisrose@tug.org> and others
 Xy-pic is free software: see the User's Guide for details.

Loading kernel: messages; fonts; allocations: state, direction,
utility macros; pictures: \xy, positions, objects, decorations;
kernel objects: directionals, circles, text; options; algorithms: directions,
edges, connections;  Xy-pic loaded))
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xymatrix.tex
 Xy-pic option: Matrix feature v.3.14 loaded)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyframe.tex
 Xy-pic option: Frame and Bracket extension v.3.14 loaded)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyarrow.tex
 Xy-pic option: Arrow and Path feature v.3.9 path, \ar, loaded)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyarc.tex
 Xy-pic option: Circle, Ellipse, Arc feature v.3.8
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xycurve.tex
 Xy-pic option: Curve and Spline extension v.3.12 curve, circles, loaded)
circles, ellipses, elliptical arcs, loaded)

Package Qcircuit Warning: Qcircuit is loading in Postscript mode. The Xy-pic op
tions ps and dvips will be loaded. If you wish to use other Postscript drivers 
for Xy-pic, you must modify the code in Qcircuit.tex.

(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyps.tex
 Xy-pic option: PostScript backend v.3.12 drivers, hooks, loaded)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xydvips.tex
 Xy-pic option: DVIPS driver v.3.9 loaded))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/listings.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstmisc.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/listings.cfg))
(./Qtutorial.aux)

Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt),
(hyperref)                using 11in.

(/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/color.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/local/texlive/2014/texmf-dist/tex/xelatex/xetex-def/xetex.def))
(/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/nameref.sty
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./Qtutorial.out) (./Qtutorial.out)

Package hyperref Warning: Rerun to get /PageLabels entry.

(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyps-ps.tex)

Xy-pic Warning: The produced DVI file is NOT PORTABLE [Qtutorial:8]:
 It contains <driver> `dvips' \specials for the `PostScript' extension.

(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyps-pro.tex)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xypspatt.tex)
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xypsdict.tex) PS relaxed
(/usr/local/texlive/2014/texmf-dist/tex/generic/xypic/xyps-f.tex)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang2.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang3.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang2.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang3.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang2.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstlang3.sty)
(/usr/local/texlive/2014/texmf-dist/tex/latex/listings/lstmisc.sty)
(/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/se-ascii-print.def)
<xymatrix 11x3 1432> <xymatrix 8x3 1238> <xymatrix 12x7 2936>
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/omscmr.fd) <xymatrix 3x1
143>
Underfull \hbox (badness 2529) in paragraph at lines 121--126
[]\OT1/cmr/m/n/10 The com-mand []\OT1/cmtt/m/n/10 \Qcircuit \OT1/cmr/m/n/10 is 
sim-ply a dis-guised
[1] <xymatrix 2x2 18> <xymatrix 5x2 558> <xymatrix 3x2 284>
Underfull \hbox (badness 10000) in paragraph at lines 177--178

<xymatrix 3x2 284> <xymatrix 4x2 306> <xymatrix 5x4 857> [2] <xymatrix 3x3
432> <xymatrix 3x2 196> <xymatrix 3x6
Overfull \vbox (2.37013pt too high) detected at line 289

Overfull \vbox (2.37012pt too high) detected at line 289
559> <xymatrix 3x3 322> [3]
Underfull \hbox (badness 5316) in paragraph at lines 321--328
[]\OT1/cmr/m/n/10 First let's go over the []\OT1/cmtt/m/n/10 \multigate \OT1/cm
r/m/n/10 com-mand.
<xymatrix 3x6 562>
Overfull \hbox (3.15932pt too wide) in paragraph at lines 359--359
[]     \OT1/cmtt/m/n/7 & \multigate{1}{\mathcal{F}} & \sgate{\mathcal{G}}{2} & 
\qw \\[] 
<xymatrix 4x3 592> <xymatrix 2x1 105> <xymatrix 2x1 44> <xymatrix 2x1 44>
<xymatrix 2x1 44> <xymatrix

LaTeX Font Warning: Command \tiny invalid in math mode on input line 383.

2x1

LaTeX Font Warning: Command \tiny invalid in math mode on input line 383.

105> <xymatrix 2x1 10> <xymatrix 5x2 394> <xymatrix

LaTeX Font Warning: Command \tiny invalid in math mode on input line 406.

3x1

LaTeX Font Warning: Command \tiny invalid in math mode on input line 406.

143>
Overfull \hbox (13.87198pt too wide) in paragraph at lines 409--409
[]    \OT1/cmtt/m/n/9 \lstick{\ket{\psi}}  & \meterB{\ket{\xi_\pm}} & \cw[] 
<xymatrix 2x2 232> [4] <xymatrix

LaTeX Font Warning: Command \tiny invalid in math mode on input line 427.

3x3

LaTeX Font Warning: Command \tiny invalid in math mode on input line 427.

432> <xymatrix 4x4 463> <xymatrix 6x5 928>
Overfull \hbox (9.14703pt too wide) in paragraph at lines 470--470
[]     \OT1/cmtt/m/n/9 & \targ & \targ & \cds{4}{\cdots} & \targ & \qw\\[] 
<xymatrix 7x4 1427> [5] <xymatrix 5x3 633> <xymatrix 6x3 566>
Underfull \hbox (badness 10000) in paragraph at lines 546--548

<xymatrix 7x3 1157> [6] [7]
Underfull \hbox (badness 10000) in paragraph at lines 662--663

LaTeX Font Warning: Font shape `OMS/cmtt/m/n' undefined
(Font)              using `OMS/cmsy/m/n' instead
(Font)              for symbol `textbraceleft' on input line 676.

Underfull \hbox (badness 10000) in paragraph at lines 718--718

Overfull \hbox (12.00351pt too wide) in paragraph at lines 665--720
 []$ 
[8] (./Qtutorial.aux)

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

 )
(see the transcript file for additional information)
Output written on Qtutorial.pdf (8 pages).
SyncTeX written on Qtutorial.synctex.gz.
Transcript written on Qtutorial.log.
Travis-S commented 8 years ago

Based on @smkhossain's idea, we implemented the suggested changes to the xyoptions in bfa98d148c69, and rolled them into the v2.5.2 release.