# Tag Info

18

A simple workaround is to use Export instead of right clicking and choosing Save As ... The result will look like this: Much better. It's not clear to me why this difference exists between saving from the front end or using Export, but there is a significant difference in the quality of the output. Notice that the line widths are different too (the ...

12

Proof of the Szabolcs's idea: Graphics[{PointSize[0.001], Point@RandomReal[1, {1000, 2}]}, ImageSize -> 30] After Save As (28x28 grid): After Export Another workaround is printing the graphic to a file.

12

I had the same problem after switching to Mathematica 10. The issue here is the following: Export uses Rasterize to create the png image. The StyleEnvironement, which is used in Rasterized, cannot be specified as an option but is given by the $FrontEnd object (not by the EvaluatingNotebook[]!). You can change the StyleEnvironement by SetOptions[$FrontEnd, ...

8

I could not get it to work with $FrontEnd, but setting the ScreenStyleEnvironment on$FrontEndSession worked for me. Here text cells get two different backgrounds and font sizes, depending on the environment. ("Printout" is pink and large.) sseOpt = Options[$FrontEndSession, ScreenStyleEnvironment]; SetOptions[$FrontEndSession, ScreenStyleEnvironment ...

7

To long for a comment, but looks great on "10.0 for Mac OS X x86 (64-bit) (June 29, 2014)" with AR, Preview and Skim. Shut-down and restart your system and try with an alternative viewer ... Edit @Jens response is fantastic, right? The procedure improves the resolution dramatically and even reduced the size. I was able to test both algorithms on iMac ...

6

Magnification and Magnify You can use the Magnification option for magnifying the whole graphics: Style[pl, Magnification -> 5/8] Export["example2.pdf", Style[pl, Magnification -> 5/8]] You could also try Magnify: Export["example3.pdf", Magnify[pl, 5/8]] Note that Magnify is affected by the global Magnification option which you can access by ...

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

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

5

The symbols { and [ are taken from the font "Mathematica2Mono" (decimal codes 56 and 64), symbol → (\[Rule] and \[RightArrow]) - from "Mathematica1Mono" (decimal code 174). You can easily see which symbols correspond to these codes in the standard ASCII table: FromCharacterCode[{174, 56, 64}] "®8@" You can display them using Mathematica font: ...

5

Unfortunately some effects, such as transparency, are not supported in EPS, so that workaround is not always usable. I found a different workaround with different tradeoffs: instead of Rectangle use Polygon specify the colours using the VertexColors option of Polygon The polygons will be correct size and will not overlap when exported to PDF. However, ...

5

I think the better solution that I find so far is shown as below: SetOptions[SelectedNotebook[], PrintingStyleEnvironment -> "Printout", ShowSyntaxStyles -> True]

4

So what you basically have to do is to take the head of the arrow only. I was a bit lazy to rebuild the Polygon myself so I looked for a .m file related to Arrow and found Arrow.m in /usr/local/Wolfram/Mathematica/8.0/AddOns/LegacyPackages/Graphics which contains approximately the following function makehead: makehead[len_, wid_, cent_] := Polygon@{{0, 0}, ...

4

You can apply a strategy I learned from @Jens. Add the following to your notebook: Map[SetOptions[#, Prolog -> {{EdgeForm[], Texture[{{{0, 0, 0, 0}}}], Polygon[#, VertexTextureCoordinates -> #] &[{{0, 0}, {1, 0}, {1, 1}}]}}] &, {ParametricPlot}]; Give your plot a name: im1 = PlotU2Treh = ParametricPlot[ ...

3

I see this problem too, and I found it is fixed in Skim and Preview by using this function: rasterTrick[plot_] := Show[plot, Prolog -> {Opacity[0], Texture[{{{0, 0, 0, 0}}}], VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}}, Polygon[{{0, 0}, {.1, 0}, {.1, .1}}]}] Export["regionIBD_MatrixPlot1.pdf", mPlot // rasterTrick] The ...

3

Another quick(?) and dirty way: Let nb be the notebook to be printed. E.g., execute nb = EvaluationNotebook[] in the notebook you would like. Then execute NotebookPrint[NotebookGet@nb /. CellGroupData[data_, Closed] :> CellGroupData[data, Open]] or Export["/tmp/foo.pdf", NotebookGet@nb /. CellGroupData[data_, Closed] :> CellGroupData[data, ...

3

If the PDF file was composed with one of the latest security features of Adobe, you will not be able to parse. You need adobe Acrobat Pro to remove the security feature. This is assuming you have the priviledge to do so. Another option is to print the file to Paperport PDF convert to PDF format and re export to PDF. But this might defeat your purpose to ...

2

You can use the running text option. You can find it at Printing Settings -> Headers and Footers.... It will generate a Dynamic-object in the PageHeaders option of the target Notebook, which will read the contents of Cells with specified style and position per page: One possible way would be put special styled Cells on every page (in the following ...

2

You can do this using CounterFunction: SetOptions[EvaluationNotebook[], PrintingStartingPageNumber -> 1, PrintingOptions -> {"FirstPageHeader" -> True}, PageHeaders -> { {Cell[TextData[{CounterBox["Page"]}], "PageNumber"], Cell[TextData[ CounterBox["Page", CounterFunction :> ...

2

Set your File->Printing Settings->Page Setup as you want it. Set Format->Screen Environment to PrintOut. Most people (assumptions are risky) aren't printing out every notebook so the normal environment is much less cramped than PrintOut.

2

This is an entirely different technique, but I felt that is worth posting. Really this question is asking how to print a booklet of Mathematica cells. Although you can split a page into 2 groups of landscapes cells, IMO the above solution isn't very practical. The above solution doesn't take into account that you might have multiple pages of cells. The ...

2

In Mathematica 9, (rm -rf)'s comment that fonts with the extension .otf (aka OpenType) can't be embedded still holds. In addition, I've also noticed that not all fonts with the extension .ttf can be embedded. When choosing a font for your PDF files, it might be best to always test the files in other environments where that font isn't installed.

2

This might help. Here I have a helper function to make the legend into an Inset: plot = Plot[Evaluate[Exp[-4 f] /. {{f -> t}, {f -> t^2}}], {t, 0, 3}, BaseStyle -> {FontSize -> 11, AbsoluteThickness[1.5]}, PlotStyle -> {Blue, Red}, AxesLabel -> {"t"}, PlotLabel -> "Negativity", PlotLegends -> Placed[{"OU", "FBM"}, ...

2

I cannot reproduce this problem on OS X with the current version of Mathematica (9.0.1). However, I think I remember a similar problem existing in some earlier versions of Mathematica, at least on Windows. If my memory is correct, a possible solution was to use one of the PDF printers (Acrobat Distiller, redmon, etc.) to print the notebook to PDF instead ...

2

Rasterizing is a possibility: data = Notebook[{Cell[ BoxData[ToBoxes[ Rasterize[ Grid[{{11, 22}, {33, 44}}, Frame -> All, FrameStyle -> Directive[AbsoluteThickness[1], Orange]], ImageResolution -> 400](*end of Grid*)]]](*end of Cell*)}]; Export[FileNameJoin[{\$TemporaryDirectory, "grid.pdf"}], data]; ...

2

I'm posting a separate answer to show what I did but please upvote @JoseECalderon if you find this answer useful, as he led me in the right direction regarding security settings. Unfortunately the security settings on my document prevented even printing to a (clean) PDF: I found a blog post where someone needed to unlock exactly the documents I'm working ...

1

Since you mentioned squished axes values when using GraphicsGrid, you can use a combination of ImageSize and BaseStyle--along numerous options to tweak plots and graphics, more info here--within LogLogPlot to achieve the look you want (I haven't experimented with it much but I found font size at 1/20 of image size looks decent). You can also specify the ...

1

If you need to show the points at the arrow tips, you should specify them separately from the specification of the arrows. The points coordinates may be obtained from those of the arrows. Try this: textsize = 16; ah = 0.03; ps1 = 0.5; ps2 = 0.01; lstAr1 = {{{0.0, Sqrt[2]}, {0.35, Sqrt[2]}}, {{-0.1, -Sqrt[2]}, {-0.35, -Sqrt[2]}}, {{2 Pi + 0.1, ...

1

In the command line on linux (I am using fedora 20), try: pdftotext PDFFILE.pdf NEWFILE.txt Then in Mathematica: variable = Import[NEWFILE.txt, #] & /@ {"Element1", "Element2", "Element3", "Element4", "Element5"}; where "Element1..." are the elements obtained by Import [NEWFILE.txt, "Elements"] Then you can examine the variable using part: ...

1

I have found a solution that works but it is OS specific. The following code works on Linux with installed exiftools. A new function is provided (ExportPDF) that takes the same arguments as Export and an optional further argument "title". The PDF is produced with the standard export function and the command line tool exiftool is used to alter the title. If ...

1

I would suggest you make a large graphic object the size of a page, say ImageSize->{700, 1000}, with some details like a grid. Then experiment with the Mathematica print options for margins until you have something that consistently prints at a size you want with the margins you want. Then you can Inset all the graphics you need with a predictable ...

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