3

Does simple markup, such as italic, work for whole paragraphs or only for parts of the line? For example:

/first italic paragraph

second italic paragraph/

If not - what would be a correct way to do that?

Srv19
  • 479
  • 3
  • 15
  • AFAIK, the intent of markup is to highlight a specific portion of text from a paragraph - like highlight a particular word(s) and not entire paragraphs. That said, if you don't mind you can insert a slash in the beginning and end of each line (using a macro) and that will give you an entire paragraph whose lines are italic. Should you copy the text elsewhere from org mode - remember that you would have the slashes in the middle of the text. – Prasanna Oct 18 '16 at 01:30
  • What I needed was whole paragraphs exported as italic. In the end I decided to use LaTeX blocks for that – Srv19 Oct 28 '16 at 18:53
  • 1
    Possible duplicate of [Inline verbatim and code with quotes in Org-mode](https://emacs.stackexchange.com/questions/13820/inline-verbatim-and-code-with-quotes-in-org-mode) –  Jan 12 '18 at 21:11

2 Answers2

3

The maximum number of newlines allowed in an Org emphasis expression is controlled by the last element in org-emphasis-regexp-components. As is mentioned in the docstring, you need to reload Org after changing this variable to take effect:

(setf (nth 4 org-emphasis-regexp-components) 10)
(load-library "org")
mutbuerger
  • 3,434
  • 14
  • 22
1

This approach uses Emacs macros to do what you need. Follow the steps given below.

  1. Use the F3 to start recording your macro.
  2. Assuming that your point is somewhere in the first line of the paragraph that you wish to apply italic formatting, press C-a. This takes the cursor to the beginning of the line.
  3. Type the / key and press C-e to move the cursor to the end of the current line and type / again. Notice that your line is already has italic formatting applied in org-mode.
  4. Move your point to the next line and press C-a.
  5. Press F4 to stop recording your macro.
  6. Assuming you will re-use this macro, let us give this macro a name and save it for future use. Use the command M-x name-last-kbd-macro and give your macro a name. For example: para_italic.
  7. Select (C-spc) the paragraph (only one paragraph) at a time and use the command M-x apply-macro-to-region-lines

To learn more about using keyboard macros, you can refer,

  1. Emacs Wiki
  2. YouTube videos on Emacs macros. I'm following Mike Zamansky. His videos are good.
Prasanna
  • 1,470
  • 16
  • 30