-
Notifications
You must be signed in to change notification settings - Fork 44
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
Transfer fortran90.org content #112
Comments
Yes, we should transfer it and then put a banner at fortran90.org to come here. |
Following that discussion https://fortran-lang.discourse.group/t/fortran-lang-is-now-second-in-google/931/14 , I can help working on translating the ReStructuredText format to Markdown, using Pandoc. |
@vmagnin thank you! That would be super helpful. |
I would be happy to help too! I guess that the file conversion is the easiest step ;) A nice integration in fortran-lang (by considering the current content of fortran-lang to avoid overlap) would require more work. |
Go ahead, take one page and submit a PR against this repository. Then let's figure out how to best integrate. |
Yes, a quick try today showed me that Pandoc was doing a very good job, except some characters like quotes, and some links. So the translation with Pandoc will be very fast, the longest work will be to verify that every thing is OK. Perhaps a simple copy/paste of the texts of both versions, and a diff on the two resulting files could accelerate that validation. Then will begin the integration to the website. I propose beginning working myself on the Pandoc and validation step. In the meantime, @jvdp1 you can have a look at the text of fortran90.org and the content of Fortran-lang.org to identify potential problems. |
I guess I should put the Markdown files into a directory in https://fortran-lang.org/learn/ Then probably we will need Sebastian @awvwgk to integrate those |
The documentation regarding the learn subsection is located here. |
Right, you forked from my fork, just branch from my default branch, it is kept in sync with the @fortran-lang default branch automatically. You can direct your PR against the @fortran-lang version of the homepage, but if you make a PR against my fork by accident, I'll watch out and advice how to get to the real upstream. |
I report my progress translating fortran90.org files. The following command gives good results: $ pandoc --standalone --toc --resource-path=../images --to markdown_strict --shift-heading-level-by=1 best-practices.rst -o best-practices.md I have added the In the The Now my objective is to first work on a PR for
Remarks concerning code indentation: Useful links: |
Thank you @vmagnin for this wok. I would be in favor of working directly on a multi-page mini-book. IMO it will be easier to review and identify possible overlaps with existing contents. |
Thank you @vmagnin for this work! Yes, we can do multi page mini book and review page by page. Yes, let's start with the best practices. (The rosetta has an issue that it has side by side code comparisons which we have to figure out how to do in Markdown. We don't need to include the Mandelbrot image, I only included it to show that both Python and Fortran generate exactly the same image.) I think there is in general no agreement on the number of spaces. I suggest to keep the formatting as is, and see how it looks when rendered and if there are objections. |
So let's go with multi-page! I will slice Concerning Note that for the moment, I have not yet included those files in my Fortran-lang.org fork, so I don't know yet how they will look in a browser. |
For $ pandoc --standalone --toc --resource-path=../images/ --to markdown_strict+grid_tables --shift-heading-level-by=1 rosetta.rst -o rosetta.md The tables look good in a text editor, but my Markdown viewers don't manage them. But I will test it in the website fork. |
Beginning visualizing the result with Jekyll, I have updated my Pandoc command: $ pandoc --standalone --toc --resource-path=../images --to markdown_strict+pipe_tables+backtick_code_blocks best-practices.rst -o best-practices.md
|
Nice, thank you @vmagnin! I can help proof read once you are ready. |
I have committed the new mini-book to my fork in a new $ tree best_practices
best_practices
├── allocatable_arrays.md
├── arrays.md
├── callbacks.md
├── c_interfacing.md
├── element_operations.md
├── file_io.md
├── floating_point.md
├── index.md
├── integer_division.md
├── modules_programs.md
├── multidim_arrays.md
├── parallel_programming.md
├── python_interfacing.md
├── style_guide.md
└── type_casting.md
0 directories, 15 files Let me know if you agree with those directory and filenames. I am waiting for your signal to make a PR. Some remarks:
|
Great stuff! (Feel free to delete the vestigial |
Thanks @LKedward, I have committed a Concerning the Python Fortran Rosetta Stone page, it's more difficult with the Python / Fortran code comparisons in two columns. I have found no Pandoc extension to obtain a correct Markdown table. Pandoc can generate HTML tables, but we lose the syntax highlighting. No idea for the moment... The vertical alignment problem can be fixed by adding an attribute: |
I'll review later today, thank you so much @vmagnin! Regarding the rosetta, one option is to use Myst: https://myst-nb.readthedocs.io/en/latest/use/markdown.html, it is markdown and it can do anything that ReST could do. I believe it can do side by side tables. |
Sounds good to me. I guess a PR could be opened for review. Should we already introduce cross-references with the current content of fortran-lang.org (especially from the Quickstart tutorial in whcih tips are mentioned to this mi-book) (during the review)? |
#112) (#185) * rosetta * rosetta stone code * tables * list index tables * list index tables * math tables * math tables * math tables * math tables * rosetta stone * rosetta stone * python 2 to 3 * indexing example table * speed readings * suggestions * suggestions * suggestions * Update data/learning.yml Co-authored-by: Zachary Moon <zmoon92@gmail.com> * Update data/learning.yml Co-authored-by: Zachary Moon <zmoon92@gmail.com> * suggestions * rosetta * indentation * fortran while loop * code colouring * feat:add indentation in python codes * fix syntax * fix: indentation * fix: for indentation --------- Co-authored-by: Ondřej Čertík <ondrej@certik.us> Co-authored-by: Vincent Magnin Co-authored-by: Zachary Moon <zmoon92@gmail.com>
See #69
The text was updated successfully, but these errors were encountered: