-
Notifications
You must be signed in to change notification settings - Fork 557
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
ability to scale images in markdown #15
Comments
Thanks Pete - I'm the same with markdown! As far as I know there's no clean way for specifying image size right now, but the functionality is imminent. I'll add this point to the readme to make it clear. For more information, see: jgm/pandoc#261 (summary - the Pandoc fix is on a branch waiting to be merged). If it's urgent, we could work out a temporary fix in the meantime... |
Thanks Tom thats great, hopefully it gets sorted soon. I tried inserting images this way https://www.sharelatex.com/learn/Inserting_Images but I get [pdf] Error 43 when I try to output the PDF. Do you know of a way I can manually insert the image and alter their size |
Hey Pete, One option that works for me is replacing the pdf image with a resized jpg (for example, the following 200 x 200 pixel jpg): ...and then updating the file type in the chunk that imports the figure: \label{ref_a_figure}](source/figures/example_figure.jpg) Not a perfect solution, but does this meet your needs for now? |
thats awesome Tom, I never thought of that. I'm sorry for asking so many questions but I dont know if this is a bug or an issue with my markup I have the following markup
I would expect the 'platform_model' image to be above the Client side application section, however it is not (see image) I did find a quick solution using
however, the figure reference stopped working Am I doing something wrong or is this a bug? Sorry for the hassle |
Hi Pete,
If you get an error when compiling, it's useful to add Pandoc's verbose flag to the Makefile:
It looks like adding the \newline errors with "! LaTeX Error: There's no line here to end", the same error that you would get if you added newline on an empty line. Not really a bug, just not appropriate use of the command. The problem is that your image doesn't fit between the sentence containing the citation and the end of the page. Either you have white space here or you allow the following sentence to flow before the image is placed. If you're happy with white space, you should be able to use "\newpage" to get the kind of layout that you're looking for. One interesting side point is that it looks like Pandoc hard codes image placement with the htbp options. You can overwrite these options in the source/style/template.tex file if you want to play around with the float behaviour: % Overwrite \begin{figure}[htbp] with \begin{figure}[H]
\usepackage{float}
\let\origfigure=\figure
\let\endorigfigure=\endfigure
\renewenvironment{figure}[1][]{%
\origfigure[b]
}{%
\endorigfigure
} |
Hi Tom, Got it working with your help, really appreciate it. Sorry for being annoying but I have one more question (probably a stupid question), is it possible to sort the references by citation order? I tried |
Hi Pete, glad to hear you worked it out. The reference style is defined in the following file: If you'd like to change to a different style, just overwrite the content with an alternative CSL definition from: http://citationstyles.org/ The Vancouver style may be what you are looking for: Hope this helps, |
For people arriving via Google, or from clicking through the readme:
Source: http://pandoc.org/MANUAL.html#extension-link_attributes |
thanks @rudolfbyker, I've added an example of this syntax to the template |
When I insert a figure it scales to the width of the PDF, this makes some of my images too large. Is it possible to change the scale / size of the image using markdown or LaTex, although I'm not too familiar with LaTex.
Nice job setting this up, I hate word and am much more productive in markdown 👍
The text was updated successfully, but these errors were encountered: