emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Changing star character
@ 2011-02-25 12:42 Javier M Mora
  2011-02-26 15:36 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Javier M Mora @ 2011-02-25 12:42 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

I want to use org-mode as an ideas-processor to write articles/thesis 
with LaTeX.

I've tried export from org to LaTeX but I don't like results: Every org 
headline become in a latex headline. I want more granularity using org 
to classify my ideas inside a paragraph.

My idea is be able to use the same file as a valid org file and a valid 
LaTeX file and select in which major mode I want to work (org or Auctex) 
depending on my needs.

If I can change star symbol from "*" char to "%" char (comment mark in 
LaTeX). It become possible.

Is it possible?
Is there a variable to change star symbol?
Is "*" so hardcoded that it is impossible change behavior?


Thanks, Javier M Mora.

I'm not member of org-mode list. Please, send me a copy to my personal 
email.

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

* Re: Changing star character
  2011-02-25 12:42 Changing star character Javier M Mora
@ 2011-02-26 15:36 ` Bastien
  2011-02-26 20:54   ` Javier M Mora
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2011-02-26 15:36 UTC (permalink / raw)
  To: Javier M Mora; +Cc: emacs-orgmode

Hi Javier,

Javier M Mora <jamarier@gmail.com> writes:

> If I can change star symbol from "*" char to "%" char (comment mark in
> LaTeX). It become possible.
>
> Is it possible?

No.

> Is there a variable to change star symbol?
> Is "*" so hardcoded that it is impossible change behavior?

Yes.

Besides, I don't really get what you are trying to achieve, an example
would be better - but this example won't make it easier to change what
you suggest ;)

Best,

-- 
 Bastien

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

* Re: Changing star character
  2011-02-26 15:36 ` Bastien
@ 2011-02-26 20:54   ` Javier M Mora
  2011-02-26 21:02     ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Javier M Mora @ 2011-02-26 20:54 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 26/02/11 16:36, Bastien wrote:
> Hi Javier,
>
> Javier M Mora<jamarier@gmail.com>  writes:
>
>> If I can change star symbol from "*" char to "%" char (comment mark in
>> LaTeX). It become possible.
>>
>> Is it possible?
>
> No.
>
>> Is there a variable to change star symbol?
>> Is "*" so hardcoded that it is impossible change behavior?
>
> Yes.
>
> Besides, I don't really get what you are trying to achieve, an example
> would be better - but this example won't make it easier to change what
> you suggest ;)
>


I like org-mode, and I like Auctex mode and both are major modes so it's 
not possible use both simultaneous.


I'd like to write scientific text in LaTeX using org-mode way:

% Section: Importance of This
\section{Importance of This}
%% What is it "This"
    To talk about \emph{this} is important look to several factors:
%%% "This" depends on "That"
    \emph{That} is very important in \emph{this} and bla, bla, bla...
%%% This depends on "These"
    Also, \emph{These} is another. bla bla bla...
%%% This is not "another".
    And don't forget another has anything.
%%%% SubIdea
    blablabla


% is the comment in LaTeX and is the outline of my ideas. And the text 
associated to every headline is the text of the article. With  org-mode, 
I can sort ideas (and lines of text associated) moving subtrees. 
org-mode relate ideas with text.

% char is LaTeX comment so LaTeX ignores until the end of line.

The problem is org-mode only works with star '*' character to mark 
headlines and LaTeX would print lots of star in the text. org-mode LaTeX 
export is not enough good for this idea, because every headline in 
org-mode becomes a headline in LaTeX and as you can see in my example 
this is not always the better. The export org-mode to LaTeX of this 
example is:

\section{Section: Importance of This}
\section{Importance of This}
\subsection{What is it "This"}
    To talk about \emph{this} is important look to several factors:
\subsubsection{"This" depends on "That"}
    \emph{That} is very important in \emph{this} and bla, bla, bla...
\subsubsection{This depends on "These"}
    Also, \emph{These} is another. bla bla bla...
\subsubsection{This is not "another".}
    And don't forget another has anything.
\paragraph{SubIdea}
    blablabla

When the desired objetive is put everything in a paragraph:

\section{Importance of This}
    To talk about \emph{this} is important look to several factors:
    \emph{That} is very important in \emph{this} and bla, bla, bla...
    Also, \emph{These} is another. bla bla bla...
    And don't forget another has anything.
    blablabla

etc.


Before and after of send email to org-mode mail list, I read source code 
and I thought star character was hard coded in it. (IMHO star char must 
be a configuration var). But I wanted to hear the opinion of experts 
from the maillist before doing anything.

So, I created two elisp functions to make a translation.:

(defun org2latex ()
   "Convert star to comments in LaTeX"
   (interactive)
   (save-excursion
     (goto-char (point-min))
     (while (search-forward-regexp "^\*+" nil t)
;      (while (search-backward "*" (beginning-of-line) t)
;       (replace-match "%" nil t))
       (let ((finalsearch (point)))
         (move-beginning-of-line nil)
         (while (search-forward "*" finalsearch t)
           (replace-match "%" nil t))
         )
       )
     )
   (latex-mode)
)

(defun latex2org ()
   "Convert comments in LaTeX to stars in org-mode"
   (interactive)
   (save-excursion
     (goto-char (point-min))
     (while (search-forward-regexp "^%+" nil t)
;      (while (search-backward "%" (beginning-of-line) t)
;       (replace-match "*" nil t))
       (let ((finalsearch (point)))
         (move-beginning-of-line nil)
         (while (search-forward "%" finalsearch t)
           (replace-match "*" nil t))
         )
       )
     )
;doesn't work. I want open/see the currently (sub)tree
   (let ((position (point)))
         (org-mode)
         (goto-char position)
         )
)

I'm a newbie with elisp. This works but:

1.- I don't spend to much time with search-backward, and didn't work for 
me. So, I had to make a detour with search-forward.

2.- From Latex2org when I start org-mode, All trees are closed. I'd like 
keep open the tree in the cursor.

That all. I hope these functions can help someone or inspire to solve a 
similar problem. To make programs?

Again, I'm not in maillist. Please send me a copy to my email.

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

