public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* pandoc html to pdf
@ 2019-10-22 16:12 Ivana Zgaljic
       [not found] ` <75ad3ed6-e3a7-480e-813e-26e9795041bb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Ivana Zgaljic @ 2019-10-22 16:12 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 894 bytes --]

Hi, I am converting a file from html to pdf using the following command:

pandoc iz_test.html -s -o iz_final.pdf


I noticed the default setting is that the pdf prints to portrait but I'd 
like my pdf output to print as landscape.

Reviewed the options setting and I've saved a new default.tex file 
in C:\Users\myusername\AppData\Roaming\pandoc

Any suggestions on how I should modify my default.tex so my output prints 
in landscape?  My output pdf still prints in pdf.

Thank you.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/75ad3ed6-e3a7-480e-813e-26e9795041bb%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1340 bytes --]

[-- Attachment #2: default.tex --]
[-- Type: text/x-tex, Size: 11916 bytes --]

%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}  

% The declaration of the document class:

% The second line here, i.e.
% \documentclass[12pt]{scrartcl} 
% is a standard LaTeX document class declaration: 
% we say what kind of document we are making in curly brackets, 
% and specify any options in square brackets.

% (The previous line is a pseudo-comment, declaring that we will
% use the special XeTeX machinery for its more extensive font list
% and its use of unicode; 
% in general, LaTeX 'comments' like this one
%  begin with % and end with a linebreak.)

% Note that there we have nothing in the nature of a template;
% it's just a standard bit of LaTeX pandoc will copy unaltered into the 
% LaTeX file it is writing.  But suppose you wrote something
% more akin to the corresponding line in Pandoc's default 
% latex.template file, say:

% \documentclass$if(fontsize)$[$fontsize$]$endif${scrartcl}

% then you would have invented a 'variable', fontsize, 
% and could write things like 

% `markdown2pdf my.txt --xetex --variable=fontsize:12pt -o my.pdf` or
% `pandoc -r markdown -w html my.txt -s --xetex --variable=fontsize:24pt -o my.tex`. 

% If we specified --variable-fontsize:12, then template substitution
% would yield a LaTeX document beginning
% \documentclass[12pt]{scrarcl}
% which is just what we said anyway. 
% But we could also specify a different fontsize.

% I don't use this `--variable=....`functionality myself; 
% I have a couple of basic templates I call with 
% `--template=whatever.template` which I can also 
% easily inspect to adjust things like font size as I please. 

% While we are discussing the declaration of the document class...
% here's an alternative command for two column landscape, 
% not bad for some purposes. (If you strike the word 'landscape' 
% you will have two narrow newspaperlike
% columns; scientists like that, because irrationality must
% show itself somewhere):
%\documentclass[12pt,twocolumn,landscape]{scrartcl} 
% Columns are too close together in LaTeX so we add this 
% `columnsep` command:
%\setlength{\columnsep}{.5in}


% I use the special 'komascript' article class "scrartcl" 
% reasons I can't entirely remember; I'm not sure it's that great.
% One reason is the unimportant one that, like many classes,
% it allows very big fonts which are convenient for booklet printing 
% in the idiotic American way by shrinking letterpaper pages.

% the standard minimal LaTeX 'article' class declaration would be something like:

% \documentclass[12pt]{article} 

% or for big type:

% \documentclass[24pt]{extarticle}

% but these restrict you to old-fashioned LaTeX materials.
% Note that Kieran Healy uses the swank 'Memoir' class, 
% \documentclass[11pt,article,oneside]{memoir}
% which might be worth a look. 

% Enough about the document class.

% -- We are in swanky unicode, XeTeX land, and must now import these packages:
% \usepackage{fontspec,xltxtra,xunicode}
% fontspec means we can specify pretty much any font.
% Because we are using XeTeX material,
% this template needs to be called with the `--xetex` flag. 


% Symbols: 
% Pandoc imports the extensive `amsmath` collection of symbols 
% for typesetting ordinary math.  
% \usepackage{amsmath}
% if you use exotic symbols you need to import specific packages, eg. for
% electrical engineering diagrams, musical notation, exotic currency symbols,
% the unspeakable rites of freemasonry etc.


% `babel`: 
% The `babel` package, among other things, lets you determine what 
% language you are using in a given stretch of text, so that typesetting 
% will go well. Here we specify that mostly, we are speaking English:
% \usepackage[english]{babel}


% Margins, etc:
% the `geometry` package makes for convenient adjusting of margins, which is what
% you asked about.  Of course it can do much more, even make coffee for you:
\usepackage{geometry}
\geometry{legalpaper, landscape, margin=0.25 in}
% so if you just keep a copy of this template in the directory you are working in, you
% can adjust the margins by going into this file and messing with the margins.
% the syntax is very unforgiving, but permits 3cm and 2.5in and some other things.


% Font:
% Here I set my main font, which is an Apple Corporation Exclusive, golly. 

% \setmainfont{Hoefler Text}
% \setromanfont[Mapping=tex-text,Contextuals={NoWordInitial,NoWordFinal,NoLineInitial,NoLineFinal},Ligatures={NoCommon}]{Hoefler Text}

% Hoefler Text is okay, but note the long discussion of 'contextuals' which is necessary to cools off 
% some of its show-offy properties. (You can make your essay look like the 
% Declaration of Independence by specifying e.g. Ligatures={Rare} )
% If you have a copy you might try it; as it is
% I will comment it out and supply something more certain to be around:

\setmainfont{Times Roman}

% Properly one should specify a sanserif font and a monospace font
% see e.g. the example of Kieran Healy:
% \setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro} 
% \setsansfont[Mapping=tex-text]{Minion Pro} 
% \setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}

% But I hate sanserif fonts, and anyway there are defaults.



% Heading styles:
% These commands keep the koma system from making stupid sans serif section headings
\setkomafont{title}{\rmfamily\mdseries\upshape\normalsize}
\setkomafont{sectioning}{\rmfamily\mdseries\upshape\normalsize}
\setkomafont{descriptionlabel}{\rmfamily\mdseries\upshape\normalsize}



% I'm puzzled why I have this foonote speciality, 
% I wonder if it's part of my problem I've been having, but wont look
% into it now. 
% \usepackage[flushmargin]{footmisc} 
% \usepackage[hang,flushmargin]{footmisc}


% So much for my personal template.


% Everything that follows is copied from the pandoc default template:
% I will interpolate a few comments, the comments that are in 
% the default template will be marked % -- 

% Paragraph format:
% Pandoc prefers unindented paragraphs in the European style:
\setlength{\parindent}{0pt}
%  ... with paragraph breaks marked by a slight lengthening of 
% the space between paragraphs:
\setlength{\parskip}{6pt plus 2pt minus 1pt}

% Page format:
\pagestyle{plain}  
% The default `plain` pagestyle just numbers the pages,
% whereas  
% \pagestyle{empty} 
% would give you no numbering.
% After one-million man-years of macro-composition, 
% there are also fancy pagestyles with much wilder options 
% for headers and footers, of course.

% Footnotes
% if you have code in your footnotes, the million macro march 
% kind of bumps into itself.
% Pandoc, having just rendered your text into LaTeX, 
% knows whether the 'variable' `verbatim-in-note` is True, and 
% If it is, it asks for a  LaTeX package that solves the dilemma:
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$

% Lists formatting: 
% note sure what 'fancy enums' are; something to do with lists, 
% as the further comment suggests: 
$if(fancy-enums)$
% -- Redefine labelwidth for lists; otherwise, the enumerate package will cause
% -- markers to extend beyond the left margin.
\makeatletter\AtBeginDocument{%
  \renewcommand{\@listi}
    {\setlength{\labelwidth}{4em}}
}\makeatother
\usepackage{enumerate}
$endif$


% Table formatting: 
% What if you make a table? -- Pandoc knows, of course, and 
% then declares that its  variable `table` is True and 
% imports a table package suitable to its pleasantly simple tables. 
% Needless to say infinitely   complicated tables are possible in 
% LaTeX with suitable packages. We are spared the temptation:

$if(tables)$
\usepackage{array}

% Continuing on the topic of tables ... (we havent reached `endif`). 
% The commented out line below is in the default pandoc  latex.template.
% Some unpleasantness with table formatting must be corrected.

% -- This is needed because raggedright in table elements redefines \\:
\newcommand{\PreserveBackslash}[1]{\let\temp=\\#1\let\\=\temp}
\let\PBS=\PreserveBackslash

$endif$


% Subscripts:
% Pandoc remembers whether you used subscripts, assigning True to 
% its `subscript` variable 
% It then needs to adopt a default with an incantation like this:
$if(subscript)$
\newcommand{\textsubscr}[1]{\ensuremath{_{\scriptsize\textrm{#1}}}}
$endif$


% Web-style links:

% markdown inclines us to use links, since our texts can be made into html. 
% Why not have clickable blue links even in 
% learned, scientific, religious, juridical, poetical and other suchlike texts? 
% Never mind that they have been proven to destroy the nervous system!

% First, what about the fact that links like http://example.com are 
% technically code and thus must not be broken across lines? 
% [breaklinks=true] to the rescue!

% Nowadays LaTeX can handle all of this with another half million macros:

% \usepackage[breaklinks=true]{hyperref}
% \hypersetup{colorlinks,%
% citecolor=blue,%
% filecolor=blue,%
% linkcolor=blue,%
% urlcolor=blue}
$if(url)$
\usepackage{url}
$endif$



% Images. 
% In ye olde LaTeX one could only import a limited range of image
% types, e.g. the forgotten .eps files.  Or else one simply drew the image with suitable
% commands and drawing packages.  Today we want to import .jpg files we make with 
% our smart phones or whatever:

$if(graphics)$
\usepackage{graphicx}
% -- We will generate all images so they have a width \maxwidth. This means
% -- that they will get their normal width if they fit onto the page, but
% -- are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$



% Section numbering.  
% Here again is a variable you can specify on the commandline
% `markdown2pdf my.txt --number-sections --xetex --template=/wherever/this/is -o my.pdf`
$if(numbersections)$
$else$
\setcounter{secnumdepth}{0}
$endif$

% Footnotes: 
% Wait, didn't we already discuss the crisis of code in footnotes?  
% Evidently the order of unfolding of macros required that
% we import a package to deal with them earlier
% and issue a command it defines now. (Or maybe that's not the reason;
% very often the order does matter as the insane system of macro expansion
% must take place by stages.)
$if(verbatim-in-note)$
\VerbatimFootnotes % -- allows verbatim text in footnotes
$endif$

% Other stuff you specify on the command line:
% You can include stuff for the header from a file specified on the command line;
% I've never done this, but that stuff will go here:
$for(header-includes)$
$header-includes$
$endfor$

% Title, authors, date.
% If you specified title authors and date at the start of 
% your pandoc-markdown file, pandoc knows the 'values' of the
% variables: title authors date and fills them in.

$if(title)$
\title{$title$}
$endif$
\author{$for(author)$$author$$sep$\\$endfor$}
$if(date)$
\date{$date$}
$endif$

% At last: 
% The document itself!:

% After filling in all these blanks above, or erasing them 
% where they are not needed, Pandoc has finished writing the 
% famous LaTeX *preamble* for your document.
% Now comes the all-important command \begin{document}
% which as you can see, will be paired with an \end{document} at the end.
% Pandoc knows whether you have a title, and has already
% specified what it is; if so, it demands that the title be rendered.  
% Pandoc knows whether you want a table of contents, you
% specify this on the command line.
% Then, after fiddling with alignments, there comes the real
% business: pandoc slaps its rendering of your text in the place of
% the variable `body`
% It then concludes the document it has been writing. 

\begin{document}


$if(title)$
\maketitle
$endif$

$if(toc)$
\tableofcontents

$endif$


$if(alignment)$
\begin{$alignment$}
$endif$

$body$

%$if(alignment)$
\end{$alignment$}
$endif$


\end{document}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found] ` <75ad3ed6-e3a7-480e-813e-26e9795041bb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-22 17:04   ` Ivana Zgaljic
       [not found]     ` <db92c6d3-266b-4ef7-a279-d94ac9bd17ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Ivana Zgaljic @ 2019-10-22 17:04 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1076 bytes --]

