Tag Info

Hot answers tagged

16

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


9

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.


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

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

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

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

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


4

The reason why this overhang appears is that the Thickness of the line marking the edge of the Disk is not counted as something that needs to be clipped (although it should). The line itself (the center of the thick red line) is clipped correctly. But of course the result looks very clumsy, and it can only be eliminated if the line thickness is made as ...


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


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

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


3

Here are the steps to the obtain the PDF's files you want without the problems you showed. I am going by the assumption that there is no simple Plot option we are overlooking here, so this solution uses Inskscape to get the pdf file without the clipping you show. 1) Download the install free software Inskscape 2) Export the images you want to svg and not ...


3

You have to remove(set to 0) the margins for Printout in the current Stlysheet. I have the Stylesheet installed on my computer and will hopeful post a more portable(not requiring you to install a new stylsheet solution). The following is a png showing the final output. SetOptions[ EvaluationNotebook[], StyleDefinitions -> Notebook[{ ...


3

Vitally has the same idea, but I thought it would be a hassle to do it manually like that, so let MMA insert the page breaks: myList = Array["object", {20}]; Table[CellPrint[{i, Cell["", "PageBreak", PageBreakBelow -> True]}], {i, myList}] Edit: In response to the comment, Here we create a new notebook and set the page headers to none. Then we ...


2

For a few objects on the page a manual approach is Top Menu >> Insert >> Page Break And then to make sure (on Mac): Top Menu >> File >> Print >> PDF >> Open PDF in Preview


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

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

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


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

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.


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

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


1

I do this kind of things regularly. The view of the PDF documents I obtain I find to be satisfactory. Sometimes there appears a conflict of the embedded figure and the page length. This may give rise to something like a part of the page with no text. If this is strongly unwanted, I fix this up manually (also not a big deal). To make the PDF file I simply ...


1

Another convenient workaround is to export to PDF, reimport the PDF file and export it again. For my files it reduced sizes from 2 MB down to 200 kb. Regards Patrick Edit: Here is an example of an 700kb export. If reimported and reexported, the file size is down to 28k. Quality seems the same to me. Special characters however, like ä or ö from German are ...



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