Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-25 Thread Eric S Fraga
On Saturday, 24 Mar 2018 at 17:23, Samuel Wales wrote:
> it looks much better now.  i think the main thing i would want is to
> color links differently from the default red box, like maybe color the
> text "#8968cd" and underline it so it looks kind of like a web page.

You can specify settings to the hyperref package.  See the LaTeX
documentation for that package and then use #+latex_header: to give your
settings.

> also, the pronoun "I" is boldface, which is disconcerting.  Acronyms
> are also, but that is less disconcerting.

Strange.  Maybe create a very small org file and the resulting LaTeX
file for us to look at?

> this seemed to work [when i run it twice at least].  thank you!

Maybe because the first time, the actual configuration is modified but
after the configuration of LaTeX classes has been used by org so it only
takes into effect the second time.  LaTeX classes should probably be
defined in your org initialisation files.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-347-gd73a5e


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-24 Thread Samuel Wales
i find that the following does not take effect the first time, but
works the second time.  not sure why that would be.

it looks much better now.  i think the main thing i would want is to
color links differently from the default red box, like maybe color the
text "#8968cd" and underline it so it looks kind of like a web page.

also, the pronoun "I" is boldface, which is disconcerting.  Acronyms
are also, but that is less disconcerting.

(add-to-list 'org-latex-classes
 '("article"
   "
\\documentclass{scrartcl}
% alpha is the single \ for these three correct?
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]
\\setlength{\\parindent}{0pt}
\\setlength{\\parskip}{6pt}
"
   ("\\section{%s}" . "\\section*{%s}")
   ("\\subsection{%s}" . "\\subsection*{%s}")
   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
   ("\\paragraph{%s}" . "\\paragraph*{%s}")
   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

> 1. Start your document with a top level heading, i.e. single * heading.

subtree.

> 2. Remove any whitespace before the \[...] entries in your
>org-latex-classes setting.

this seemed to work [when i run it twice at least].  thank you!

aren't the single \ removed by emacs lisp's string object parsing?



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-19 Thread Eric S Fraga
On Sunday, 18 Mar 2018 at 21:41, Samuel Wales wrote:
> On 3/13/18, Eric S Fraga  wrote:
>> Could you post a minimal example that illustrates this?
>
> here is the minimal example.  [btw, it turns out that pandoc erros
> now, so i have to either get your direct export code to work, or fix
> pandoc's export.]

Couple of things:

1. Start your document with a top level heading, i.e. single * heading.
2. Remove any whitespace before the \[...] entries in your
   org-latex-classes setting.

For instance, this seems to work fine for me although obviously with no
real content it is difficult to see the settings taking effect:


* NEXTKA fixing pdf to have better paragraphs
SCHEDULED: <2018-03-21 Wed>

#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
 '("article"
  "
\\documentclass{scrartcl}
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]
\\setlength{\\parindent}{0pt}
\\setlength{\\parskip}{6pt}
"
                   ("\\section{%s}" . "\\section*{%s}")
                   ("\\subsection{%s}" . "\\subsection*{%s}")
                   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                   ("\\paragraph{%s}" . "\\paragraph*{%s}")
                   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.7-475-g3ffc7d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-18 Thread Samuel Wales
[never mind the comment below..  if i use \\ instead of \, it doesn't
error, but produces default packages on the first page.  then the
document starts on the second page.]

On 3/18/18, Samuel Wales  wrote:
> On 3/13/18, Eric S Fraga  wrote:
>> Could you post a minimal example that illustrates this?
>
> here is the minimal example.  [btw, it turns out that pandoc erros
> now, so i have to either get your direct export code to work, or fix
> pandoc's export.]
>
> *** NEXTKA fixing pdf to have better paragraphs
> SCHEDULED: <2018-03-21 Wed>
> #+begin_src emacs-lisp
> (add-to-list 'org-latex-classes
>  '("article"
>   "
>\\documentclass{scrartcl}
>% alpha is the single \ for these three erroneous?  but with \\ it
> errors.
>\[DEFAULT-PACKAGES]
>\[PACKAGES]
>\[EXTRA]
>\\setlength{\\parindent}{0pt}
>\\setlength{\\parskip}{6pt}
> "
>("\\section{%s}" . "\\section*{%s}")
>("\\subsection{%s}" . "\\subsection*{%s}")
>("\\subsubsection{%s}" .
> "\\subsubsection*{%s}")
>("\\paragraph{%s}" . "\\paragraph*{%s}")
>("\\subparagraph{%s}" .
> "\\subparagraph*{%s}")))
> #+end_src
>


-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-18 Thread Samuel Wales
On 3/13/18, Eric S Fraga  wrote:
> Could you post a minimal example that illustrates this?

