Tag Info

Hot answers tagged

16

You can set this in a style sheet so that it is done once and you don't have to do it again: Cell[StyleData[All, "Printout"], ShowCellLabel -> False] or can you programmatically add this private style to your notebook: SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[{Cell[StyleData[StyleDefinitions -> "Default.nb"]], ...


16



15

Short answer: I hope Export["foo.pdf", plot,Background->None] fixes it. Let's get there step by step. First, Acrobat X Pro on my Mac reports that both your PDF files are fine. They print fine, and pass all tests with flying colors. I uncompressed the PDF (thanks pdftk) and a diff on them reveals that one weird object that only appears in your ...


13

For Example: WriteString["stdout", "First part of the result: ", DateString[]]; (*Perform some calc*) i = 0; WriteString["stdout", " -- Addition to the result: ", DateString[], "\n"];


11

You could uncheck ShowCellLabel under Cell Options > Cell Labels in the Option Inspector. If you only want to turn off input and output cells in the printing environment, you could edit the style sheet of the document. In order to do that you choose Edit Stylesheet... in the format menu. Click on the link to the base definition of the style sheet ...


11

You can specify ImageSize in inches. From docs > ImageSize> MoreInformation: Specifications for both width and height can be any of the following: ... 72di di inches (before magnification) ... Examples: Row[{Plot[{Sin[x], Cos[x]}, {x, -2 Pi, 2 Pi}, Frame -> True, AspectRatio -> 1/GoldenRatio, ImageSize -> 72 2], ...


11

Quite redundant after the other answers and links, but I use something like this for vector-based technical drawings and CNC data (using mm as unit). This is not foolproof as it might e.g. screw up with conflicting options and such, so make sure to check the output. Important: SetPlotRange for your graphics explicitely: gfx = Graphics[Line[{{10, 10}, ...


9

Here is a starting point, which people with palette creation experience could expand on to create a "one click" solution. First, my setup: File number 1: "confidential.nb" with two sections and two text cells. I selected the entire first section and hit CTRL+J to bring up the cell tags: I added the tag "Confidential" to all of the cells. This is what ...


9

You might also have luck if you specify the ImageSize Export[filename, plot, "PDF", ImageSize -> 8*72] I have also been able to print files when using the Print As Image option (under Advanced from the Print menu of Adobe).


8

Your question isn't very specific, so here is a generic example from another question From the documentation for ImageSize: The following settings can be given: 72di di inches (before magnification) Suppose we want to give sizes in centimeters. We establish a scale: cm = 72/2.54; And we give the ImageSize in this scale, also making sure to ...


7

Sounds like you are looking for $Messages and $Output, and maybe also $PrePrint or $Post. $Messages and $Output are a list of streams to which corresponding output is written (note that $Output is only getting output from Prints, not from return values of shift-return-evaluations). To cover return values of shift-return-evaluations you might want to ...


7

I thought this might be useful information for users. WRI tech support say this is a bug. However if you open the exported PDF in the open source PDF reader Evince then you can print.


7

I have found one solution, using a temporary file:- streams = AppendTo[$Output, OpenWrite[]]; Module[{}, Print[Plot[Sin[x], {x, 0, 2 Pi}]]; a = 123]; Close@Last@streams; $Output = Most@streams; printoutput = ReadList@First@Last@streams


6

Make your CellEvaluationFunction this: Function[Print[NotebookRead[EvaluationCell[]]];] Note that EvaluationCell (and the CellObject it creates) are new to version 9.


6

This seems to be a problem with the "Preview" application from Mac OSX. Viewing both at 100%, Preview renders the points very large while Acrobat does not. I blame Preview. I'm not sure how to fix it for Preview only. This should be a comment but I can't post those yet. Using the built in "Save as PDF" dialog from the print menu works fine for me. ...


6

I think this does what you want: Less @@ SortBy[Defer[Subscript[ω, #]] & /@ {1, 2, 11, 22}, N @@ # &]


5

(I posted a similar answer on MathGroup recently.) Here's an alternative to the other very good answers you already received. If you need high accuracy, I recommend exporting to DXF. DXF is a format used by CAD applications requiring precision. Then you can use one of the many DXF-viewers or CAD programs to print to precision. (There seem to be a ...


5

NotebookPrint[expr, Interactive -> True]


5

First, I cannot reproduce your issue on Mathematica 8.0.1.0 on 64-bit Linux (CentOS 5.8). But I compare what you obtain and what I see, and I think I have an idea. The notebook does not specifically require fonts, and as such, the font for e.g. your title cell is system-dependent. On my Mac, it uses a bold Helvetica in size 36, while on my Linux box it ...


5

You can temporarily redefine Print, like so: fun[] := Module[{}, Print[Plot[Sin[x], {x, 0, 2 Pi}]]; a = 123] list = {}; Block[{Print = AppendTo[list, {##}] &}, fun[]] Now list contains everything that was printed. (Of course in a practical application you'd probably want to do something smarter than an inefficient periodic AppendTo) If you still ...


5

Note that your definitions k=1 and i=1 make little difference, as i and k are local in the do loops. To see how the code behaves we actually have to look at the range specifications for k first. temp is a list, so values for k be taken from this list. But the values for k are then always lists as well, as temp is a list of lists. So also in the inner loop ...


5

Too long for comment and there is not much information in the question but I would use CellTags. You can add tag by Ctrl+J or via menu: Cell/CelTags/Add... If you want to print only cells with particular tag you can create such document: CreateDocument[ NotebookRead /@ Cells[EvaluationNotebook[], ...


5

You can use Print@Row instead of Grid. However by default output cells have PageBreakWithin->False option. So you can avoid it by CellPrint@ExpressionCell[..., PageBreakWithin -> True]. Example: f[a_] := Plot[#[x], {x, 0, a}, AspectRatio -> 1, ImageSize -> 200] & /@ {Sin, Cos, Tan} f /@ {10, 30, 100} // Grid ...


4

This problem of not printing Exported PDFs originated when upgrading from version 7 to version 8. In version 7 it worked fine. In February 2011, I complained to Wolfram Research, as a Premier Service Member, but they could not fix this at the time. By trial and error I have stumbled upon a workaround. Export the graphics as a Postscript file: ...


4

I can only give a partial answer. Your problem arises because FilePrint doesn't use $Output (stdout). It uses the stderr stream, so you can't capture what it writes by using Block and assigning to $Output. Unfortunately, I don't think any system variable is bound to stderr. Perhaps I'm wrong. In that case, I hope a more knowable person will be able to ...


4

Try setting the printing environment on 'Working' using the File > Printing Settings > Printing Environment menu. The default for printing, the Printout stylesheet uses a condensed version of the screen stylesheet. Proof: If you open the stylesheet editor (Format > Edit Stylesheet...) while using the standard notebook style you get this: Click ...


4

I haven't figured out how to add a "Content Removed" label or to hide entire groups of cells, but you can use Style Sheets and the Printout environment to at least automatically Close cells with the style "Confidential" while printing. With this method I think you would need to have a different Confidential style for each cell type (code, text, etc.) that ...


4

Perhaps inches = 72; Plot[Sin[x], {x, 0, 4 Pi}, ImageSize -> { 4 inches, Automatic}] If you have to use Quantity you can set the ImageSize converting inches to printer points: ImageSize -> { 72 QuantityMagnitude[Quantity[4, "Inches"]], Automatic} Update: or, better yet, Plot[Sin[x], {x, 0, 4 Pi}, PlotStyle->Thick, ImageSize -> { ...


3

Please try setting menu File > Print Settings > Printing Environment to Working and report if the behavior changes at all. Please also try each of these settings and report any effect: SetOptions[$FrontEndSession, PrivateFontOptions -> {"FontType" -> "Outline"}] SetOptions[$FrontEndSession, PrivateFontOptions -> ...


3

It looks like something screwy on your system rather than anything specific to your notebook or stylesheet (I downloaded and everything was fine on my Mac). You could try explicitly setting the FontTracking at various levels, Global, Notebook, Cell etc. and see if that helps. SetOptions[EvaluationNotebook[], FontTracking -> "Condensed"] ...



Only top voted, non community-wiki answers of a minimum length are eligible