--- texworks-0.2.3.orig/debian/README.Debian +++ texworks-0.2.3/debian/README.Debian @@ -0,0 +1,20 @@ +texworks for Debian +------------------- + +An environment for authoring TeX (LaTeX, ConTeXt, etc) documents, with +a Unicode-based, TeX-aware editor, integrated PDF viewer, and a clean, +simple interface accessible to casual and non-technical users. + +Note to use synctex feature you need to install TeX Live 2009 which +will be in Debian soon. + +Temporary modifications: +1. I borrowed texworks.desktop, texworks.xpm and texworks.1 by +Stefan Löffler in texworks-0.1.0~svn335~jaunty1 +and I modified them a bit for Debian, especially, texworks.xpm +was converted from texworks.png + +2. I enabled to print PDF directly with a patch in + http://code.google.com/p/texworks/issues/detail?id=78 + + -- Atsuhito KOHDA Sun, 11 Oct 2009 15:25:52 +0900 --- texworks-0.2.3.orig/debian/README.source +++ texworks-0.2.3/debian/README.source @@ -0,0 +1,9 @@ +texworks for Debian +------------------- + + + + + + --- texworks-0.2.3.orig/debian/changelog +++ texworks-0.2.3/debian/changelog @@ -0,0 +1,17 @@ +texworks (0.2.3-2) unstable; urgency=low + + * Rebuild under poppler 0.12 (Closes: #551435) + * Added note on synctex feature in README.Debian + * Fixed copyright file to express Jérôme Laurens correctly + * Added texlive-latex-base and texlive-xetex to Recommends and Suggests + respectively. + * Moved "uudecode debian/document-print.png.enc" to configure-stamp + from build-stamp because configure searched it. + + -- Atsuhito KOHDA Sun, 18 Oct 2009 19:16:52 +0900 + +texworks (0.2.3-1) unstable; urgency=low + + * Initial release (Closes: #538211) + + -- Atsuhito KOHDA Sun, 11 Oct 2009 15:25:52 +0900 --- texworks-0.2.3.orig/debian/compat +++ texworks-0.2.3/debian/compat @@ -0,0 +1 @@ +7 --- texworks-0.2.3.orig/debian/texworks.menu +++ texworks-0.2.3/debian/texworks.menu @@ -0,0 +1,3 @@ +?package(texworks):needs="X11" section="Applications/Editors"\ + title="texworks" command="/usr/bin/texworks"\ + icon="/usr/share/pixmaps/texworks.xpm" --- texworks-0.2.3.orig/debian/texworks.1 +++ texworks-0.2.3/debian/texworks.1 @@ -0,0 +1,49 @@ +.TH TEXWORKS 1 + +.SH NAME +.B texworks +\- a simple TeX front-end program + +.SH SYNOPSIS +.B texworks +[FILE]... + +.SH DESCRIPTION +.B TeXworks +is an environment for authoring TeX (LaTeX, ConTeXt, etc) documents, with a Unicode-based, TeX-aware editor, integrated PDF viewer, and a clean, simple interface accessible to casual and non-technical users. + +It is inspired by Dick Koch's award-winning TeXShop program for Mac OS X, which has made quality typesetting through TeX accessible to a wider community of users, without a technical or intimidating face. The goal of +.B TeXworks +is to deliver a similarly integrated, easy-to-use environment for users on other platforms, especially GNU/Linux and Windows. + +.SH ENVIRONMENT +.TP +TW_INIPATH +Overrides the location of the preferences file. +.TP +TW_LIBPATH +Overrides the location of the additional configuration and library files. + +.SH FILES +.TP +.I ~/.config/TUG/TeXworks.conf +Text file to store the preferences. +.TP +.I ~/.TeXworks/* +Additional configuration and library files (e.g. for auto completion, templates, etc.). +.TP +.I /usr/lib/TeXworks/texworks-setup.ini +Setup file to override the location of the files mentioned above (e.g. for enabling portable operation). + +.SH SEE ALSO +.B TeXworks +homepage : \%http://tug.org/texworks/ + +.B TeXworks +development: http://code.google.com/p/texworks/ + +.SH BUGS +If you find a bug, please report it at \%http://code.google.com/p/texworks/issues/list + +.SH AUTHORS +Jonathan Kew and others --- texworks-0.2.3.orig/debian/texworks.desktop +++ texworks-0.2.3/debian/texworks.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=TeXworks +GenericName=TeXworks +Comment=TeX Editor +Exec=texworks +Icon=/usr/share/pixmaps/texworks.xpm +Terminal=false +Type=Application +StartupNotify=false +Categories=Application;Science;Utility; +OnlyShowIn=GNOME;XFCE;KDE +MimeType=application/x-latex;text/x-bibtex;text/x-tex; --- texworks-0.2.3.orig/debian/texworks.xpm +++ texworks-0.2.3/debian/texworks.xpm @@ -0,0 +1,157 @@ +/* XPM */ +static char *texworks_s[] = { +/* columns rows colors chars-per-pixel */ +"32 32 119 2", +" c #03810381759E", +". c #09A009A073A7", +"X c #047804787B5E", +"o c #093009307CBA", +"O c #1031103173C2", +"+ c #1DF21DF27683", +"@ c #1537153779FA", +"# c #1B371B377BC8", +"$ c #2F8D2F8D6299", +"% c #2326232671E6", +"& c #2D4A2D4A7475", +"* c #240724077C54", +"= c #2DA62DA67CFC", +"- c #339833987250", +"; c #3F553F5576D8", +": c #318B318B7EBF", +"> c #3D2C3D2C7AF4", +", c #475047504763", +"< c #4B6E4B6E4B9A", +"1 c #535F535F539E", +"2 c #5794579458C0", +"3 c #5C6F5C6F5C82", +"4 c #41D941D96C77", +"5 c #523352336473", +"6 c #5EDA5EDA60AA", +"7 c #5D465D466CBA", +"8 c #410C410C73F9", +"9 c #48584858706E", +"0 c #417F417F7E26", +"q c #4E604E607C41", +"w c #54FC54FC7195", +"e c #5BC65BC673CD", +"r c #5C125C127855", +"t c #6417641764A5", +"y c #659965996A3B", +"u c #6B136B136C1D", +"i c #61D961D974FC", +"p c #6D366D367265", +"a c #72FB72FB7330", +"s c #7843784377EB", +"d c #76187618786E", +"f c #7B747B747B95", +"g c #0C9B0C9B845B", +"h c #147E147E8716", +"j c #1A821A8280C9", +"k c #174D174D8BD6", +"l c #1D141D148FD2", +"z c #248D248D85E6", +"x c #295E295E85E5", +"c c #271527158882", +"v c #29DA29DA8DB9", +"b c #32B832B8813A", +"n c #3E3A3E3A96F4", +"m c #3BBB3BBB9A7B", +"M c #46994699856A", +"N c #45ED45ED89E0", +"B c #4D274D278DE3", +"V c #5D555D558550", +"C c #422F422F9546", +"Z c #550B550B910E", +"A c #5B755B75938E", +"S c #596A596A9DD4", +"D c #6D606D6084C0", +"F c #6DA16DA1894F", +"G c #77CB77CB8475", +"H c #7DC07DC0808F", +"J c #62FA62FA9B12", +"K c #756375639643", +"L c #71D871D89E88", +"P c #59015901A7E3", +"I c #58D558D5B6DE", +"U c #60D360D3AE7B", +"Y c #7A4F7A4FA63A", +"T c #721E721EAA84", +"R c #6F856F85B294", +"E c #7F5B7F5BB577", +"W c #83EA83EA8446", +"Q c #8B8A8B8A8C17", +"! c #815281529D4D", +"~ c #8F348F349BFF", +"^ c #93979397945F", +"/ c #94249424997F", +"( c #9CBA9CBA9DFA", +") c #849F849FA1C0", +"_ c #900C900CA35F", +"` c #86408640ABFE", +"' c #8D268D26AFB4", +"] c #92CF92CFA50D", +"[ c #9E799E79A3C8", +"{ c #83ED83EDB734", +"} c #9E049E04BF16", +"| c #A457A457A48B", +" . c #A42FA42FAC3E", +".. c #AB9FAB9FAC36", +"X. c #AB92AB92B040", +"o. c #A3C4A3C4BC1B", +"O. c #AD9BAD9BBCFF", +"+. c #B451B451B4EA", +"@. c #B99CB99CB7BE", +"#. c #B1DBB1DBBA6F", +"$. c #BC90BC90BC65", +"%. c #C0C8C0C8BFCF", +"&. c #8B468B46D9DD", +"*. c #A3DAA3DACB70", +"=. c #BDA5BDA5C557", +"-. c #BD3DBD3DCDAB", +";. c #C2F3C2F3C311", +":. c #C704C704CA09", +">. c #CC0ECC0ECC89", +",. c #CCFBCCFBD262", +"<. c #D414D414D41A", +"1. c #D8B1D8B1D7E2", +"2. c #DC41DC41DC09", +"3. c #D7D0D7D0E704", +"4. c #E4A0E4A0E4AE", +"5. c #EB66EB66EB5E", +"6. c #F33EF33EF35C", +"7. c #FE2DFE2DFE21", +"8. c None", +/* pixels */ +"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.<.>.:.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.8.8.8.8.1.>.=.O.' Y O.>.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.2.<.<.=.o.` J N = # A #.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.2.1.,.-.} T C x ; e i 7 4 & J #.8.8.8.8.8.8.8.8.8.8.8.", +"8.<.<.1.,.-.*.E J N j X o 4 a s W W w 8 ~ ;.8.8.8.8.8.8.8.8.8.8.", +"8.>.>.=.R I P V i y - o X + D ( ;.;.Q u d | 8.8.8.8.8.8.8.8.8.8.", +"8.>.:.[ n m e a a f r j g o B #.>.2.$.Q p ^ @.8.8.8.8.8.8.8.8.8.", +"8.:.:.[ S U y f | $./ M k X # ) $.>.>.@.[ ..$.:.8.8.8.8.8.8.8.8.", +"8.8.>.+.{ &.G ..4.6.$.D v g N X.;.;.;.$.$.$.$.:.8.8.8.8.8.8.8.", +"8.8.:.$._ ` H +.5.7.4.( Z l X @ K @.$.;.$.$.$.$.$.:.8.8.8.8.8.8.", +"8.8.>.;.Q u s ..4.7.6.$.F z o = ] @.$.$.$.$.$.$.;.8.8.8.8.8.8.", +"8.8.8.:.| s W >.6.7.7.2./ 0 h . A +.%.$.+.+.$.$.$.$.8.8.8.8.8.", +"8.8.8.:.;.+.>.7.7.7.7.6.@.D c * ] .L Z ! +.$.$.$.$.8.8.8.8.", +"8.8.8.>.1.5.7.7.7.7.7.7.1.^ > b b % $ e ( +.$.$.$.>.8.8.8.", +"8.8.8.>.2.4.6.7.7.7.7.7.5...q . O & 4 5 6 t W ..+.$.@.$.8.8.8.", +"8.8.8.8.<.4.5.6.6.6.6.3.*.J * % 8 e p a u y t a | +.$.@.@.$.8.8.", +"8.8.8.8.>.1.2.4.4.2.=.J : - 9 p d d a u t t y W ..$.$.@.@.@.;.8.", +"8.8.8.8.:.>.1.1.2.>.| 7 5 y a a a u y y a f ( +.$.$.$.$.@.@.+.8.", +"8.8.8.8.8.:.<.<.<.>...s u u u y y u d ^ ..+.$.$.$.$.$.@...^ ^ 8.", +"8.8.8.8.8.;.>.>.>.:.+.Q u t t p Q ( +.$.$.$.$.$.$.@.| Q t t 8.8.", +"8.8.8.8.8.$.:.>.>.:.@...^ H Q | $.;.;.;.$.$.$.+.| Q t < 1 t 8.8.", +"8.8.8.8.8.%.;.;.;.;.;.;.$.@.$.;.;.;.;.;.$.+./ s t < < 3 8.8.8.8.", +"8.8.8.8.8.8.$.;.;.;.;.;.;.;.;.;.;.;.$.+./ a 1 < < 2 a 8.8.8.8.8.", +"8.8.8.8.8.8.@.;.;.;.;.;.;.;.;.;.@.| Q u 1 , , 3 a 8.8.8.8.8.8.8.", +"8.8.8.8.8.8.@.$.;.;.;.;.;.;.@.| f t < < 1 t a 8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.$.$.$.;.$.+.| f 3 < , 2 y 8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.@.$.$...Q a 3 < , 1 p 8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.+...Q t < , , 2 u 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.a 1 , < y u 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.8.6 t H 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +"8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8." +}; --- texworks-0.2.3.orig/debian/patch-print +++ texworks-0.2.3/debian/patch-print @@ -0,0 +1,378 @@ +--- texworks-0.0.1~svn337.orig/src/TeXDocument.h ++++ texworks-0.0.1~svn337/src/TeXDocument.h +@@ -116,6 +116,7 @@ + void selectWindow(bool activate = true); + void typeset(); + void interrupt(); ++ void print(); + + private slots: + void newFile(); +--- texworks-0.0.1~svn337.orig/src/PDFDocument.cpp ++++ texworks-0.0.1~svn337/src/PDFDocument.cpp +@@ -50,6 +50,11 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + + #include + +@@ -1100,6 +1105,7 @@ + connect(actionNew, SIGNAL(triggered()), qApp, SLOT(newFile())); + connect(actionNew_from_Template, SIGNAL(triggered()), qApp, SLOT(newFromTemplate())); + connect(actionOpen, SIGNAL(triggered()), qApp, SLOT(open())); ++ connect(actionPrintPDF, SIGNAL(triggered()), this, SLOT(print())); + + connect(actionQuit_TeXworks, SIGNAL(triggered()), TWApp::instance(), SLOT(maybeQuit())); + +@@ -1710,3 +1716,203 @@ + } + } + ++void PDFDocument::print() ++{ ++ QPrinter printer(QPrinter::HighResolution); ++ QPrintDialog printDlg(&printer, this); ++ QPainter painter; ++ QProgressDialog progressDlg(this); ++ Poppler::Page * page; ++ QImage pageImage; ++ QRect viewport; ++ int dpiX, dpiY; ++ double dpiXScale = 1.0, dpiYScale = 1.0; ++ double scale; ++ unsigned int firstPage, lastPage, i; ++ bool success = false; ++ ++ // check if there's a pdf document to print ++ if(!document) return; ++ ++ // check if we have permission to print the document ++ if(!document->okToPrint()) { ++ QMessageBox::critical(this, tr("Printing denied"), tr("You are not permitted to print this document")); ++ return; ++ } ++ ++ // Set up some basic information about the document ++ printer.setCreator(TEXWORKS_NAME); ++ printer.setDocName(document->info("Title")); ++ if(printer.docName().isEmpty()) printer.setDocName(QFileInfo(curFile).baseName()); ++ ++ // do some setup for the print dialog ++ printDlg.setMinMax(1, document->numPages()); ++ printDlg.setOption(QAbstractPrintDialog::PrintToFile, true); ++ printDlg.setOption(QAbstractPrintDialog::PrintSelection, false); ++ printDlg.setOption(QAbstractPrintDialog::PrintPageRange, true); ++ printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true); ++ printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName())); ++ ++ // show the print dialog to the user ++ if(printDlg.exec() != QDialog::Accepted) return; ++ ++ // determine the print range ++ switch(printDlg.printRange()) { ++ case QAbstractPrintDialog::PageRange: ++ firstPage = printDlg.fromPage(); ++ lastPage = printDlg.toPage(); ++ break; ++ default: ++ firstPage = 1; ++ lastPage = document->numPages(); ++ } ++ ++ // On *nix-like platforms, try using lp for printing ++ #if defined(Q_WS_X11) || defined(Q_WS_MAC) ++ // Catch empty printer names (e.g. used by CUPS for "printing to pdf") ++ if(!printer.printerName().isEmpty()) { ++ QStringList arguments; ++ ++ arguments << "lp"; ++ ++ arguments << QString("-d %1").arg(printer.printerName()); ++ arguments << QString("-n %1").arg(printer.numCopies()); ++ arguments << QString("-t \"%1\"").arg(printer.docName()); ++ arguments << QString("-P %1-%2").arg(firstPage).arg(lastPage); ++ ++ switch(printer.duplex()) { ++ case QPrinter::DuplexNone: ++ arguments << "-o sides=one-sided"; ++ break; ++ case QPrinter::DuplexShortSide: ++ arguments << "-o sides=two-sided-short-edge"; ++ break; ++ case QPrinter::DuplexLongSide: ++ arguments << "-o sides=two-sided-long-edge"; ++ break; ++ default: ++ break; ++ } ++ arguments << "--"; ++ ++ arguments << QString("\"%1\"").arg(curFile); ++ ++ // passing arguments as QStringList didn't work for me - probably ++ // because of improper quoting of spaces ++ if(QProcess::execute(arguments.join(" ")) == 0) return; ++ } ++ #endif // On *nix, try using lpr for printing ++ ++ // On Windows, try using OS native operation ++ #if defined(Q_WS_WIN) ++ { ++ // First try: directly passing postscript to the printer (if supported) ++ // I'm not sure if this is supported anywhere ++ // Note: QPrinter::getDC and QPrinter::releaseDC are undocumented ++ HDC dc; ++ Poppler::PSConverter * psConv; ++ ++ dc = printer.getDC(); ++ ++ if(dc) { ++ int nEscapeCode = POSTSCRIPT_PASSTHROUGH; ++ if(ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&nEscapeCode, 0, NULL ) > 0 && (psConv = document->psConverter())) { ++ // Convert the pdf to postscript instructions ++ QBuffer buffer; ++ ++ buffer.open(QBuffer::ReadWrite); ++ psConv->setOutputDevice(&buffer); ++ psConv->convert(); ++ ++ // and send them to the printer ++ success = (ExtEscape(dc, POSTSCRIPT_PASSTHROUGH, buffer.data().size(), buffer.data().data(), 0, NULL) > 0); ++ ++ buffer.close(); ++ } ++ printer.releaseDC(dc); ++ if(success) return; ++ } ++ // Second try: print by calling the system's standard printing program for pdf ++ // Seems to only print to the default printer, hence disabled for now ++/* ++ wchar_t * filename; ++ HRESULT coInit; ++ filename = new wchar_t[curFile.size()]; ++ ++ curFile.toWCharArray(filename); ++ coInit = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); ++ if(coInit == S_OK || coInit == S_FALSE) { ++ success = ((int)ShellExecute(NULL, L"print", filename, NULL, NULL, SW_NORMAL) > 32); ++ CoUninitialize(); ++ } ++ delete[] filename; ++ if(success) return; ++*/ ++ } ++ #endif // On Windows, try using OS native operation ++ ++ // Fallback: use Qt for printing ++ // ++ // This means rendering the pages as images via poppler and printing those ++ // To keep the rendering time and file size reasonable, resolution is ++ // clamped to a maximum of 300dpi. If you need more, use another program ;). ++ ++ { ++ // ignore printer margins while painting - the margins are included in the ++ // pdf file ++ printer.setFullPage(true); ++ ++ painter.begin(&printer); ++ viewport = painter.viewport(); ++ ++ dpiX = printer.printEngine()->metric(QPaintDevice::PdmDpiX); ++ dpiY = printer.printEngine()->metric(QPaintDevice::PdmDpiY); ++ ++ // clamp the resolution to 300 dpi (postscript devices return 1200 dpi to ++ // Qt by default) to reduce file size and render time ++ dpiXScale = qMax(1, dpiX / 300); ++ dpiYScale = qMax(1, dpiY / 300); ++ dpiX = qMin(300, dpiX); ++ dpiY = qMin(300, dpiY); ++ ++ progressDlg.setAutoClose(true); ++ progressDlg.setRange(firstPage, lastPage + 1); ++ progressDlg.setWindowModality(Qt::WindowModal); ++ for(i = firstPage; i <= lastPage && !progressDlg.wasCanceled(); ++i) { ++ progressDlg.setValue(i - firstPage); ++ progressDlg.setLabelText(tr("Printing page %1 of %2").arg(i - firstPage + 1).arg(lastPage - firstPage + 1)); ++ ++ page = document->page(i - 1); ++ if(page) { ++ pageImage = page->renderToImage(dpiX, dpiY); ++ painter.save(); ++ ++ // calculate the scale factor necessary to resize the page image to ++ // the real page while retaining the aspect ratio ++ scale = qMin((double)viewport.width() / (dpiXScale * pageImage.width()), (double)viewport.height() / (dpiYScale * pageImage.height())); ++ ++ // if we need to shrink the page, so be it ++ if(scale < 1) { ++ painter.scale(scale, scale); ++ } ++ // otherwise center the page image on the page ++ // TODO: handle landscape etc. ++ else { ++ painter.translate( (viewport.width() - dpiXScale * pageImage.width()) / 2, (viewport.height() - dpiYScale * pageImage.height()) / 2); ++ } ++ painter.scale(dpiXScale, dpiYScale); ++ ++ painter.drawImage(0, 0, pageImage); ++ ++ painter.restore(); ++ } ++ ++ if(i != lastPage) printer.newPage(); ++ } ++ ++ if(progressDlg.wasCanceled()) printer.abort(); ++ else painter.end(); ++ ++ progressDlg.reset(); ++ } ++} +--- texworks-0.0.1~svn337.orig/src/TeXDocument.ui ++++ texworks-0.0.1~svn337/src/TeXDocument.ui +@@ -183,7 +183,7 @@ + 0 + 0 + 780 +- 22 ++ 25 + + + +@@ -199,6 +199,7 @@ + + + ++ + + + +@@ -1025,6 +1026,18 @@ + QAction::NoRole + + ++ ++ ++ ++ :/images/tango/document-print.png:/images/tango/document-print.png ++ ++ ++ Print ++ ++ ++ Ctrl+P ++ ++ + + + +--- texworks-0.0.1~svn337.orig/src/TeXDocument.cpp ++++ texworks-0.0.1~svn337/src/TeXDocument.cpp +@@ -56,6 +56,8 @@ + #include + #include + #include ++#include ++#include + + #ifdef Q_WS_WIN + #include +@@ -135,6 +137,7 @@ + connect(actionSave_As, SIGNAL(triggered()), this, SLOT(saveAs())); + connect(actionRevert_to_Saved, SIGNAL(triggered()), this, SLOT(revert())); + connect(actionClose, SIGNAL(triggered()), this, SLOT(close())); ++ connect(actionPrintSource, SIGNAL(triggered()), this, SLOT(print())); + + connect(actionRemove_Aux_Files, SIGNAL(triggered()), this, SLOT(removeAuxFiles())); + +@@ -2441,3 +2444,26 @@ + pdfDoc = NULL; + } + } ++ ++void TeXDocument::print() ++{ ++ QPrinter printer(QPrinter::HighResolution); ++ QPrintDialog printDlg(&printer, this); ++ ++ // Set up some basic information about the document ++ printer.setCreator(TEXWORKS_NAME); ++ printer.setDocName(QFileInfo(curFile).baseName()); ++ ++ // do some setup for the print dialog ++ // Note: no page range since we don't know how many pages this will be. ++ printDlg.setOption(QAbstractPrintDialog::PrintToFile, true); ++ printDlg.setOption(QAbstractPrintDialog::PrintSelection, true); ++ printDlg.setOption(QAbstractPrintDialog::PrintPageRange, false); ++ printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true); ++ printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName())); ++ ++ // show the print dialog to the user ++ if(printDlg.exec() != QDialog::Accepted) return; ++ ++ textEdit->print(&printer); ++} +--- texworks-0.0.1~svn337.orig/src/PDFDocument.ui ++++ texworks-0.0.1~svn337/src/PDFDocument.ui +@@ -23,7 +23,7 @@ + 0 + 0 + 800 +- 22 ++ 25 + + + +@@ -43,6 +43,7 @@ + + + ++ + + + +@@ -677,6 +678,18 @@ + QAction::NoRole + + ++ ++ ++ ++ :/images/tango/document-print.png:/images/tango/document-print.png ++ ++ ++ Print... ++ ++ ++ Ctrl+P ++ ++ + + + +--- texworks-0.0.1~svn337.orig/src/PDFDocument.h ++++ texworks-0.0.1~svn337/src/PDFDocument.h +@@ -244,6 +244,7 @@ + void selectWindow(bool activate = true); + void texClosed(QObject *obj); + void reload(); ++ void print(); + + private slots: + void updateRecentFileActions(); +--- texworks-0.0.1~svn337.orig/res/resources.qrc ++++ texworks-0.0.1~svn337/res/resources.qrc +@@ -19,6 +19,7 @@ + tango/document-open.png + images/fileprint.png + tango/document-save.png ++ tango/document-print.png + tango/go-first.png + images/fitwidth.png + images/fitwindow.png --- texworks-0.2.3.orig/debian/control +++ texworks-0.2.3/debian/control @@ -0,0 +1,23 @@ +Source: texworks +Section: editors +Priority: extra +Maintainer: Atsuhito KOHDA +Build-Depends: debhelper (>= 7), libhunspell-dev, qt4-dev-tools, libpoppler-qt4-dev, libdbus-1-dev, sharutils +Standards-Version: 3.8.3 +Homepage: http://www.tug.org/texworks/ + +Package: texworks +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Recommends: texlive-latex-base +Suggests: texlive-xetex +Description: An environment for authoring TeX (LaTeX, ConTeXt, etc) documents + An environment for authoring TeX (LaTeX, ConTeXt, etc) documents, with + a Unicode-based, TeX-aware editor, integrated PDF viewer, and a clean, + simple interface accessible to casual and non-technical users. + . + TeXworks is inspired by Dick Koch's award-winning TeXShop program for + Mac OS X, which has made quality typesetting through TeX accessible to + a wider community of users, without a technical or intimidating face. + The goal of TeXworks is to deliver a similarly integrated, easy-to-use + environment for users on other platforms, especially GNU/Linux and Windows. --- texworks-0.2.3.orig/debian/copyright +++ texworks-0.2.3/debian/copyright @@ -0,0 +1,69 @@ +This work was packaged for Debian by: + + Atsuhito KOHDA on Sun, 11 Oct 2009 15:25:52 +0900 + +It was downloaded from + +Upstream Authors: + + Jonathan Kew + Jérôme Laurens + Till Tantau + +Copyright: + + TeXworks is copyright (c) 2007-09 by Jonathan Kew. + The SyncTeX code is copyright (c) 2008, 2009 by Jérôme Laurens + Beamer templates are Copyright 2004 by Till Tantau + +License of TeXworks: + + Distributed under the terms of the GNU General Public License, version 2 or (at your option) any later version. + +License of the SyncTeX: + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, + copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following + conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE + + Except as contained in this notice, the name of the copyright holder + shall not be used in advertising or otherwise to promote the sale, + use or other dealings in this Software without prior written + authorization from the copyright holder. + +License of the Beamer templates: + + % In principle, this file can be redistributed and/or modified under + % the terms of the GNU Public License, version 2. + % + % However, this file is supposed to be a template to be modified + % for your own needs. For this reason, if you use this file as a + % template and not specifically distribute it as part of a another + % package/program, I grant the extra permission to freely copy and + % modify this file as you see fit and even to delete this copyright + % notice. + +The Debian packaging is: + + Copyright (C) 2009 Atsuhito KOHDA + +and is licensed under the GPL version 3, +see `/usr/share/common-licenses/GPL-3'. + --- texworks-0.2.3.orig/debian/rules +++ texworks-0.2.3/debian/rules @@ -0,0 +1,104 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +USDIR=$(CURDIR)/debian/texworks/usr/share + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + patch -p1 < ./debian/patch-print + uudecode debian/document-print.png.enc + mv document-print.png res/tango/ + qmake-qt4 + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + #docbook-to-man debian/texworks.sgml > texworks.1 + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + if [ -f Makefile ]; then $(MAKE) clean; fi + rm -f ./texworks ./Makefile src/DefaultBinaryPaths.h + if [ -d moc ];then rmdir moc; fi + if [ -d obj ];then rmdir obj; fi + if [ -d rcc ];then rmdir rcc; fi + if [ -d ui ];then rmdir ui; fi + patch -NRp1 < ./debian/patch-print || true + rm -f document-print.png res/tango/document-print.png + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Add here commands to install the package into debian/texworks. +# $(MAKE) DESTDIR=$(CURDIR)/debian/texworks install + cp ./texworks $(CURDIR)/debian/texworks/usr/bin + cp debian/texworks.xpm $(USDIR)/pixmaps/ + cp debian/texworks.desktop $(USDIR)/applications/ + +# Build architecture-independent files here. +binary-indep: install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples +# dh_install + dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman debian/texworks.1 + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure +#%: +# dh $@ --- texworks-0.2.3.orig/debian/menu.ex +++ texworks-0.2.3/debian/menu.ex @@ -0,0 +1,2 @@ +?package(texworks):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\ + title="texworks" command="/usr/bin/texworks" --- texworks-0.2.3.orig/debian/dirs +++ texworks-0.2.3/debian/dirs @@ -0,0 +1,3 @@ +usr/bin +usr/share/pixmaps +usr/share/applications --- texworks-0.2.3.orig/debian/postinst.ex +++ texworks-0.2.3/debian/postinst.ex @@ -0,0 +1,39 @@ +#!/bin/sh +# postinst script for texworks +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- texworks-0.2.3.orig/debian/postrm.ex +++ texworks-0.2.3/debian/postrm.ex @@ -0,0 +1,37 @@ +#!/bin/sh +# postrm script for texworks +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- texworks-0.2.3.orig/debian/preinst.ex +++ texworks-0.2.3/debian/preinst.ex @@ -0,0 +1,35 @@ +#!/bin/sh +# preinst script for texworks +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- texworks-0.2.3.orig/debian/prerm.ex +++ texworks-0.2.3/debian/prerm.ex @@ -0,0 +1,38 @@ +#!/bin/sh +# prerm script for texworks +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `upgrade' +# * `failed-upgrade' +# * `remove' `in-favour' +# * `deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- texworks-0.2.3.orig/debian/watch.ex +++ texworks-0.2.3/debian/watch.ex @@ -0,0 +1,23 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# See uscan(1) for format + +# Compulsory line, this is a version 3 file +version=3 + +# Uncomment to examine a Webpage +# +#http://www.example.com/downloads.php texworks-(.*)\.tar\.gz + +# Uncomment to examine a Webserver directory +#http://www.example.com/pub/texworks-(.*)\.tar\.gz + +# Uncommment to examine a FTP server +#ftp://ftp.example.com/pub/texworks-(.*)\.tar\.gz debian uupdate + +# Uncomment to find new files on sourceforge, for devscripts >= 2.9 +# http://sf.net/texworks/texworks-(.*)\.tar\.gz + +# Uncomment to find new files on GooglePages +# http://example.googlepages.com/foo.html texworks-(.*)\.tar\.gz --- texworks-0.2.3.orig/debian/docs +++ texworks-0.2.3/debian/docs @@ -0,0 +1 @@ +README --- texworks-0.2.3.orig/debian/document-print.png.enc +++ texworks-0.2.3/debian/document-print.png.enc @@ -0,0 +1,26 @@ +begin 644 document-print.png +MB5!.1PT*&@H````-24A$4@```"`````@"`8```!S>GKT````!'-"250("`@( +M?`ADB````ZQ)1$%46(7EE[M/(U<4QG]C9CR#L8-E+(1@@8BU*%9;@$'Y!R)E +M6R1JR@"[,8(R04I"D19"*!(I%&DI4H=-2>^&`@DIBA"/%3@XV!Z#PSQO"L:C +M&9N'%Y.DR"<=^=YSSYSSZ3OWWAG#_QW270OKZ^L_&(8Q"T3:K.&JJOKCTM+2 +MZ]L6Y;N>,DUS=G%QL=WB`)&-C8U9X/T(""$B`&=G9VU5[^OK\W.]%X$@CH^/ +M;_7;MDVI5"*=3B-)X6X.#@ZV1/!!`HJB,#(RU=-T_0OHF!229)\)8+^8K'8 +M1+2WM[=U`O/S\Q]U='3\8MMV#\#%Q<6M28-H]#7.ZPK,S7E@60RR=K:&F-C8U2KU:;$MQVONXAT=761S^?)Y7*4 +MRV565U=_2Z52+U965NR0`I(D?3$S,].;3"8!2*52_@73#BXO+TDD$M1J->+Q +M.-/3TQ]N;6U]#GP3"LSEOOT5V[9X-C"`IFE$HTK`HD35*&K(5%151=."IJ%U:G1Z!K"S +MLP.`:9DA`DT*]/?W\^577V-95BBPOL`ZSI,3&3) +M9L<10N"ZKM?_P-AU<3V?\'QN*V/OUVH@T-2"?QIF@[+_/H'_6H'&%M3W@!J) +M1,QJ58_&8K%`W[WS'AR[P7O`VPNMC(6+$*#K%21)J3SWIZTI\*(5KZ7'\$G'*Y_//V]O9W +MP)]`H7Z\-8]1-Q#S2#W%OZ(@+"^G!5P"YT"E\06O`%%`?>+B`(YG%F#RN#OM +7Z?$WY*!45:$5$