2 column documents in mathematica

前端 未结 3 1776
广开言路
广开言路 2021-02-07 18:32

Mathematica can be used to write very nice documents. Does anyone know if it is possible to write documents with 2 columns? If so, can you provide some examples or links to othe

3条回答
  •  耶瑟儿~
    2021-02-07 18:47

    Graphics and Inset can be used for layouts, for example:-

    text = StringTake[ExampleData[{"Text", "Prufrock"}], {226, 931}];
    columntext1 = StringTake[text, 350];
    columntext2 = StringTake[text, {348, 706}];
    column1 = Graphics[{White, Rectangle[{0, 0}, {150, 210}], Black,
        Inset[TextCell[columntext1,
          LineSpacing -> {0, 16}, TextJustification -> 1],
         {0, 210}, {Left, Top}, {150, Automatic}]},
       PlotRange -> {{0, 150}, {0, 210}},
       BaseStyle -> {FontFamily -> "Times", 
             FontWeight -> "Plain", FontSize -> 13}];
    column2 = Graphics[{White, Rectangle[{0, 0}, {150, 210}], Black,
        Inset[TextCell[columntext2,
          LineSpacing -> {0, 16}, TextJustification -> 1],
         {0, 210}, {Left, Top}, {150, Automatic}]},
       PlotRange -> {{0, 150}, {0, 210}},
       BaseStyle -> {FontFamily -> "Times", 
             FontWeight -> "Plain", FontSize -> 13}];
    image = ExampleData[{"TestImage", "House2"}];
    clippedimage = Graphics[{Blue, Rectangle[{0, 0}, {500, 270}],
        Inset[image, {250, 170}, {Center, Center}, {512, 512}]},
       PlotRange -> {{0, 500}, {0, 270}}, ImageSize -> 500];
    Graphics[{White, Rectangle[{0, 0}, {330, 400}],
      Inset[column1, {75, 295}, {Center, Center}, {150, 210}],
      Inset[column2, {255, 295}, {Center, Center}, {150, 210}],
      Inset[clippedimage, {165, 90}, {Center, Center}, {330, 179}]},
     PlotRange -> {{0, 330}, {0, 400}}, ImageSize -> 330]
    

    enter image description here

提交回复
热议问题