Skip to content

Create a PDF file from Markdown documents (md2pdf) #11257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 187 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
067a4d7
add pandoc subproject (md2pdf)
michelou Jan 30, 2021
e7cfae3
Merge branch 'scala3-pandoc' of https://github.com/michelou/dotty int…
michelou Jan 30, 2021
3a442e2
updated shell script 'build'
michelou Jan 30, 2021
6dfa925
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 2, 2021
8e634ac
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 4, 2021
2277b00
addressed subset of review comments
michelou Feb 4, 2021
8a0660b
Add regression tests for #9283 #9284 #9288 #9293
griggt Jan 30, 2021
af60155
Add regression test for #2941
griggt Jan 31, 2021
1388371
Update CI status badge URL to reflect workflow name change
griggt Jan 30, 2021
761b98e
Feature GADT support for class type parameters
Ang9876 Jan 26, 2021
7999636
Update compiler/src/dotty/tools/dotc/typer/Typer.scala
Ang9876 Jan 28, 2021
d899873
Fix CI failure in [test_windows_full]
nicolasstucki Feb 1, 2021
b55aae5
Disable some scala3doc tests in Windows CI
nicolasstucki Feb 1, 2021
0b7a4f6
pages for enums
romanowski Feb 1, 2021
7620508
Make sure language imports are detectable syntactically
odersky Jan 21, 2021
63430b9
Simplifications
odersky Jan 23, 2021
2e25572
Add mode bit to track whether we are in safe nulls mode
odersky Jan 23, 2021
00e087b
Refine initial SafeNulls setting
odersky Jan 31, 2021
ce9fe32
Fix deprecation for java.lang.Deprecated
BarkingBad Jan 26, 2021
97b9b8a
Apply requested changes
BarkingBad Feb 1, 2021
1e24baf
Widen irreducible match type aliases to their bounds
odersky Jan 31, 2021
c27e3bb
Apply suggestions from code review
nicolasstucki Feb 1, 2021
c917f26
Make sure language imports are detectable syntactically
odersky Feb 1, 2021
9dbb155
Rename the setting -noindent into -no-indent.
sjrd Dec 4, 2020
1bcca9e
Fix Java 8 CI
nicolasstucki Feb 2, 2021
5d28c9f
Use all available context info for healing ambiguous implicits
odersky Feb 1, 2021
a9ee311
Drop ConstraintResultDeep mode
odersky Feb 2, 2021
d94ea36
Address review comments
odersky Feb 3, 2021
251d436
Upgrade to ASM 9.0
smarter Feb 2, 2021
db6f2f5
Update context-functions-spec.md
costa100 Nov 23, 2020
f7a0667
Fix #10788: Parsing arguments for java annotations
Kordyjan Jan 7, 2021
0314c1e
Skip java annotations with complex args in parser
Kordyjan Jan 13, 2021
ee68a15
Remove JavaAnnotationArg context property§
Kordyjan Feb 3, 2021
fe6a1ed
Wrap typed tree in special case for java annotation args
Kordyjan Feb 3, 2021
67b6a8c
Implement bean property generation
Kordyjan Nov 30, 2020
b8aab0b
Basic test case
Kordyjan Dec 1, 2020
81e7d81
Add test for overriding bean property
Kordyjan Dec 2, 2020
4dfdc10
Add filtering out synthetic accessors from unpickled templates
Kordyjan Dec 3, 2020
1ef4b83
Remove Permanent flag from sythetic accessors
Kordyjan Dec 3, 2020
15fb83b
Fix missing coordinates
Kordyjan Dec 7, 2020
0d7ef9c
Apply suggestions from code review for bean properties accessors
Kordyjan Feb 3, 2021
5bf10b7
Update base version
nicolasstucki Feb 2, 2021
e75021d
Use p* for vararg patterns
odersky Jan 28, 2021
e2ca8fe
Use p* for vararg splices in expressions
odersky Jan 28, 2021
5c6bac8
Update tests to use new syntax
odersky Jan 28, 2021
2b0fb76
Allow rewriting `x: _*` to `x*`
odersky Jan 28, 2021
bcec9f2
Update docs
odersky Jan 28, 2021
238f593
Update check file
odersky Jan 28, 2021
dbebfe4
Update compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky Feb 3, 2021
4fd99b8
Fix typo 'Deprectated' -> 'Deprecated'
Philippus Feb 3, 2021
0e83880
fix type parameter name
Feb 4, 2021
779ffa5
Scala3doc: improve member lookup
abgruszecki Feb 3, 2021
ba9990d
Heal type of UnApply in quotes
nicolasstucki Feb 3, 2021
ab6961a
remove dotty.dokka.model.api package
romanowski Feb 1, 2021
451c352
Clean up files locations and directories
romanowski Feb 1, 2021
b62f98c
Cleanup test packages
romanowski Feb 1, 2021
18d267b
rename scala3doc into scaladoc
romanowski Feb 1, 2021
d43588b
rename dotty.dokka package into dotty.tools.scaladoc
romanowski Feb 1, 2021
d6f5b13
Rename scala3doc to scaladoc in sbt plugin
romanowski Feb 2, 2021
497b04f
Fix incorrect renames and spelling
romanowski Feb 3, 2021
2003757
Fix inferView on TermRef of Null
noti0na1 Feb 4, 2021
2acb641
Update creator-applications.md
Flowdalic Jan 18, 2021
9822973
Compactify names when flattening, to limit length of classfile names
griggt Feb 2, 2021
6383e62
Add scala2-compat test
griggt Feb 3, 2021
c725883
Don't compactify Java inner class names
griggt Feb 3, 2021
45f1157
Keep the length of class file names in tests within Docker/aufs limits
griggt Feb 4, 2021
cca0aef
LambdaLift: reload non-sym denotations when needed
smarter Feb 3, 2021
4681407
Add regression test for #10366
griggt Feb 5, 2021
145899b
Fix broken link to 'By Name Context Parameters' page
AugustNagro Feb 5, 2021
25ee815
Fix a typo in TestTest docs
dwijnand Feb 4, 2021
8291e51
Add perspective to the community build (#10750)
Katrix Feb 5, 2021
15d4ba1
Don't use suffix `_` in eta expansion
odersky Feb 4, 2021
3130926
Fix source version for test
odersky Feb 5, 2021
ff5f7e9
Use `notInitialized` for wildcard initializers
odersky Jan 27, 2021
414fd97
Deprecate `= _` under source 3.1
odersky Jan 27, 2021
0e9b758
Rename notInitialized to uninitialized
odersky Jan 27, 2021
24cc317
Change context-free syntax to reflect elimination of `= _`
odersky Jan 27, 2021
9c85ebb
Clarify docs
odersky Jan 31, 2021
f9fc161
Address review comments
odersky Feb 3, 2021
ca39802
Change tests to new syntax
odersky Feb 4, 2021
15f7ae4
Update compiler/src/dotty/tools/dotc/parsing/Parsers.scala
odersky Feb 5, 2021
9ff0d4c
rebased
michelou Feb 5, 2021
f8be8f2
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 5, 2021
5ac7adc
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 7, 2021
d15a234
added section wildcard-init.md'
michelou Feb 7, 2021
9b85042
updated data/usage.md
michelou Feb 7, 2021
a1a5a0a
added section 'Imports'
michelou Feb 8, 2021
e38d4b7
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 8, 2021
8fe4593
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 10, 2021
77ea171
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 12, 2021
0ccbee8
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 12, 2021
c61b09b
Merge branch 'scala3-pandoc' of https://github.com/michelou/dotty int…
michelou Feb 12, 2021
825cfcc
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 17, 2021
804f005
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 21, 2021
d2be290
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 26, 2021
e7fe9eb
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Feb 26, 2021
6d97268
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 1, 2021
7e0fe06
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 1, 2021
7d47860
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 2, 2021
b03a9a6
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 3, 2021
645a233
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 3, 2021
7cccddd
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 4, 2021
f4306e2
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 4, 2021
808b1a7
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 6, 2021
035e081
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 6, 2021
524b034
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 11, 2021
8e51561
sync with upstream
michelou Mar 11, 2021
eca1e51
Fix formatting
romanowski Mar 11, 2021
73c8ea9
Add top level index page
romanowski Mar 2, 2021
0e491f7
Fix two links in the Explicit Nulls doc
ShapelessCat Mar 12, 2021
ece8b34
Add missing suffixes
nicolasstucki Mar 11, 2021
3776afb
Upgrade JLine to 3.19.0
griggt Mar 12, 2021
aa0b9b4
Fix #9776: Don't issue a @switch warning when fewer than 4 cases
griggt Sep 22, 2020
4579509
Fix @switch warnings for matches on value classes
griggt Sep 25, 2020
a614d79
GADTs: widen only top-level variant params
abgruszecki Mar 12, 2021
2322fe9
Check conformance of trait and class parameters of base types
b-studios Jan 11, 2021
98c8977
reduced number of Logarithm
xhudik Mar 9, 2021
d155c65
fixed: Logarithms->MyMaths in text
xhudik Mar 12, 2021
6d51056
more fixes in Markdown files
michelou Mar 13, 2021
4438273
Add TypeTest to sidebar on website
bishabosha Mar 10, 2021
ea79336
Update sidebar.yml
bishabosha Mar 11, 2021
161cd41
Cleanup Namer#valOrDefDefSig#inferredType
smarter Mar 11, 2021
0f33822
Improve our ability to override default parameters
smarter Mar 11, 2021
f27d3c9
Fix variance checking in default getters
smarter Mar 12, 2021
ede1a50
Add Conversion.into method
odersky Mar 9, 2021
3339c92
Add doc comments on Conversion methods
odersky Mar 9, 2021
ca07eb3
Update CompletionTest
odersky Mar 9, 2021
ded06b0
Rename `into` to `convert`
odersky Mar 10, 2021
02b86cc
Fix name in comments
odersky Mar 10, 2021
53a5189
Bump sbt to 1.4.9
griggt Mar 15, 2021
8a21460
Update ScAS : remove implicit conversions
rjolly Mar 2, 2021
d65b62c
Make output match the example program
rbonvall Mar 14, 2021
fef312e
Fix #11654: disable pickling test for language.scala
liufengyun Mar 9, 2021
e1b045f
Add GADT test for upcasting
Linyxus Feb 24, 2021
89585c9
Consider all parents when upcasting
Linyxus Feb 24, 2021
2f29d69
Remove useless trace and add existence checking
Linyxus Mar 12, 2021
6eb5f21
Define repl as an alias of scala-compiler-bootstrapped/console
adpi2 Mar 15, 2021
244e976
Allow for missing type symbols in needsRewire
odersky Mar 15, 2021
cd3dc3a
Survive competing methods with select names _1, _2, ...
odersky Mar 14, 2021
fcffed6
Fix desugaring of context bounds in extensions
rjolly Mar 4, 2021
ed985ca
Add quotes.Type.valueOfConstant
nicolasstucki Mar 12, 2021
f4fa164
Print complete extractor for reflect TypeLambda
nicolasstucki Mar 15, 2021
cc1892d
Cleanup sourcecode of Quotes
nicolasstucki Mar 15, 2021
99223f4
Move to sbt slash syntax
adpi2 Mar 15, 2021
a905547
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 15, 2021
4950820
Revert "Fix desugaring of context bounds in extensions"
bishabosha Mar 15, 2021
c011ada
Fix clear_out() not deleting files in cmdTests
griggt Mar 9, 2021
c95ee93
Fix broken dotty.tools.io.Path#parent
griggt Mar 8, 2021
b06a689
Don't normalize paths in Path#parent
griggt Mar 11, 2021
52ddedb
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 16, 2021
f4ab2cf
sync with upstream
michelou Mar 22, 2021
511882e
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 27, 2021
f6902bb
Merge branch 'scala3-pandoc' of https://github.com/michelou/dotty int…
michelou Mar 30, 2021
235a364
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Mar 30, 2021
01bc30c
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Apr 6, 2021
9154836
sync with upstream
michelou Apr 6, 2021
eb2b1ad
Merge remote-tracking branch 'upstream/master' into scala3-pandoc
michelou Apr 6, 2021
93670ff
Allow by-name types in using clauses
odersky Apr 6, 2021
144100c
Merge branch 'master' of https://github.com/lampepfl/dotty into scala…
michelou Apr 6, 2021
bebf97a
Streamline flag checking
odersky Apr 6, 2021
2b9311a
Revert "Recursively check nonvariant arguments of base types for real…
odersky Apr 6, 2021
d976fe3
Add test
odersky Apr 6, 2021
39094b1
Make community build docs experiment-aware
abgruszecki Mar 29, 2021
8b28db5
Community build: tag scas as not requiring experimental
abgruszecki Apr 6, 2021
888828c
bump sbt to 1.5.0
adpi2 Mar 22, 2021
bed2c9d
Use sbt slash syntax
adpi2 Apr 7, 2021
ba7f121
Fix minitest doc command
adpi2 Apr 7, 2021
e510487
Merge remote-tracking branch 'upstream/master' into HEAD
michelou Apr 14, 2021
ab22bed
Add TermParamClause.isGiven
nicolasstucki Apr 8, 2021
ec29ddf
Add `TermParamClause.isErased`
nicolasstucki Apr 9, 2021
2354dbc
Add @covers annotation
liufengyun Jan 21, 2021
7de8074
Make TypeTest.unapply conditionally irrefutable
liufengyun Apr 12, 2021
8a83a70
Fix type test for trait parameter arguments
odersky Apr 9, 2021
4f4598a
Run scripted with sbt 1.5
adpi2 Apr 12, 2021
eda52b6
Use Mill 0.9.6-16-a5da34
adpi2 Apr 13, 2021
e8797ff
updated external links to docs.scala-lang.org
michelou Jul 23, 2021
6efbda4
updated files pandoc.yaml and reference.md
michelou Jan 2, 2022
60af122
fixed branch
michelou Jan 2, 2022
b7f64a9
prints version
michelou Jan 2, 2022
67e85ae
chmod +x
michelou Jan 2, 2022
0b53581
prints version (cnt'd)
michelou Jan 2, 2022
83e7ad9
added printenv job
michelou Jan 2, 2022
4cd7159
updated .md files, updated pandoc.yaml
michelou Jan 2, 2022
3e7db05
bash -> sh
michelou Jan 2, 2022
5de9c72
updated shell scripts (bash->sh, fonts)
michelou Jan 4, 2022
d4e7651
install additional TeX fonts
michelou Jan 4, 2022
959b112
updated file reference.md
michelou Feb 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/pandoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Pandoc

on:
push:
branches: [scala3-pandoc]

jobs:
printenv:
runs-on: ubuntu-latest

steps:
- name: Print Ubuntu environment
run: |
env | grep GIT
env | grep HOME
docker version --format '{{.Server.Version}}'
#docker run pandoc/latex:latest --version | grep ^pandoc

build:
needs: printenv
runs-on: ubuntu-latest
container:
image: pandoc/latex:latest
#if: "( github.event_name == 'pull_request'
# && !contains(github.event.pull_request.body, '[skip ci]')
# && !contains(github.event.pull_request.body, '[skip docs]')
# )
# || contains(github.event.ref, 'pandoc')
# || contains(github.event.ref, 'master')"

steps:
- name: Git Checkout
uses: actions/checkout@v2

- name: Print Pandoc environment
run: |
#env | grep TEX
pandoc --version | grep ^pandoc

- name: Install additional TeX fonts
run: |
find . -name install-tex-fonts
chmod u+x ./pandoc/extras/install-tex-fonts
DEBUG=1 & ./pandoc/extras/install-tex-fonts

- name: Generate PDF reference documentation
run: |
find . -name md2pdf
chmod u+x ./pandoc/md2pdf
DEBUG=1 & ./pandoc/md2pdf reference
2 changes: 1 addition & 1 deletion community-build/community-projects/cask
Submodule cask updated 39 files
+14 −14 build.sc
+0 −0 cask/src-0/cask/main/Routes.scala
+66 −66 cask/src-0/cask/router/Macros.scala
+74 −0 cask/src-0/cask/router/RoutesEndpointMetadata.scala
+0 −80 cask/src-3/cask/router/RoutesEndpointMetadata.scala
+0 −18 cask/src/cask/main/Main.scala
+1 −1 cask/src/cask/model/Params.scala
+3 −0 cask/src/cask/router/Decorators.scala
+446 −0 docs/pages/1 - Cask: a Scala HTTP micro-framework.md
+51 −0 docs/pages/2 - Main Customization.md
+94 −0 docs/pages/3 - About Cask.md
+1 −1 example/compress/build.sc
+1 −1 example/compress2/build.sc
+1 −1 example/compress3/build.sc
+1 −1 example/cookies/app/src/Cookies.scala
+1 −1 example/cookies/app/test/src/ExampleTests.scala
+1 −1 example/cookies/build.sc
+1 −1 example/decorated/build.sc
+1 −1 example/decorated2/build.sc
+1 −1 example/endpoints/build.sc
+1 −1 example/formJsonPost/build.sc
+1 −1 example/httpMethods/build.sc
+1 −1 example/minimalApplication/build.sc
+1 −1 example/minimalApplication2/build.sc
+1 −1 example/redirectAbort/build.sc
+1 −1 example/scalatags/build.sc
+1 −1 example/staticFiles/build.sc
+1 −1 example/staticFiles2/build.sc
+1 −1 example/todo/build.sc
+1 −1 example/todoApi/build.sc
+1 −1 example/todoDb/build.sc
+1 −1 example/twirl/build.sc
+1 −1 example/variableRoutes/build.sc
+1 −1 example/websockets/build.sc
+1 −1 example/websockets2/build.sc
+1 −1 example/websockets3/build.sc
+1 −1 example/websockets4/build.sc
+1 −1 mill
+2 −7 readme.md
2 changes: 1 addition & 1 deletion community-build/community-projects/intent
Submodule intent updated 2 files
+2 −2 build.sbt
+1 −1 consume/build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/scas
Submodule scas updated 74 files
+2 −2 application/build.js
+6 −6 application/ivy.xml
+2 −2 build.js
+7 −5 build.sc
+7 −6 examples/bigint.txt
+0 −1 examples/index.txt
+2 −1 examples/jasbigint.txt
+3 −3 examples/math3.txt
+4 −4 examples/mod_polynomial.txt
+7 −7 examples/modint.txt
+0 −30 examples/module.txt
+17 −21 examples/poly.txt
+14 −18 examples/poly_rings.txt
+22 −23 examples/polynomial.txt
+20 −20 examples/polypower.txt
+19 −20 examples/polypower_jaspp.txt
+19 −20 examples/polypower_rings.txt
+20 −21 examples/polypower_scas.txt
+2 −2 examples/pp1.txt
+3 −3 examples/pp_jas.txt
+6 −11 examples/rational.txt
+7 −13 examples/rational_polynomial.txt
+2 −1 examples/ringsbigint.txt
+5 −5 ivy.xml
+2 −2 pom.xml
+1 −1 readme.txt
+0 −16 scas/application/src/jas/BigInteger.scala
+30 −1 scas/application/src/jas/Main.scala
+0 −13 scas/application/src/jas/PolynomialRing.scala
+3 −7 scas/application/src/jas/PowerProduct.scala
+5 −5 scas/application/src/jas/Ring.scala
+11 −8 scas/application/src/math3/Main.scala
+7 −11 scas/application/src/math3/Matrix.scala
+0 −19 scas/application/src/rings/BigInteger.scala
+25 −0 scas/application/src/rings/Main.scala
+3 −1 scas/application/src/rings/MultivariatePolynomialRing.scala
+5 −6 scas/application/src/rings/Ring.scala
+34 −0 scas/src/scas/Main.scala
+14 −23 scas/src/scas/base/BigIntegerImpl.scala
+5 −5 scas/src/scas/base/ModInteger.scala
+8 −15 scas/src/scas/base/RationalImpl.scala
+4 −0 scas/src/scas/math/Equiv.scala
+8 −1 scas/src/scas/math/Ordering.scala
+10 −4 scas/src/scas/math/PartialOrdering.scala
+0 −12 scas/src/scas/math/conversion/Equiv.scala
+0 −3 scas/src/scas/math/conversion/Ordering.scala
+0 −16 scas/src/scas/math/conversion/PartialOrdering.scala
+0 −35 scas/src/scas/module/ArrayModule.scala
+0 −12 scas/src/scas/module/Main.scala
+12 −16 scas/src/scas/polynomial/Polynomial.scala
+6 −6 scas/src/scas/polynomial/TreePolynomial.scala
+1 −0 scas/src/scas/power/ArrayPowerProduct.scala
+3 −3 scas/src/scas/power/ArrayPowerProductWithDegree.scala
+2 −4 scas/src/scas/power/Lexicographic.scala
+5 −9 scas/src/scas/power/PowerProduct.scala
+0 −3 scas/src/scas/prettyprint/Main.scala
+7 −11 scas/src/scas/structure/AbelianGroup.scala
+1 −1 scas/src/scas/structure/Field.scala
+4 −6 scas/src/scas/structure/Module.scala
+5 −12 scas/src/scas/structure/Monoid.scala
+2 −5 scas/src/scas/structure/NotQuiteField.scala
+2 −2 scas/src/scas/structure/NotQuiteGroup.scala
+1 −1 scas/src/scas/structure/Ring.scala
+2 −5 scas/src/scas/structure/SemiGroup.scala
+2 −3 scas/src/scas/structure/Structure.scala
+2 −4 scas/src/scas/structure/VectorSpace.scala
+3 −3 scas/src/scas/structure/commutative/Field.scala
+44 −51 scas/src/scas/structure/commutative/Quotient.scala
+4 −4 scas/src/scas/structure/commutative/Residue.scala
+8 −11 scas/src/scas/structure/commutative/UniqueFactorizationDomain.scala
+1 −1 scas/src/scas/structure/ordered/Structure.scala
+0 −18 scas/src/scas/util/Fragable.scala
+0 −8 scas/src/scas/util/Main.scala
+1 −1 scas/src/scas/variable/Variable.scala
2 changes: 1 addition & 1 deletion community-build/community-projects/scodec
2 changes: 1 addition & 1 deletion community-build/community-projects/stdLib213
Submodule stdLib213 updated 711 files
4 changes: 4 additions & 0 deletions pandoc/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs/
extras/
*.bat
README.md
1 change: 1 addition & 0 deletions pandoc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/
35 changes: 35 additions & 0 deletions pandoc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Created by mics (https://github.com/michelou/) on December 2020.

FROM pandoc/ubuntu-latex:2.11.4

LABEL md2pdf.author="Stéphane Micheloud <stephane.micheloud@gmail.com>"
LABEL md2pdf.description="Create PDF file for Scala 3 documentation"
LABEL md2pdf.version=1.0

WORKDIR /dotty
COPY ./tmp/docs ./docs/docs

WORKDIR pandoc
COPY ./data ./data
COPY ./md2pdf .

ENV TEXLIVE_HOME=/opt/texlive/texdir

## See https://github.com/openjournals/whedon/blob/master/paperdraft.Dockerfile
RUN tlmgr update --self

## Install additional LaTeX packages
## Already present: fancyvrb, fontspec, l3backend, l3kernel, l3packages, pgf, unicode-math, xcolor.
RUN tlmgr install \
dejavu \
environ \
gnu-freefont \
selnolig \
tcolorbox \
trimspaces

RUN echo "#!/bin/bash \n ./md2pdf \n ls /dotty/out/pandoc/" > ./entrypoint.sh
RUN chmod +x ./entrypoint.sh

ENTRYPOINT [ "./entrypoint.sh" ]
CMD [ "reference" ]
90 changes: 90 additions & 0 deletions pandoc/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# <span id="top">Creating PDF files for the Scala 3 documentation</span>
<!-- created by mics (https://github.com/michelou/) on December 2020 -->

This project is located at the root of the [`lampepfl/dotty`][github_dotty] repository, at the same level as the [`Scaladoc`][github_scala3doc] project.

We aim to generate a *single* PDF file from a collection of [Markdown] documents, for instance for the [*Scala 3 reference*][scala3_reference] documentation.

Our solution is built on [Pandoc]; it gets its inputs from two directories and generates a PDF file into the output directory:

<table style="margin-top:-10px; max-width:650px;">
<tr>
<td><b>Input directories</b></td>
<td><code>docs/docs/&lt;project&gt;/</code><br/><code>pandoc/data/</code></td>
<td><code>*.md</code> files<br/><a href="https://pandoc.org/">Pandoc</a> data files</td>
</tr>
<tr>
<td><b>Output directory</b></td>
<td><code>out/pandoc/</code></td>
<td><code>scala3_<i>&lt;project&gt;</i>.pdf</code><sup>(*)</sup></td>
</tr>
</table>

<span style="margin-left:10px;font-size:90%;"><sup>(*)</sup> *`<project>`* is one of [`contributing`](https://github.com/lampepfl/dotty/tree/master/docs/docs/contributing), [`internals`](https://github.com/lampepfl/dotty/tree/master/docs/docs/internals), [`reference`](https://github.com/lampepfl/dotty/tree/master/docs/docs/reference) or [`usage`](https://github.com/lampepfl/dotty/tree/master/docs/docs/usage).</span>

The generated PDF file is more elaborated than its sibling HTML version; unlike the online [*Scala 3 reference*][scala3_reference] documentation available on the [Scala 3 documentation](https://docs.scala-lang.org/scala3/) webpage, the `scala3_reference.pdf` document :
- starts with a *title page* directly followed by a *table of contents* and ends with an *appendix*.
- gathers all the "*More details*" sections in the appendix.

> See document [`PROJECT.md`](docs/PROJECT.md) for further information, e.g. project organisation.

## <span id="dependencies">Project dependencies</span>

This project depends on the following software :

- [Pandoc 2](https://github.com/jgm/pandoc/releases) <sup id="anchor_01">[1](#footnote_01)</sup> *([release notes](https://pandoc.org/releases.html))*
- [TeX Live 2021](https://tug.org/texlive/) <sup id="anchor_02">[2](#footnote_02)</sup> *([release notes](http://www.tug.org/texlive/doc/texlive-en/texlive-en.html#x1-880009.2))*

> See documents [`PANDOC.md`](docs/PANDOC.md) and [`TEXLIVE.md`](docs/TEXLIVE.md) for product specific information, e.g. software installation.

One may also install the following software:

- [Docker Desktop 3](https://docs.docker.com/get-docker/) <sup id="anchor_03">[3](#footnote_03)</sup> *([release notes](https://docs.docker.com/release-notes/))*

> See document [`DOCKER.md`](docs/DOCKER.md) for further information, e.g. `Dockerfile` usage.

## <span id="commands">Build commands</span>

We provide two commands for MacOS/Ubuntu as well as their equivalents for MS Windows :
- for *interactive users* :<br/>[`build {<option>|<subcommand>}`](./build) (resp. [`build.bat`](./build.bat) on MS Windows)<br/><span style="font-size:80%;">(option `-help` displays the available options/subcommands).</span>
- for *automated tasks* (primarily, but not exclusively) :<br/>[`md2pdf [<project>]`](./md2pdf) (resp. [`md2pdf.bat`](./md2pdf.bat) on MS Windows)<br/><span style="font-size:80%;">(default value for `<project>` : `reference`).</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've wondering, instead of having two commands build and md2pdf, can we have the same command for both local machines and cloud CI, assuming that both will use a published docker image?

Copy link
Contributor Author

@michelou michelou Feb 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your suggestion is right.

The existence of both commands build and md2pdf stems in part from my own background as a long-standing developer. Let me try to advocate the case (for fun) :

  • as a preamble the existance of both scripts is not directly linked to Docker.
  • build is a user-friendly wrapper script; it calls md2pdf but it also
    • provides some options (e.g. -verbose and -debug) and some subcommands (e.g. clean and view on MS Windows); I typically run command build -timer -verbose clean view to generate file scala3_reference.pdf on my Win10 laptop.
    • provides conditional compilation; the output file (e.g. scala3_reference.pdf) is generated depending on input file timestamps.
  • md2pdf is the minimal script for running pandoc with the appropriate settings.

In the context of the Dotty project, we can indeed have only one shell script : md2pdf (and may be md2pdf.bat).

NB. I could even omit several type checks environment checks inmd2pdf assuming users can help themselves in case of errors.


We also provide support for cloud development/deployment :

- with *Docker*<br/><a href="./Dockerfile"><code>Dockerfile</code></a>, a text document to create a Docker image featuring <a href="https://tug.org/texlive/">TeX Live</a>, <a href="https://pandoc.org/">Pandoc</a> and <a href="./md2pdf"><code>md2pdf</code></a>.
- with *GitHub Actions* <b style="color:red;">WIP</b> :<br/><a href="../.github/workflows/pandoc.yaml"><code>pandoc.yaml</code></a>, a workflow file to run CI jobs with <a href="https://docs.github.com/en/actions">GitHub Actions</a>.

> See document [`EXAMPLES.md`](docs/EXAMPLES.md) for usage examples in different environments.

## <span id="footnotes">Footnotes</span>

<span id="footnote_01">[1]</span> ***Pandoc software*** [↩](#anchor_01)

<dl><dd>
<a href="https://pandoc.org/">Pandoc</a> is both a library and a command line tool for converting files from one markup format into another. Through the command line option <a href="https://pandoc.org/MANUAL.html#option--pdf-engine"><code>--pdf-engine=&lt;path&gt;</code></a> Pandoc supports many PDF engines, among others <a href="https://linux.die.net/man/1/pdflatex"><code>pdflatex</code></a>, <a href="http://www.luatex.org/"><code>lualatex</code></a> and <code>xelatex</code>.
</dd></dl>

<span id="footnote_02">[2]</span> ***MiKTeX software*** [↩](#anchor_02)

<dl><dd>
As an alternative to <a href="https://tug.org/texlive/">TeX Live 2020</a> one may also use the <a href="https://miktex.org/">MiKTeX</a> distribution <i>(<a href="https://miktex.org/announcement/miktex-20-12">release notes</a>)</i> which we have tested on both MS Windows 10 and <a href="https://www.msys2.org/">MSYS2</a>.
</dd></dl>

<span id="footnote_03">[3]</span> ***Docker software*** [↩](#anchor_03)

<dl><dd>
We run <a href="https://docs.docker.com/docker-for-windows/install/">Docker Desktop for Windows</a> on our development machine.<br/>
Note that WSL 2 is required to interact with Docker on Windows from <a href="https://ubuntu.com/wsl">Ubuntu for WSL</a> (see documentation <a href="https://docs.docker.com/docker-for-windows/wsl/">Docker Desktop WSL 2 backend</a>).
</dd></dl>

***

*[mics](https://github.com/michelou/)/January 2022* [**&#9650;**](#top "Back to top")
<span id="bottom">&nbsp;</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Back to top seems not very useful, maybe remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While your comment is justified for people working with 20+ inch screens, I and others I guess are used to read online docs with a 5.8 inch cell phone, in which case this tiny button is very practical. I let you decide.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, it's fine to keep it.


[github_dotty]: https://github.com/lampepfl/dotty/#dotty
[github_scala3doc]: https://github.com/lampepfl/dotty/tree/master/scala3doc#scala3doc
[markdown]: https://commonmark.org/
[pandoc]: https://pandoc.org/ "A universal document converter"
[scala3_reference]: https://dotty.epfl.ch/docs/reference/overview.html
[tex_live]: https://tug.org/texlive/
183 changes: 183 additions & 0 deletions pandoc/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
#!/usr/bin/env bash

## Created by mics (https://github.com/michelou/) on December 2020.

##############################################################################
## Subroutines

getHome() {
local source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do
local linked="$(readlink "$source")"
local dir="$( cd -P $(dirname "$source") && cd -P $(dirname "$linked") && pwd )"
source="$dir/$(basename "$linked")"
done
( cd -P "$(dirname "$source")" && pwd )
}

getOS() {
local os
case "$(uname -s)" in
Linux*) os=Linux;;
Darwin*) os=Mac;;
CYGWIN*) os=Win;; # os=Cygwin;;
MINGW*) os=Win;; # os=MinGw;;
*) os=Unknown
esac
echo $os
}

# use variables EXITCODE, TIMER_START
cleanup() {
[[ $1 =~ ^[0-1]$ ]] && EXITCODE=$1

if $TIMER; then
local timer_end=$(date +'%s')
local duration=$((timer_end - TIMER_START))
echo "Total elapsed time: $(date -d @$duration +'%H:%M:%S')" 1>&2
fi
debug "EXITCODE=$EXITCODE"
exit $EXITCODE
}

verbose() {
$VERBOSE && echo "$1" 1>&2
}

debug() {
local debug_label="[DEBUG]"
$DEBUG && echo "$debug_label $1" 1>&2
}

error() {
local error_label="Error:"
echo "$error_label $1" 1>&2
}

args() {
PROJECT_NAME=$PROJECT_NAME_DEFAULT

[[ $# -eq 0 ]] && HELP=true && return 1

for arg in "$@"; do
case "$arg" in
## options
-debug) DEBUG=true ;;
-help) HELP=true ;;
-project:*) PROJECT_NAME="$(project_name ${arg:9})" ;;
-timer) TIMER=true ;;
-verbose) VERBOSE=true ;;
-*)
error "Unknown option $arg"
EXITCODE=1 && return 0
;;
## subcommands
clean) CLEAN=true ;;
compile) COMPILE=true ;;
help) HELP=true ;;
*)
error "Error: Unknown subcommand $arg"
EXITCODE=1 && return 0
;;
esac
done
$CLEAN || $COMPILE || $HELP || HELP=true
debug "Options : DEBUG=$DEBUG TIMER=$TIMER VERBOSE=$VERBOSE"
debug "Subcommands: CLEAN=$CLEAN COMPILE=$COMPILE HELP=$HELP"
debug "Variables : PANDOC_HOME=$PANDOC_HOME"
debug "Variables : TEXLIVE_HOME=$TEXLIVE_HOME"
debug "Variables : PROJECT_NAME=$PROJECT_NAME"
# See http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/
$TIMER && TIMER_START=$(date +"%s")
}