here is the minimal example.  [btw, it turns out that pandoc erros
now, so i have to either get your direct export code to work, or fix
pandoc's export.]

*** NEXTKA fixing pdf to have better paragraphs
SCHEDULED: <2018-03-21 Wed>
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
 '("article"
  "
   \\documentclass{scrartcl}
   % alpha is the single \ for these three erroneous?  but with \\ it errors.
   \[DEFAULT-PACKAGES]
   \[PACKAGES]
   \[EXTRA]
   \\setlength{\\parindent}{0pt}
   \\setlength{\\parskip}{6pt}
"
                   ("\\section{%s}" . "\\section*{%s}")
                   ("\\subsection{%s}" . "\\subsection*{%s}")
                   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                   ("\\paragraph{%s}" . "\\paragraph*{%s}")
                   ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-13 Thread Eric S Fraga
On Monday, 12 Mar 2018 at 16:42, Samuel Wales wrote:
> seems to work.  the only thing is that the first page is blank with
> "[DEFAULT-PACKAGES] on it.  i tried commenting that part out and got a
> blank page.  i presume this is because i am using maint and not
> master.  again thanks.

Could you post a minimal example that illustrates this?
-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-12 Thread Samuel Wales
seems to work.  the only thing is that the first page is blank with
"[DEFAULT-PACKAGES] on it.  i tried commenting that part out and got a
blank page.  i presume this is because i am using maint and not
master.  again thanks.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-12 Thread Samuel Wales
thank you.

i will try it.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-12 Thread Eric S Fraga
On Friday,  9 Mar 2018 at 17:30, Samuel Wales wrote:
> On 3/9/18, Eric S Fraga  wrote:
>> Type C-h v org-latex-classes RET for the full description.  The
>> header-string can include those particular indent and skip settings
>> along with other bits.
>
> i consulted the docstring and the manual.  the description was greek
> to me and there was no reference to qa term you used afaict.

Apologies for this.  Try the following (after loading org):

#+begin_src emacs-lisp
  (add-to-list 'org-latex-classes
   '("article" "\\documentclass{scrartcl}
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]
   \\setlength{\\parindent}{0pt}
   \\setlength{\\parskip}{6pt}
  "
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
#+end_src 

This should then work for default LaTeX export.


-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-09 Thread Samuel Wales
On 3/9/18, Eric S Fraga  wrote:
> Type C-h v org-latex-classes RET for the full description.  The
> header-string can include those particular indent and skip settings
> along with other bits.

i consulted the docstring and the manual.  the description was greek
to me and there was no reference to qa term you used afaict.

but i figured out that article is the default and now know that you
want me to change header-string in that.  so i did this:

(with-eval-after-load 'org-latex
  (setf (second (assoc "article" org-latex-classes))
;; non-idempotent is undesirable
(concat "\\setlength{\\parindent}{0pt}\\setlength{\\parskip}{6pt}"
;; repeating this form is undesirable
(second (assoc "article" org-latex-classes)

which seems to set the variable correctly but has no effect.

it's ok to drop this.  i am limited in computer use and cannot sustain
more debugging cycles.

thanks for your help.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-09 Thread Eric S Fraga
On Friday,  9 Mar 2018 at 13:26, Samuel Wales wrote:

[...]

> in any case, greek to me.  this was my best guess.
>
> (with-eval-after-load
> (add-to-list org-latex-classes
> '("org-latex" "\setlength{\parindent}{0pt}\setlength{\parskip}{6pt}")))

No, this won't work.  You need to check the documentation for the
variable to see the structure that is expected:

org-latex-classes is a variable defined in ‘ox-latex.el’.
Its value is shown below.

Documentation:
Alist of LaTeX classes and associated header and structure.
If #+LATEX_CLASS is set in the buffer, use its value and the
associated information.  Here is the structure of each cell:

  (class-name
header-string
(numbered-section . unnumbered-section)
...)

(continues)

Type C-h v org-latex-classes RET for the full description.  The
header-string can include those particular indent and skip settings
along with other bits.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-09 Thread Samuel Wales
On 3/8/18, Eric S Fraga  wrote:
> On Thursday,  8 Mar 2018 at 12:55, Samuel Wales wrote:
>> On 3/3/18, Eric S Fraga  wrote:
>>> #+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt}

>> are there settings in .emacs that will do the same thing?
>
> Yes, you can put such commands in the definition of the org-latex
> class.  Check org-latex-classes.

just feedback on the manual and the docstring, but i found nothing
about an org-latex class.  perhaps i wasn't supposed to?  in my latex
ignorance i think a class is probably like article, etc.  maybe
org-latex is a generic thing that gets put in front of article or
something.

in any case, greek to me.  this was my best guess.

(with-eval-after-load
(add-to-list org-latex-classes
'("org-latex" "\setlength{\parindent}{0pt}\setlength{\parskip}{6pt}")))

this isn't critical enough for me to pursue it further as i can use
html export and then pandoc, but maybe the doc could say what
org-latex class is.

>>> A table of contents will probably only be generated if you have not
>>> turned of heading numbering.

this is interesting.  i wonder why.

>> interesting.  i have 2 tables of contents for the same document.  [1
>> level at front and complete at end.]  i have num:t in properties
>> drawer.
>>
>> in html, both export.  in pdf, only the first exports.
>
> Cannot help here.  Sorry.

ok.  :].  thanks.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-08 Thread Eric S Fraga
On Thursday,  8 Mar 2018 at 12:55, Samuel Wales wrote:
> On 3/3/18, Eric S Fraga  wrote:
>> #+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt}
>>
>> might give you "unbunched" "unindented" paragraphs.
>
> thank you.  i will try that when i can.
>
> are there settings in .emacs that will do the same thing?

Yes, you can put such commands in the definition of the org-latex
class.  Check org-latex-classes.

>> A table of contents will probably only be generated if you have not
>> turned of heading numbering.  You can turn this on explicitly by
>>
>> #+options: toc:t num:t
>
> interesting.  i have 2 tables of contents for the same document.  [1
> level at front and complete at end.]  i have num:t in properties
> drawer.
>
> in html, both export.  in pdf, only the first exports.

Cannot help here.  Sorry.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-08 Thread Samuel Wales
On 3/3/18, Eric S Fraga  wrote:
> #+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt}
>
> might give you "unbunched" "unindented" paragraphs.

thank you.  i will try that when i can.

are there settings in .emacs that will do the same thing?

> A table of contents will probably only be generated if you have not
> turned of heading numbering.  You can turn this on explicitly by
>
> #+options: toc:t num:t

interesting.  i have 2 tables of contents for the same document.  [1
level at front and complete at end.]  i have num:t in properties
drawer.

in html, both export.  in pdf, only the first exports.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-03 Thread Eric S Fraga
On Friday,  2 Mar 2018 at 11:53, Samuel Wales wrote:
> On 3/2/18, Eric S Fraga  wrote:
>> Why can you not use any LaTeX settings?  Org has very extensive support
>> for allowing tweaking of the formatting.
>
> delighted to learn of settings.

So, I am not sure what it is you want to do but maybe a line along the
lines of

#+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt}

might give you "unbunched" "unindented" paragraphs.

A table of contents will probably only be generated if you have not
turned of heading numbering.  You can turn this on explicitly by

#+options: toc:t num:t

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-02 Thread Diego Zamboni
I have also found that exporting to a .texi file (using ox-texinfo) and then 
using texi2pdf to generate a PDF produces, out of the box, a nicer-looking 
(IMO) document than the native LaTeX export.

—Diego


> On 2 Mar 2018, at 19:53, Samuel Wales  wrote:
> 
> On 3/2/18, Eric S Fraga  wrote:
>> Why can you not use any LaTeX settings?  Org has very extensive support
>> for allowing tweaking of the formatting.
> 
> delighted to learn of settings.
> 




Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-02 Thread Samuel Wales
On 3/2/18, Eric S Fraga  wrote:
> Why can you not use any LaTeX settings?  Org has very extensive support
> for allowing tweaking of the formatting.

delighted to learn of settings.



Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-01 Thread Eric S Fraga
On Thursday,  1 Mar 2018 at 16:09, Samuel Wales wrote:
> mostly ooc because pandoc looks good.
>
> but when i export a subtree [using recent maint] to pdf i get
> paragraphs that are indented and bunched up, and a table of contents
> is missing, and dunno what else.  maybe a quote is not set off or
> something like that.

Maybe it would help if you showed us what you mean.  Org's export to PDF
uses quite vanilla LaTeX directives by default.  I do not know what
pandoc does.

> just wondering if anybody has settings or filters or whatnot to make
> the latter look like the former.  [i don't need details on latex
> paragraph settings or ideas -- i won't be able to implement them.
> just wondering if there is a turnkey set of org settings you can do.]

Why can you not use any LaTeX settings?  Org has very extensive support
for allowing tweaking of the formatting.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d


signature.asc
Description: PGP signature


Re: [O] what settings would make original export to pdf as good as pandoc conversion?

2018-03-01 Thread Samuel Wales
i didn't specify that what looks good to me is org export to html, to
regular pandoc to pdf.  congratulations to the html exporter people
and the pandoc people.

On 3/1/18, Samuel Wales  wrote:
> mostly ooc because pandoc looks good.
>
> but when i export a subtree [using recent maint] to pdf i get
> paragraphs that are indented and bunched up, and a table of contents
> is missing, and dunno what else.  maybe a quote is not set off or
> something like that.
>
> just wondering if anybody has settings or filters or whatnot to make
> the latter look like the former.  [i don't need details on latex
> paragraph settings or ideas -- i won't be able to implement them.
> just wondering if there is a turnkey set of org settings you can do.]
>


-- 
The Kafka Pandemic: 

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
.