Just a clarification.  I meant to say "My output pdf still prints in 
portrait."

On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic wrote:
>
> Hi, I am converting a file from html to pdf using the following command:
>
> pandoc iz_test.html -s -o iz_final.pdf
>
>
> I noticed the default setting is that the pdf prints to portrait but I'd 
> like my pdf output to print as landscape.
>
> Reviewed the options setting and I've saved a new default.tex file 
> in C:\Users\myusername\AppData\Roaming\pandoc
>
> Any suggestions on how I should modify my default.tex so my output prints 
> in landscape?  My output pdf still prints in pdf.
>
> Thank you.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1664 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found]     ` <db92c6d3-266b-4ef7-a279-d94ac9bd17ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-22 18:26       ` BPJ
       [not found]         ` <CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw=jVwH5gq7H7m9_+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BPJ @ 2019-10-22 18:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 2647 bytes --]

Make a file called "landscape.yaml" which contains this:

    ---
    geometry:
      - landscape
    ---

then add this to your command line:

    --metadata-file=landscape.yaml

Make sure you have the latest version of pandoc, since the --metadata-file
option was added very recently.

You probably need to adjust the margins too.  You can add more geometry
options to the metadata file:

    ---
    geometry:
      - landscape
      - top=15mm
      - left=15mm
      - right=15mm
      - bottom=20mm
    ---

(Those are quite possibly not good values; it's just an example!)

If you want all the margins to be the same width you can use

    - margin=20mm

You can use in, cm or pt instead of mm if you prefer those units.

https://tex.stackexchange.com/a/147507/93534

http://texdoc.net/pkg/geometry

https://github.com/jgm/pandoc/releases/tag/latest


Den tis 22 okt. 2019 19:05Ivana Zgaljic <ivana.zgaljic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Just a clarification.  I meant to say "My output pdf still prints in
> portrait."
>
> On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic wrote:
>>
>> Hi, I am converting a file from html to pdf using the following command:
>>
>> pandoc iz_test.html -s -o iz_final.pdf
>>
>>
>> I noticed the default setting is that the pdf prints to portrait but I'd
>> like my pdf output to print as landscape.
>>
>> Reviewed the options setting and I've saved a new default.tex file
>> in C:\Users\myusername\AppData\Roaming\pandoc
>>
>> Any suggestions on how I should modify my default.tex so my output prints
>> in landscape?  My output pdf still prints in pdf.
>>
>> Thank you.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw%3DjVwH5gq7H7m9_%2Bg%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4788 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found]         ` <CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw=jVwH5gq7H7m9_+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-22 22:04           ` John MacFarlane
       [not found]             ` <yh480k4l00igi9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2019-10-22 22:04 UTC (permalink / raw)
  To: BPJ, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


