emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* generate PDF with matching new-lines in quotation C-u C-c C-e
@ 2018-07-30 14:37 Van L
  2018-07-30 15:09 ` Leslie Watter
  0 siblings, 1 reply; 5+ messages in thread
From: Van L @ 2018-07-30 14:37 UTC (permalink / raw)
  To: Org-mode

Hello,

Is it possible to produce in PDF the following passage with matching new-lines?

    #+NAME: page-56-57
    #+BEGIN_SRC latex :export:
      \begin{quotation}
      war. The longer a war lasts, the more things tend to depend on acci-
      dents. Neither you nor we can see into them: we have to abide their
      outcome in the dark. And when people are entering upon a war they
      do things the wrong way round. Action comes first, and it is only
      when they have already suffered that they begin to think. We, how-
      ever, are still far removed from such a mistaken attitude; so, to the
      best of our belief, are you. And so we urge you, now, while we are
      both still free to make sensible decisions, do not break the peace,
      do not go back upon your oaths; instead let us settle our differences
      by arbitration, as is laid down in the treaty. If you will not do so, we
      shall have as our witnesses the gods who heard our oaths. You will
      have begun the war, and we shall attempt to meet you in any and
      every field of action that you may choose.
      \end{quotation}
    #+END_SRC

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

* Re: generate PDF with matching new-lines in quotation C-u C-c C-e
  2018-07-30 14:37 generate PDF with matching new-lines in quotation C-u C-c C-e Van L
@ 2018-07-30 15:09 ` Leslie Watter
  2018-08-01 10:50   ` Van L
  0 siblings, 1 reply; 5+ messages in thread
From: Leslie Watter @ 2018-07-30 15:09 UTC (permalink / raw)
  To: van; +Cc: org-mode-email

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

Hello,

On Mon, Jul 30, 2018 at 11:37 AM Van L <van@scratch.space> wrote:

> Hello,
>
> Is it possible to produce in PDF the following passage with matching
> new-lines?
>

You can force a newline in LaTeX putting '\\' at the end of the line(as the
last chars on the line).

You can try this:

>     #+NAME: page-56-57
>     #+BEGIN_SRC latex :export:
>       \begin{quotation}
>       war. The longer a war lasts, the more things tend to depend on
> acci-\\
>       dents. Neither you nor we can see into them: we have to abide their
> \\
>       outcome in the dark. And when people are entering upon a war they\\
>       do things the wrong way round. Action comes first, and it is only\\
>       when they have already suffered that they begin to think. We, how-\\
>       ever, are still far removed from such a mistaken attitude; so, to the
> \\
>       best of our belief, are you. And so we urge you, now, while we are\\
>       both still free to make sensible decisions, do not break the peace,
> \\
>       do not go back upon your oaths; instead let us settle our differences
> \\
>       by arbitration, as is laid down in the treaty. If you will not do
> so, we\\
>       shall have as our witnesses the gods who heard our oaths. You will\\
>       have begun the war, and we shall attempt to meet you in any and\\
>       every field of action that you may choose.\\
>       \end{quotation}
>     #+END_SRC
>

Cheers,

LEslie


-- 
Leslie H. Watter

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

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

* Re: generate PDF with matching new-lines in quotation C-u C-c C-e
  2018-07-30 15:09 ` Leslie Watter
@ 2018-08-01 10:50   ` Van L
  2018-08-01 12:38     ` Leslie Watter
  0 siblings, 1 reply; 5+ messages in thread
From: Van L @ 2018-08-01 10:50 UTC (permalink / raw)
  To: leslie; +Cc: org-mode-email

Thank you,

> You can force a newline in LaTeX putting '\\' at the end of the line(as the last chars on the line).

Yes. The file sample2e.tex demonstrates the use of '\\' in the 'verse' environment.

I now have the following wanting to fully justify the lines but it doesn’t.

    #+BEGIN_SRC latex :noexport:
      \parbox{\linewidth}{\small
      war. The longer a war lasts, the more things tend to depend on acci-\\
      dents. Neither you nor we can see into them: we have to abide their\\
      outcome in the dark. And when people are entering upon a war they\\
      do things the wrong way round. Action comes first, and it is only\\
      when they have already suffered that they begin to think. We, how-\\
      ever, are still far removed from such a mistaken attitude; so, to the\\
      best of our belief, are you. And so we urge you, now, while we are\\
      both still free to make sensible decisions, do not break the peace,\\
      do not go back upon your oaths; instead let us settle our differences\\
      by arbitration, as is laid down in the treaty. If you will not do so, we\\
      shall have as our witnesses the gods who heard our oaths. You will\\
      have begun the war, and we shall attempt to meet you in any and\\
      every field of action that you may choose.}
    #+END_SRC

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

