emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Adding a resume.cls to Org ?
@ 2025-01-24  2:47 David Masterson
  2025-01-24  9:47 ` Robert Klein
  0 siblings, 1 reply; 4+ messages in thread
From: David Masterson @ 2025-01-24  2:47 UTC (permalink / raw)
  To: emacs-orgmode

Anyone have a writeup on adding a simple resume.cls to Org?
-- 
David Masterson


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

* Re: Adding a resume.cls to Org ?
  2025-01-24  2:47 Adding a resume.cls to Org ? David Masterson
@ 2025-01-24  9:47 ` Robert Klein
  2025-01-24 22:30   ` David Masterson
  0 siblings, 1 reply; 4+ messages in thread
From: Robert Klein @ 2025-01-24  9:47 UTC (permalink / raw)
  To: David Masterson; +Cc: emacs-orgmode

On Thu, 23 Jan 2025 18:47:23 -0800
David Masterson <dsmasterson@icloud.com> wrote:

> Anyone have a writeup on adding a simple resume.cls to Org?

You mean something like

  (setq roklein/org-latex-class/scrartcl
        ;; note: ~\\\\ resolves to ~\\ which is a forced space
        ;; plus a line break.  Otherwise the following text (even
        ;; if there is an empty line) would be on the same line
        ;; as the paragraph title.
        '("scrartcl"
          "\\documentclass[11pt]{scrartcl}"
          ("\\section{%s}" . "\\section*{%s}")
          ("\\subsection{%s}" . "\\subsection*{%s}")
          ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
          ("\\paragraph{%s}~\\par" . "\\paragraph*{%s}~\\par")
          ("\\subparagraph{%s}~\\par" . "\\subparagraph*{%s}~\\par")))

  (use-package ox-latex
    :after org
    :config
    (setq org-latex-default-class "scrartcl"
          ;; more stuff...
    (add-to-list 'org-latex-classes roklein/org-latex-class/scrartcl)
    ;; more stuff
  )



Best regards
Robert


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

* Re: Adding a resume.cls to Org ?
  2025-01-24  9:47 ` Robert Klein
@ 2025-01-24 22:30   ` David Masterson
  2025-01-25 19:13     ` Robert Klein
  0 siblings, 1 reply; 4+ messages in thread
From: David Masterson @ 2025-01-24 22:30 UTC (permalink / raw)
  To: Robert Klein; +Cc: emacs-orgmode

Robert Klein <roklein@roklein.de> writes:

> On Thu, 23 Jan 2025 18:47:23 -0800
> David Masterson <dsmasterson@icloud.com> wrote:
>
>> Anyone have a writeup on adding a simple resume.cls to Org?
>
> You mean something like
>
>   (setq roklein/org-latex-class/scrartcl

This is the name of a variable?  With slashes in the name?!?  Didn't
know that...

>         ;; note: ~\\\\ resolves to ~\\ which is a forced space
>         ;; plus a line break.  Otherwise the following text (even
>         ;; if there is an empty line) would be on the same line
>         ;; as the paragraph title.

Not sure I get this...

>         '("scrartcl"

Is this actually the cls file?  Where is the cls file located?

>           "\\documentclass[11pt]{scrartcl}"

This is defining the documentclass or loading the existing
documentclass?

>           ("\\section{%s}" . "\\section*{%s}")
>           ("\\subsection{%s}" . "\\subsection*{%s}")
>           ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
>           ("\\paragraph{%s}~\\par" . "\\paragraph*{%s}~\\par")
>           ("\\subparagraph{%s}~\\par" . "\\subparagraph*{%s}~\\par")))

1. The cls file defines the "\\section*" (etc) references, right?
2. Must all cls files have definitions for this hierarchy?
3. What do I look for in the cls file to identify the start of one of
these definitions?  (I think I can read it after I know where to start
reading.)
4. What is "~\\par" ?

>   (use-package ox-latex
>     :after org
>     :config
>     (setq org-latex-default-class "scrartcl"
>           ;; more stuff...
>     (add-to-list 'org-latex-classes roklein/org-latex-class/scrartcl)
>     ;; more stuff
>   )

This I get.

Thanks for the help.
-- 
David Masterson


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

* Re: Adding a resume.cls to Org ?
  2025-01-24 22:30   ` David Masterson
@ 2025-01-25 19:13     ` Robert Klein
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Klein @ 2025-01-25 19:13 UTC (permalink / raw)
  To: David Masterson; +Cc: emacs-orgmode

Answers interspersed.

PS, The help for the variable “org-latex-classes” (C-h v
org-latex-classes) has a very detailed description (and examples
without the ~\\par)

Am Fri, 24 Jan 2025 14:30:36 -0800
schrieb David Masterson <dsmasterson@icloud.com>:

> Robert Klein <roklein@roklein.de> writes:
> 
> > On Thu, 23 Jan 2025 18:47:23 -0800
> > David Masterson <dsmasterson@icloud.com> wrote:
> >  
> >> Anyone have a writeup on adding a simple resume.cls to Org?  
> >
> > You mean something like
> >
> >   (setq roklein/org-latex-class/scrartcl  
> 
> This is the name of a variable?  With slashes in the name?!?  Didn't
> know that...

helps me to keep track.

> 
> >         ;; note: ~\\\\ resolves to ~\\ which is a forced space
> >         ;; plus a line break.  Otherwise the following text (even
> >         ;; if there is an empty line) would be on the same line
> >         ;; as the paragraph title.  
> 
> Not sure I get this...

I think this is copy-pasted from the mailing list.  I forgot why I put
it there and in the sectioning definition below. 


> 
> >         '("scrartcl"  
> 
> Is this actually the cls file?  Where is the cls file located?

this belongs to the koma-script package which is part of most TeX
distributions.  I testet a “algol60.cls” file which is in the same
directory as the .org file.

> 
> >           "\\documentclass[11pt]{scrartcl}"  
> 
> This is defining the documentclass or loading the existing
> documentclass?

This is what the LaTeX exporter puts in the TeX file.


> 
> >           ("\\section{%s}" . "\\section*{%s}")
> >           ("\\subsection{%s}" . "\\subsection*{%s}")
> >           ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> >           ("\\paragraph{%s}~\\par" . "\\paragraph*{%s}~\\par")
> >           ("\\subparagraph{%s}~\\par" .
> > "\\subparagraph*{%s}~\\par")))  
> 
> 1. The cls file defines the "\\section*" (etc) references, right?

yes

> 2. Must all cls files have definitions for this hierarchy?

no, but you have to tell org the sectioning structure of the class.

> 3. What do I look for in the cls file to identify the start of one of
> these definitions?  (I think I can read it after I know where to start
> reading.)

yes, but typically you get one of the things which are in the
standard LaTex document classes “article”, “report”, “book” etc.

> 4. What is "~\\par" ?

~ is a non-breaking space, \par is a blank line in TeX.  (This is what
the comment above is about).



> 
> >   (use-package ox-latex
> >     :after org
> >     :config
> >     (setq org-latex-default-class "scrartcl"
> >           ;; more stuff...
> >     (add-to-list 'org-latex-classes
> > roklein/org-latex-class/scrartcl) ;; more stuff
> >   )  
> 
> This I get.
> 
> Thanks for the help.



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

end of thread, other threads:[~2025-01-25 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-24  2:47 Adding a resume.cls to Org ? David Masterson
2025-01-24  9:47 ` Robert Klein
2025-01-24 22:30   ` David Masterson
2025-01-25 19:13     ` Robert Klein

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