# Tag Info

18

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

17

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"]], ...

17

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 ...

15

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}, ...

14

One common way to deal with diagnostic messages is something like this: Instead of Print use some other head of your choosing, e.g. debugPrint. f[x_] := (debugPrint["x is ", x]; x^2) Now you can either simply define debugPrint = Print to enable messages permanently, or you can do it temporarily in a localized way with Block[{debugPrint = Print}, f[5]] ...

12

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

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

I don't think that this is a problem with Mathematica, but rather with a combination of (possibly) HP printers and PostScript printer drivers on Macs. The error you see is a PostScript error; see this site for an explanation. The short version is that the printer has reached some kind of internal limit, most commonly caused by a page that is too complex ...

9

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 ...

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).

9

You have several possibilities: 1) Instead of Printing into usual StandardForm Cell where the parsing and 2D formatting take significant processor's time you can print into plain text Cells: CellPrint[Cell["stuff=" <> ToString[stuff]]]] This takes substantially less CPU time and should render much faster. 2) Instead of printing into separate cells ...

9

Seems like you are looking for Inactivate: ClearAll[x, y]; Inactivate[ Print[x = 1]; Print[y = x + 3]; y, Print] 4

9

This is a known problem with nodejs on Windows. The stdout stream is an asynchronous stream and is not always being flushed before the process exits. A work-around is to perform an explicitly synchronous write to stdout (i.e. file descriptor #1): Import["!node -e require('fs').writeSync(1,'test')", "Text"] (* test *) The bug report referenced above ...

8

On a Linux pc, the relevant file is in a place like this one: /usr/local/Wolfram/Mathematica/10.1/SystemFiles/FrontEnd/TextResources/X/MenuSetup.tr To edit the file, one needs administrator rights, i.e. modify it under sudo. Since introducing errors can make Mathematica no longer usable, first make a backup copy of the original file before trying 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

NotebookPrint[expr, Interactive -> True]

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 @@ # &]

6

A wide variety of print settings can be stored within a given notebook. If you are observing print settings that appear to differ from the default settings then my guess is that inadvertently some unwanted settings have been localized to the notebook. You can check this via the Options Inspector. For your specific problem you can ensure that the notebook ...

6

I propose: a = {1, 4, 11, 14}; b = Range[0, 14]; {#, Pick[b, Mod[b (1 + #), 15], 0]} & /@ a { {1, {0}}, {4, {0, 3, 6, 9, 12}}, {11, {0, 5, 10}}, {14, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}} } Anything more is formatting, which I shall leave to you.

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

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[], ...

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