Even with old versions of pandoc you should be able to do

    -Vgeometry=landscape

BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Make a file called "landscape.yaml" which contains this:
>
>     ---
>     geometry:
>       - landscape
>     ---
>
> then add this to your command line:
>
>     --metadata-file=landscape.yaml
>
> Make sure you have the latest version of pandoc, since the --metadata-file
> option was added very recently.
>
> You probably need to adjust the margins too.  You can add more geometry
> options to the metadata file:
>
>     ---
>     geometry:
>       - landscape
>       - top=15mm
>       - left=15mm
>       - right=15mm
>       - bottom=20mm
>     ---
>
> (Those are quite possibly not good values; it's just an example!)
>
> If you want all the margins to be the same width you can use
>
>     - margin=20mm
>
> You can use in, cm or pt instead of mm if you prefer those units.
>
> https://tex.stackexchange.com/a/147507/93534
>
> http://texdoc.net/pkg/geometry
>
> https://github.com/jgm/pandoc/releases/tag/latest
>
>
> Den tis 22 okt. 2019 19:05Ivana Zgaljic <ivana.zgaljic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>
>> Just a clarification.  I meant to say "My output pdf still prints in
>> portrait."
>>
>> On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic wrote:
>>>
>>> Hi, I am converting a file from html to pdf using the following command:
>>>
>>> pandoc iz_test.html -s -o iz_final.pdf
>>>
>>>
>>> I noticed the default setting is that the pdf prints to portrait but I'd
>>> like my pdf output to print as landscape.
>>>
>>> Reviewed the options setting and I've saved a new default.tex file
>>> in C:\Users\myusername\AppData\Roaming\pandoc
>>>
>>> Any suggestions on how I should modify my default.tex so my output prints
>>> in landscape?  My output pdf still prints in pdf.
>>>
>>> Thank you.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw%3DjVwH5gq7H7m9_%2Bg%40mail.gmail.com.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found]             ` <yh480k4l00igi9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-10-23  9:25               ` BPJ
       [not found]                 ` <CADAJKhDvUkp2GExt0Cq7G4eJOyN0aO-Fthb4Vkugx3q_6Jr3pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: BPJ @ 2019-10-23  9:25 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4027 bytes --]

Right, I forgot about the -V option. Sorry. I haven't used it in a very
long time since I usually convert from or via Markdown. I find that
inspecting and tweaking an intermediate Markdown version is often a good
idea also when going between two other formats.

P.S. @John, when I hit "reply all" I got your address in the To field and
the list address in the Cc field. You may want to look into that.


Den ons 23 okt. 2019 00:04John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:

>
> Even with old versions of pandoc you should be able to do
>
>     -Vgeometry=landscape
>
> BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Make a file called "landscape.yaml" which contains this:
> >
> >     ---
> >     geometry:
> >       - landscape
> >     ---
> >
> > then add this to your command line:
> >
> >     --metadata-file=landscape.yaml
> >
> > Make sure you have the latest version of pandoc, since the
> --metadata-file
> > option was added very recently.
> >
> > You probably need to adjust the margins too.  You can add more geometry
> > options to the metadata file:
> >
> >     ---
> >     geometry:
> >       - landscape
> >       - top=15mm
> >       - left=15mm
> >       - right=15mm
> >       - bottom=20mm
> >     ---
> >
> > (Those are quite possibly not good values; it's just an example!)
> >
> > If you want all the margins to be the same width you can use
> >
> >     - margin=20mm
> >
> > You can use in, cm or pt instead of mm if you prefer those units.
> >
> > https://tex.stackexchange.com/a/147507/93534
> >
> > http://texdoc.net/pkg/geometry
> >
> > https://github.com/jgm/pandoc/releases/tag/latest
> >
> >
> > Den tis 22 okt. 2019 19:05Ivana Zgaljic <ivana.zgaljic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
> >
> >> Just a clarification.  I meant to say "My output pdf still prints in
> >> portrait."
> >>
> >> On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic wrote:
> >>>
> >>> Hi, I am converting a file from html to pdf using the following
> command:
> >>>
> >>> pandoc iz_test.html -s -o iz_final.pdf
> >>>
> >>>
> >>> I noticed the default setting is that the pdf prints to portrait but
> I'd
> >>> like my pdf output to print as landscape.
> >>>
> >>> Reviewed the options setting and I've saved a new default.tex file
> >>> in C:\Users\myusername\AppData\Roaming\pandoc
> >>>
> >>> Any suggestions on how I should modify my default.tex so my output
> prints
> >>> in landscape?  My output pdf still prints in pdf.
> >>>
> >>> Thank you.
> >>>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "pandoc-discuss" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an
> >> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com
> >> <
> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com?utm_medium=email&utm_source=footer
> >
> >> .
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw%3DjVwH5gq7H7m9_%2Bg%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDvUkp2GExt0Cq7G4eJOyN0aO-Fthb4Vkugx3q_6Jr3pw%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 6595 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found]                 ` <CADAJKhDvUkp2GExt0Cq7G4eJOyN0aO-Fthb4Vkugx3q_6Jr3pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2019-10-23 14:16                   ` Ivana Zgaljic
       [not found]                     ` <43d5cea2-d1f4-49cf-aff9-723ff6dddba1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Ivana Zgaljic @ 2019-10-23 14:16 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 4428 bytes --]

