Show More
@@ -532,33 +532,21 b' class ConverterRST(Converter):' | |||
|
532 | 532 | def _unknown_lines(self, data): |
|
533 | 533 | return rst_directive('.. warning:: Unknown cell') + [data] |
|
534 | 534 | |
|
535 | @DocInherit | |
|
535 | 536 | def render_display_format_html(self, output): |
|
536 | """render the html part of an output | |
|
537 | ||
|
538 | Returns list. | |
|
539 | """ | |
|
540 | 537 | return rst_directive('.. raw:: html', output.html) |
|
541 | 538 | |
|
539 | @DocInherit | |
|
542 | 540 | def render_display_format_latex(self, output): |
|
543 | """render the latex part of an output | |
|
544 | ||
|
545 | Returns list. | |
|
546 | """ | |
|
547 | 541 | return rst_directive('.. math::', output.latex) |
|
548 | 542 | |
|
543 | @DocInherit | |
|
549 | 544 | def render_display_format_json(self, output): |
|
550 | """render the json part of an output | |
|
551 | ||
|
552 | Returns list. | |
|
553 | """ | |
|
554 | 545 | return rst_directive('.. raw:: json', output.json) |
|
555 | 546 | |
|
556 | 547 | |
|
548 | @DocInherit | |
|
557 | 549 | def render_display_format_javascript(self, output): |
|
558 | """render the javascript part of an output | |
|
559 | ||
|
560 | Returns list. | |
|
561 | """ | |
|
562 | 550 | return rst_directive('.. raw:: javascript', output.javascript) |
|
563 | 551 | |
|
564 | 552 | |
@@ -663,33 +651,20 b' class ConverterMarkdown(Converter):' | |||
|
663 | 651 | def _unknown_lines(self, data): |
|
664 | 652 | return ['Warning: Unknown cell', data] |
|
665 | 653 | |
|
654 | @DocInherit | |
|
666 | 655 | def render_display_format_html(self, output): |
|
667 | """render the html part of an output | |
|
668 | ||
|
669 | Returns list. | |
|
670 | """ | |
|
671 | 656 | return [output.html] |
|
672 | 657 | |
|
658 | @DocInherit | |
|
673 | 659 | def render_display_format_latex(self, output): |
|
674 | """render the latex part of an output | |
|
675 | ||
|
676 | Returns list. | |
|
677 | """ | |
|
678 | 660 | return ['LaTeX::', indent(output.latex)] |
|
679 | 661 | |
|
662 | @DocInherit | |
|
680 | 663 | def render_display_format_json(self, output): |
|
681 | """render the json part of an output | |
|
682 | ||
|
683 | Returns list. | |
|
684 | """ | |
|
685 | 664 | return ['JSON:', indent(output.json)] |
|
686 | 665 | |
|
687 | ||
|
666 | @DocInherit | |
|
688 | 667 | def render_display_format_javascript(self, output): |
|
689 | """render the javascript part of an output | |
|
690 | ||
|
691 | Returns list. | |
|
692 | """ | |
|
693 | 668 | return ['JavaScript:', indent(output.javascript)] |
|
694 | 669 | |
|
695 | 670 | |
@@ -888,62 +863,38 b' class ConverterHTML(Converter):' | |||
|
888 | 863 | return ['<h2>Warning:: Unknown cell</h2>'] + self.in_tag('pre', data) |
|
889 | 864 | |
|
890 | 865 | |
|
866 | @DocInherit | |
|
891 | 867 | def render_display_format_png(self, output): |
|
892 | """render the png part of an output | |
|
893 | ||
|
894 | Returns list. | |
|
895 | """ | |
|
896 | 868 | return ['<img src="data:image/png;base64,%s"></img>' % output.png] |
|
897 | 869 | |
|
870 | @DocInherit | |
|
898 | 871 | def render_display_format_svg(self, output): |
|
899 | """render the svg part of an output | |
|
900 | ||
|
901 | Returns list. | |
|
902 | """ | |
|
903 | 872 | return [output.svg] |
|
904 | 873 | |
|
874 | @DocInherit | |
|
905 | 875 | def render_display_format_jpeg(self, output): |
|
906 | """render the jpeg part of an output | |
|
907 | ||
|
908 | Returns list. | |
|
909 | """ | |
|
910 | 876 | return ['<img src="data:image/jpeg;base64,%s"></img>' % output.jpeg] |
|
911 | 877 | |
|
878 | @DocInherit | |
|
912 | 879 | def render_display_format_text(self, output): |
|
913 | """render the text part of an output | |
|
914 | ||
|
915 | Returns list. | |
|
916 | """ | |
|
917 | 880 | return self._ansi_colored(output.text) |
|
918 | 881 | |
|
882 | @DocInherit | |
|
919 | 883 | def render_display_format_html(self, output): |
|
920 | """render the html part of an output | |
|
921 | ||
|
922 | Returns list. | |
|
923 | """ | |
|
924 | 884 | return [output.html] |
|
925 | 885 | |
|
886 | @DocInherit | |
|
926 | 887 | def render_display_format_latex(self, output): |
|
927 | """render the latex part of an output | |
|
928 | ||
|
929 | Returns list. | |
|
930 | """ | |
|
931 | 888 | return [output.latex] |
|
932 | 889 | |
|
890 | @DocInherit | |
|
933 | 891 | def render_display_format_json(self, output): |
|
934 | """render the json part of an output | |
|
935 | ||
|
936 | Returns []. | |
|
937 | """ | |
|
938 | 892 | # html ignores json |
|
939 | 893 | return [] |
|
940 | 894 | |
|
941 | 895 | |
|
896 | @DocInherit | |
|
942 | 897 | def render_display_format_javascript(self, output): |
|
943 | """render the javascript part of an output | |
|
944 | ||
|
945 | Returns list. | |
|
946 | """ | |
|
947 | 898 | return [output.javascript] |
|
948 | 899 | |
|
949 | 900 | |
@@ -1120,36 +1071,24 b' class ConverterLaTeX(Converter):' | |||
|
1120 | 1071 | |
|
1121 | 1072 | return lines |
|
1122 | 1073 | |
|
1074 | @DocInherit | |
|
1123 | 1075 | def render_display_format_html(self, output): |
|
1124 | """render the html part of an output | |
|
1125 | ||
|
1126 | Returns []. | |
|
1127 | """ | |
|
1128 | 1076 | return [] |
|
1129 | 1077 | |
|
1078 | @DocInherit | |
|
1130 | 1079 | def render_display_format_latex(self, output): |
|
1131 | """render the latex part of an output | |
|
1132 | ||
|
1133 | Returns list. | |
|
1134 | """ | |
|
1135 | 1080 | if type(output.latex) == type([]): |
|
1136 | 1081 | return output.latex |
|
1137 | 1082 | return [output.latex] |
|
1138 | 1083 | |
|
1084 | @DocInherit | |
|
1139 | 1085 | def render_display_format_json(self, output): |
|
1140 | """render the json part of an output | |
|
1141 | ||
|
1142 | Returns []. | |
|
1143 | """ | |
|
1144 | 1086 | # latex ignores json |
|
1145 | 1087 | return [] |
|
1146 | 1088 | |
|
1147 | 1089 | |
|
1090 | @DocInherit | |
|
1148 | 1091 | def render_display_format_javascript(self, output): |
|
1149 | """render the javascript part of an output | |
|
1150 | ||
|
1151 | Returns []. | |
|
1152 | """ | |
|
1153 | 1092 | # latex ignores javascript |
|
1154 | 1093 | return [] |
|
1155 | 1094 | |
@@ -1225,33 +1164,21 b' class ConverterNotebook(Converter):' | |||
|
1225 | 1164 | def render_display_format_text(self, output): |
|
1226 | 1165 | return [output.text] |
|
1227 | 1166 | |
|
1167 | @DocInherit | |
|
1228 | 1168 | def render_display_format_html(self, output): |
|
1229 | """render the html part of an output | |
|
1230 | ||
|
1231 | Returns []. | |
|
1232 | """ | |
|
1233 | 1169 | return [output.html] |
|
1234 | 1170 | |
|
1171 | @DocInherit | |
|
1235 | 1172 | def render_display_format_latex(self, output): |
|
1236 | """render the latex part of an output | |
|
1237 | ||
|
1238 | Returns list. | |
|
1239 | """ | |
|
1240 | 1173 | return [output.latex] |
|
1241 | 1174 | |
|
1175 | @DocInherit | |
|
1242 | 1176 | def render_display_format_json(self, output): |
|
1243 | """render the json part of an output | |
|
1244 | ||
|
1245 | Returns []. | |
|
1246 | """ | |
|
1247 | 1177 | return [output.json] |
|
1248 | 1178 | |
|
1249 | 1179 | |
|
1180 | @DocInherit | |
|
1250 | 1181 | def render_display_format_javascript(self, output): |
|
1251 | """render the javascript part of an output | |
|
1252 | ||
|
1253 | Returns []. | |
|
1254 | """ | |
|
1255 | 1182 | return [output.javascript] |
|
1256 | 1183 | |
|
1257 | 1184 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now