Best way to add an icon to a cell in a Python notebook that exports to PDF (Not a Figure with a Figure label) #7550
Replies: 5 comments 4 replies
-
I do not understand the meaning of the title and its link to the content of the post I'am afraid. What I do understand is that you want to do: |
Beta Was this translation helpful? Give feedback.
-
Mcanouil, Thank you for your fast response .. let me try to explain better... Which renders into PDF as this .. However, ideally what I would want is that image (icon) (1) In the left margin (2) Without the 'Figure' Label and title. I just want a clear, typographic way of showing students where they need to enter code. Another option would be to display the code block (i.e. black background square) but without the actual text of the code. So this ... Would render something like this: (I have edited the program code out of the image here manually) Actually .. I am flexible. I just need a neat, easy-to-use, easy-to-recognise typography that shows students "This is where you need to enter code based on my previous instructions". I then plan to give these PDFs to students as hand-outs so that they can create their own .ipynb notebooks. Thank you again for any help. |
Beta Was this translation helpful? Give feedback.
-
I am experimenting by doing this: But still seeing this in my PDF: If I could get that image on the left of the page and remove the caption I think I would be good. |
Beta Was this translation helpful? Give feedback.
-
Thanks for trying out quarto. You wrote this:
You have a number of mistakes. The triple-tick syntax with If you don't mind my unsolicited advice: instead of attempting advanced examples from the start, I think you'd be better served by starting with the tutorials and making sure you understand what's going on in them first: https://quarto.org/docs/get-started/hello/jupyter.html |
Beta Was this translation helpful? Give feedback.
-
Thank you - yes I will look at the tutorials. I actually did make some progress including and formatting a small image without a caption after your advice. In the end however I decided to use a '.callout-tip' with a short message saying "Add your code here". That looks good on the page and achieves my goal. Thank you again. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am writing a series of student workbooks for a Machine Learning course using Python and Jupyter Notebooks. I want to publish these into PDF using Quarto. In one version of the exported PDF I want to hide the code (which I see I can do using 'echo: false.
However, I want to indicate to students where they need to fill in the missing code. I am looking for something such as:
I tried just dragging an image into a cell - but then Quarto labels this as a figure - which I don't want.
Any suggestions please?
Beta Was this translation helpful? Give feedback.
All reactions