Posts

Showing posts with the label Export

-bash: Export: `=': Not A Valid Identifier

Answer : You cannot put spaces around the = sign when you do: export foo=bar Remove the spaces you have and you should be good to go. If you type: export foo = bar the shell will interpret that as a request to export three names: foo , = and bar . = isn't a valid variable name, so the command fails. The variable name, equals sign and it's value must not be separated by spaces for them to be processed as a simultaneous assignment and export. I faced the same error and did some research to only see that there could be different scenarios to this error. Let me share my findings. Scenario 1: There cannot be spaces beside the = (equals) sign $ export TEMP_ENV = example-value -bash: export: `=': not a valid identifier // this is the answer to the question $ export TEMP_ENV =example-value -bash: export: `=example-value': not a valid identifier $ export TEMP_ENV= example-value -bash: export: `example-value': not a valid identifier Scenario 2: Objec...

Automatizing PSfrag Export

Image
Answer : Let me try to give you some hints. Problem 1. When you look at a specific tick in a Graphics it usually looks similar to the following {200., 200., {0.00625, 0.}, {GrayLevel[0.], AbsoluteThickness[0.25]}} it means, at position 200 draw the number 200. The next list is the specification of the tick-length and then follows a list of graphic-directives to use. I assume if you convert the label into another form, like a string, you may have more luck with your approach. Let's try something transformTick[{pos_, label_, length_List, spec_List}] := {pos, ToString[label, TraditionalForm], length, spec} p1 = Plot[x^2, {x, 0, 1000}, Frame -> True] p2 = Show[p1, FrameTicks -> Map[transformTick, FrameTicks /. AbsoluteOptions[p, FrameTicks], {2}]] It seems the Ticks are a bit smaller and the dot after the number does not appear in the original but otherwise it looks OK for me. If you now compare ImportString[ExportString[#, "EPS"], "EPS...