SF.net SVN: docutils:[9851 ] trunk/sandbox/manpage-wri ter

grubert--- via Docutils-checkins <[email protected]>
Newsgroups gmane.text.docutils.cvs
Message-ID <[email protected]>
Revision: 9851
          http://sourceforge.net/p/docutils/code/9851
Author:   grubert
Date:     2024-08-03 12:35:42 +0000 (Sat, 03 Aug 2024)
Log Message:
-----------
add regressions for mandoc and .UR/.UE

Modified Paths:
--------------
    trunk/sandbox/manpage-writer/runtest-mandoc

Added Paths:
-----------
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps
    trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8

Added: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.man	2024-08-03 12:35:42 UTC (rev 9851)
@@ -0,0 +1,181 @@
+.\" Man page generated from reStructuredText by manpage writer
+.\" from docutils 0.22b.dev.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "" "" "" ""
+.SH Name
+ \- 
+from quickref.html
+.SH Explicit Markup
+.SS Footnotes
+.sp
+Footnote references, like [5]\&.
+Note that footnotes may get
+rearranged, e.g., to the bottom of
+the \(dqpage\(dq.
+.IP [5] 5
+A numerical footnote. Note
+there\(aqs no colon after the \fB]\fP\&.
+
+.sp
+.ce
+----
+
+.ce 0
+.sp
+.sp
+Autonumbered footnotes are
+possible, like using [1] and [2]\&.
+.IP [1] 5
+This is the first one.
+.IP [2] 5
+This is the second one.
+.sp
+They may be assigned \(aqautonumber
+labels\(aq \- for instance,
+[4] and [3]\&.
+.IP [3] 5
+a.k.a. 
+.UR third
+.UE
+
+.IP [4] 5
+a.k.a. 
+.UR fourth
+.UE
+
+
+.sp
+.ce
+----
+
+.ce 0
+.sp
+.sp
+Auto\-symbol footnotes are also
+possible, like this: [*] and [\(dg]\&.
+.IP [*] 5
+This is the first one.
+.IP [\(dg] 5
+This is the second one.
+.SS Citations
+.sp
+Citation references, like [CIT2002]\&.
+Note that citations may get
+rearranged, e.g., to the bottom of
+the \(dqpage\(dq.
+.IP [CIT2002] 5
+A citation
+(as often used in journals).
+.sp
+Citation labels contain alphanumerics,
+underlines, hyphens and fullstops.
+Case is not significant.
+.sp
+Given a citation like [this], one
+can also refer to it like 
+.UR this
+.UE
+\&.
+.IP [this] 5
+here.
+.SS External Hyperlink Targets
+.sp
+External hyperlinks, like 
+.UR https://www.python.org/
+Python
+.UE
+\&.
+.sp
+embedded External hyperlinks, like 
+.UR https://www.python.org/
+Python
+.UE
+\&.
+.SS Internal Hyperlink Targets
+.sp
+Internal cross\-references, like 
+.UR example
+.UE
+\&.
+.sp
+This is an example cross\-reference target.
+.SS Indirect Hyperlink Targets
+.sp
+.UR https://www.python.org/
+Python
+.UE
+ is 
+.UR https://www.python.org/
+my favourite
+programming language
+.UE
+\&.
+.SH Titles are targets, too
+.sp
+Implicit references, like 
+.UR Titles are
+targets, too
+.UE
+\&.
+.SH and
+.sp
+See the 
+.UR https://www.python.org/
+Python
+.UE
+ home page for info.
+.sp
+.UR mailto:[email protected]
+Write to me
+.UE
+ with your questions.
+.\" deduplicate _Python: https://www.python.org
+.
+.SS URIs with known schemes
+.sp
+.UR tel:+48\-816\-555\-1212
+.UE
+
+.UR urn:isbn:0\-486\-27557\-4
+.UE
+
+.UR news:comp.infosystems.www.servers.unix
+.UE
+
+.UR https://[email protected]:123/forum/questions/?tag=networking&order=newest#top
+.UE
+
+.SS Standalone email addresses
+.sp
+like 
+.UR [email protected]
+.UE
+
+.\" End of generated man page.

Added: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.ps	2024-08-03 12:35:42 UTC (rev 9851)
@@ -0,0 +1,304 @@
+%!PS-Adobe-3.0
+%%DocumentData: Clean7Bit
+%%Orientation: Portrait
+%%Pages: (atend)
+%%PageOrder: Ascend
+%%DocumentMedia: man-Letter 612 790 0 () ()
+%%DocumentNeededResources: font Times-Roman Times-Bold Times-Italic Times-BoldItalic
+%%DocumentSuppliedResources: procset MandocProcs 1.0 0
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset MandocProcs 10170 10170
+/fs 11 def
+/f0 { /Times-Roman fs selectfont } def
+/f1 { /Times-Bold fs selectfont } def
+/f2 { /Times-Italic fs selectfont } def
+/f3 { /Times-BoldItalic fs selectfont } def
+/s { 3 1 roll moveto show } bind def
+/c { exch currentpoint exch pop moveto show } bind def
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Letter
+<</PageSize [612 790]>>setpagedevice
+%%EndFeature
+%%EndSetup
+%%Page: 1 1
+f1
+68.024 702.988(Name)s
+f0
+90.024 687.599(-)s
+96.437(from)c
+120.571(quickref.html)c
+f1
+68.024 656.821(Explicit)s
+107.448(Markup)c
+76.274 641.432(Footnotes)s
+f0
+87.274 626.043(Footnote)s
+129.140(references,)c
+179.828(like)c
+199.078([5].)c
+220.154(Note)c
+244.288(that)c
+263.538(footnotes)c
+307.230(may)c
+328.922(get)c
+345.114(rearranged,)c
+397.639(e.g.,)c
+419.023(to)c
+430.331(the)c
+446.523(bottom)c
+480.447(of)c
+492.360(the)c
+508.552("page".)c
+87.274 595.265([5])s
+114.774(A)c
+125.466(numerical)c
+172.205(footnote.)c
+214.368(Note)c
+238.502(there's)c
+271.183(no)c
+284.933(colon)c
+312.125(after)c
+335.027(the)c
+f1
+351.219(])c
+f0
+354.882(.)c
+322.190 549.098(----)s
+114.774 472.153(Autonumbered)s
+183.513(footnotes)c
+227.205(are)c
+243.386(possible,)c
+284.944(like)c
+304.194(using)c
+330.781([1])c
+346.357(and)c
+364.991([2].)c
+87.274 441.375([1])s
+114.774(This)c
+137.082(is)c
+147.169(the)c
+163.361(first)c
+183.832(one.)c
+87.274 410.597([2])s
+114.774(This)c
+137.082(is)c
+147.169(the)c
+163.361(second)c
+196.658(one.)c
+114.774 379.819(They)s
+140.129(may)c
+161.821(be)c
+174.955(assigned)c
+215.589('autonumber)c
+274.549(labels')c
+306.625(-)c
+313.038(for)c
+328.614(instance,)c
+370.161([4])c
+385.737(and)c
+404.371([3].)c
+87.274 349.041([3])s
+114.774(a.k.a.)c
+143.792(<third>)c
+87.274 302.874([4])s
+114.774(a.k.a.)c
+143.792(<fourth>)c
+322.190 241.318(----)s
+114.774 164.373(Auto-symbol)s
+175.582(footnotes)c
+219.274(are)c
+235.455(also)c
+255.926(possible,)c
+297.484(like)c
+316.734(this:)c
+338.437([*])c
+354.013(and)c
+372.647([<*>].)c
+87.274 133.595([*])s
+114.774(This)c
+137.082(is)c
+147.169(the)c
+163.361(first)c
+183.832(one.)c
+87.274 102.817([<*>])s
+f0
+68.024 739.233(\(\))s
+536.932(\(\))c
+536.932 36.245(\(\))s
+showpage
+%%Page: 2 2
+f0
+114.774 702.988(This)s
+137.082(is)c
+147.169(the)c
+163.361(second)c
+196.658(one.)c
+f1
+76.274 672.210(Citations)s
+f0
+87.274 656.821(Citation)s
+125.477(references,)c
+176.165(like)c
+195.415([CIT2002].)c
+250.712(Note)c
+274.846(that)c
+294.096(citations)c
+334.125(may)c
+355.817(get)c
+372.009(rearranged,)c
+424.534(e.g.,)c
+445.918(to)c
+457.226(the)c
+473.418(bottom)c
+507.342(of)c
+519.255(the)c
+87.274 641.432("page".)s
+87.274 610.654([CIT2002])s
+114.774 595.265(A)s
+125.466(citation)c
+161.216(\(as)c
+176.792(often)c
+202.147(used)c
+225.060(in)c
+236.368(journals\).)c
+114.774 564.487(Citation)s
+152.977(labels)c
+181.390(contain)c
+216.524(alphanumerics,)c
+286.176(underlines,)c
+337.502(hyphens)c
+376.915(and)c
+395.549(fullstops.)c
+441.694(Case)c
+465.828(is)c
+475.915(not)c
+492.723(significant.)c
+114.774 533.709(Given)s
+144.408(a)c
+152.042(citation)c
+187.792(like)c
+207.042([this],)c
+235.763(one)c
+254.397(can)c
+272.415(also)c
+292.886(refer)c
+316.393(to)c
+327.701(it)c
+336.567(like)c
+355.817(<this>)c
+386.870(.)c
+87.274 502.931([this])s
+114.774(here.)c
+f1
+76.274 472.153(External)s
+119.966(Hyperlink)c
+171.006(Targets)c
+f0
+87.274 456.764(External)s
+127.292(hyperlinks,)c
+179.234(like)c
+198.484(Python)c
+232.408(<https://www.python.org/>)c
+355.740(.)c
+87.274 425.986(embedded)s
+135.234(External)c
+175.252(hyperlinks,)c
+227.194(like)c
+246.444(Python)c
+280.368(<https://www.python.org/>)c
+403.700(.)c
+f1
+76.274 395.208(Internal)s
+117.524(Hyperlink)c
+168.564(Targets)c
+f0
+87.274 379.819(Internal)s
+124.234(cross-references,)c
+201.190(like)c
+220.440(<example>)c
+272.866(.)c
+87.274 349.041(This)s
+109.582(is)c
+119.669(an)c
+132.803(example)c
+172.821(cross-reference)c
+242.748(target.)c
+f1
+76.274 318.263(Indirect)s
+116.908(Hyperlink)c
+167.948(Targets)c
+f0
+87.274 302.874(Python)s
+121.198(<https://www.python.org/>)c
+90.024 287.485(is)s
+100.111(my)c
+116.919(favourite)c
+159.379(programming)c
+222.013(language)c
+264.473(<https://www.python.org/>)c
+387.805(.)c
+f1
+68.024 256.707(Titles)s
+97.053(are)c
+115.071(targets,)c
+152.944(too)c
+f0
+87.274 241.318(Implicit)s
+124.861(references,)c
+175.549(like)c
+194.799(targets,)c
+229.625(too)c
+246.433(<Titles>)c
+286.649(.)c
+f1
+68.024 210.540(and)s
+f0
+87.274 195.151(See)s
+105.908(the)c
+122.100(Python)c
+156.024(<https://www.python.org/>)c
+90.024 179.762(home)s
+117.216(page)c
+140.734(for)c
+156.310(info.)c
+87.274 148.984(Write)s
+115.071(to)c
+126.379(me)c
+142.571(<mailto:[email protected]>)c
+90.024 133.595(with)s
+112.332(your)c
+135.245(questions.)c
+f1
+76.274 102.817(URIs)s
+103.466(with)c
+126.995(known)c
+161.535(schemes)c
+f0
+68.024 739.233(\(\))s
+536.932(\(\))c
+536.932 36.245(\(\))s
+showpage
+%%Page: 3 3
+f0
+87.274 702.988(<tel:+48-816-555-1212>)s
+87.274 672.210(<urn:isbn:0-486-27557-4>)s
+87.274 641.432(<news:comp.infosystems.www.servers.unix>)s
+87.274 610.654(<https://[email protected]:123/forum/questions/?tag=networking&order=newest#top>)s
+f1
+76.274 564.487(Standalone)s
+131.593(email)c
+160.006(addresses)c
+f0
+87.274 549.098(like)s
+106.524(<[email protected]>)c
+f0
+68.024 739.233(\(\))s
+536.932(\(\))c
+536.932 36.245(\(\))s
+showpage
+%%Trailer
+%%Pages: 3
+%%EOF

Added: trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8
===================================================================
--- trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8	                        (rev 0)
+++ trunk/sandbox/manpage-writer/expected-mandoc/refs-urue.utf8	2024-08-03 12:35:42 UTC (rev 9851)
@@ -0,0 +1,100 @@
+()                                                                          ()
+
+NNaammee
+        - from quickref.html
+
+EExxpplliicciitt MMaarrkkuupp
+   FFoooottnnootteess
+       Footnote references, like [5].  Note that footnotes may get rearranged,
+       e.g., to the bottom of the "page".
+
+       [5]  A numerical footnote. Note there's no colon after the ]].
+
+
+                                           ----
+
+
+
+
+            Autonumbered footnotes are possible, like using [1] and [2].
+
+       [1]  This is the first one.
+
+       [2]  This is the second one.
+
+            They may be assigned 'autonumber labels' - for instance, [4] and
+            [3].
+
+       [3]  a.k.a.  <third>
+
+
+       [4]  a.k.a.  <fourth>
+
+
+
+                                           ----
+
+
+
+
+            Auto-symbol footnotes are also possible, like this: [*] and [†].
+
+       [*]  This is the first one.
+
+       [†]  This is the second one.
+
+   CCiittaattiioonnss
+       Citation references, like [CIT2002].  Note that citations may get
+       rearranged, e.g., to the bottom of the "page".
+
+       [CIT2002]
+            A citation (as often used in journals).
+
+            Citation labels contain alphanumerics, underlines, hyphens and
+            fullstops.  Case is not significant.
+
+            Given a citation like [this], one can also refer to it like <this>
+            .
+
+       [this]
+            here.
+
+   EExxtteerrnnaall HHyyppeerrlliinnkk TTaarrggeettss
+       External hyperlinks, like Python <https://www.python.org/> .
+
+       embedded External hyperlinks, like Python <https://www.python.org/> .
+
+   IInntteerrnnaall HHyyppeerrlliinnkk TTaarrggeettss
+       Internal cross-references, like <example> .
+
+       This is an example cross-reference target.
+
+   IInnddiirreecctt HHyyppeerrlliinnkk TTaarrggeettss
+       Python <https://www.python.org/>
+        is my favourite programming language <https://www.python.org/> .
+
+TTiittlleess aarree ttaarrggeettss,, ttoooo
+       Implicit references, like targets, too <Titles> .
+
+aanndd
+       See the Python <https://www.python.org/>
+        home page for info.
+
+       Write to me <mailto:[email protected]>
+        with your questions.
+
+   UURRIIss wwiitthh kknnoowwnn sscchheemmeess
+       <tel:+48-816-555-1212>
+
+       <urn:isbn:0-486-27557-4>
+
+       <news:comp.infosystems.www.servers.unix>
+
+       <https://[email protected]:123/forum/questions/?tag=networking&order=newest#top>
+
+
+   SSttaannddaalloonnee eemmaaiill aaddddrreesssseess
+       like <[email protected]>
+
+
+                                                                            ()

Modified: trunk/sandbox/manpage-writer/runtest-mandoc
===================================================================
--- trunk/sandbox/manpage-writer/runtest-mandoc	2024-08-02 03:19:09 UTC (rev 9850)
+++ trunk/sandbox/manpage-writer/runtest-mandoc	2024-08-03 12:35:42 UTC (rev 9851)
@@ -98,5 +98,30 @@
   done
 done
 
+# reference macros
+EXT=-urue.man
+for EXP_F in $EXP_DIR/*$EXT ; do
+  BASE=`basename $EXP_F`
+  F_BASE=${BASE%$EXT}
+  OPT="--use-reference-macros"
+  $CMD $OPT $IN_DIR/$F_BASE.txt $OUT_DIR/$BASE
+  if [ $? -eq 0 ] ; then
+    diff -s -u $EXP_DIR/$BASE $OUT_DIR/$BASE
+    if [ $? -ne 0 ] ; then
+      inc_ERROR_CNT
+    fi
+    for ENC in $ENCS ; do
+      BASE=${BASE%.man}
+      if [ -e $EXP_DIR/$BASE.$ENC ] ; then
+        mandoc -T$ENC $OUT_DIR/$BASE.man > $OUT_DIR/$BASE.$ENC
+        diff -s -u $EXP_DIR/$BASE.$ENC $OUT_DIR/$BASE.$ENC
+        if [ $? -ne 0 ] ; then
+          inc_ERROR_CNT
+        fi
+      fi
+    done
+  fi
+done
+
 report_ERROR_CNT
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



_______________________________________________
Docutils-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/docutils-checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.