Command that takes optional arguments
I want to make a latex command that takes optional arguments
Code:
\newcommand{\vamt}{1.5cm} Taking the following as example, I get a "1.5cm" vertical space between "Paragraph 1" and "Paragraph 2". But instead of getting "2cm" between "Paragraph 2" and "Paragraph 3", I am simply getting "2cm" being printed as text, with the paragraph spacing still at "1.5cm". Code:
To prove it by contradiction try and assume that the statement is false, |
Quote:
Quote:
Quote:
Quote:
Latex is a very detailed and specialized documentation preparation system. There are a number of ways to attain certain results. Please bear in mind that it may be very helpful to give a visual description of the desired outcome, as opposed to asking about various terms. Anyone trying to help would want to know how you wish the results to appear as and also where you did try something, how the result did not match your desired outcome. Many times, input accompanied by desired output, as well as interim not fully resolved output will help people understand what each goal is. |
Well, in other thread (now closed) should
command be called with \vspc[2] instead of \vspc{2}. |
People have been continuing to close my post saying they were duplicates, but which were not. This place is quite depressing when people are allowed to mess with other people's posts.
|
I wouldn't know about it. I am mostly lurking here once in a week. I hope I helped with the latex.
|
Quote:
If you have an issue with a particular post that was closed you should contact a moderator with your concerns. As I understand it such decisions are not arbitrary but actually based on the content of the post that gets closed and all related posts. |
Quote:
|
Quote:
If you feel a thread has been closed incorrectly, please use the Report button to request reopening of a thread, however it is also best to provide supporting information and revised content for the post of the thread in question so that the moderators may amend your thread question to make it more clear. Without proper context and revised content, the moderators may have little choice except to leave certain threads closed. Members please stay on topic in this thread moving forwards. Some additional information has been requested here and there have not been any additional details provided. Please see post #2 for the additional details. Being more clear with your question by providing example input/output and explaining the details about what exactly you have tried, what you expected to occur, and what instead occurred are extremely important with questions about a technical documentation preparation system. Please remember that all LQ members are volunteers and not paid support, therefore their participation is voluntary. Here are some helpful links: The Welcome to LQ page with some guidance for questions The Project Tools FAQ which provides further forum usage info and links to help write effective questions The LQ rules which provides the site rules but also some good guidelines as to how to post If there are any further questions, the Report action can be used, the Contact Us link at the bottom of the page can be used for questions, or members can private message me with their questions. Singular complaints alone are not always helpful because they do not always explain person's points clearly. Best Regards. |
Quote:
When I threw together a quick-n-dirty LaTeX document (using the 'article' documentclass) and tried the OP's '\vspc' and '\vspc[2cm]' newcommands, I get paragraph spacing of 2cm and 3cm, respectively. Not sure why the spacing but LaTeX (or, rather, TeX) does some intelligent formatting that may be affecting the exact spacing that the OP is looking for. (Especially when you include images, etc.) In the example I slapped together that generated those results, I thought that orphan/widow adjustments may have played a role in the paragraph spacing I wound up with (the resulting PDF had two lines of text on page two). But, removing a few sentences to shorten the paragraphs to produce a one-page output without any orphans or widows showed that this wasn't the case. OP: Can you generate a PDF of what you're attempting to produce and attach it. Your newcommand is working. Well, it's doing something. Interestingly, '\vspc[0cm]' results in a standard no-blank-lines paragraph spacing. Is there a reason why you don't simply use '\vspace{1.5}'? If I use that between paragraphs where I want that spacing, I get exactly 1.5cm. Define a newcommand that hard codes the 1.5cm. If that's the standard spacing you want, you can set that using '\setlength{\parskip}{1.5cm}' (which I suspect you already know). Then, for special cases, use '\vspace{custom-amount}' HTH... |
All times are GMT -5. The time now is 02:44 PM. |