Git Product home page Git Product logo

Comments (16)

erciccione avatar erciccione commented on August 17, 2024

@pazos how heavily should the document be reformatted?

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

to be parseable we need to use relative path for images (eg: replace /media/image.png for media/image.png). But using a template can benefit us in the long run. In that case I would go for using https://github.com/evangoer/pandoc-ebook-template, which has rules to build epub, pdf and html. If you are ok with that template I can submit a PR.

In the long run we can look at generating jeckyll static pages with pandoc too, but I think isn't needed for now.

@erciccione: do you use mac/linux as your OS? I'm not sure how all this would work on windows.

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

I would keep it as simple as possible for now, since we only need to make a decent looking PDF and i don't plan anything more complex than that for the future. Let's avoid the change of template. I'm intalling pandoc and all needed dependencies right now so i can test (i'm on linux btw)

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

Ok, i tested it using the command pandoc --from markdown -o guide.pdf monero-GUI-guide.md (since the format was kinda broken using markdown_github) but i'm not completely satisfated about it, the TOC is completely broken, but maybe it only needs some formatting.

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

hey, the toc, chapters, sections and subsections shall be generated by pandoc, not by hand. If you follow the convention of # chapter ## section ### subsection it should be easy to do.

Look at this example which I generated:
monero-GUI-guide.pdf

The only thing to do is handle external links in the last section.

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

I understand that, but still looks quite ugly to me at the moment, in the example you posted there is even a blank page (page 20) in the middle of the document. It's true that it wasn't present in mine using the same tool, so it probably need just some tweaking here and there to look good. Right now i can't find the tool i used the first time (what i did was markdown ->html ->PDF) so i can't post an example. Don't get me wrong, i would love to use this if we can fix these two issues (blank parts and ugly external links at the bottom). Could you post an example with these two fixed?
Sorry if i didn't write clearly, i'm quite burned out at the moment.

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

Don't worry. I will write a template when I have some time. Almost all issues have solutions with some latex love. The blank page is related to settings image being too big and the hyperlinks are just a matter of changing the format.

I'm quite burned out at the moment.

You are doing a great job with all the translation stuff and the ecosystem repo. Hands up 👍

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

Hey @pazos i see you opened #26 , but i really think we don't need a template or a makefile here. PDFs will be generated probably 3-5 times a year, when doing so i can just do it manually. Let's keep the repo as clean as possible :)

Btw, i'm playing a bit with the various options here, i used your makefile as an example and i helped myself with the official manual. I tweaked the commands a little bit and I came out with

pandoc --from markdown --variable urlcolor=blue -o guide.pdf monero-GUI-guide.md --toc --variable geometry:a4paper --dpi=200 --variable documentclass:report

the only differences are the depth of --toc (left default) and the --dpi variable to improve the quality of the pictures. What do you think? anyway i will give it a better look tomorrow with a properly working brain

You are doing a great job with all the translation stuff and the ecosystem repo. Hands up +1

Thank you :)

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

the only differences are the depth of --toc (left default) and the --dpi variable to improve the quality of the pictures. What do you think?

Yep, toc should be at least 3. DPI is a bit high (default is 96 afaik).

i really think we don't need a template or a makefile here. PDFs will be generated probably 3-5 times a year, when doing so i can just do it manually. Let's keep the repo as clean as possible :)

Ok, I will close the PR ;)

FYI you always use a template when using pandoc to "translate via latex" between markdown and pdf. In case you don't explicit use one you'll be using the default one, that can be viewed with pandoc -D latex. Command line will help with some basic stuff but some fine-tuning options like where to insert linebreaks are done modifying the template.

Feel free to ping me if you need some help with those rules

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

@pazos I'm trying to build the PDF using pandoc but i don't understand why some pictures are misplaced. Any idea of how to fix this?

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

please give me more info. Missplaced how?. Also give me the command used to generate the pdf.

Are you running the command against this repo? If so I can try myself and see what is wrong.

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

sorry you are right, i've tried many variants of the command i wrote above, the problem is that some pictures end up in a different position than they should be. For example in the section "settings" the picture is in the middle of the text, after (14) but before (15). When it should be before (1) instead. I'm attaching the PDF. You can see it by yourself, just remove the TOC first.

guide.pdf

from monero-gui-guide.

pazos avatar pazos commented on August 17, 2024

mmm, not sure if I can help without modyfing the template used by pandoc. Images are placed based on space available on pages. The settings image is too large in height so it needs a page for itself. Latex see that is one page available after 14 so it places the image there.

There are too many ways to fixing this, but the most obvious is having each chapter on its own markdown and start each chapter on its own new page. So, in that case the Settings image will come first and then you'll have settings (1-18)

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

@pazos Could you create a quick template i can use right now to solve this? Or maybe there is another quick way to solle this?

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

#56

from monero-gui-guide.

erciccione avatar erciccione commented on August 17, 2024

#56 is merged

from monero-gui-guide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.