* FR: Define Latex macros from export header @ 2009-02-15 6:59 Russell Adams 2009-02-19 19:24 ` Carsten Dominik 0 siblings, 1 reply; 12+ messages in thread From: Russell Adams @ 2009-02-15 6:59 UTC (permalink / raw) To: emacs org-mode mailing list I think this one should be very easy! For each option in the export template at the head of the file, could we export them for use in Latex? For example: #+AUTHOR: Russell Adams becomes \def\ORG_AUTHOR{Russell Adams} in the header of the Latex output? I'm finding myself redefining these macros, especially when I'm using a custom maketitle. Thanks. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-15 6:59 FR: Define Latex macros from export header Russell Adams @ 2009-02-19 19:24 ` Carsten Dominik 2009-02-19 20:02 ` Russell Adams 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-02-19 19:24 UTC (permalink / raw) To: Russell Adams; +Cc: emacs org-mode mailing list Hi Russel, can you come up with a complete list of macros you'd like to have defined? Right now you are leaving the guesswork to me. - Carsten On Feb 15, 2009, at 7:59 AM, Russell Adams wrote: > I think this one should be very easy! > > For each option in the export template at the head of the file, could > we export them for use in Latex? > > For example: > #+AUTHOR: Russell Adams > > becomes > > \def\ORG_AUTHOR{Russell Adams} > > in the header of the Latex output? > > I'm finding myself redefining these macros, especially when I'm using > a custom maketitle. > > Thanks. > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: 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] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-19 19:24 ` Carsten Dominik @ 2009-02-19 20:02 ` Russell Adams 2009-02-20 10:05 ` Carsten Dominik 0 siblings, 1 reply; 12+ messages in thread From: Russell Adams @ 2009-02-19 20:02 UTC (permalink / raw) To: emacs org-mode mailing list Carsten, I was thinking of just exporting all key/value pairs in the header with an org prefix (no - or _ or /, ie: "orgAUTHOR"). We don't need to pick any specific ones. The only one that we have to worry about is properly quoting the OPTIONS line. FYI I love the LATEX_HEADER line, I've done away with the latex classes entirely in some recent documents. Its not in the manual yet though. Thanks. On Thu, Feb 19, 2009 at 08:24:39PM +0100, Carsten Dominik wrote: > Hi Russel, > > can you come up with a complete list of macros you'd like > to have defined? Right now you are leaving the guesswork to me. > > - Carsten > > On Feb 15, 2009, at 7:59 AM, Russell Adams wrote: > >> I think this one should be very easy! >> >> For each option in the export template at the head of the file, could >> we export them for use in Latex? >> >> For example: >> #+AUTHOR: Russell Adams >> >> becomes >> >> \def\ORG_AUTHOR{Russell Adams} >> >> in the header of the Latex output? >> >> I'm finding myself redefining these macros, especially when I'm using >> a custom maketitle. >> >> Thanks. >> >> ------------------------------------------------------------------ >> Russell Adams RLAdams@AdamsInfoServ.com >> >> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >> >> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-19 20:02 ` Russell Adams @ 2009-02-20 10:05 ` Carsten Dominik 2009-02-20 16:33 ` Russell Adams 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-02-20 10:05 UTC (permalink / raw) To: Russell Adams; +Cc: emacs org-mode mailing list On Feb 19, 2009, at 9:02 PM, Russell Adams wrote: > Carsten, > > I was thinking of just exporting all key/value pairs in the header > with > an org prefix (no - or _ or /, ie: "orgAUTHOR"). OK, try (setq org-export-latex-import-inbuffer-stuff t) > We don't need to pick any specific ones. The only one that we have to > worry about is properly quoting the OPTIONS line. I am not sure if there is anything to worry about. If you want to use the content of that line, yes, but that seems unlikely. > FYI I love the LATEX_HEADER line, I've done away with the latex > classes entirely in some recent documents. Its not in the manual yet > though. Thanks, they are now documented, but will reach the manual on the web only with the next release. - Carsten > > > Thanks. > > On Thu, Feb 19, 2009 at 08:24:39PM +0100, Carsten Dominik wrote: >> Hi Russel, >> >> can you come up with a complete list of macros you'd like >> to have defined? Right now you are leaving the guesswork to me. >> >> - Carsten >> >> On Feb 15, 2009, at 7:59 AM, Russell Adams wrote: >> >>> I think this one should be very easy! >>> >>> For each option in the export template at the head of the file, >>> could >>> we export them for use in Latex? >>> >>> For example: >>> #+AUTHOR: Russell Adams >>> >>> becomes >>> >>> \def\ORG_AUTHOR{Russell Adams} >>> >>> in the header of the Latex output? >>> >>> I'm finding myself redefining these macros, especially when I'm >>> using >>> a custom maketitle. >>> >>> Thanks. >>> >>> ------------------------------------------------------------------ >>> Russell Adams RLAdams@AdamsInfoServ.com >>> >>> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >>> >>> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >>> >>> >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Remember: use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: 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] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-20 10:05 ` Carsten Dominik @ 2009-02-20 16:33 ` Russell Adams 2009-02-21 13:03 ` Carsten Dominik 0 siblings, 1 reply; 12+ messages in thread From: Russell Adams @ 2009-02-20 16:33 UTC (permalink / raw) To: emacs org-mode mailing list On Fri, Feb 20, 2009 at 11:05:03AM +0100, Carsten Dominik wrote: > > On Feb 19, 2009, at 9:02 PM, Russell Adams wrote: > >> Carsten, >> >> I was thinking of just exporting all key/value pairs in the header >> with >> an org prefix (no - or _ or /, ie: "orgAUTHOR"). > > OK, try > > (setq org-export-latex-import-inbuffer-stuff t) That worked, the only point I may make would be to exclude LATEX_HEADER and TEXT from that list. I'm also trying to resolve an ordering issue. I want to have a header/footer line declared in the header, but I want to use these orgTITLE macros in that. Currently LATEX_HEADER and the class go first before the definitions, and TEXT occurs inside the document. If the macro isn't defined before the header/footer, you get an error. I may have to manually code those, which defeats the purpose of using the org options. Suggestions? ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-20 16:33 ` Russell Adams @ 2009-02-21 13:03 ` Carsten Dominik 2009-02-21 14:28 ` Russell Adams 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-02-21 13:03 UTC (permalink / raw) To: Russell Adams; +Cc: emacs org-mode mailing list On Feb 20, 2009, at 5:33 PM, Russell Adams wrote: > On Fri, Feb 20, 2009 at 11:05:03AM +0100, Carsten Dominik wrote: >> >> On Feb 19, 2009, at 9:02 PM, Russell Adams wrote: >> >>> Carsten, >>> >>> I was thinking of just exporting all key/value pairs in the header >>> with >>> an org prefix (no - or _ or /, ie: "orgAUTHOR"). >> >> OK, try >> >> (setq org-export-latex-import-inbuffer-stuff t) > > That worked, the only point I may make would be to exclude > LATEX_HEADER and TEXT from that list. OK, done. I think it would even make sense to remove OPTIONS, I cannot see how you would use this, would you? > I'm also trying to resolve an ordering issue. I want to have a > header/footer line declared in the header, but I want to use these > orgTITLE macros in that. Currently LATEX_HEADER and the class go first > before the definitions, and TEXT occurs inside the document. If the > macro isn't defined before the header/footer, you get an error. > > I may have to manually code those, which defeats the purpose of using > the org options. I have switched this around, these definitions now com right after the \usepackage macros, before the custom header stuff. - Carsten ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-21 13:03 ` Carsten Dominik @ 2009-02-21 14:28 ` Russell Adams 2009-02-22 18:26 ` Latex features Russell Adams 2009-02-23 0:06 ` FR: Define Latex macros from export header Russell Adams 0 siblings, 2 replies; 12+ messages in thread From: Russell Adams @ 2009-02-21 14:28 UTC (permalink / raw) To: emacs org-mode mailing list On Sat, Feb 21, 2009 at 02:03:54PM +0100, Carsten Dominik wrote: > >> That worked, the only point I may make would be to exclude >> LATEX_HEADER and TEXT from that list. > > OK, done. I think it would even make sense to remove OPTIONS, > I cannot see how you would use this, would you? I don't see that options would be terribly useful, but it doesn't conflict. Perhaps someone else would think of a use. >> I'm also trying to resolve an ordering issue. I want to have a >> header/footer line declared in the header, but I want to use these >> orgTITLE macros in that. Currently LATEX_HEADER and the class go first >> before the definitions, and TEXT occurs inside the document. If the >> macro isn't defined before the header/footer, you get an error. >> >> I may have to manually code those, which defeats the purpose of using >> the org options. > > I have switched this around, these definitions now com right > after the \usepackage macros, before the custom header stuff. I'll give that a whirl next. The file I was testing on had a unique arrangement, where I have a latex class called 'none' defined, which is exactly that, empty. Then the document start and packages were all in LATEX_HEADER lines, which worked very well. Thanks. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Latex features 2009-02-21 14:28 ` Russell Adams @ 2009-02-22 18:26 ` Russell Adams 2009-02-22 19:51 ` Carsten Dominik 2009-02-23 0:06 ` FR: Define Latex macros from export header Russell Adams 1 sibling, 1 reply; 12+ messages in thread From: Russell Adams @ 2009-02-22 18:26 UTC (permalink / raw) To: emacs-orgmode Related to the latest Latex features, I've discovered that if I have a saved document without changes and I initiate a Latex export that the document now shows changed and asks to be saved if I quit. Undo and friends don't show me that anything in the file actually changed, just the status. 6.05 didn't do this, so its recent. Any ideas? ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Re: Latex features 2009-02-22 18:26 ` Latex features Russell Adams @ 2009-02-22 19:51 ` Carsten Dominik 0 siblings, 0 replies; 12+ messages in thread From: Carsten Dominik @ 2009-02-22 19:51 UTC (permalink / raw) To: Russell Adams; +Cc: emacs-orgmode Fixed, thanks! - Carsten On Feb 22, 2009, at 7:26 PM, Russell Adams wrote: > Related to the latest Latex features, I've discovered that if I have a > saved document without changes and I initiate a Latex export that the > document now shows changed and asks to be saved if I quit. Undo and > friends don't show me that anything in the file actually changed, just > the status. > > 6.05 didn't do this, so its recent. > > Any ideas? > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: 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] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-21 14:28 ` Russell Adams 2009-02-22 18:26 ` Latex features Russell Adams @ 2009-02-23 0:06 ` Russell Adams 2009-02-26 20:19 ` Carsten Dominik 1 sibling, 1 reply; 12+ messages in thread From: Russell Adams @ 2009-02-23 0:06 UTC (permalink / raw) To: emacs-orgmode On Sat, Feb 21, 2009 at 08:28:13AM -0600, Russell Adams wrote: > >> I'm also trying to resolve an ordering issue. I want to have a > >> header/footer line declared in the header, but I want to use these > >> orgTITLE macros in that. Currently LATEX_HEADER and the class go first > >> before the definitions, and TEXT occurs inside the document. If the > >> macro isn't defined before the header/footer, you get an error. > >> > >> I may have to manually code those, which defeats the purpose of using > >> the org options. I think I got it! The issue here is that we're trying to define a _Latex_ macro with the export options, and THAT is where the resolution order becomes an issue. Could we create some org-export macros that will be translated inline? That way the header data would be replaced in the body of all export types (ascii, html, & latex)? No more need to define latex macros. ------- Example ------------ #+TITLE: This is a title ... Welcome to %%orgTITLE%%. after export: Welcome to This is a title. ---------------------------- This resolves the ordering issue and lets the metadata be used in the document, which is the original purpose. The syntax would require some consideration, but anything fairly obtuse that wouldn't be confused for a code sample would work. I like "closing" formats and would prefer multiple symbols be involved to minimize the chance of a collision. We'd likely need a OPTION for whether or not to honor these. Suggested formats: - %%orgVAR%% - (-:orgVAR:-) (credit to johnw for "Entranced by Smileys Format") - !~orgVAR~! I need to learn lisp so I can start helping with these. :P Thanks. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-23 0:06 ` FR: Define Latex macros from export header Russell Adams @ 2009-02-26 20:19 ` Carsten Dominik 2009-02-26 21:26 ` Russell Adams 0 siblings, 1 reply; 12+ messages in thread From: Carsten Dominik @ 2009-02-26 20:19 UTC (permalink / raw) To: Russell Adams; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 2506 bytes --] Hi Russel, you can now write {{{TITLE}}} and {{{EMAIL}}} etc to get these interpolated. More generally, you can write #+MACRO: name value of the macro and then write {{{name}}} to get the value interpolated. - Carsten On Feb 23, 2009, at 1:06 AM, Russell Adams wrote: > On Sat, Feb 21, 2009 at 08:28:13AM -0600, Russell Adams wrote: >>>> I'm also trying to resolve an ordering issue. I want to have a >>>> header/footer line declared in the header, but I want to use these >>>> orgTITLE macros in that. Currently LATEX_HEADER and the class go >>>> first >>>> before the definitions, and TEXT occurs inside the document. If the >>>> macro isn't defined before the header/footer, you get an error. >>>> >>>> I may have to manually code those, which defeats the purpose of >>>> using >>>> the org options. > > I think I got it! The issue here is that we're trying to define a > _Latex_ macro with the export options, and THAT is where the > resolution order becomes an issue. > > Could we create some org-export macros that will be translated inline? > That way the header data would be replaced in the body of all export > types (ascii, html, & latex)? No more need to define latex macros. > > ------- Example ------------ > > #+TITLE: This is a title > ... > Welcome to %%orgTITLE%%. > > after export: > > Welcome to This is a title. > > ---------------------------- > > This resolves the ordering issue and lets the metadata be used in the > document, which is the original purpose. > > The syntax would require some consideration, but anything fairly > obtuse that wouldn't be confused for a code sample would work. I like > "closing" formats and would prefer multiple symbols be involved to > minimize the chance of a collision. We'd likely need a OPTION for > whether or not to honor these. > > Suggested formats: > > - %%orgVAR%% > - (-:orgVAR:-) (credit to johnw for "Entranced by Smileys Format") > - !~orgVAR~! > > I need to learn lisp so I can start helping with these. :P > > Thanks. > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode [-- Attachment #1.2: Type: text/html, Size: 4118 bytes --] [-- Attachment #2: Type: text/plain, Size: 204 bytes --] _______________________________________________ Emacs-orgmode mailing list Remember: 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] 12+ messages in thread
* Re: FR: Define Latex macros from export header 2009-02-26 20:19 ` Carsten Dominik @ 2009-02-26 21:26 ` Russell Adams 0 siblings, 0 replies; 12+ messages in thread From: Russell Adams @ 2009-02-26 21:26 UTC (permalink / raw) To: emacs-orgmode Carsten, Rock on! I'll test this out shortly. Thanks. On Thu, Feb 26, 2009 at 09:19:48PM +0100, Carsten Dominik wrote: > Hi Russel, > > you can now write {{{TITLE}}} and {{{EMAIL}}} etc to get these > interpolated. > More generally, you can write > > #+MACRO: name value of the macro > > and then write {{{name}}} to get the value interpolated. > > - Carsten > > On Feb 23, 2009, at 1:06 AM, Russell Adams wrote: > >> On Sat, Feb 21, 2009 at 08:28:13AM -0600, Russell Adams wrote: >>>>> I'm also trying to resolve an ordering issue. I want to have a >>>>> header/footer line declared in the header, but I want to use these >>>>> orgTITLE macros in that. Currently LATEX_HEADER and the class go >>>>> first >>>>> before the definitions, and TEXT occurs inside the document. If the >>>>> macro isn't defined before the header/footer, you get an error. >>>>> >>>>> I may have to manually code those, which defeats the purpose of >>>>> using >>>>> the org options. >> >> I think I got it! The issue here is that we're trying to define a >> _Latex_ macro with the export options, and THAT is where the >> resolution order becomes an issue. >> >> Could we create some org-export macros that will be translated inline? >> That way the header data would be replaced in the body of all export >> types (ascii, html, & latex)? No more need to define latex macros. >> >> ------- Example ------------ >> >> #+TITLE: This is a title >> ... >> Welcome to %%orgTITLE%%. >> >> after export: >> >> Welcome to This is a title. >> >> ---------------------------- >> >> This resolves the ordering issue and lets the metadata be used in the >> document, which is the original purpose. >> >> The syntax would require some consideration, but anything fairly >> obtuse that wouldn't be confused for a code sample would work. I like >> "closing" formats and would prefer multiple symbols be involved to >> minimize the chance of a collision. We'd likely need a OPTION for >> whether or not to honor these. >> >> Suggested formats: >> >> - %%orgVAR%% >> - (-:orgVAR:-) (credit to johnw for "Entranced by Smileys Format") >> - !~orgVAR~! >> >> I need to learn lisp so I can start helping with these. :P >> >> Thanks. >> >> ------------------------------------------------------------------ >> Russell Adams RLAdams@AdamsInfoServ.com >> >> PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ >> >> Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-02-26 21:26 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-02-15 6:59 FR: Define Latex macros from export header Russell Adams 2009-02-19 19:24 ` Carsten Dominik 2009-02-19 20:02 ` Russell Adams 2009-02-20 10:05 ` Carsten Dominik 2009-02-20 16:33 ` Russell Adams 2009-02-21 13:03 ` Carsten Dominik 2009-02-21 14:28 ` Russell Adams 2009-02-22 18:26 ` Latex features Russell Adams 2009-02-22 19:51 ` Carsten Dominik 2009-02-23 0:06 ` FR: Define Latex macros from export header Russell Adams 2009-02-26 20:19 ` Carsten Dominik 2009-02-26 21:26 ` Russell Adams
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).