* Re: Changing star character
  2011-02-26 20:54   ` Javier M Mora
@ 2011-02-26 21:02     ` Thomas S. Dye
  2011-02-26 22:10       ` Alan L Tyree
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas S. Dye @ 2011-02-26 21:02 UTC (permalink / raw)
  To: Javier M Mora; +Cc: Bastien, emacs-orgmode

Aloha Javier,

On Feb 26, 2011, at 10:54 AM, Javier M Mora wrote:

> On 26/02/11 16:36, Bastien wrote:
>> Hi Javier,
>>
>> Javier M Mora<jamarier@gmail.com>  writes:
>>
>>> If I can change star symbol from "*" char to "%" char (comment  
>>> mark in
>>> LaTeX). It become possible.
>>>
>>> Is it possible?
>>
>> No.
>>
>>> Is there a variable to change star symbol?
>>> Is "*" so hardcoded that it is impossible change behavior?
>>
>> Yes.
>>
>> Besides, I don't really get what you are trying to achieve, an  
>> example
>> would be better - but this example won't make it easier to change  
>> what
>> you suggest ;)
>>
>
>
> I like org-mode, and I like Auctex mode and both are major modes so  
> it's not possible use both simultaneous.
>
>

You can use both.  You can edit LaTeX source code blocks in Org-mode  
using the AucTeX major mode, then tangle the LaTeX code.

All the best,
Tom



> I'd like to write scientific text in LaTeX using org-mode way:
>
> % Section: Importance of This
> \section{Importance of This}
> %% What is it "This"
>   To talk about \emph{this} is important look to several factors:
> %%% "This" depends on "That"
>   \emph{That} is very important in \emph{this} and bla, bla, bla...
> %%% This depends on "These"
>   Also, \emph{These} is another. bla bla bla...
> %%% This is not "another".
>   And don't forget another has anything.
> %%%% SubIdea
>   blablabla
>
>
> % is the comment in LaTeX and is the outline of my ideas. And the  
> text associated to every headline is the text of the article. With   
> org-mode, I can sort ideas (and lines of text associated) moving  
> subtrees. org-mode relate ideas with text.
>
> % char is LaTeX comment so LaTeX ignores until the end of line.
>
> The problem is org-mode only works with star '*' character to mark  
> headlines and LaTeX would print lots of star in the text. org-mode  
> LaTeX export is not enough good for this idea, because every  
> headline in org-mode becomes a headline in LaTeX and as you can see  
> in my example this is not always the better. The export org-mode to  
> LaTeX of this example is:
>
> \section{Section: Importance of This}
> \section{Importance of This}
> \subsection{What is it "This"}
>   To talk about \emph{this} is important look to several factors:
> \subsubsection{"This" depends on "That"}
>   \emph{That} is very important in \emph{this} and bla, bla, bla...
> \subsubsection{This depends on "These"}
>   Also, \emph{These} is another. bla bla bla...
> \subsubsection{This is not "another".}
>   And don't forget another has anything.
> \paragraph{SubIdea}
>   blablabla
>
> When the desired objetive is put everything in a paragraph:
>
> \section{Importance of This}
>   To talk about \emph{this} is important look to several factors:
>   \emph{That} is very important in \emph{this} and bla, bla, bla...
>   Also, \emph{These} is another. bla bla bla...
>   And don't forget another has anything.
>   blablabla
>
> etc.
>
>
> Before and after of send email to org-mode mail list, I read source  
> code and I thought star character was hard coded in it. (IMHO star  
> char must be a configuration var). But I wanted to hear the opinion  
> of experts from the maillist before doing anything.
>
> So, I created two elisp functions to make a translation.:
>
> (defun org2latex ()
>  "Convert star to comments in LaTeX"
>  (interactive)
>  (save-excursion
>    (goto-char (point-min))
>    (while (search-forward-regexp "^\*+" nil t)
> ;      (while (search-backward "*" (beginning-of-line) t)
> ;       (replace-match "%" nil t))
>      (let ((finalsearch (point)))
>        (move-beginning-of-line nil)
>        (while (search-forward "*" finalsearch t)
>          (replace-match "%" nil t))
>        )
>      )
>    )
>  (latex-mode)
> )
>
> (defun latex2org ()
>  "Convert comments in LaTeX to stars in org-mode"
>  (interactive)
>  (save-excursion
>    (goto-char (point-min))
>    (while (search-forward-regexp "^%+" nil t)
> ;      (while (search-backward "%" (beginning-of-line) t)
> ;       (replace-match "*" nil t))
>      (let ((finalsearch (point)))
>        (move-beginning-of-line nil)
>        (while (search-forward "%" finalsearch t)
>          (replace-match "*" nil t))
>        )
>      )
>    )
> ;doesn't work. I want open/see the currently (sub)tree
>  (let ((position (point)))
>        (org-mode)
>        (goto-char position)
>        )
> )
>
> I'm a newbie with elisp. This works but:
>
> 1.- I don't spend to much time with search-backward, and didn't work  
> for me. So, I had to make a detour with search-forward.
>
> 2.- From Latex2org when I start org-mode, All trees are closed. I'd  
> like keep open the tree in the cursor.
>
> That all. I hope these functions can help someone or inspire to  
> solve a similar problem. To make programs?
>
> Again, I'm not in maillist. Please send me a copy to my email.
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Changing star character
  2011-02-26 21:02     ` Thomas S. Dye
@ 2011-02-26 22:10       ` Alan L Tyree
  0 siblings, 0 replies; 5+ messages in thread
From: Alan L Tyree @ 2011-02-26 22:10 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Javier M Mora

On Sat, 26 Feb 2011 11:02:23 -1000
"Thomas S. Dye" <tsd@tsdye.com> wrote:

> Aloha Javier,
> 
> On Feb 26, 2011, at 10:54 AM, Javier M Mora wrote:
> 
> > On 26/02/11 16:36, Bastien wrote:
> >> Hi Javier,
> >>
> >> Javier M Mora<jamarier@gmail.com>  writes:
> >>
> >>> If I can change star symbol from "*" char to "%" char (comment  
> >>> mark in
> >>> LaTeX). It become possible.
> >>>
<SNIP>

Hi Javier,
Do you really need org mode for what you want to do? Simple outline
mode is a good "idea processor" and you can change the '*' to '%'.
Outline mode can run as a minor mode under auctex.

Cheers,
Alan


> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 


-- 
Alan L Tyree                    http://www2.austlii.edu.au/~alan
Tel:  04 2748 6206

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

end of thread, other threads:[~2011-02-26 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 12:42 Changing star character Javier M Mora
2011-02-26 15:36 ` Bastien
2011-02-26 20:54   ` Javier M Mora
2011-02-26 21:02     ` Thomas S. Dye
2011-02-26 22:10       ` Alan L Tyree

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).