We help IT Professionals succeed at work.

In Latex, how do I start a remark on a fresh line?

1,699 Views
Last Modified: 2013-12-02
The construction: \remark in Latex is used like this:
\remark This is an obvious comment.
The resulting output is:
Remark 1 This is an obvious comment.
I wish it to be:
Remark 1
This is an obvious comment. (starting on a fresh line)
I think it is done using the \renewcommand or \newcommand functions.
I would be interested in both if someone is willing to help.
Comment
Watch Question

fridomCEO/Programmer
CERTIFIED EXPERT

Commented:

Author

Commented:
fridom
Thanks, but too involved - no items involved for example.
I just want the call: \remark give output that I would expect to result from "\\" or \newline but it will not accept it.
I want the output to be:
Remark 1
The Romans used special characters to construct their number system.
Remark 2
The Arabians used the system we adopt today.
fridomCEO/Programmer
CERTIFIED EXPERT

Commented:
I'm short on time and can not look into it further what happens if you try
\remark { \\ Text I want on it's one line} ?

you should really check the above mentioned page and come up with a small command
for your purpose....

Author

Commented:
No the new comment refers me back to the previous one.
Previous experience tells me that Oklit could solve this problem easily.
Keith
I don't know the \remark command but I guess it is a modification of the enumerate environment's \item command. In which case you might think this would do what you want:

\renewcommand{\theenumi}{Remark \arabic{enumi} \\ }

However it does not, and I don't have the expertise to give you your preferred solution, sorry. I can however offer you this hack:

\remark \ \\ This is an obvious comment

It works on the principle that an item (remark?) is allowed to include a new line character as long as it is not the first character.

Hope this helps.

Author

Commented:
Yes, your second suggestion works, but it is not automatic - you have to be diligent and I have hundreds of remarks.
My original request for a proper modification of \remark is justified.
Keith
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Would have liked to use renewcommand and retain \remark but no a big issue.
Cannot, however, understand why renewcommand will not work.
Keith
I think I've cracked it! My previous attempts failed due to problems with recursive definition of remark and not knowing how to correctly pass on the arguments. Both of these problems appear to be solved with this:

% take a `snapshot' of the remark command
\let\oldremark\remark  
% redefine remark based upon the `snapshot'
\renewcommand\remark[2][]{\oldremark{#1}\ \\ #2}

Admittedly, this assumes that your \remark command is a redefinition of \item and that two parameters were passed-on when remark was defined. If only one argument was passed, then it may be necessary to use this version:

\let\oldremark\remark
\renewcommand\remark[1][]{\oldremark{}\ \\ #1}

Author

Commented:
To sailingbye
Many thanks - used the latter.
Keith

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.