Thank you all, the  -Vgeometry=landscape solution worked.

BP, I didnt have luck using the landscape.yaml file.  This file should live 
in 'C:/Users/zgaljiv/AppData/Roaming/pandoc', correct?

On Wednesday, October 23, 2019 at 5:26:05 AM UTC-4, BP wrote:
>
> Right, I forgot about the -V option. Sorry. I haven't used it in a very 
> long time since I usually convert from or via Markdown. I find that 
> inspecting and tweaking an intermediate Markdown version is often a good 
> idea also when going between two other formats.
>
> P.S. @John, when I hit "reply all" I got your address in the To field and 
> the list address in the Cc field. You may want to look into that.
>
>
> Den ons 23 okt. 2019 00:04John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org <javascript:>> 
> skrev:
>
>>
>> Even with old versions of pandoc you should be able to do
>>
>>     -Vgeometry=landscape
>>
>> BPJ <mel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes:
>>
>> > Make a file called "landscape.yaml" which contains this:
>> >
>> >     ---
>> >     geometry:
>> >       - landscape
>> >     ---
>> >
>> > then add this to your command line:
>> >
>> >     --metadata-file=landscape.yaml
>> >
>> > Make sure you have the latest version of pandoc, since the 
>> --metadata-file
>> > option was added very recently.
>> >
>> > You probably need to adjust the margins too.  You can add more geometry
>> > options to the metadata file:
>> >
>> >     ---
>> >     geometry:
>> >       - landscape
>> >       - top=15mm
>> >       - left=15mm
>> >       - right=15mm
>> >       - bottom=20mm
>> >     ---
>> >
>> > (Those are quite possibly not good values; it's just an example!)
>> >
>> > If you want all the margins to be the same width you can use
>> >
>> >     - margin=20mm
>> >
>> > You can use in, cm or pt instead of mm if you prefer those units.
>> >
>> > https://tex.stackexchange.com/a/147507/93534
>> >
>> > http://texdoc.net/pkg/geometry
>> >
>> > https://github.com/jgm/pandoc/releases/tag/latest
>> >
>> >
>> > Den tis 22 okt. 2019 19:05Ivana Zgaljic <ivana....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
>> <javascript:>> skrev:
>> >
>> >> Just a clarification.  I meant to say "My output pdf still prints in
>> >> portrait."
>> >>
>> >> On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic wrote:
>> >>>
>> >>> Hi, I am converting a file from html to pdf using the following 
>> command:
>> >>>
>> >>> pandoc iz_test.html -s -o iz_final.pdf
>> >>>
>> >>>
>> >>> I noticed the default setting is that the pdf prints to portrait but 
>> I'd
>> >>> like my pdf output to print as landscape.
>> >>>
>> >>> Reviewed the options setting and I've saved a new default.tex file
>> >>> in C:\Users\myusername\AppData\Roaming\pandoc
>> >>>
>> >>> Any suggestions on how I should modify my default.tex so my output 
>> prints
>> >>> in landscape?  My output pdf still prints in pdf.
>> >>>
>> >>> Thank you.
>> >>>
>> >> --
>> >> You received this message because you are subscribed to the Google 
>> Groups
>> >> "pandoc-discuss" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send 
>> an
>> >> email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> >> To view this discussion on the web visit
>> >> 
>> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com
>> >> <
>> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com?utm_medium=email&utm_source=footer
>> >
>> >> .
>> >>
>> >
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "pandoc-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw%3DjVwH5gq7H7m9_%2Bg%40mail.gmail.com
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/43d5cea2-d1f4-49cf-aff9-723ff6dddba1%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 9788 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: pandoc html to pdf
       [not found]                     ` <43d5cea2-d1f4-49cf-aff9-723ff6dddba1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-10-28  9:04                       ` BPJ
  0 siblings, 0 replies; 7+ messages in thread
From: BPJ @ 2019-10-28  9:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5542 bytes --]

