Re: Document-internal hyperlinks
Am 23.05.2010 05:56, schrieb Shawn Willden: Okay, with the help of the kind folks on comp.text.tex, I have a solution. In the generated LaTeX file containing the actual text of the statutes, which is included in the LyX document, I modified my script to insert: \begingroup \renewcommand*{\thepara}{76-10-500}% \refstepcounter{para}% \label{code:76-10-500}% \endgroup Before the \paragraph containing each statute. Can you send me a LyX file in a private message to see how you've done this in LyX? Maybe I can simplify it a bit or create a LyX layout file so that people can use this solution without having to write LaTeX code. Many thanks in advance and regards Uwe
Re: Document-internal hyperlinks
On Thu, May 20, 2010 at 1:15 PM, Uwe Stöhr wrote: > I failed to achieve this in LaTeX. But when you ask this question on the > comp.text.text newsgroup you will surely get a reply how to do this with > LaTeX. If you know the solution for LaTeX, please report back and I'll help > you to get it to work in an appropriate way in LyX. Okay, with the help of the kind folks on comp.text.tex, I have a solution. In the generated LaTeX file containing the actual text of the statutes, which is included in the LyX document, I modified my script to insert: \begingroup \renewcommand*{\thepara}{76-10-500}% \refstepcounter{para}% \label{code:76-10-500}% \endgroup Before the \paragraph containing each statute. I also had to add: \newcounter{para} at the top of this file (or I could have put it in the LyX document preamble). With that done, I can use normal references. What I did was to use formatted references and define: \newrefformat{code}{\S\ref{#1} on page \pageref{#1}} The result is very nice. The references get formatted like "76-10-500 on page 32" and clicking them in the PDF takes you directly to the referenced statute, not just within a page or two of it. -- Shawn
Re: Document-internal hyperlinks
Am 16.05.2010 20:41, schrieb Shawn Willden: What I'd really like is for something like: begin example \label{code:53-5-703}\paragraph{...}... ... As can be seen in \hyperlink{code:53-5-703}{53-5-703}, the composition of the board is... -end example- where the first parameter to my hypothetical hyperlink function is the label to be referenced and the second is the text of the reference. I failed to achieve this in LaTeX. But when you ask this question on the comp.text.text newsgroup you will surely get a reply how to do this with LaTeX. If you know the solution for LaTeX, please report back and I'll help you to get it to work in an appropriate way in LyX. I would like to post the result at the LyX Wiki so that others can use the same solution for legal texts. thanks in advance and regards Uwe
Document-internal hyperlinks
I need to create some hyperlinks in the PDF version of my LyX document. Basically, they're cross references, but none of the available cross-reference formats do what I want. One portion of my document (article class) has \paragraphs containing chunks of legal code. The paragraph title is the code section and title, like: \paragraph{53-5-703. Board -- Membership -- Compensation -- Terms -- Duties} Then from other places in the text I reference the statues by code section (e.g. 53-5-703) and sometimes by sub-paragraph (e.g. 53-5-703(3)(a)). Ideally, I'd like all those references to be hyperlinks to the text of the statute. The portion of the document that contains all of the statutes is an included LaTeX file which is programmatically generated, so I can easily add labels to every section and paragraph. The problem is how to reference them and to get the references formatted the way I'd like. What I'd really like is for something like: begin example \label{code:53-5-703}\paragraph{...}... ... As can be seen in \hyperlink{code:53-5-703}{53-5-703}, the composition of the board is... -end example- where the first parameter to my hypothetical hyperlink function is the label to be referenced and the second is the text of the reference. I can almost make formatted references do what I want. If I define: \newrefformat{code}{#1} and insert Formatted Reference cross references, then I get "code:53-5-703" -- but it's not a hyperlink and I need to remove the "code:". If I define: \newrefformat{code}{\ref{#1}} then I get a hyperlinked reference to the section containing the relevant paragraph but (a) it's not to the paragraph itself, and the sections can be several pages long, and (b) the text of the hyperlink is the section number (e.g. 4.3), rather than the code section number. Any suggestions? Thanks, -- Shawn