TeX - LaTeX Asked on June 24, 2021
Attached code is a letter ‘M’ (one of) from a logo. It turns out that the letter comes outside the boundary. How can I get a preview of the whole? Is the space limited within the standalone class? And do I have to resize/ scale my picture first?
documentclass{standalone}
usepackage{pst-all}
begin{document}
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(6499.85351562,944)
{
newrgbcolor{curcolor}{0 0.58823532 1}
pscustom[linestyle=none,fillstyle=solid,fillcolor=curcolor]
{
newpath
moveto(4887.01547782,902.50517744)
lineto(4887.01547782,385.00785704)
lineto(4680.59148299,385.00785704)
lineto(4680.59148299,393.3465235)
curveto(4680.59148299,508.00785397)(4680.60614965,622.66918443)(4680.50214965,737.33184823)
curveto(4680.49948299,740.51318149)(4679.21281635,743.69451474)(4678.5261497,746.87451466)
curveto(4677.95281638,746.707848)(4677.37948307,746.54118134)(4676.80481641,746.37451467)
curveto(4664.71015005,722.28651528)(4652.53681702,698.23584921)(4640.54215065,674.09584981)
curveto(4627.94481763,648.74251711)(4615.65415128,623.23718442)(4602.97681826,597.92251839)
curveto(4591.42215188,574.84918563)(4579.32748552,552.04651953)(4567.8514858,528.93452011)
curveto(4558.01815272,509.13318727)(4548.91948628,488.96652111)(4539.12748652,469.1425216)
curveto(4531.92215337,454.5518553)(4524.07815356,440.27585566)(4516.60082042,425.81718935)
curveto(4510.77548723,414.55052297)(4504.20882073,403.55452324)(4499.66882084,391.78385687)
curveto(4497.13282091,385.20519037)(4493.87548765,385.01585704)(4488.20882113,385.04252371)
curveto(4440.65548898,385.26919037)(4393.10082351,385.17185704)(4345.54882469,385.17185704)
lineto(4318.99415869,385.17185704)
curveto(4311.08349222,400.65852332)(4303.15415909,415.86652294)(4295.51549261,431.21585589)
curveto(4287.27015948,447.78385547)(4279.43015968,464.55318839)(4271.16082655,481.10918797)
curveto(4263.47149341,496.50785425)(4255.31282695,511.66918721)(4247.62482714,527.06785349)
curveto(4240.62216065,541.08918647)(4234.10882748,555.35318612)(4227.14082765,569.39318577)
curveto(4220.16616116,583.45051875)(4212.82749468,597.32785173)(4205.77816152,611.34918472)
curveto(4199.49949501,623.83185107)(4193.4688285,636.43985076)(4187.20349532,648.92918378)
curveto(4178.72082887,665.83051669)(4170.11682908,682.6718496)(4161.56749596,699.53984918)
curveto(4155.53682944,711.44251555)(4149.58616293,723.39051525)(4143.41149641,735.21851495)
curveto(4142.04882978,737.83051489)(4139.8954965,740.03051483)(4138.10616321,742.41984811)
curveto(4137.15549657,739.50784818)(4135.37949662,736.59851492)(4135.37682995,733.68651499)
curveto(4135.23682995,619.9131845)(4135.25816329,506.13985401)(4135.25816329,392.36652352)
lineto(4135.25816329,385.10652371)
lineto(3927.58083514,385.10652371)
lineto(3927.58083514,902.00384412)
lineto(4254.56482697,902.00384412)
curveto(4260.60082682,889.1665111)(4266.78882666,876.1211781)(4272.87549318,863.02784509)
curveto(4283.05415959,841.12384564)(4293.03149267,819.12517952)(4303.34615908,797.2865134)
curveto(4314.94749213,772.72651402)(4326.93015849,748.34651462)(4338.54882487,723.79584857)
curveto(4344.35949139,711.51584888)(4349.60882459,698.97184919)(4355.34082445,686.65051617)
curveto(4360.08882433,676.45184976)(4365.29415753,666.46651667)(4370.06749075,656.27851693)
curveto(4377.2208239,641.01051731)(4384.19282373,625.65318436)(4391.20882355,610.31985141)
curveto(4395.32749012,601.31718497)(4399.04615669,592.11185186)(4403.61948991,583.34918542)
curveto(4405.70615652,579.35318552)(4408.46082312,580.66118548)(4410.17415641,584.52651872)
curveto(4413.95815632,593.05451851)(4418.02082288,601.46385163)(4421.72882279,610.02518475)
curveto(4429.99415592,629.11185094)(4438.04882238,648.28918379)(4446.30748884,667.37984998)
curveto(4458.17948855,694.83318263)(4470.10082158,722.26651528)(4482.10615461,749.66251459)
curveto(4490.37682107,768.53318079)(4498.92748753,787.28118032)(4507.16615399,806.16384651)
curveto(4518.87015369,832.97851251)(4530.66882007,859.75851184)(4541.90081979,886.77051116)
curveto(4548.36215296,902.31051078)(4547.89281964,902.50517744)(4565.03681921,902.50517744)
lineto(4878.35681137,902.50517744)
closepath
}
}
end{pspicture}
end{document}
The code is completely rubbish! You used a graphical program which exports this crazy code. Using curveto
for line segments is nonsense.
However, the coordinates for pspicture
were wrong:
documentclass[pstricks]{standalone}
usepackage{pst-all}
begin{document}
psset{xunit=.5pt,yunit=.5pt,runit=.5pt}
begin{pspicture}(3900,375)(4900,925)
[...]
It would be much more easier if you used a simple pspolygon
command! For example:
documentclass[pstricks]{standalone}
usepackage{pst-all}
begin{document}
newrgbcolor{curcolor}{0 0.58823532 1}
begin{pspicture}(8,5)
pspolygon*[linecolor=curcolor](0,0)(0,5)(2.5,5)(4,1.5)(5.5,5)(8,5)(8,0)(6.5,0)(6.5,3.5)(5,0)(3,0)(1.5,3.5)(1.5,0)
end{pspicture}
end{document}
Or with real characters (Helvetica). Needs latex->dvips->ps2pdf:
documentclass{article}
usepackage[paperwidth=12cm,paperheight=6.2cm,margin=0cm]{geometry}
pagestyle{empty}
parindent=0cm
usepackage{pst-text}
begin{document}
DeclareFixedFont{phv}{T1}{phv}{b}{n}{8cm}
begin{pspicture}(0,-0.2)(8,6)
pscharpath[linecolor=blue,fillcolor=blue,fillstyle=solid]{phv MS}
end{pspicture}
end{document}
Answered by user187802 on June 24, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP