Re: complex renewcommand \cite
On 2012-11-24 18:20:45 +, Richard Heck said: On 11/23/2012 09:59 AM, Andreas Paeffgen wrote: I want to get a different \cite command in the document. If i put \renewcommand{\cite}{\texorpdfstring{\cite{%}}{} } in the preamble i get an emergency stop. This causes an infinite loop. \cite gets unpacked into something involving \cite, which gets unpacked into something else involving \cite, etc. Not so good. The problem is that LaTeX does not expand \cite when you give this command, but only when \cite itself is expanded. That is: \cite, even though it is a command, works like a variable. Consider: \newcommand\mystuff{a} \newcommand\inparens{(\mystuff)} \inparens \renewcommand\mystuff{b} \inparens This will print "(a)" then "(b)". This is actually quite useful sometimes, and could equally well be done with more complicated commands. (This kind of thing is done in the LaTeX core all the time.) The standard way around this kind of thing is: \let\oldcite=\cite and then you redefine \cite in terms of \oldcite. The point is that \let actually assigns the *expanded* form (at that point) of \cite to \oldcite, rather than making \oldcite an alias for \cite (which would just give us the other problem back again). So, e.g.: \let\stuff=\mystuff \renewcommand\mystuff{c} \stuff will still print "b", not "c". Richard I am not sure if i adapted your idea correctly. If i set in the preamble the following code \newcommand\newcite{\texorpdfstring{\cite%}{}} \let\cite=\newcite Latex stops with the following error: Runaway argument? {\texorpdfstring {\cite \let \cite =\newcite \par \renewcommand {\bibsection \E TC. If i do not put % latex loops forever. Any idea what i made wrong? Two sample tex file are attached. The Test_orig.tex still compiles but does not have the preamble changes. Andreas test.tex Description: Binary data Test_orig.tex Description: Binary data
complex renewcommand \cite
I want to get a different \cite command in the document. If i put \renewcommand{\cite}{\texorpdfstring{\cite{%}}{} } in the preamble i get an emergency stop. If i use the expandet command in an ERT, it works. See the attached test.lyx test.lyx Description: Binary data Any suggestions what i do wrong? I need only one variable. the last {} should be empty all the time. \texorpdfstring{\cite{Gilbert}}{} This is the text in ERT and this works. Andreas
Re: Appendix and Bibliographie
Quoting the memoir manual: "If you want to change the heading, redefine \bibsection. For example, to have the bibliography as a numbered section instead of an unnumbered chapter, redefine it like \renewcommand{\bibsection}{% \section{\bibname} \prebibhook}" In your case, replace \section by \chapter in the quoted redefinition. HTH Jürgen Thanks, that helped. And i got the manual for memoir.sty. Pretty extensive. Andreas
Appendix and Bibliographie
On MacOS 10.7.4, Lyx 2.05. Document style: book (memoir) When i put a bibliography inside an appandix, it does not get numbered. I want the bibliography shown as a normal Appendix entry. Now in TOC and Text Appendix A This Appendix B That Bibliography Wanted in Toc and Text Appendix A This Appendix B That Appendix C Bibliography Is this easy to achieve, without a own .sty? Any hints would be great. ap
Re: href for footnote / endnote (Solved)
On 2012-11-14 12:11:01 +, PhilipPirrip said: On 11/13/2012 10:05 PM, Andreas Paeffgen wrote: Any hint/ suggestion would be appreciated. Export LaTeX from LyX and compare with the file that works. It is probably something about the order in which the packages (commands) are called. Ok, the order of the packages is wrong. You can not use the modules "endnotes", "footnote to endnote", but you have to insert in the preamble the following commands. \usepackage{endnotes} \usepackage{hyperendnotes} \let\footnote=\endnote Then everything works as expected. Thanks to all for the great help AP
Re: href for footnote / endnote
On 2012-11-12 07:39:23 +, PhilipPirrip said: If one tries to google for "hyperref endnotes clickable" he will find some solutions. There's also a hyperendnotes.sty that some say works. test.lyx Description: Binary data test.tex Description: Binary data error.log Description: Binary data hyperendnotes.sty Description: Binary data In latex the hyperendnotes.sty works, but not in lyx. See the attached files. Maybe someone could shed a light, whats going wrong in Lyx? The .sty file is located in /Users/myuser/Library/texmf/tex/latex and /Users/myuser/Library/texmf/tex/latex/lyx \Hy@SectionHShift=\skip43 ) (/Users/myuser/Library/texmf/tex/latex/hyperendnotes.sty \c@Hendnote=\count99 This is the section from the error.log where the .sty file is referenced to. Got it loaded or skiped? Any hint/ suggestion would be appreciated.
Re: href for footnote / endnote
On 2012-11-09 15:49:11 +, PhilipPirrip said: On 11/09/2012 04:05 PM, Andreas Paeffgen wrote: Hi Philip, that works, but i do not want to insert manual labels and references. I just want the footnotes to be klickable. The footnotes in my example are clickable even without using labels. What version of LyX are you using. Can you upload your minimal example that does (not) work. i attached one example with modifications to the labels (deleted) and my configuration: module footnote to endnote and documenttyp koma_book. Also is your example attached, where only the module footnote to endnote and endnote is added. Deleting the endnote module still breaks hyperref. hyper_endnote.lyx Description: Binary data hyper_footnote1.lyx Description: Binary data It seams that the module footnote to endnote breaks the hyperref function. The footnote example without the labels and no module worked properly. Is it a lyx or latex problem? Any further suggestions?
Re: href for footnote / endnote
On 2012-11-09 14:43:45 +, PhilipPirrip said: Does the attached example work for you? Hi Philip, that works, but i do not want to insert manual labels and references. I just want the footnotes to be klickable. In a printed document it does not mater, but in a ebook /pdf it is more comfortable. Do you have any suggestion how to achieve that in a preamble comand? Any other global document options i set the same to yours, but that did not work. Thanks for any further help and suggestions. Andreas
Re: href for footnote / endnote
On 2012-11-09 14:12:00 +, Richard Heck said: On 11/09/2012 09:03 AM, Andreas Paeffgen wrote: Is there a possibilty to get the footnote / endnote numbers in a pdf document as links? Hyperref does this, I believe. You can turn it on under Document>Settings>PDF Options. rh Thanks for your answer, rh. I already use this option, but without additional parameters. All the footnotes / endnotes are only numbered, without beeing a link. All other links function properly, eg. toc. Any further suggestions? ap
href for footnote / endnote
Is there a possibilty to get the footnote / endnote numbers in a pdf document as links? Is the href package the only one related to links in pdf? Is there an other workaround? Lyx 2.04 on Macos 10.7.4 Thanks for any hints. Best regards Andreas
Strange Temp directory used
MacOS 10.7.4, Lyx 2.04 In the preferences of Lyx i set the temp directory path to /Users/MyUser/Documents/TMP. But Lyx uses the following path to create tmp files: /private/var/folders/c9.. Is there a way force Lyx to use the path in the preferences? Andreas
Re: LF in latex export
Thanks for all your helpful comments and hints. I see that such fancy editors like Texmaker / Texshop have some real disadvantages in case of debugging / error finding and some slight advantages in content visibilty. I try to live with the LF per line and fidle with the 65 charakters per line options. Andreas
LF in latex export
On Macos 10.7.4, Lyx 2.0.4 i want to export a Lyx document to normal Latex. I noticed, that in the exported document, each line has a LineFeed (LF) even though it is not the end of a paragraph. If you open the Lyx document in a text editor, each line has a LineFeed too. If you export to open document and from there to latex, the document preserves the LineFeed for the end of a paragraph. Only every paragraph in LibreOffice and the exported latex file has a LF. How can i achieve a direct exported latex file from Lyx with a LineFeed only after each paragraph? Reason: Latex compiles the exported files fine, but editing in a Latex Editor like TexMaker gets pretty nasty with a LF for each line and not only for each paragraph. Any hints, comments?