* Re: generate PDF with matching new-lines in quotation C-u C-c C-e
  2018-08-01 10:50   ` Van L
@ 2018-08-01 12:38     ` Leslie Watter
  2018-08-02  4:07       ` Van L
  0 siblings, 1 reply; 5+ messages in thread
From: Leslie Watter @ 2018-08-01 12:38 UTC (permalink / raw)
  To: van; +Cc: org-mode-email

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

Hallo Van,

On Wed, Aug 1, 2018 at 7:51 AM Van L <van@scratch.space> wrote:

> Thank you,
>
> > You can force a newline in LaTeX putting '\\' at the end of the line(as
> the last chars on the line).
>
> Yes. The file sample2e.tex demonstrates the use of '\\' in the 'verse'
> environment.
>
> I now have the following wanting to fully justify the lines but it doesn’t.
>

Well, you must choose what do you want. If you let LaTeX fully justify your
text, you don't control line endings, otherwise you can put \\ to say 'Hey
I want a line ending here'.

If you want a shorter quoting you could use a different size to \parbox.

As an example you can use      * \parbox{0.7\linewidth}*
to limit the parbox to 70% of your linewidth.

Cheers,

LEslie


>     #+BEGIN_SRC latex :noexport:
>       \parbox{\linewidth}{\small
>       war. The longer a war lasts, the more things tend to depend on
> acci-\\
>       dents. Neither you nor we can see into them: we have to abide their\\
>       outcome in the dark. And when people are entering upon a war they\\
>       do things the wrong way round. Action comes first, and it is only\\
>       when they have already suffered that they begin to think. We, how-\\
>       ever, are still far removed from such a mistaken attitude; so, to
> the\\
>       best of our belief, are you. And so we urge you, now, while we are\\
>       both still free to make sensible decisions, do not break the peace,\\
>       do not go back upon your oaths; instead let us settle our
> differences\\
>       by arbitration, as is laid down in the treaty. If you will not do
> so, we\\
>       shall have as our witnesses the gods who heard our oaths. You will\\
>       have begun the war, and we shall attempt to meet you in any and\\
>       every field of action that you may choose.}
>     #+END_SRC



-- 
Leslie H. Watter

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

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

* Re: generate PDF with matching new-lines in quotation C-u C-c C-e
  2018-08-01 12:38     ` Leslie Watter
@ 2018-08-02  4:07       ` Van L
  0 siblings, 0 replies; 5+ messages in thread
From: Van L @ 2018-08-02  4:07 UTC (permalink / raw)
  To: leslie; +Cc: org-mode-email


Hello Leslie,

> Well, you must choose what do you want. 

I have it :-) No amount of searching through the Internet forums was going to find this. But, you can piece it together from Leslie Lamport’s LaTeX book which I finally did.

The \linebreak leaves the full justification default unchanged.

#+LATEX_CLASS: article
#+LATEX_HEADER: \pdfmapfile{/opt/local/share/texmf-texlive/fonts/map/dvips/libertine/libertine.map}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_COMPILER: xelatex
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+OPTIONS: H:2 num:nil toc:nil \n:t @:t ::t |:t ^:{} _:{} *:t TeX:t LaTeX:t title:nil author:nil date:nil email:nil

    #+NAME: page-56-57
    #+BEGIN_SRC latex
      \begin{minipage}[b]{28em}
      war. The longer a war lasts, the more things tend to depend on acci-\linebreak
      dents. Neither you nor we can see into them: we have to abide their\linebreak
      outcome in the dark. And when people are entering upon a war they\linebreak
      do things the wrong way round. Action comes first, and it is only\linebreak
      when they have already suffered that they begin to think. We, how-\linebreak
      ever, are still far removed from such a mistaken attitude; so, to the\linebreak
      best of our belief, are you. And so we urge you, now, while we are\linebreak
      both still free to make sensible decisions, do not break the peace,\linebreak
      do not go back upon your oaths; instead let us settle our differences\linebreak
      by arbitration, as is laid down in the treaty. If you will not do so, we\linebreak
      shall have as our witnesses the gods who heard our oaths. You will\linebreak
      have begun the war, and we shall attempt to meet you in any and\linebreak
      every field of action that you may choose.
      \end{minipage}
    #+END_SRC

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

end of thread, other threads:[~2018-08-02  4:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 14:37 generate PDF with matching new-lines in quotation C-u C-c C-e Van L
2018-07-30 15:09 ` Leslie Watter
2018-08-01 10:50   ` Van L
2018-08-01 12:38     ` Leslie Watter
2018-08-02  4:07       ` Van L

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).