-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_testdoc.html
3121 lines (2686 loc) · 142 KB
/
demo_testdoc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
File automatically generated using DocOnce (https://github.com/doconce/doconce/):
doconce format html testdoc.do.txt --pygments_html_linenos --html_style=solarized --pygments_html_style=emacs --examples_as_exercises --output=demo_testdoc
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="DocOnce: https://github.com/doconce/doconce/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="A Document for Testing DocOnce">
<meta name="keywords" content="figures,movies,index with subindex,_boldface word_ in index,index with _boldface word_,index with _boldface word_ in subentry,double _boldface word_ _boldface word_ in subentry too,index, with comma, and one more">
<title>A Document for Testing DocOnce</title>
<link href="https://raw.githubusercontent.com/doconce/doconce/main/bundled/html_styles/style_solarized_box/css/solarized_light_code.css" rel="stylesheet" type="text/css" title="light"/>
<script src="https://raw.githubusercontent.com/doconce/doconce/main/bundled/html_styles/style_solarized_box/js/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<style type="text/css">
/* solarized style */
body {
margin: 5;
padding: 0;
border: 0; /* Remove the border around the viewport in old versions of IE */
width: 100%;
background: #fdf6e3;
min-width: 600px; /* Minimum width of layout - remove if not required */
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 1.0em;
line-height: 1.3em;
color: #657b83;
}
a { color: #859900; text-decoration: underline; }
a:hover, a:active { outline:none }
a, a:active, a:visited { color: #859900; }
a:hover { color: #268bd2; }
h1, h2, h3 { margin:.8em 0 .2em 0; padding:0; line-height: 125%; }
h2 { font-variant: small-caps; }
tt, code { font-family: monospace, sans-serif; box-shadow: none; }
hr { border: 0; width: 80%; border-bottom: 1px solid #aaa; }
p { text-indent: 0px; }
p.caption { width: 80%; font-style: normal; text-align: left; }
hr.figure { border: 0; width: 80%; border-bottom: 1px solid #aaa; }
.alert-text-small { font-size: 80%; }
.alert-text-large { font-size: 130%; }
.alert-text-normal { font-size: 90%; }
.alert {
padding:8px 35px 8px 14px; margin-bottom:18px;
text-shadow:0 1px 0 rgba(255,255,255,0.5);
border:1px solid #93a1a1;
border-radius: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
color: #555;
background-color: #eee8d5;
background-position: 10px 5px;
background-repeat: no-repeat;
background-size: 38px;
padding-left: 55px;
width: 75%;
}
.alert-block {padding-top:14px; padding-bottom:14px}
.alert-block > p, .alert-block > ul {margin-bottom:1em}
.alert li {margin-top: 1em}
.alert-block p+p {margin-top:5px}
.alert-notice { background-image: url(https://raw.githubusercontent.com/doconce/doconce/bundled/html_images/small_yellow_notice.png); }
.alert-summary { background-image:url(https://raw.githubusercontent.com/doconce/doconce/main/bundled/html_images/small_yellow_summary.png); }
.alert-warning { background-image: url(https://raw.githubusercontent.com/doconce/doconce/main/bundled/html_images/small_yellow_warning.png); }
.alert-question {background-image:url(https://raw.githubusercontent.com/doconce/doconce/main/bundled/html_images/small_yellow_question.png); }
div { text-align: justify; text-justify: inter-word; }
.tab {
padding-left: 1.5em;
}
div.toc p,a {
line-height: 1.3;
margin-top: 1.1;
margin-bottom: 1.1;
}
</style>
<script src="https://sagecell.sagemath.org/static/jquery.min.js"></script>
<script src="https://sagecell.sagemath.org/embedded_sagecell.js"></script>
<link rel="stylesheet" type="text/css" href="https://sagecell.sagemath.org/static/sagecell_embed.css">
<script>
$(function () {
// Make *any* div with class "sage_compute" a Sage cell
sagecell.makeSagecell({inputLocation: "div.sage_compute",
evalButtonText: "Evaluate"});
document.getElementsByClassName("sage_compute")[0].closest(".input").style.paddingBottom=95;
});
</script>
<!-- Tools for embedded Bokeh plots -->
<link rel="stylesheet"
href="https://cdn.pydata.org/bokeh/release/bokeh-0.9.0.min.css"
type="text/css" />
<script type="text/javascript"
src="https://cdn.pydata.org/bokeh/release/bokeh-0.9.0.min.js">
</script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
</head>
<!-- tocinfo
{'highest level': 1,
'sections': [('Table of contents',
1,
'table_of_contents',
'table_of_contents'),
('Section 1', 1, 'sec1', 'sec1'),
('Here is a list with subsubsection heading',
3,
None,
'here-is-a-list-with-subsubsection-heading'),
('Subsection 1', 2, 'subsec1', 'subsec1'),
('Test Section reference at beginning of line and after a '
'sentence',
3,
None,
'test-section-reference-at-beginning-of-line-and-after-a-sentence'),
('Computer code', 3, None, 'computer-code'),
('Subsubsection heading before code',
3,
None,
'subsubsection-heading-before-code'),
('Running OS commands', 3, None, 'running-os-commands'),
('Footnotes', 3, None, 'footnotes'),
('Subsection 2: Testing figures', 2, 'subsec:ex', 'subsec:ex'),
('The $\\theta$ parameter (not $\\nabla$?)',
2,
'decay:sec:theta',
'decay:sec:theta'),
('Custom Environments', 2, None, 'custom-environments'),
('Tables', 2, 'subsec:table', 'subsec:table'),
('A test of verbatim words in heading with subscript $a_i$: '
'`my_file_v1` and `my_file_v2`',
2,
None,
'a-test-of-verbatim-words-in-heading-with-subscript-a-i-my-file-v1-and-my-file-v2'),
('_Just bold_', 2, None, 'just-bold'),
('*Just emphasize*', 2, None, 'just-emphasize'),
('`Just verbatim`', 2, None, 'just-verbatim'),
('_Bold_ beginning', 2, None, 'bold-beginning'),
('*Emphasize* beginning', 2, None, 'emphasize-beginning'),
('`Verbatim` beginning', 2, None, 'verbatim-beginning'),
('Maybe _bold end_', 2, None, 'maybe-bold-end'),
('Maybe *emphasize end*', 2, None, 'maybe-emphasize-end'),
('Maybe `verbatim end`', 2, None, 'maybe-verbatim-end'),
('The middle has _bold_ word',
2,
None,
'the-middle-has-bold-word'),
('The middle has *emphasize* word',
2,
None,
'the-middle-has-emphasize-word'),
('The middle has `verbatim` word',
2,
None,
'the-middle-has-verbatim-word'),
('Bibliography test', 2, None, 'bibliography-test'),
('Example 1: Examples can be typeset as exercises',
2,
'Example',
'Example'),
('User-defined environments',
2,
None,
'user-defined-environments'),
('Example 1: A test function', 2, 'ex:test:1p1', 'ex:test:1p1'),
('Example 2: Addition', 2, 'ex:math:1p1', 'ex:math:1p1'),
('URLs', 2, 'subsubsec:ex', 'subsubsec:ex'),
('LaTeX Mathematics', 1, None, 'latex-mathematics'),
('Exercises', 1, None, 'exercises'),
('Problem 2: Flip a Coin', 2, 'demo:ex:1', 'demo:ex:1'),
('My remarks', 3, None, 'my-remarks'),
('Remarks', 3, None, 'remarks'),
('Not an exercise', 2, None, 'not-an-exercise'),
('Exercise 3: Test of plain text exercise',
2,
'my:exer1',
'my:exer1'),
('Project 4: Compute a Probability', 2, 'demo:ex:2', 'demo:ex:2'),
('Project 5: Explore Distributions of Random Circles',
2,
'proj:circle1',
'proj:circle1'),
('Remarks', 3, None, 'remarks'),
('Exercise 6: Determine some Distance',
2,
'exer:dist',
'exer:dist'),
('Remarks', 3, None, 'remarks'),
('Some exercise without the "Exercise:" prefix',
2,
None,
'some-exercise-without-the-exercise-prefix'),
('Exercise 8: Solution of differential equation',
2,
'sec:this:exer:de',
'sec:this:exer:de'),
('Example 9: Just an example',
2,
None,
'example-9-just-an-example'),
('Here goes another section',
1,
None,
'here-goes-another-section'),
('More Exercises', 1, None, 'more-exercises'),
('Exercise 10: Make references to projects and problems',
2,
'exer:some:formula',
'exer:some:formula'),
('Project 11: References in a headings do not work well in html',
2,
'exer:you',
'exer:you'),
('References', 1, None, 'references'),
('Appendix: Just for testing; part I', 1, 'app1', 'app1'),
('A subsection within an appendix',
2,
None,
'a-subsection-within-an-appendix'),
('Appendix: Just for testing; part II', 1, 'app2', 'app2'),
('Appendix: Testing identical titles',
2,
None,
'appendix-testing-identical-titles'),
('Appendix: Testing identical titles',
2,
'test:title:id1',
'test:title:id1'),
('Appendix: Testing identical titles',
2,
'test:title:id2',
'test:title:id2'),
('Appendix: Testing identical titles',
2,
None,
'appendix-testing-identical-titles'),
('Appendix: Testing inline comments',
2,
None,
'appendix-testing-inline-comments'),
('Appendix: Testing headings ending with `verbatim inline`',
2,
None,
'appendix-testing-headings-ending-with-verbatim-inline')]}
end of tocinfo -->
<body>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: { autoNumber: "AMS" },
extensions: ["AMSmath.js", "AMSsymbols.js", "autobold.js", "color.js"]
}
});
</script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- ------------------- main content ---------------------- -->
<center>
<h1>A Document for Testing DocOnce</h1>
</center> <!-- document title -->
<!-- author(s): Hans Petter Langtangen, Kaare Dump, A. Dummy Author, I. S. Overworked and Outburned, and J. Doe -->
<center>
<b>Hans Petter Langtangen</b> [1, 2] (<tt>hpl at simula.no</tt>)
</center>
<center>
<b>Kaare Dump</b> [3]
</center>
<center>
<b>A. Dummy Author</b>
</center>
<center>
<b>I. S. Overworked and Outburned</b> [4, 5, 6, 7]
</center>
<center>
<b>J. Doe</b> (<tt>j_doe at cyberspace.com</tt>)
</center>
<!-- institution(s) -->
<center>
[1] <b>Center for Biomedical Computing, Simula Research Laboratory</b>
</center>
<center>
[2] <b>Department of Informatics, University of Oslo</b>
</center>
<center>
[3] <b>Segfault, Cyberspace</b>
</center>
<center>
[4] <b>Inst1</b>
</center>
<center>
[5] <b>Inst2, Somewhere</b>
</center>
<center>
[6] <b>Third Inst, Elsewhere</b>
</center>
<center>
[7] <b>Fourth Inst</b>
</center>
<br>
<center>
<h4>Dec 9, 2021</h4>
</center> <!-- date -->
<br>
<h1 id="table_of_contents">Table of contents</h1>
<div class='toc'>
<p><a href="#sec1"> Section 1 </a></p>
<p><span class="tab"> <a href="#subsec1"> Subsection 1 </a></p>
<p><span class="tab"> <a href="#subsec:ex"> Subsection 2: Testing figures </a></p>
<p><span class="tab"> <a href="#decay:sec:theta"> The \( \theta \) parameter (not \( \nabla \)?) </a></p>
<p><span class="tab"> <a href="#custom-environments"> Custom Environments </a></p>
<p><span class="tab"> <a href="#subsec:table"> Tables </a></p>
<p><span class="tab"> <a href="#a-test-of-verbatim-words-in-heading-with-subscript-a-i-my-file-v1-and-my-file-v2"> A test of verbatim words in heading with subscript \( a_i \): <code>my_file_v1</code> and <code>my_file_v2</code> </a></p>
<p><span class="tab"> <a href="#just-bold"> <b>Just bold</b> </a></p>
<p><span class="tab"> <a href="#just-emphasize"> <em>Just emphasize</em> </a></p>
<p><span class="tab"> <a href="#just-verbatim"> <code>Just verbatim</code> </a></p>
<p><span class="tab"> <a href="#bold-beginning"> <b>Bold</b> beginning </a></p>
<p><span class="tab"> <a href="#emphasize-beginning"> <em>Emphasize</em> beginning </a></p>
<p><span class="tab"> <a href="#verbatim-beginning"> <code>Verbatim</code> beginning </a></p>
<p><span class="tab"> <a href="#maybe-bold-end"> Maybe <b>bold end</b> </a></p>
<p><span class="tab"> <a href="#maybe-emphasize-end"> Maybe <em>emphasize end</em> </a></p>
<p><span class="tab"> <a href="#maybe-verbatim-end"> Maybe <code>verbatim end</code> </a></p>
<p><span class="tab"> <a href="#the-middle-has-bold-word"> The middle has <b>bold</b> word </a></p>
<p><span class="tab"> <a href="#the-middle-has-emphasize-word"> The middle has <em>emphasize</em> word </a></p>
<p><span class="tab"> <a href="#the-middle-has-verbatim-word"> The middle has <code>verbatim</code> word </a></p>
<p><span class="tab"> <a href="#bibliography-test"> Bibliography test </a></p>
<p><span class="tab"> <a href="#Example"> Example 1: Examples can be typeset as exercises </a></p>
<p><span class="tab"> <a href="#user-defined-environments"> User-defined environments </a></p>
<p><span class="tab"> <a href="#ex:test:1p1"> Example 1: A test function </a></p>
<p><span class="tab"> <a href="#ex:math:1p1"> Example 2: Addition </a></p>
<p><span class="tab"> <a href="#subsubsec:ex"> URLs </a></p>
<p><a href="#latex-mathematics"> LaTeX Mathematics </a></p>
<p><a href="#exercises"> Exercises </a></p>
<p><span class="tab"> <a href="#demo:ex:1"> Problem 2: Flip a Coin </a></p>
<p><span class="tab"> <a href="#not-an-exercise"> Not an exercise </a></p>
<p><span class="tab"> <a href="#my:exer1"> Exercise 3: Test of plain text exercise </a></p>
<p><span class="tab"> <a href="#demo:ex:2"> Project 4: Compute a Probability </a></p>
<p><span class="tab"> <a href="#proj:circle1"> Project 5: Explore Distributions of Random Circles </a></p>
<p><span class="tab"> <a href="#exer:dist"> Exercise 6: Determine some Distance </a></p>
<p><span class="tab"> <a href="#some-exercise-without-the-exercise-prefix"> Some exercise without the "Exercise:" prefix </a></p>
<p><span class="tab"> <a href="#sec:this:exer:de"> Exercise 8: Solution of differential equation </a></p>
<p><span class="tab"> <a href="#example-9-just-an-example"> Example 9: Just an example </a></p>
<p><a href="#here-goes-another-section"> Here goes another section </a></p>
<p><a href="#more-exercises"> More Exercises </a></p>
<p><span class="tab"> <a href="#exer:some:formula"> Exercise 10: Make references to projects and problems </a></p>
<p><span class="tab"> <a href="#exer:you"> Project 11: References in a headings do not work well in html </a></p>
<p><a href="#references"> References </a></p>
<p><a href="#app1"> Appendix: Just for testing; part I </a></p>
<p><span class="tab"> <a href="#a-subsection-within-an-appendix"> A subsection within an appendix </a></p>
<p><a href="#app2"> Appendix: Just for testing; part II </a></p>
<p><span class="tab"> <a href="#appendix-testing-identical-titles"> Appendix: Testing identical titles </a></p>
<p><span class="tab"> <a href="#test:title:id1"> Appendix: Testing identical titles </a></p>
<p><span class="tab"> <a href="#test:title:id2"> Appendix: Testing identical titles </a></p>
<p><span class="tab"> <a href="#appendix-testing-identical-titles"> Appendix: Testing identical titles </a></p>
<p><span class="tab"> <a href="#appendix-testing-inline-comments"> Appendix: Testing inline comments </a></p>
<p><span class="tab"> <a href="#appendix-testing-headings-ending-with-verbatim-inline"> Appendix: Testing headings ending with <code>verbatim inline</code> </a></p>
</div>
<br>
<!-- !split -->
<p>The format of this document is
plain, homemade HTML (from DocOnce).
</p>
<p>
<b>Abstract.</b> This is a document with many test constructions for doconce syntax.
It was used heavily for the development and kept for testing
numerous constructions, also special and less common cases.
</p>
<p>And exactly for test purposes we have an extra line here, which
is part of the abstract.
</p>
<!-- Cannot demonstrate chapter headings since abstract and chapter -->
<!-- are mutually exclusive in LaTeX -->
<h1 id="sec1">Section 1</h1>
<p>Here is a nested list:</p>
<ul>
<li> item1</li>
<li> item2</li>
<li> item3 which continues on the next line to test that feature</li>
<li> and a sublist</li>
<ul>
<li> with indented subitem1</li>
<li> and a subitem2</li>
</ul>
<li> and perhaps an ordered sublist
<ol type="a"></li>
<li> first item</li>
<li> second item, continuing on a new line</li>
</ol>
</ul>
<p>
<b>Here is a list with paragraph heading.</b>
</p>
<ul>
<li> item1</li>
<li> item2</li>
</ul>
<h3 id="here-is-a-list-with-subsubsection-heading">Here is a list with subsubsection heading </h3>
<ul>
<li> item1</li>
<li> item2</li>
</ul>
<blockquote>
<p>Here are two lines that make up
a block quote for testing <em>emphasized words</em> and <b>boldface words</b>,
also with hypens:
<em>pre</em>-fix, post-<em>fix</em>, <b>pre</b>-fix, post-<b>fix</b>.
</p>
</blockquote>
<p>Here are two references. Equation \eqref{my:eq1} is fine. Eq. \eqref{my:eq1} too.
Even Equation \eqref{my:eq1} without the tilde.
This equation appears in another part if this document is split.
</p>
<p>Let us add a paragraph to
test that HTML,
with WordPress
(<code>--wordpress</code> option)
can handle linebreaks
<em>correctly</em>,
even when lines begin with
<b>bold words</b> and
<code>verbatim words</code> in
<font color="red">red color</font>, and
<a href="https://google.com" target="_self">links</a> as well as math:
\( 1+1=2 \).
</p>
<p>Test also that <em>emphasize</em>
at the end of line, and <b>bold</b>
works, as well as <font color="blue">color</font>
and <a href="https://google.com" target="_self">links2</a>
and <code>verbatim</code>
as well.
</p>
<h2 id="subsec1">Subsection 1</h2>
<!-- Refer to section/appendix etc. at the beginning of the line -->
<!-- and other special fix situations for HTML. -->
<p>More text, with a reference back to
the section <a href="#sec1">Section 1</a> and <a href="#subsec1">Subsection 1</a>, and further to the
the sections <a href="#subsec1">Subsection 1</a> and <a href="#subsubsec:ex">URLs</a>, which
encourages you to do the tasks in <a href="#demo:ex:1">Problem 2: Flip a Coin</a> and <a href="#exer:some:formula">Exercise 10: Make references to projects and problems</a>.
<a href="#app1">Appendix: Just for testing; part I</a> and <a href="#app2">Appendix: Just for testing; part II</a> are also nice elements.
</p>
<h3 id="test-section-reference-at-beginning-of-line-and-after-a-sentence">Test Section reference at beginning of line and after a sentence </h3>
<p>The section <a href="#subsec1">Subsection 1</a> is fine.
The section <a href="#subsubsec:ex">URLs</a> too.
</p>
<!-- sphinx code-blocks: pycod=python cod=fortran cppcod=c++ sys=console -->
<h3 id="computer-code">Computer code </h3>
<p>Let's do some copying from files too. First from subroutine up to the very end,</p>
<!-- code=fortran (!bc fcod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 8</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 9</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">10</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">11</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">12</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">13</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"> <span style="color: #8B008B; font-weight: bold">subroutine </span>test()
<span style="color: #00688B; font-weight: bold">integer </span>i
<span style="color: #00688B; font-weight: bold">real</span>*<span style="color: #B452CD">8</span> r
r = <span style="color: #B452CD">0</span>
<span style="color: #8B008B; font-weight: bold">do </span>i = <span style="color: #B452CD">1</span>, i
r = r + i
<span style="color: #8B008B; font-weight: bold">end do</span>
<span style="color: #8B008B; font-weight: bold"> return</span>
C END1
<span style="color: #8B008B; font-weight: bold">program </span>testme
<span style="color: #8B008B; font-weight: bold">call </span>test()
<span style="color: #8B008B; font-weight: bold">return</span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>and then just the subroutine,</p>
<!-- code=fortran (!bc fcod) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">8</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"> <span style="color: #8B008B; font-weight: bold">subroutine </span>test()
<span style="color: #00688B; font-weight: bold">integer </span>i
<span style="color: #00688B; font-weight: bold">real</span>*<span style="color: #B452CD">8</span> r
r = <span style="color: #B452CD">0</span>
<span style="color: #8B008B; font-weight: bold">do </span>i = <span style="color: #B452CD">1</span>, i
r = r + i
<span style="color: #8B008B; font-weight: bold">end do</span>
<span style="color: #8B008B; font-weight: bold"> return</span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>and finally the complete file with a plain text verbatim environment
(<code>envir=ccq</code>):
</p>
<!-- code=text (!bc ccq) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 8</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 9</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">10</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">11</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">12</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">13</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">14</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">15</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">C a comment
subroutine test()
integer i
real*8 r
r = 0
do i = 1, i
r = r + i
end do
return
C END1
program testme
call test()
return
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Testing other code environments. First Python:</p>
<!-- code=doconce (!bc do) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">!bc pycod
def f(x):
return x+1
!ec
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>which gets rendered as</p>
<!-- code=python (!bc pycod-t) typeset with pygments style "perldoc-t" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">def</span> <span style="color: #008b45">f</span>(x):
<span style="color: #8B008B; font-weight: bold">return</span> x+<span style="color: #B452CD">1</span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
</div>
<p>Test paragraph and subsubsection headings before
before code.
</p>
<p>
<b>Paragraph heading before code.</b>
</p>
<!-- code=python (!bc pycod-t) typeset with pygments style "perldoc-t" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">sys</span>
sys.path.insert(<span style="color: #B452CD">0</span>, os.pardir)
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
</div>
<h3 id="subsubsection-heading-before-code">Subsubsection heading before code </h3>
<!-- code=python (!bc pycod-t) typeset with pygments style "perldoc-t" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">def</span> <span style="color: #008b45">h</span>(z):
<span style="color: #8B008B; font-weight: bold">return</span> z+<span style="color: #B452CD">1</span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
</div>
<p>Now a complete program to be shown via Python Online Tutorial:</p>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<iframe width="950" height="500" frameborder="0"
src="https://pythontutor.com/iframe-embed.html#code=class+Line%3A%0A++++def+__init__%28self%2C+a%2C+b%29%3A%0A++++++++self.a%2C+self.b+%3D+a%2C+b%0A%0A++++def+__call__%28self%2C+x%29%3A%0A++++++++a%2C+b+%3D+self.a%2C+self.b%0A++++++++return+a%2Ax+%2B+b%0A%0Aline+%3D+Line%282%2C+1%29%0Ay+%3D+line%28x%3D3%29%0Aprint%28y%29&py=2&curInstr=0&cumulative=false">
</iframe>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Some more Python code (actually specified as a sage cell, but
such cells are not supported by this format).
</p>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<div class="sage_compute">
<script type="text/x-sage">
a = 2
b = 3
print('a+b:', a + b)
# In a sage cell we can also plot
from matplotlib.pyplot import *
from numpy import *
x = linspace(0, 4*pi, 101)
y = exp(-0.1*x)*cos(x)
plot(x, y)
xlabel('x'); ylabel('y')
show()
</script>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Then Cython (with -h option so it is hidden in html/sphinx):</p>
<!-- code=cython (!bc cycod-h) typeset with pygments style "perldoc-h" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<script type="text/javascript">
function show_hide_codeeb1b(){
$("#codeeb1b").toggle();
}
</script>
<button type="button" onclick="show_hide_codeeb1b()">Show/Hide code</button>
<div id="codeeb1b" style="display:none">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #8B008B; font-weight: bold">cpdef</span> <span style="color: #008b45">f</span>(double x):
<span style="color: #8B008B; font-weight: bold">return</span> x + <span style="color: #B452CD">1</span>
</pre>
</div>
</td></tr></table>
</div>
</div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Standard Python shell sessions:</p>
<!-- code=python (!bc pyshell) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">8</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">>>> <span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">import</span> linspace, sin
>>> <span style="color: #228B22"># Some comment</span>
>>> x = linspace(<span style="color: #B452CD">0</span>, <span style="color: #B452CD">2</span>, <span style="color: #B452CD">11</span>)
>>> y = sin(x)
>>> y[<span style="color: #B452CD">0</span>]
<span style="color: #B452CD">0</span>
>>> <span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">matplotlib.pyplot</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">plt</span>
>>> plt.plot(x, y)
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Similar IPython sessions:</p>
<!-- code=ipy (!bc ipy) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 8</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;"> 9</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">10</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">11</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">12</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">13</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">14</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">15</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #555555">In [1]: </span><span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">import</span> linspace, sin
<span style="color: #555555">In [2]: </span><span style="color: #228B22"># Some comment</span>
<span style="color: #555555">In [3]: </span>x = linspace(<span style="color: #B452CD">0</span>, <span style="color: #B452CD">2</span>, <span style="color: #B452CD">11</span>)
<span style="color: #555555">In [4]: </span>y = sin(x)
<span style="color: #555555">In [5]: </span>y[<span style="color: #B452CD">0</span>]
<span style="color: #000080; font-weight: bold">Out[5]: </span><span style="color: #888888">0</span>
<span style="color: #555555">In [6]: </span><span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">matplotlib.pyplot</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">plt</span>
<span style="color: #555555">In [7]: </span>plt.plot(x, y)
<span style="color: #555555">In [8]: </span>a=<span style="color: #CD5555">'multiple-\nline\noutput'</span>
<span style="color: #555555">In [9]: </span>a
<span style="color: #000080; font-weight: bold">Out[9]: </span><span style="color: #888888">'multiple-\nline\noutput'</span>
<span style="color: #555555">In [10]: </span><span style="color: #658b00">print</span>(a)
<span style="color: #888888">multiple-</span>
<span style="color: #888888">line</span>
<span style="color: #888888">output</span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
<div class="output_wrapper">
<div class="output">
<div class="output_area">
<div class="output_subarea output_stream output_stdout output_text">
</div>
</div>
</div>
</div>
</div>
<p>Here is the interactive session again, but with <code>pyshell-t</code>.</p>
<!-- code=python (!bc pyshell-t) typeset with pygments style "perldoc-t" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">8</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">>>> <span style="color: #8B008B; font-weight: bold">from</span> <span style="color: #008b45; text-decoration: underline">numpy</span> <span style="color: #8B008B; font-weight: bold">import</span> linspace, sin
>>> <span style="color: #228B22"># Some comment</span>
>>> x = linspace(<span style="color: #B452CD">0</span>, <span style="color: #B452CD">2</span>, <span style="color: #B452CD">11</span>)
>>> y = sin(x)
>>> y[<span style="color: #B452CD">0</span>]
<span style="color: #B452CD">0</span>
>>> <span style="color: #8B008B; font-weight: bold">import</span> <span style="color: #008b45; text-decoration: underline">matplotlib.pyplot</span> <span style="color: #8B008B; font-weight: bold">as</span> <span style="color: #008b45; text-decoration: underline">plt</span>
>>> plt.plot(x, y)
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
</div>
<!-- This one tests a + sign before a code environment -->
<p>C++:</p>
<!-- code=c++ (!bc cpppro-t) typeset with pygments style "perldoc-t" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">7</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;"><span style="color: #1e889b">#include</span><span style="color: #bbbbbb"> </span><span style="color: #228B22"><iostream></span><span style="color: #1e889b"></span>
<span style="color: #00688B; font-weight: bold">int</span><span style="color: #bbbbbb"> </span><span style="color: #008b45">main</span>()<span style="color: #bbbbbb"></span>
{<span style="color: #bbbbbb"></span>
<span style="color: #bbbbbb"> </span>std::cout<span style="color: #bbbbbb"> </span><<<span style="color: #bbbbbb"> </span><span style="color: #CD5555">"Sample output"</span><span style="color: #bbbbbb"> </span><<<span style="color: #bbbbbb"> </span>std::endl;<span style="color: #bbbbbb"></span>
<span style="color: #bbbbbb"> </span><span style="color: #8B008B; font-weight: bold">return</span><span style="color: #bbbbbb"> </span><span style="color: #B452CD">0</span><span style="color: #bbbbbb"></span>
}<span style="color: #bbbbbb"></span>
</pre>
</div>
</td></tr></table> </div>
</div>
</div>
</div>
<!-- The next should get correctly typset in sphinx (cod is fcod) -->
<!-- It also tests emoji before code -->
<p>And a little bit of Fortran: <img src="https://raw.githubusercontent.com/hplgit/doconce/master/bundled/emoji/png/dizzy_face.png" width="22px" height="22px" align="center"></p>
<!-- code=doconce (!bc do) typeset with pygments style "perldoc" -->
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="inner_cell">
<div class="input_area">
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">1</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">2</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">3</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">4</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">5</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">6</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">7</span>
<span style="color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px;">8</span></pre>
</div></td><td class="code"><div class="highlight" style="background: #eeeedd">
<pre style="line-height: 125%;">!bc cod
subroutine midpt(x, length, a, b)
real*8 a, b, x
x = (a + b)/2
length = b - a
return
end
!ec
</pre>