help() {
cat << EOS
Usage: $BASENAME { <option> | <subcommand> }

Options:
-debug show commands executed by this script
-help display this help message
-project:<name> project name (default: $PROJECT_NAME_DEFAULT)
-timer display total elapsed time
-verbose display progress messages

Subcommands:
clean delete generated files
help display this help message
compile compile source files
EOS
}

project_name() {
local name=""
case "$1" in
internals) name="internals" ;;
reference) name="reference" ;;
usage) name="usage" ;;
*) error "Invalid project name $1"
esac
$name
}

clean() {
if [ -d "$TARGET_DIR" ]; then
debug "rm -rf $TARGET_DIR"
verbose "Delete directory $TARGET_DIR"
rm -rf "$TARGET_DIR"
[[ $? -eq 0 ]] || ( EXITCODE=1 & return 0 )
fi
}

compile() {
[ -d "$TARGET_DIR" ] || mkdir -p "$TARGET_DIR"

debug "$MD2PDF_CMD $PROJECT_NAME"
verbose "$MD2PDF_CMD $PROJECT_NAME"
$MD2PDF_CMD $PROJECT_NAME
[[ $? -eq 0 ]] || ( EXITCODE=1 & return 0 )
}

##############################################################################
## Environment setup

BASENAME=$(basename "${BASH_SOURCE[0]}")

EXITCODE=0

PROG_HOME="$(getHome)"

OS="$(getOS)"
[ $OS == "Unknown" ] && error "Unsupported OS"
[ $OS == "Win" ] && EXT=".exe" || EXT=""

MD2PDF_CMD=$PROG_HOME/md2pdf
[ -x "$MD2PDF_CMD" ] || error "md2pdf script not found"

PROJECT_NAME_DEFAULT=reference

CLEAN=false
COMPILE=false
DEBUG=false
HELP=false
TIMER=false
VERBOSE=false

TARGET_DIR=$(dirname "$PROG_HOME")/out/pandoc

args "$@"
[[ $EXITCODE -eq 0 ]] || cleanup 1

##############################################################################
## Main

$HELP && help && cleanup

if $CLEAN; then
clean || cleanup 1
fi
if $COMPILE; then
compile || cleanup 1
fi

cleanup
Loading