Sorry, Ivana, I didn't see your reply. The YAML file should live in the
folder you are running pandoc from. Otherwise you must specify the full
path to the file, and I *think* that on Windows the file needs to be
somewhere on the same volume, usually C, as the current folder. I could be
wrong there though, since it is more than a decade since I used Windows
regularly.

Den ons 23 okt. 2019 16:17Ivana Zgaljic <ivana.zgaljic-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> Thank you all, the  -Vgeometry=landscape solution worked.
>
> BP, I didnt have luck using the landscape.yaml file.  This file should
> live in 'C:/Users/zgaljiv/AppData/Roaming/pandoc', correct?
>
> On Wednesday, October 23, 2019 at 5:26:05 AM UTC-4, BP wrote:
>>
>> Right, I forgot about the -V option. Sorry. I haven't used it in a very
>> long time since I usually convert from or via Markdown. I find that
>> inspecting and tweaking an intermediate Markdown version is often a good
>> idea also when going between two other formats.
>>
>> P.S. @John, when I hit "reply all" I got your address in the To field and
>> the list address in the Cc field. You may want to look into that.
>>
>>
>> Den ons 23 okt. 2019 00:04John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
>>
>>>
>>> Even with old versions of pandoc you should be able to do
>>>
>>>     -Vgeometry=landscape
>>>
>>> BPJ <mel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>>
>>> > Make a file called "landscape.yaml" which contains this:
>>> >
>>> >     ---
>>> >     geometry:
>>> >       - landscape
>>> >     ---
>>> >
>>> > then add this to your command line:
>>> >
>>> >     --metadata-file=landscape.yaml
>>> >
>>> > Make sure you have the latest version of pandoc, since the
>>> --metadata-file
>>> > option was added very recently.
>>> >
>>> > You probably need to adjust the margins too.  You can add more geometry
>>> > options to the metadata file:
>>> >
>>> >     ---
>>> >     geometry:
>>> >       - landscape
>>> >       - top=15mm
>>> >       - left=15mm
>>> >       - right=15mm
>>> >       - bottom=20mm
>>> >     ---
>>> >
>>> > (Those are quite possibly not good values; it's just an example!)
>>> >
>>> > If you want all the margins to be the same width you can use
>>> >
>>> >     - margin=20mm
>>> >
>>> > You can use in, cm or pt instead of mm if you prefer those units.
>>> >
>>> > https://tex.stackexchange.com/a/147507/93534
>>> >
>>> > http://texdoc.net/pkg/geometry
>>> >
>>> > https://github.com/jgm/pandoc/releases/tag/latest
>>> >
>>> >
>>> > Den tis 22 okt. 2019 19:05Ivana Zgaljic <ivana....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
>>> >
>>> >> Just a clarification.  I meant to say "My output pdf still prints in
>>> >> portrait."
>>> >>
>>> >> On Tuesday, October 22, 2019 at 12:12:41 PM UTC-4, Ivana Zgaljic
>>> wrote:
>>> >>>
>>> >>> Hi, I am converting a file from html to pdf using the following
>>> command:
>>> >>>
>>> >>> pandoc iz_test.html -s -o iz_final.pdf
>>> >>>
>>> >>>
>>> >>> I noticed the default setting is that the pdf prints to portrait but
>>> I'd
>>> >>> like my pdf output to print as landscape.
>>> >>>
>>> >>> Reviewed the options setting and I've saved a new default.tex file
>>> >>> in C:\Users\myusername\AppData\Roaming\pandoc
>>> >>>
>>> >>> Any suggestions on how I should modify my default.tex so my output
>>> prints
>>> >>> in landscape?  My output pdf still prints in pdf.
>>> >>>
>>> >>> Thank you.
>>> >>>
>>> >> --
>>> >> You received this message because you are subscribed to the Google
>>> Groups
>>> >> "pandoc-discuss" group.
>>> >> To unsubscribe from this group and stop receiving emails from it,
>>> send an
>>> >> email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> >> To view this discussion on the web visit
>>> >>
>>> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com
>>> >> <
>>> https://groups.google.com/d/msgid/pandoc-discuss/db92c6d3-266b-4ef7-a279-d94ac9bd17ff%40googlegroups.com?utm_medium=email&utm_source=footer
>>> >
>>> >> .
>>> >>
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "pandoc-discuss" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> an email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>> > To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw%3DjVwH5gq7H7m9_%2Bg%40mail.gmail.com
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/43d5cea2-d1f4-49cf-aff9-723ff6dddba1%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/43d5cea2-d1f4-49cf-aff9-723ff6dddba1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhA10%3DLLfmt62T%2BEUf9nkXGSjhHNnCyB2zPqkxJ5ScDrRA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 8265 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-28  9:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 16:12 pandoc html to pdf Ivana Zgaljic
     [not found] ` <75ad3ed6-e3a7-480e-813e-26e9795041bb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-22 17:04   ` Ivana Zgaljic
     [not found]     ` <db92c6d3-266b-4ef7-a279-d94ac9bd17ff-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-22 18:26       ` BPJ
     [not found]         ` <CADAJKhAVr8HJ6mLMg3wrjbMvOjHcWJKYxw=jVwH5gq7H7m9_+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-22 22:04           ` John MacFarlane
     [not found]             ` <yh480k4l00igi9.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-10-23  9:25               ` BPJ
     [not found]                 ` <CADAJKhDvUkp2GExt0Cq7G4eJOyN0aO-Fthb4Vkugx3q_6Jr3pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-10-23 14:16                   ` Ivana Zgaljic
     [not found]                     ` <43d5cea2-d1f4-49cf-aff9-723ff6dddba1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-10-28  9:04                       ` BPJ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).