FIG2SXD(1)

πŸ“¦
version 0.24 Β· 2 versions
  • 0.24 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.20 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, meet fig2sxd β€” it's the little utility that converts .fig files into .sxd files. that's it, that's the whole job. iconic. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

fig2sxd [-w] [-l(ine)w(idth)1 l] [-stylebase s] figfile sxdfile

🌸 DESCRIPTION 🌸

so basically, this program tries to take the file you hand it in xfig format and turn it into a sxd file that OpenOffice.org Draw can actually open. glow-up complete. πŸ’…

here's the tea on the arguments:

  • if figfile ends with .fig or .xfig and you don't pass sxdfile, the output file gets named just like figfile but with .sxd on the end instead of .(x)fig. auto-naming, we love her. πŸŽ€
  • if you use - for figfile, the program reads from stdin instead. which means you can do this little number:
pstoedit -f fig file.ps - | fig2sxd - file.sxd

and boom, you're converting ps files. πŸͺ„

now, if your file has a LOT of objects, you might wanna reach for something like:

pstoedit -f 'fig:-startdepth 9999' file.ps - | fig2sxd - file.sxd

which gets you more layers. fair warning tho β€” the output of pstoedit is no longer a valid xfig file after this, but it makes the z ordering of the objects in OpenOffice.org Draw stay correct. trade-off, bestie. 🀷

  • if you use - for sxdfile, the program writes to stdout instead.

and then there's the line width situation:

  • with the -linewidth1 option (or its lil nickname -lw1), you can set the width of lines that have thickness 1 in xfig. the unit is 1 cm. if you pass 0 here you get fine lines. example time:
pstoedit -f 'fig:-startdepth 9999' file.ps - | fig2sxd -lw1 0 -
file.sxd
  • with the -w option, out-of-specification values only get you warnings β€” but they will be sanitized. no chaos allowed, sorry. 🧼
  • with the -stylebase option, you can change the prefix of the generated style names. this is highkey useful if you don't want styles from several converted figures mixing together when they get joined into one OpenOffice.org document. the argument to -stylebase has to consist of 4..255 alphanumeric characters. those are the rules. πŸ“

πŸ’€ DEFICIENCIES πŸ’€

ngl, not every single .fig object gets converted perfectly. here's the honest list:

  • splines look pretty similar but they are not exactly the same. close enough? maybe not. 😭
  • text placement might be a little bit wrong, especially for very small font sizes.
  • hatches look different in many cases.
  • hollow arrows are not supported and get replaced by their filled counterparts. gone, reduced to atoms. πŸ’€
  • and yeah, there are various other things that could be improved. we're aware. πŸ™ˆ

also, it looks like OpenOffice.org cannot read xml attribute values longer than 64kB, which is exactly the kind of thing you'd run into with very long polygons or lines. so for unfilled polylines, fig2sxd creates several smaller polylines of 500 points each and groups them together. slay. πŸ’…

but splitting an arbitrary filled polygon? not trivial, and not implemented. don't ask her to do that, she won't. 🚫


πŸ”₯ SEE ALSO πŸ”₯

pstoedit(1), xfig(1) and http://fig2sxd.sourceforge.net/ (for updates, bestie, go check it).


πŸ‘‘ AUTHOR πŸ‘‘

the program and this manual page were both written by Alexander Bürger <acfb@users.sourceforge.net>. we stan. 🫢


okay that's the whole page, no cap. this was FIG2SXD(1) from the General Commands Manual, and that footer tag at the bottom is literally just FIG2SXD(1) again β€” she's her own hype woman. mwah πŸ’‹ 🌈 ⭐

πŸ“¦ where this page comes from