Consider the following example:


% latex filename.tex
% dvips filename.dvi
% ps2pdf filename.ps




    fillstyle = solid,
    fillcolor = lightgray





How do I make PSTricks fill only the enclosed area (the horizontal line isn't there if you remove \pscustom)?

  • may be add title/reason for the edit to make it clear and catchy for others Commented Jul 29, 2013 at 21:50
  • @texenthusiast I just made the initial code simpler. :) Commented Jul 29, 2013 at 22:11

2 Answers 2


When using pscustom it's best to have the starting point and ending point match together; indeed, the reason that you are getting the unexpected result is that PSTricks is connecting the first and last points together- in your code, the first and last points are far away from each other, hence the unwanted horizontal line.

I switched the order of a few of your psarc segments, and also changed the direction of some of them from counter clockwise to clockwise using psarcn to keep everything flowing in the same direction.

While debugging, I found it helpful to colour the different segments, and use arrows to show the direction:

enter image description here

Once everything matched, up, adding pscustom back in gave the result as expected:


% arara: pdflatex: {shell: true}
% !arara: indent: {overwrite: yes}





You'll note that I have left the colours and arrows in the code- just remove them when you're happy with what's going on.

As noted by Werner, in this particular case you might get the same output using ncarcbox, which is detailed on p68 of the documentation.

PS: I've also used the arara tool to help with shell escape.

  • 2
    Great answer. In this, very particular case, pstricks also provides \ncarcbox that creates a similar shape. See p 68 of the pstricks documentation.
    – Werner
    Commented Jun 1, 2013 at 16:31
  • @Werner thanks, I appreciate the compliment :) I had wondered if there was something a built-in way of doing it- I'll add it to my answer :)
    – cmhughes
    Commented Jun 1, 2013 at 16:47
  • @SvendTveskæg you're welcome :)
    – cmhughes
    Commented Jun 2, 2013 at 17:00

As Werner already wrote use \ncarcbox:





You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .